Replaced all occurences of str(n)casecmp with gmx_str(n)casecmp.
authorErik Lindahl <lindahl@cbr.su.se>
Sun, 22 Aug 2010 20:33:30 +0000 (22:33 +0200)
committerErik Lindahl <lindahl@cbr.su.se>
Sun, 22 Aug 2010 20:33:30 +0000 (22:33 +0200)
53 files changed:
include/string2.h
src/gmxlib/atomprop.c
src/gmxlib/checkpoint.c
src/gmxlib/filenm.c
src/gmxlib/futil.c
src/gmxlib/index.c
src/gmxlib/libxdrf.c
src/gmxlib/matio.c
src/gmxlib/nrama.c
src/gmxlib/pargs.c
src/gmxlib/pdbio.c
src/gmxlib/readinp.c
src/gmxlib/strdb.c
src/gmxlib/string2.c
src/gmxlib/tpxio.c
src/gmxlib/wman.c
src/gmxlib/xvgr.c
src/kernel/add_par.c
src/kernel/g_x2top.c
src/kernel/gctio.c
src/kernel/gen_vsite.c
src/kernel/gpp_bond_atomtype.c
src/kernel/h_db.c
src/kernel/hizzie.c
src/kernel/nm2type.c
src/kernel/pdb2gmx.c
src/kernel/pdb2top.c
src/kernel/pgutil.c
src/kernel/readir.c
src/kernel/readpull.c
src/kernel/resall.c
src/kernel/specbond.c
src/kernel/ter_db.c
src/kernel/tomorse.c
src/kernel/topdirs.c
src/kernel/topio.c
src/kernel/toppush.c
src/kernel/vsite_parm.c
src/kernel/xlate.c
src/mdlib/gmx_qhop_xml.c
src/ngmx/dialogs.c
src/ngmx/xdlg.c
src/ngmx/xdlghi.c
src/ngmx/xstat.c
src/tools/dlist.c
src/tools/gmx_cluster.c
src/tools/gmx_enemat.c
src/tools/gmx_energy.c
src/tools/gmx_genbox.c
src/tools/gmx_genion.c
src/tools/gmx_hbond.c
src/tools/gmx_membed.c
src/tools/make_ndx.c

index fa4551fc644aea64a04e5725c45789ae2b7f16f5..5077c3409b7ef3516dbf6b5f7f45508b78eff4a2 100644 (file)
@@ -84,8 +84,8 @@ void trim (char *str);
 
 void nice_header (FILE *out,const char *fn);
 
-int strcasecmp_min(const char *str1, const char *str2);
-int strncasecmp_min(const char *str1, const char *str2, int n);
+int gmx_strcasecmp_min(const char *str1, const char *str2);
+int gmx_strncasecmp_min(const char *str1, const char *str2, int n);
 /* This funny version of strcasecmp, is not only case-insensitive,
  * but also ignores '-' and '_'.
  */
index 1ee8f1b7d34064f21349e59e33e6d2e678eedb04..f787d08884e0dde2a980a45a41594e084d6b8c9b 100644 (file)
@@ -355,7 +355,7 @@ int gmx_atomprop_atomnumber(gmx_atomprop_t aps,const char *elem)
   
   set_prop(aps,epropElement);
   for(i=0; (i<ap->prop[epropElement].nprop); i++) {
-    if (strcasecmp(ap->prop[epropElement].atomnm[i],elem) == 0) {
+    if (gmx_strcasecmp(ap->prop[epropElement].atomnm[i],elem) == 0) {
       return gmx_nint(ap->prop[epropElement].value[i]);
     }
   }
index d33b85b41a2e0f6d02a3c633c408c8bd8ac42d5a..ee4bf8f0ea32b5bf3088a0e549bf1c18d8db564f 100644 (file)
@@ -2106,7 +2106,7 @@ bool read_checkpoint_simulation_part(const char *filename, int *simulation_part,
                 }
                 fn = outputfiles[0].filename;
                 if (strlen(fn) < 4 ||
-                    strcasecmp(fn+strlen(fn)-4,ftp2ext(efLOG)) == 0)
+                    gmx_strcasecmp(fn+strlen(fn)-4,ftp2ext(efLOG)) == 0)
                 {
                     gmx_fatal(FARGS,"File appending requested, but the log file is not the first file listed in the checkpoint file");
                 }
index 3aafd395ad84c511a3b4a35d78f35a88c08235e8..b26b34dcd9085e8e5d54906c400adfad734feeaa 100644 (file)
@@ -545,7 +545,7 @@ int fn2ftp(const char *fn)
 
     for (i = 0; (i < efNR); i++)
         if ((eptr = deffile[i].ext) != NULL)
-            if (strcasecmp(feptr, eptr) == 0)
+            if (gmx_strcasecmp(feptr, eptr) == 0)
                 break;
 
     return i;
@@ -560,7 +560,7 @@ static void set_extension(char *buf, int ftp)
     df = &(deffile[ftp]);
     len = strlen(buf);
     extlen = strlen(df->ext);
-    if ((len <= extlen) || (strcasecmp(&(buf[len - extlen]), df->ext) != 0))
+    if ((len <= extlen) || (gmx_strcasecmp(&(buf[len - extlen]), df->ext) != 0))
         strcat(buf, df->ext);
 }
 
@@ -661,7 +661,7 @@ static void set_filenm(t_filenm *fnm, const char *name, bool bCanNotOverride,
             extlen = strlen(z_ext[i]);
             if (len > extlen)
             {
-                if (strcasecmp(name+len-extlen,z_ext[i]) == 0)
+                if (gmx_strcasecmp(name+len-extlen,z_ext[i]) == 0)
                 {
                     buf[len-extlen]='\0';
                     break;
index 669b19c1f4e40f41dab11847e525e8e835d7ac7c..4a85ecfbd923cd69f74199bf693f7a1ee2f847fc 100644 (file)
@@ -754,7 +754,7 @@ bool get_libdir(char *libdir)
      * too, or we wont be able to detect that the file exists
      */
 #if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || defined __CYGWIN__ || defined __CYGWIN32__)
-    if(strlen(bin_name)<3 || strncasecmp(bin_name+strlen(bin_name)-4,".exe",4))
+    if(strlen(bin_name)<3 || gmx_strncasecmp(bin_name+strlen(bin_name)-4,".exe",4))
         strcat(bin_name,".exe");
 #endif
 
index 38f24c9c42a52d13c5cc515f7fa50548dda0c42c..2f4d94fcfa49473b4f42134381fc293eb60922bf 100644 (file)
@@ -341,8 +341,8 @@ static void analyse_prot(const char ** restype,t_atoms *atoms,
   };
   const int  wholename[NCH]  = { -1, 0,-1,-1,-1,-1,-1,-1, 11,-1 };
   /* the index in wholename gives the first item in the arrays of 
-   * atomtypes that should be tested with 'strncasecmp' in stead of
-   * strcasecmp, or -1 if all items should be tested with strcasecmp
+   * atomtypes that should be tested with 'gmx_strncasecmp' in stead of
+   * gmx_strcasecmp, or -1 if all items should be tested with strcasecmp
    * This is comparable to using a '*' wildcard at the end of specific
    * atom names, but that is more involved to implement...
    */
@@ -383,10 +383,10 @@ static void analyse_prot(const char ** restype,t_atoms *atoms,
          while (isdigit(atnm[0]))
            atnm++;
          if ( (wholename[i]==-1) || (j<wholename[i]) ) {
-           if (strcasecmp(chains[i][j],atnm) == 0)
+           if (gmx_strcasecmp(chains[i][j],atnm) == 0)
              match=TRUE;
          } else {
-           if (strncasecmp(chains[i][j],atnm,strlen(chains[i][j])) == 0)
+           if (gmx_strncasecmp(chains[i][j],atnm,strlen(chains[i][j])) == 0)
              match=TRUE;
          }
        }
@@ -411,7 +411,7 @@ static void analyse_prot(const char ** restype,t_atoms *atoms,
          for(;((atoms->atom[n].resind==resind) && (n<atoms->nr));n++) {
            match=FALSE;
            for(j=0;(j<sizes[i]); j++) 
-             if (strcasecmp(chains[i][j],*atoms->atomname[n]) == 0)
+             if (gmx_strcasecmp(chains[i][j],*atoms->atomname[n]) == 0)
                match=TRUE;
            if (match != complement[i])
              aid[nra++]=n;
@@ -936,7 +936,7 @@ int find_group(char s[], int ngrps, char **grpname)
   /* first look for whole name match */
   if (aa==NOTSET)
     for(i=0; i<ngrps; i++)
-      if (strcasecmp_min(s,grpname[i])==0) {
+      if (gmx_strcasecmp_min(s,grpname[i])==0) {
        if(aa!=NOTSET)
          bMultiple = TRUE;
        aa=i;
@@ -944,7 +944,7 @@ int find_group(char s[], int ngrps, char **grpname)
   /* second look for first string match */
   if (aa==NOTSET)
     for(i=0; i<ngrps; i++)
-      if (strncasecmp_min(s,grpname[i],n)==0) {
+      if (gmx_strncasecmp_min(s,grpname[i],n)==0) {
        if(aa!=NOTSET)
          bMultiple = TRUE;
        aa=i;
index 6a41f76d36f8ae3ed8b0552bd3a5654f7620052f..93072680074c302083ed2112939bf1dc4c8f1f6a 100644 (file)
@@ -409,7 +409,7 @@ int xdropen(XDR *xdrs, const char *filename, const char *type) {
         strcpy(newtype, "ab+");
         lmode = XDR_ENCODE;
     }
-    else if (strncasecmp(type, "r+", 2) == 0)
+    else if (gmx_strncasecmp(type, "r+", 2) == 0)
     {
         xdrmodes[xdrid] = 'a';
         strcpy(newtype, "rb+");
index 68b65c76175e02cc8b23f8fb94e25cf4dbf6e769..c521d4a4bc0705554cd038aa11ee12ffac90c247 100644 (file)
@@ -286,7 +286,7 @@ void read_xpm_entry(FILE *in,t_matrix *mm)
     parsestring(line,"y-label",(mm->label_y));
     parsestring(line,"type",buf);
   }
-  if (buf[0] && (strcasecmp(buf,"Discrete")==0))
+  if (buf[0] && (gmx_strcasecmp(buf,"Discrete")==0))
     mm->bDiscrete=TRUE;
    
   if (debug)
index 812bf83fc30ba49be8d4fa8d50ec981e03427896..8fff5ae594c3616d659bbd3e1b9becaf9b562ee5 100644 (file)
@@ -208,18 +208,18 @@ static void get_dih2(t_xrama *xr,t_functype functype[],
       
       for(j=0; (j<NPP); j++)
        thisff[j]=-1;
-      if (strcasecmp(cai,"C") == 0) {
+      if (gmx_strcasecmp(cai,"C") == 0) {
        /* May be a Phi angle */
-       if ((strcasecmp(caj,"N") == 0) &&
-           (strcasecmp(cak,"CA") == 0) &&
-           (strcasecmp(cal,"C") == 0))
+       if ((gmx_strcasecmp(caj,"N") == 0) &&
+           (gmx_strcasecmp(cak,"CA") == 0) &&
+           (gmx_strcasecmp(cal,"C") == 0))
          thisff[0]=ai,thisff[1]=aj,thisff[2]=ak,thisff[3]=al;
       }
-      else if (strcasecmp(cai,"N") == 0) {
+      else if (gmx_strcasecmp(cai,"N") == 0) {
        /* May be a Psi angle */
-       if ((strcasecmp(caj,"CA") == 0) &&
-           (strcasecmp(cak,"C") == 0) &&
-           (strcasecmp(cal,"N") == 0))
+       if ((gmx_strcasecmp(caj,"CA") == 0) &&
+           (gmx_strcasecmp(cak,"C") == 0) &&
+           (gmx_strcasecmp(cal,"N") == 0))
          thisff[1]=ai,thisff[2]=aj,thisff[3]=ak,thisff[4]=al;
       }
       if (thisff[1] != -1) {
index dc6f859823db06150fd173764d8c29413c8f3736..8095f52f826a77066096b4b0706a140eee683f77 100644 (file)
@@ -111,7 +111,7 @@ void get_pargs(int *argc,char *argv[],int nparg,t_pargs pa[],bool bKeepArgs)
                         for(k=1; (pa[j].u.c[k] != NULL); k++)
                             /* only check ptr against beginning of 
                                pa[j].u.c[k] */
-                            if (strncasecmp(ptr,pa[j].u.c[k],strlen(ptr)) == 0)
+                            if (gmx_strncasecmp(ptr,pa[j].u.c[k],strlen(ptr)) == 0)
                                 if ( ( match == NOTSET ) || 
                                         ( strlen(pa[j].u.c[k]) < 
                                           strlen(pa[j].u.c[match]) ) )
index f96515edc60d1bee226bd5a8ac4a2476f463f9f8..48f4eccad7ba7d4ca7dff7bf56fac0cb0bc4c57f 100644 (file)
@@ -323,7 +323,7 @@ void write_pdbfile_indexed(FILE *out,const char *title,
             "%-6s%5u %-4.4s %3.3s %c%4d%c   %10.5f%10.5f%10.5f%8.4f%8.4f    %2s\n");
     else {
       /* Check whether atomname is an element name */
-      if ((strlen(nm)<4) && (strcasecmp(nm,atoms->atom[i].elem) != 0))
+      if ((strlen(nm)<4) && (gmx_strcasecmp(nm,atoms->atom[i].elem) != 0))
        strcpy(pdbform,pdbformat);
       else {
        strcpy(pdbform,pdbformat4);
index 6288c01e8bf57ac3b35adcf95e722a94dffa8c1e..976ce1a6c5ac1cea6a3a998dfdbbfdafb0ec33c4 100644 (file)
@@ -115,14 +115,14 @@ t_inpfile *read_inpfile(const char *fn,int *ninp,
            int found_index;
            
            /* first check whether we hit the 'multiple_entries' option */
-           if (strcasecmp_min(eMultentOpt_names[eMultentOptName], lbuf)==0) 
+           if (gmx_strcasecmp_min(eMultentOpt_names[eMultentOptName], lbuf)==0) 
            {
              /* we now check whether to allow overrides from here or not */
-             if (strcasecmp_min(eMultentOpt_names[eMultentOptNo], rbuf)==0)
+             if (gmx_strcasecmp_min(eMultentOpt_names[eMultentOptNo], rbuf)==0)
              {
                allow_override=FALSE;
              }
-             else if (strcasecmp_min(eMultentOpt_names[eMultentOptLast], rbuf)==0)
+             else if (gmx_strcasecmp_min(eMultentOpt_names[eMultentOptLast], rbuf)==0)
              {
                allow_override=TRUE;
              }
@@ -249,7 +249,7 @@ void replace_inp_entry(int ninp,t_inpfile *inp,const char *old_entry,const char
   int  i;
   
   for(i=0; (i<ninp); i++) {
-    if (strcasecmp_min(old_entry,inp[i].name) == 0) {
+    if (gmx_strcasecmp_min(old_entry,inp[i].name) == 0) {
       if (new_entry) {
        fprintf(stderr,"Replacing old mdp entry '%s' by '%s'\n",
                inp[i].name,new_entry);
@@ -271,7 +271,7 @@ static int search_einp(int ninp, const t_inpfile *inp, const char *name)
   if (inp==NULL)
     return -1;
   for(i=0; i<ninp; i++)
-    if (strcasecmp_min(name,inp[i].name) == 0)
+    if (gmx_strcasecmp_min(name,inp[i].name) == 0)
       return i;
   return -1;
 }
@@ -285,7 +285,7 @@ static int get_einp(int *ninp,t_inpfile **inp,const char *name)
 /*  if (inp==NULL)
     return -1;
   for(i=0; (i<(*ninp)); i++)
-    if (strcasecmp_min(name,(*inp)[i].name) == 0)
+    if (gmx_strcasecmp_min(name,(*inp)[i].name) == 0)
       break;
   if (i == (*ninp)) {*/
   i=search_einp(*ninp, *inp, name);
@@ -425,7 +425,7 @@ int get_eeenum(int *ninp,t_inpfile **inp,const char *name,const char **defs,
   }
   
   for(i=0; (defs[i] != NULL); i++)
-    if (strcasecmp_min(defs[i],(*inp)[ii].value) == 0)
+    if (gmx_strcasecmp_min(defs[i],(*inp)[ii].value) == 0)
       break;
   
   if (defs[i] == NULL) {
index 9b03172d4d779c030c703d31f40ed1c7a2b9f756..74afa6fe17389e335ed3b4b07f8c76f1a63e8e31 100644 (file)
@@ -136,7 +136,7 @@ int search_str(int nstr,char **str,char *key)
 
   /* Linear search */
   for(i=0; (i<nstr); i++)
-    if (strcasecmp(str[i],key)==0)
+    if (gmx_strcasecmp(str[i],key)==0)
       return i;
 
   return -1;
index 0c7928be7bfe6f5494714a3e04c03447b484097f..7243cbb037b3c15847b0246cf43527f74f203158 100644 (file)
@@ -225,7 +225,7 @@ void nice_header (FILE *out,const char *fn)
   fprintf (out,"%c\n",COMMENTSIGN);
 }
 
-int strcasecmp_min(const char *str1, const char *str2)
+int gmx_strcasecmp_min(const char *str1, const char *str2)
 {
   char ch1,ch2;
   
@@ -243,7 +243,7 @@ int strcasecmp_min(const char *str1, const char *str2)
   return 0; 
 }
 
-int strncasecmp_min(const char *str1, const char *str2, int n)
+int gmx_strncasecmp_min(const char *str1, const char *str2, int n)
 {
   char ch1,ch2;
   char *stri1, *stri2;
index a6bc3ced4f0c37bdd03224d9886297a27ba53e3c..dea198ffa42a17f8aa925f7a31027a792ec86823 100644 (file)
@@ -188,9 +188,9 @@ static void _do_section(t_fileio *fio,int key,bool bRead,const char *src,
       
       do {
        gmx_fio_do_string(fio,buf);
-      } while ((strcasecmp(buf,itemstr[key]) != 0));
+      } while ((gmx_strcasecmp(buf,itemstr[key]) != 0));
       
-      if (strcasecmp(buf,itemstr[key]) != 0) 
+      if (gmx_strcasecmp(buf,itemstr[key]) != 0) 
        gmx_fatal(FARGS,"\nCould not find section heading %s",itemstr[key]);
       else if (gmx_fio_getdebug(fio))
        fprintf(stderr," and found it\n");
index 8d261efdae7c4fb0b332b34e9ae1ab8127b36218..0e2fa8f540314b893052c100fb5574d066d768e7 100644 (file)
@@ -284,7 +284,7 @@ static char *html_xref(char *s,const char *program, t_linkdata *links,bool bWiki
     links->nsr=n;
     snew(links->sr,n);
     for(i=0,j=0; (i<n); i++) {
-      if (!program || (strcasecmp(program,filestr[i])  != 0)) {
+      if (!program || (gmx_strcasecmp(program,filestr[i])  != 0)) {
        links->sr[j].search=strdup(filestr[i]);
        if (bWiki)
          sprintf(buf,"[[%s]]",filestr[i]);
index 761df015f744b89dcc967e086de247a61188848c..d565ea154cc0c06de1797041b0335e67d1d06756 100644 (file)
@@ -182,7 +182,7 @@ static char *xvgrstr(const char *gmx,const output_env_t oenv,
                 /* Check for special symbol */
                 i = 0;
                 while (sym[i] != NULL &&
-                       strncasecmp(sym[i],gmx+g,strlen(sym[i])) != 0)
+                       gmx_strncasecmp(sym[i],gmx+g,strlen(sym[i])) != 0)
                 {
                     i++;
                 }
index 09c5c587e54aeed2d0bdb390284efa0551a1803f..02b296e9da48c25af21acd4bd1085681b4fcf680 100644 (file)
@@ -223,7 +223,7 @@ int search_jtype(t_restp *rtp,char *name,bool bNterm)
     }
     for(j=0; (j<rtp->natom); j++) {
       rtpname=*(rtp->atomname[j]);
-      if (strcasecmp(searchname,rtpname) == 0) {
+      if (gmx_strcasecmp(searchname,rtpname) == 0) {
        jmax=j;
        kmax=strlen(searchname);
        break;
index ec1cc05247ca02c7fbaf144c8f952ba125977007..a6904dde4d4e0215e77de32c06ee20a684329bed 100644 (file)
@@ -102,10 +102,10 @@ static bool is_bond(int nnm,t_nm2type nmt[],char *ai,char *aj,real blen)
     
   for(i=0; (i<nnm); i++) {
     for(j=0; (j<nmt[i].nbonds); j++) {
-      if ((((strncasecmp(ai,nmt[i].elem,1) == 0) && 
-          (strncasecmp(aj,nmt[i].bond[j],1) == 0)) ||
-         ((strncasecmp(ai,nmt[i].bond[j],1) == 0) && 
-          (strncasecmp(aj,nmt[i].elem,1) == 0))) &&
+      if ((((gmx_strncasecmp(ai,nmt[i].elem,1) == 0) && 
+          (gmx_strncasecmp(aj,nmt[i].bond[j],1) == 0)) ||
+         ((gmx_strncasecmp(ai,nmt[i].bond[j],1) == 0) && 
+          (gmx_strncasecmp(aj,nmt[i].elem,1) == 0))) &&
          (fabs(blen-nmt[i].blen[j]) <= 0.1*nmt[i].blen[j]))
        return TRUE;
     }
index c287c5ec163831481971b9782d6d3a50586e53a1..364bdc1578d9454bab556ccbffe7aa34016ae8e5 100644 (file)
@@ -65,7 +65,7 @@ static int Name2eo(char *s)
   res=-1;
   
   for(i=0; (i<eoNR); i++)
-    if (strcasecmp(s,eoNames[i]) == 0) {
+    if (gmx_strcasecmp(s,eoNames[i]) == 0) {
       res=i;
       fprintf(stderr,"Coupling to observable %d (%s)\n",res,eoNames[res]);
       break;
@@ -453,13 +453,13 @@ void read_gct(const char *fn,t_coupl_rec *tcr)
   
   for(i=0; (i<ninp); i++) {
     bWrong=FALSE;
-    if (strcasecmp(inp[i].name,"LJ") == 0) 
+    if (gmx_strcasecmp(inp[i].name,"LJ") == 0) 
       bWrong=add_lj(&nLJ,&(tcr->tcLJ),inp[i].value,tcr->bObsUsed);
-    else if (strcasecmp(inp[i].name,"BU") == 0) 
+    else if (gmx_strcasecmp(inp[i].name,"BU") == 0) 
       bWrong=add_bu(&nBU,&(tcr->tcBU),inp[i].value,tcr->bObsUsed);
-    else if (strcasecmp(inp[i].name,"Q") == 0) 
+    else if (gmx_strcasecmp(inp[i].name,"Q") == 0) 
       bWrong=add_q(&nQ,&(tcr->tcQ),inp[i].value,tcr->bObsUsed);
-    else if (strcasecmp(inp[i].name,"Bonds") == 0)
+    else if (gmx_strcasecmp(inp[i].name,"Bonds") == 0)
       bWrong=add_ip(&nIP,&(tcr->tIP),inp[i].value,F_BONDS,tcr->bObsUsed);
       
     if (bWrong)
index 9ff78d8b95b9f005f52ddf81d47f2c552a134885..ae23e27f2104c1577aa387a6a120655dee37242a 100644 (file)
@@ -120,7 +120,7 @@ static int ddb_name2dir(char *name)
   index=-1;
 
   for(i=0;i<DDB_DIR_NR && index<0;i++)
-    if(!strcasecmp(name,ddb_dirnames[i]))
+    if(!gmx_strcasecmp(name,ddb_dirnames[i]))
       index=i;
   
   return index;
@@ -175,11 +175,11 @@ static void read_vsite_database(const char *ddbname,
          (*ch) = 0;
        trim (dirstr);
 
-       if(!strcasecmp(dirstr,"HID"))
+       if(!gmx_strcasecmp(dirstr,"HID"))
          sprintf(dirstr,"HISA");
-       else if(!strcasecmp(dirstr,"HIE"))
+       else if(!gmx_strcasecmp(dirstr,"HIE"))
          sprintf(dirstr,"HISB");
-       else if(!strcasecmp(dirstr,"HIP"))
+       else if(!gmx_strcasecmp(dirstr,"HIP"))
          sprintf(dirstr,"HISH");
 
        curdir=ddb_name2dir(dirstr);
@@ -196,7 +196,7 @@ static void read_vsite_database(const char *ddbname,
        case DDB_NH3:
        case DDB_NH2:
          n = sscanf(pline,"%s%s%s",s1,s2,s3);
-         if(n<3 && !strcasecmp(s2,"planar")) {
+         if(n<3 && !gmx_strcasecmp(s2,"planar")) {
            srenew(vsiteconflist,nvsite+1);
            strncpy(vsiteconflist[nvsite].atomtype,s1,MAXNAME-1);
            vsiteconflist[nvsite].isplanar=TRUE;
@@ -226,7 +226,7 @@ static void read_vsite_database(const char *ddbname,
        case DDB_HISB:
        case DDB_HISH:
          i=0;
-         while((i<ntop) && strcasecmp(dirstr,vsitetoplist[i].resname))
+         while((i<ntop) && gmx_strcasecmp(dirstr,vsitetoplist[i].resname))
            i++;
          /* Allocate a new topology entry if this is a new residue */
          if(i==ntop) {
@@ -280,7 +280,7 @@ static int nitrogen_is_planar(t_vsiteconf vsiteconflist[],int nvsiteconf,char at
   int i,res;
   bool found=FALSE;
   for(i=0;i<nvsiteconf && !found;i++) {
-    found=(!strcasecmp(vsiteconflist[i].atomtype,atomtype) && (vsiteconflist[i].nhydrogens==2));
+    found=(!gmx_strcasecmp(vsiteconflist[i].atomtype,atomtype) && (vsiteconflist[i].nhydrogens==2));
   }
   if(found)
     res=(vsiteconflist[i-1].isplanar==TRUE);
@@ -296,8 +296,8 @@ static char *get_dummymass_name(t_vsiteconf vsiteconflist[],int nvsiteconf,char
   int i;
   bool found=FALSE;
   for(i=0;i<nvsiteconf && !found;i++) {
-    found=(!strcasecmp(vsiteconflist[i].atomtype,atom) &&
-          !strcasecmp(vsiteconflist[i].nextheavytype,nextheavy));
+    found=(!gmx_strcasecmp(vsiteconflist[i].atomtype,atom) &&
+          !gmx_strcasecmp(vsiteconflist[i].nextheavytype,nextheavy));
   }
   if(found)
     return vsiteconflist[i-1].dummymass;
@@ -314,7 +314,7 @@ static real get_ddb_bond(t_vsitetop *vsitetop, int nvsitetop,
   int i,j;
   
   i=0;
-  while(i<nvsitetop && strcasecmp(res,vsitetop[i].resname))
+  while(i<nvsitetop && gmx_strcasecmp(res,vsitetop[i].resname))
     i++;
   if(i==nvsitetop)
     gmx_fatal(FARGS,"No vsite information for residue %s found in vsite database.\n",res);
@@ -337,7 +337,7 @@ static real get_ddb_angle(t_vsitetop *vsitetop, int nvsitetop,
   int i,j;
   
   i=0;
-  while(i<nvsitetop && strcasecmp(res,vsitetop[i].resname))
+  while(i<nvsitetop && gmx_strcasecmp(res,vsitetop[i].resname))
     i++;
   if(i==nvsitetop)
     gmx_fatal(FARGS,"No vsite information for residue %s found in vsite database.\n",res);
@@ -1466,9 +1466,9 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
                  
        cmplength = bPartial[j] ? strlen(resnm)-1 : strlen(resnm);
        
-       bFound = ((strncasecmp(resnm,resnms[j], cmplength)==0) ||
-                 (strncasecmp(resnm,resnmsN[j],cmplength)==0) ||
-                 (strncasecmp(resnm,resnmsC[j],cmplength)==0));
+       bFound = ((gmx_strncasecmp(resnm,resnms[j], cmplength)==0) ||
+                 (gmx_strncasecmp(resnm,resnmsN[j],cmplength)==0) ||
+                 (gmx_strncasecmp(resnm,resnmsC[j],cmplength)==0));
        
        if ( bFound ) {
          whatres=j;
@@ -1479,7 +1479,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
            ats[k]=NOTSET;
           for(m=i; m<at->nr && at->atom[m].resind==resind && ats[k]==NOTSET;m++) 
         {
-             if (strcasecmp(*(at->atomname[m]),atnms[j][k])==0) 
+             if (gmx_strcasecmp(*(at->atomname[m]),atnms[j][k])==0) 
           {
               ats[k]=m;
               nrfound++;
@@ -1592,7 +1592,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
        
       } else if ( /*(nrHatoms == 2) && (nrbonds == 2) && REMOVED this test
                   DvdS 19-01-04 */
-                 (strncasecmp(*at->atomname[Heavy],"OW",2)==0) ) {
+                 (gmx_strncasecmp(*at->atomname[Heavy],"OW",2)==0) ) {
        bAddVsiteParam=FALSE; /* this is water: skip these hydrogens */
        if (bFirstWater) {
          bFirstWater=FALSE;
index 67c3c0562e1a7fcdd7fa24c6a3e7292cb5eaa996..ee7fe406b2a066083340e3ef3a6beeea7e7adb6f 100644 (file)
@@ -55,7 +55,7 @@ int get_bond_atomtype_type(char *str,t_bond_atomtype at)
   int i;
 
   for (i=0; (i<ga->nr); i++)
-    if (strcasecmp(str,*(ga->atomname[i])) == 0)
+    if (gmx_strcasecmp(str,*(ga->atomname[i])) == 0)
       return i;
   
   return NOTSET;
index ea167b08225a1950978cbabc3022cc026b931c77..f202bab9fdce1656a2b30ff369a0fb6cf07f265f 100644 (file)
@@ -63,7 +63,7 @@ int compaddh(const void *a,const void *b)
 
   ah=(t_hackblock *)a;
   bh=(t_hackblock *)b;
-  return strcasecmp(ah->name,bh->name);
+  return gmx_strcasecmp(ah->name,bh->name);
 }
 
 void print_ab(FILE *out,t_hack *hack,char *nname)
index 8d8386d905af2de7c17c66badf96570bf57f3fb3..78d231868e8e481c8f440d9453ab1eba376083da 100644 (file)
@@ -221,7 +221,7 @@ void set_histp(t_atoms *pdba,rvec *x,real angle,real dist){
   /* Now do the HIS stuff */
   hisind=-1;
   for(i=0; (i<natom); ) {
-    if (strcasecmp(*pdba->resinfo[pdba->atom[i].resind].name,"HIS") != 0) 
+    if (gmx_strcasecmp(*pdba->resinfo[pdba->atom[i].resind].name,"HIS") != 0) 
       i++;
     else {
       if (pdba->atom[i].resind != hisind) {
index e4f907c823e08f62a3141f8f0d3701592f49a97c..cd84b7e36e895b9c0178a9432e33b5b3e9c824c8 100644 (file)
@@ -160,7 +160,7 @@ static int match_str(const char *atom,const char *template_string)
 {
   if (!atom || !template_string)
     return ematchNone;
-  else if (strcasecmp(atom,template_string) == 0) 
+  else if (gmx_strcasecmp(atom,template_string) == 0) 
     return ematchExact;
   else if (atom[0] == template_string[0])
     return ematchElem;
index 4afaa661b1212889a414a3b58de6b213be556616..8d78806ca519ff76565e3de58249addb2912b6e0 100644 (file)
@@ -90,7 +90,7 @@ static const char *res2bb_notermini(const char *name,
   int i;
 
   i = 0;
-  while (i < nrr && strcasecmp(name,rr[i].gmx) != 0) {
+  while (i < nrr && gmx_strcasecmp(name,rr[i].gmx) != 0) {
     i++;
   }
 
@@ -311,7 +311,7 @@ static void rename_pdbres(t_atoms *pdba,const char *oldnm,const char *newnm,
   
   for(i=0; (i<pdba->nres); i++) {
     resnm = *pdba->resinfo[i].name;
-    if ((bFullCompare && (strcasecmp(resnm,oldnm) == 0)) ||
+    if ((bFullCompare && (gmx_strcasecmp(resnm,oldnm) == 0)) ||
        (!bFullCompare && strstr(resnm,oldnm) != NULL)) {
       pdba->resinfo[i].name = put_symtab(symtab,newnm);
     }
@@ -326,7 +326,7 @@ static void rename_bb(t_atoms *pdba,const char *oldnm,const char *newnm,
   
   for(i=0; (i<pdba->nres); i++) {
     bbnm = *pdba->resinfo[i].rtp;
-    if ((bFullCompare && (strcasecmp(bbnm,oldnm) == 0)) ||
+    if ((bFullCompare && (gmx_strcasecmp(bbnm,oldnm) == 0)) ||
        (!bFullCompare && strstr(bbnm,oldnm) != NULL)) {
       pdba->resinfo[i].rtp = put_symtab(symtab,newnm);
     }
@@ -559,7 +559,7 @@ static void sort_pdbatoms(int nrtp,t_restp restp[],t_hackblock hb[],
     }
     rptr = &restp[pdba->atom[i].resind];
     for(j=0; (j<rptr->natom); j++) {
-      if (strcasecmp(atomnm,*(rptr->atomname[j])) == 0) {
+      if (gmx_strcasecmp(atomnm,*(rptr->atomname[j])) == 0) {
        break;
       }
     }
@@ -1288,7 +1288,7 @@ int main(int argc, char *argv[])
       this_chainid       = ri->chainid;
       this_chainnumber   = ri->chainnum;
       
-      bWat = strcasecmp(*ri->name,watres) == 0;
+      bWat = gmx_strcasecmp(*ri->name,watres) == 0;
       if ((i == 0) || (this_chainnumber != prev_chainnumber) || (bWat != bPrevWat)) 
       {
           this_chainstart = pdba_all.atom[i].resind;
index 2e353b7a124c50c986b10a106f9bd3b4e6f26655..a031ea24bf8bb2deb1a8d6a58b79952637c50fef 100644 (file)
@@ -84,7 +84,7 @@ static int missing_atoms(t_restp *rp, int resind,t_atoms *at, int i0, int i)
         bFound=FALSE;
         for (k=i0; k<i; k++) 
         {
-            bFound = (bFound || !strcasecmp(*(at->atomname[k]),name));
+            bFound = (bFound || !gmx_strcasecmp(*(at->atomname[k]),name));
         }
         if (!bFound)
         {
@@ -209,7 +209,7 @@ choose_ff(const char *ffsel,
             {
                 if ((desc[i][0] == '[' && desc[j][0] != '[') ||
                     ((desc[i][0] == '[' || desc[j][0] != '[') &&
-                     strcasecmp(desc[i],desc[j]) > 0))
+                     gmx_strcasecmp(desc[i],desc[j]) > 0))
                 {
                     swap_strings(ffdirs,i,j);
                     swap_strings(ffs   ,i,j);
@@ -980,7 +980,7 @@ static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr)
     {
         *nr = 0;
         
-        return (strcasecmp(anm,hack->nname) == 0);
+        return (gmx_strcasecmp(anm,hack->nname) == 0);
     }
     else
     {
@@ -999,7 +999,7 @@ static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr)
         else
         {
             return (strlen(anm) == strlen(hack->nname) + 1 &&
-                    strncasecmp(anm,hack->nname,strlen(hack->nname)) == 0);
+                    gmx_strncasecmp(anm,hack->nname,strlen(hack->nname)) == 0);
         }
     }
 }
@@ -1024,7 +1024,7 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
     for(j=0; j<hbr->nhack; j++)
     {
         if (hbr->hack[j].oname != NULL && hbr->hack[j].nname != NULL &&
-            strcasecmp(oldnm,hbr->hack[j].oname) == 0)
+            gmx_strcasecmp(oldnm,hbr->hack[j].oname) == 0)
         {
             /* This is a replace entry. */
             /* Check if we are not replacing a replaced atom. */
@@ -1032,7 +1032,7 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
             for(k=0; k<hbr->nhack; k++) {
                 if (k != j &&
                     hbr->hack[k].oname != NULL && hbr->hack[k].nname != NULL &&
-                    strcasecmp(hbr->hack[k].nname,hbr->hack[j].oname) == 0)
+                    gmx_strcasecmp(hbr->hack[k].nname,hbr->hack[j].oname) == 0)
                 {
                     /* The replace in hack[j] replaces an atom that
                      * was already replaced in hack[k], we do not want
@@ -1051,7 +1051,7 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
             newnm = hbr->hack[j].nname;
             for(k=0; k<rptr->natom; k++)
             {
-                if (strcasecmp(newnm,*rptr->atomname[k]) == 0)
+                if (gmx_strcasecmp(newnm,*rptr->atomname[k]) == 0)
                 {
                     break;
                 }
@@ -1083,7 +1083,7 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
                         }
                         for(start_nr=0; start_nr<rptr->natom; start_nr++)
                         {
-                            if (strcasecmp(start_at,(*rptr->atomname[start_nr])) == 0)
+                            if (gmx_strcasecmp(start_at,(*rptr->atomname[start_nr])) == 0)
                             {
                                 break;
                             }
@@ -1120,14 +1120,14 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
             *pdba->atomname[atind] = strdup(newnm);
         }
         else if (hbr->hack[j].oname != NULL && hbr->hack[j].nname == NULL &&
-                 strcasecmp(oldnm,hbr->hack[j].oname) == 0)
+                 gmx_strcasecmp(oldnm,hbr->hack[j].oname) == 0)
         {
             /* This is a delete entry, check if this atom is present
              * in the rtp entry of this residue.
              */
             for(k=0; k<rptr->natom; k++)
             {
-                if (strcasecmp(oldnm,*rptr->atomname[k]) == 0)
+                if (gmx_strcasecmp(oldnm,*rptr->atomname[k]) == 0)
                 {
                     break;
                 }
@@ -1182,7 +1182,7 @@ void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[],
         rptr  = &restp[pdba->atom[i].resind];
         for(j=0; (j<rptr->natom); j++)
         {
-            if (strcasecmp(oldnm,*(rptr->atomname[j])) == 0)
+            if (gmx_strcasecmp(oldnm,*(rptr->atomname[j])) == 0)
             {
                 break;
             }
index 7ad0e1a35ff8eaf43d5fd67019eb0dadb82a9d3e..57c10c2a9e92dc3532f0f4ead4e1fc477f2e8711 100644 (file)
@@ -81,7 +81,7 @@ atom_id search_atom(const char *type,int start,int natoms,t_atom at[],
     }
     
     for(i=start; (i<natoms) && (bNext || (at[i].resind == resind)); i++) {
-      if (anm[i] && strcasecmp(type,*(anm[i]))==0)
+      if (anm[i] && gmx_strcasecmp(type,*(anm[i]))==0)
        return (atom_id) i;
     }
     if (!(bNext && at[start].resind==at[natoms-1].resind))
@@ -93,7 +93,7 @@ atom_id search_atom(const char *type,int start,int natoms,t_atom at[],
     if (start > 0)
       resind = at[start-1].resind;
     for(i=start-1; (i>=0) /*&& (at[i].resind == resind)*/; i--)
-      if (strcasecmp(type,*(anm[i]))==0)
+      if (gmx_strcasecmp(type,*(anm[i]))==0)
        return (atom_id) i;
     if (start > 0)
       atom_not_found(FARGS,type,at[start].resind,bondtype,bDontQuit);
index 67b9dd61b8a5d24b816ead6ff1806efcbe7fc8ce..72b56b6fb2be4d2a8f9a3247d2b5552ff50c6264 100644 (file)
@@ -1265,7 +1265,7 @@ static int search_QMstring(char *s,int ng,const char *gn[])
   int i;
 
   for(i=0; (i<ng); i++)
-    if (strcasecmp(s,gn[i]) == 0)
+    if (gmx_strcasecmp(s,gn[i]) == 0)
       return i;
 
   gmx_fatal(FARGS,"this QM method or basisset (%s) is not implemented\n!",s);
@@ -1280,7 +1280,7 @@ int search_string(char *s,int ng,char *gn[])
   int i;
   
   for(i=0; (i<ng); i++)
-    if (strcasecmp(s,gn[i]) == 0)
+    if (gmx_strcasecmp(s,gn[i]) == 0)
       return i;
       
   gmx_fatal(FARGS,"Group %s not found in indexfile.\nMaybe you have non-default goups in your mdp file, while not using the '-n' option of grompp.\nIn that case use the '-n' option.\n",s);
@@ -1705,14 +1705,14 @@ static bool do_egp_flag(t_inputrec *ir,gmx_groups_t *groups,
   for(i=0; i<nelem/2; i++) {
     j = 0;
     while ((j < nr) &&
-          strcasecmp(names[2*i],*(gnames[groups->grps[egcENER].nm_ind[j]])))
+          gmx_strcasecmp(names[2*i],*(gnames[groups->grps[egcENER].nm_ind[j]])))
       j++;
     if (j == nr)
       gmx_fatal(FARGS,"%s in %s is not an energy group\n",
                  names[2*i],option);
     k = 0;
     while ((k < nr) &&
-          strcasecmp(names[2*i+1],*(gnames[groups->grps[egcENER].nm_ind[k]])))
+          gmx_strcasecmp(names[2*i+1],*(gnames[groups->grps[egcENER].nm_ind[k]])))
       k++;
     if (k==nr)
       gmx_fatal(FARGS,"%s in %s is not an energy group\n",
@@ -1992,9 +1992,9 @@ void do_index(const char* mdparin, const char *ndx,
   snew(ir->opts.nFreeze,nr);
   for(i=k=0; (i<nfreeze); i++)
     for(j=0; (j<DIM); j++,k++) {
-      ir->opts.nFreeze[i][j]=(strncasecmp(ptr1[k],"Y",1)==0);
+      ir->opts.nFreeze[i][j]=(gmx_strncasecmp(ptr1[k],"Y",1)==0);
       if (!ir->opts.nFreeze[i][j]) {
-       if (strncasecmp(ptr1[k],"N",1) != 0) {
+       if (gmx_strncasecmp(ptr1[k],"N",1) != 0) {
          sprintf(warnbuf,"Please use Y(ES) or N(O) for freezedim only "
                  "(not %s)", ptr1[k]);
          warning(wi,warn_buf);
@@ -2087,7 +2087,7 @@ void do_index(const char* mdparin, const char *ndx,
   for(i=0;i<nr;i++){
     ir->opts.QMmult[i]   = strtol(ptr1[i],NULL,10);
     ir->opts.QMcharge[i] = strtol(ptr2[i],NULL,10);
-    ir->opts.bSH[i]      = (strncasecmp(ptr3[i],"Y",1)==0);
+    ir->opts.bSH[i]      = (gmx_strncasecmp(ptr3[i],"Y",1)==0);
   }
 
   nCASelec  = str_nelem(CASelectrons,MAXPTR,ptr1);
@@ -2105,8 +2105,8 @@ void do_index(const char* mdparin, const char *ndx,
   snew(ir->opts.bOPT,nr);
   snew(ir->opts.bTS,nr);
   for(i=0;i<nr;i++){
-    ir->opts.bOPT[i] = (strncasecmp(ptr1[i],"Y",1)==0);
-    ir->opts.bTS[i]  = (strncasecmp(ptr2[i],"Y",1)==0);
+    ir->opts.bOPT[i] = (gmx_strncasecmp(ptr1[i],"Y",1)==0);
+    ir->opts.bTS[i]  = (gmx_strncasecmp(ptr2[i],"Y",1)==0);
   }
   nSAon     = str_nelem(SAon,MAXPTR,ptr1);
   nSAoff    = str_nelem(SAoff,MAXPTR,ptr2);
index b5d2d6921affb5329069edfc2e3a6f9311bad9d4..807ad48f9cc296bee92bffbe5e82080f75f73c40 100644 (file)
@@ -203,9 +203,9 @@ void make_pull_groups(t_pull *pull,char **pgnames,t_blocka *grps,char **gnames)
       gmx_fatal(FARGS,"Less than 3 pull dimensions given in pull_dim: '%s'",
                pulldim);
     
-    if (strncasecmp(pulldim1,"N",1) == 0) {
+    if (gmx_strncasecmp(pulldim1,"N",1) == 0) {
       pull->dim[d] = 0;
-    } else if (strncasecmp(pulldim1,"Y",1) == 0) {
+    } else if (gmx_strncasecmp(pulldim1,"Y",1) == 0) {
       pull->dim[d] = 1;
       i++;
     } else {
index 2ea28a360f663a345478d0c533a832b256eb4a0b..6d7d74e9464f4fb6d0696bdbe041d1e80a911dd6 100644 (file)
@@ -217,7 +217,7 @@ static void check_rtp(int nrtp,t_restp rtp[],char *libfn)
 
   /* check for double entries, assuming list is already sorted */
   for(i=1; (i<nrtp); i++) {
-    if (strcasecmp(rtp[i-1].resname,rtp[i].resname) == 0)
+    if (gmx_strcasecmp(rtp[i-1].resname,rtp[i].resname) == 0)
       fprintf(stderr,"WARNING double entry %s in file %s\n",
              rtp[i].resname,libfn);
   }
@@ -230,7 +230,7 @@ static int comprtp(const void *a,const void *b)
   ra=(t_restp *)a;
   rb=(t_restp *)b;
 
-  return strcasecmp(ra->resname,rb->resname);
+  return gmx_strcasecmp(ra->resname,rb->resname);
 }
 
 int get_bt(char* header)
@@ -238,7 +238,7 @@ int get_bt(char* header)
   int i;
 
   for(i=0; i<ebtsNR; i++)
-    if ( strcasecmp(btsNames[i],header)==0 )
+    if ( gmx_strcasecmp(btsNames[i],header)==0 )
       return i;
   return NOTSET;
 }
@@ -301,7 +301,7 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp,
   get_a_line(in,line,STRLEN);
   if (!get_header(line,header))
     gmx_fatal(FARGS,"in .rtp file at line:\n%s\n",line);
-  if (strncasecmp("bondedtypes",header,5)==0) {
+  if (gmx_strncasecmp("bondedtypes",header,5)==0) {
     get_a_line(in,line,STRLEN);
     if ((nparam=sscanf(line,"%d %d %d %d %d %d %d %d",
                       &bts[ebtsBONDS],&bts[ebtsANGLES],
@@ -377,7 +377,7 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp,
        if (bt != NOTSET) {
          /* header is an bonded directive */
          bError = !read_bondeds(bt,in,line,&rrtp[nrtp]);
-       } else if (strncasecmp("atoms",header,5) == 0) {
+       } else if (gmx_strncasecmp("atoms",header,5) == 0) {
          /* header is the atoms directive */
          bError = !read_atoms(in,line,&(rrtp[nrtp]),tab,atype);
        } else {
@@ -403,7 +403,7 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp,
     
     firstrtp = -1;
     for(i=0; i<nrtp; i++) {
-        if (strcasecmp(rrtp[i].resname,rrtp[nrtp].resname) == 0) {
+        if (gmx_strcasecmp(rrtp[i].resname,rrtp[nrtp].resname) == 0) {
             firstrtp = i;
         }
     }
index 3e03ec25fc73fb8f5a0c2458e2a3a859becdfd98..e8c56351b33602b3c86799571d90cf1a95522439 100644 (file)
@@ -122,9 +122,9 @@ static bool is_special(int nsb,t_specbond sb[],char *res,char *atom)
   
   for(i=0; (i<nsb); i++) {
     if (((strncmp(sb[i].res1,res,3) == 0) && 
-        (strcasecmp(sb[i].atom1,atom) == 0)) ||
+        (gmx_strcasecmp(sb[i].atom1,atom) == 0)) ||
        ((strncmp(sb[i].res2,res,3) == 0) && 
-        (strcasecmp(sb[i].atom2,atom) == 0)))
+        (gmx_strcasecmp(sb[i].atom2,atom) == 0)))
       return TRUE;
   }
   return FALSE;
@@ -149,9 +149,9 @@ static bool is_bond(int nsb,t_specbond sb[],t_atoms *pdba,int a1,int a2,
   for(i=0; (i<nsb); i++) {
     *index_sb = i;
     if (((strncmp(sb[i].res1,res1,3) == 0)  && 
-        (strcasecmp(sb[i].atom1,at1) == 0) &&
+        (gmx_strcasecmp(sb[i].atom1,at1) == 0) &&
         (strncmp(sb[i].res2,res2,3) == 0)  && 
-        (strcasecmp(sb[i].atom2,at2) == 0))) {
+        (gmx_strcasecmp(sb[i].atom2,at2) == 0))) {
       *bSwap = FALSE;
       if ((0.9*sb[i].length < d) && (1.1*sb[i].length > d)) {
        if (debug) fprintf(stderr,"%g\n", sb[i].length);
@@ -159,9 +159,9 @@ static bool is_bond(int nsb,t_specbond sb[],t_atoms *pdba,int a1,int a2,
       }
     }
     if (((strncmp(sb[i].res1,res2,3) == 0)  && 
-        (strcasecmp(sb[i].atom1,at2) == 0) &&
+        (gmx_strcasecmp(sb[i].atom1,at2) == 0) &&
         (strncmp(sb[i].res2,res1,3) == 0)  && 
-        (strcasecmp(sb[i].atom2,at1) == 0))) {
+        (gmx_strcasecmp(sb[i].atom2,at1) == 0))) {
       *bSwap = TRUE;
       if ((0.9*sb[i].length < d) && (1.1*sb[i].length > d)) {
        if (debug) fprintf(stderr,"%g\n", sb[i].length);
@@ -216,7 +216,7 @@ int mk_specbonds(t_atoms *pdba,rvec x[],bool bInteractive,
                     *pdba->atomname[i]) &&
          !(nspec > 0 &&
            pdba->atom[sgp[nspec-1]].resind == pdba->atom[i].resind &&
-           strcasecmp(*pdba->atomname[sgp[nspec-1]],
+           gmx_strcasecmp(*pdba->atomname[sgp[nspec-1]],
                       *pdba->atomname[i]) == 0)) {
        specp[nspec] = pdba->atom[i].resind;
        sgp[nspec] = i;
index 7821e87c79e7c57d334501e21baafee5c692e447..19cfff8cd1599d40c7e65620e300cbacaac06685 100644 (file)
@@ -66,10 +66,10 @@ int find_kw(char *keyw)
   int i;
   
   for(i=0; i<ebtsNR; i++)
-    if (strcasecmp(btsNames[i],keyw) == 0)
+    if (gmx_strcasecmp(btsNames[i],keyw) == 0)
       return i;
   for(i=0; i<ekwNR; i++)
-    if (strcasecmp(kw_names[i],keyw) == 0)
+    if (gmx_strcasecmp(kw_names[i],keyw) == 0)
       return ebtsNR + 1 + i;
   
   return NOTSET;
@@ -391,8 +391,8 @@ t_hackblock **filter_ter(int nrtp,t_restp rtp[],
              * This makes termini selection for different molecule types
              * much cleaner.
              */
-            if (strcasecmp(restp->filebase,tb[i].filebase) == 0 &&
-                strncasecmp(resname,s,3) == 0) 
+            if (gmx_strcasecmp(restp->filebase,tb[i].filebase) == 0 &&
+                gmx_strncasecmp(resname,s,3) == 0) 
             {
                 found=TRUE;
                 srenew(list,n+1);
@@ -427,9 +427,9 @@ t_hackblock **filter_ter(int nrtp,t_restp rtp[],
          * This makes termini selection for different molecule types
          * much cleaner.
          */
-        if(strcasecmp(restp->filebase,tb[i].filebase) == 0)
+        if(gmx_strcasecmp(restp->filebase,tb[i].filebase) == 0)
         {
-            if(!strcasecmp("None",s)) 
+            if(!gmx_strcasecmp("None",s)) 
             {
                 none_idx=i;
             }
index f8874d8c0e74dcdabb2a5510452ba659a475594c..45b89f784ebe4bd9bf41841eac67baf19701d3cb 100644 (file)
@@ -121,8 +121,8 @@ static real search_e_diss(int n2m,t_2morse t2m[],char *ai,char *aj)
   /* Do a best match search for dissociation energies */
   for(i=0; (i<n2m); i++) {
     /* Check for a perfect match */
-    if (((strcasecmp(t2m[i].ai,ai) == 0) && (strcasecmp(t2m[i].aj,aj) == 0)) ||
-       ((strcasecmp(t2m[i].aj,ai) == 0) && (strcasecmp(t2m[i].ai,aj) == 0))) {
+    if (((gmx_strcasecmp(t2m[i].ai,ai) == 0) && (gmx_strcasecmp(t2m[i].aj,aj) == 0)) ||
+       ((gmx_strcasecmp(t2m[i].aj,ai) == 0) && (gmx_strcasecmp(t2m[i].ai,aj) == 0))) {
       ibest = i;
       break;
     }
index d978e4dd670fe539605b2de8a8bfac820927eff1..b5c3c0a1fb37e84ffa9275041ed26c4fefa6285a 100644 (file)
@@ -221,7 +221,7 @@ directive str2dir (char *dstr)
   char buf[STRLEN],*ptr;
   
   /* Hack to be able to read old topologies */
-  if (strncasecmp_min(dstr,"dummies",7) == 0) {
+  if (gmx_strncasecmp_min(dstr,"dummies",7) == 0) {
     sprintf(buf,"virtual_sites%s",dstr+7);
     ptr = buf;
   } else {
@@ -229,7 +229,7 @@ directive str2dir (char *dstr)
   }
   
   for (d=0; (d<d_maxdir); d++)
-    if (strcasecmp_min(ptr,dir2str((directive)d)) == 0)
+    if (gmx_strcasecmp_min(ptr,dir2str((directive)d)) == 0)
       return (directive)d;
 
   return d_invalid;
index 6b6d343a5b614925a86d3f52a83c739a89711d19..abb6379db03661b787514243b9528ca5c9688200 100644 (file)
@@ -230,7 +230,7 @@ static void get_nbparm(char *nb_str,char *comb_str,int *nb,int *comb,
   
   *nb   = -1;
   for(i=1; (i<eNBF_NR); i++)
-    if (strcasecmp(nb_str,enbf_names[i]) == 0)
+    if (gmx_strcasecmp(nb_str,enbf_names[i]) == 0)
       *nb = i;
   if (*nb == -1)
     *nb = strtol(nb_str,NULL,10);
@@ -242,7 +242,7 @@ static void get_nbparm(char *nb_str,char *comb_str,int *nb,int *comb,
   }
   *comb = -1;
   for(i=1; (i<eCOMB_NR); i++)
-    if (strcasecmp(comb_str,ecomb_names[i]) == 0)
+    if (gmx_strcasecmp(comb_str,ecomb_names[i]) == 0)
       *comb = i;
   if (*comb == -1)
     *comb = strtol(comb_str,NULL,10);
@@ -681,7 +681,7 @@ static char **read_topol(const char *infile,const char *outfile,
              get_nbparm(nb_str,comb_str,&nb_funct,&comb,wi);
              *combination_rule = comb;
              if (nscan >= 3) {
-               bGenPairs = (strncasecmp(genpairs,"Y",1) == 0);
+               bGenPairs = (gmx_strncasecmp(genpairs,"Y",1) == 0);
                if (nb_funct != eNBF_LJ && bGenPairs) {
                  gmx_fatal(FARGS,"Generating pair parameters is only supported with LJ non-bonded interactions");
                }
@@ -844,8 +844,8 @@ static char **read_topol(const char *infile,const char *outfile,
            nmolb++;
            
         bCouple = (opts->couple_moltype != NULL &&
-                   (strcasecmp("system"    ,opts->couple_moltype) == 0 ||
-                    strcasecmp(*(mi0->name),opts->couple_moltype) == 0));
+                   (gmx_strcasecmp("system"    ,opts->couple_moltype) == 0 ||
+                    gmx_strcasecmp(*(mi0->name),opts->couple_moltype) == 0));
         if (bCouple) {
             nmol_couple += nrcopies;
         }
index 0939c5488df514727fccf266f82f92d9655b3317..badda797b0e82151ea3a419efd2a7d0de69174e3 100644 (file)
@@ -425,10 +425,10 @@ void push_at (t_symtab *symtab, gpp_atomtype_t at, t_bond_atomtype bat,
      gmx_fatal(FARGS,"Bond atom type names can't be single digits.");
 
   /* Hack to read old topologies */
-  if (strcasecmp(ptype,"D") == 0)
+  if (gmx_strcasecmp(ptype,"D") == 0)
     sprintf(ptype,"V");
   for(j=0; (j<eptNR); j++)
-    if (strcasecmp(ptype,xl[j].entry) == 0)
+    if (gmx_strcasecmp(ptype,xl[j].entry) == 0)
       break;
   if (j == eptNR)
     gmx_fatal(FARGS,"Invalid particle type %s on line %s",
@@ -1224,7 +1224,7 @@ void push_molt(t_symtab *symtab,int *nmol,t_molinfo **mol,char *line,
   /* Test if this atomtype overwrites another */
   i = 0;
   while (i < *nmol) {
-    if (strcasecmp(*((*mol)[i].name),type) == 0)
+    if (gmx_strcasecmp(*((*mol)[i].name),type) == 0)
       gmx_fatal(FARGS,"moleculetype %s is redefined",type);
     i++;
   }
@@ -1977,7 +1977,7 @@ void push_mol(int nrmols,t_molinfo mols[],char *pline,int *whichmol,
   }
   
   /* search moleculename */
-  for (i=0; ((i<nrmols) && strcasecmp(type,*(mols[i].name))); i++)
+  for (i=0; ((i<nrmols) && gmx_strcasecmp(type,*(mols[i].name))); i++)
     ;
 
   if (i<nrmols) {
index a78bd7ef19a0839777d38899d16ee698ae0d82cd..1738d72f685deaf24563b8031fa2f89846d9a9a1 100644 (file)
@@ -340,10 +340,10 @@ static bool calc_vsite3_param(gpp_atomtype_t atype,
     fprintf(debug,"\n");
   }
   bXH3 = 
-    ( (strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
-      (strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
-    ( (strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
-      (strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
+    ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
+      (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
+    ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
+      (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
   
   bjk = get_bond_length(nrbond, bonds, param->AJ, param->AK);
   bjl = get_bond_length(nrbond, bonds, param->AJ, param->AL);
@@ -488,10 +488,10 @@ static bool calc_vsite3out_param(gpp_atomtype_t atype,
     fprintf(debug,"\n");
   }
   bXH3 = 
-    ( (strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
-      (strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
-    ( (strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
-      (strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
+    ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
+      (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
+    ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
+      (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
   
   /* check if construction parity must be swapped */  
   bSwapParity = ( param->C1 == -1 );
index afdf5526e8a53e63330ffe7bcb368be511bc4a53..756372b17c2458fb7a7c3fa6ec26f0ded606f0a1 100644 (file)
@@ -198,15 +198,15 @@ void rename_atoms(const char *xlfile,const char *ffdir,bool bAddCWD,
         for(i=0; (i<nxlate) && !bRenamed; i++) {
             /* Check if the base file name of the rtp and arn entry match */
             if (restp == NULL ||
-                strcasecmp(restp[resind].filebase,xlatom[i].filebase) == 0)
+                gmx_strcasecmp(restp[resind].filebase,xlatom[i].filebase) == 0)
             {
                 /* Match the residue name */
                 bMatch = (xlatom[i].res == NULL ||
-                          (strcasecmp("protein",xlatom[i].res) == 0 &&
+                          (gmx_strcasecmp("protein",xlatom[i].res) == 0 &&
                            gmx_residuetype_is_protein(rt,rnm)) ||
-                          (strcasecmp("DNA",xlatom[i].res) == 0 &&
+                          (gmx_strcasecmp("DNA",xlatom[i].res) == 0 &&
                            gmx_residuetype_is_dna(rt,rnm)) ||
-                          (strcasecmp("RNA",xlatom[i].res) == 0 &&
+                          (gmx_strcasecmp("RNA",xlatom[i].res) == 0 &&
                            gmx_residuetype_is_rna(rt,rnm)));
                 if (!bMatch)
                 {
index 5071f9254a4eb00e836930e3d51673d1b193a958..cea8d559c36bce779ad29108889f921476f1d3d2 100644 (file)
@@ -149,7 +149,7 @@ static void qhop_process_attr(FILE *fp,xmlAttrPtr attr,int parent,
     attrname = (char *)attr->name;
     attrval  = (char *)attr->children->content;
     
-#define atest(s) ((strcasecmp(attrname,s) == 0) && (attrval != NULL))
+#define atest(s) ((gmx_strcasecmp(attrname,s) == 0) && (attrval != NULL))
     kkk = find_elem(attrname,exmlNR,exml_names);
     if (attrval != NULL)
       xbuf[kkk] = strdup(attrval);
index 9596667282e44d3b98bfc19f5d9db9fb6cceae19..344b18082944f95c88ba2b4bbfac932666a4d7db 100644 (file)
@@ -155,7 +155,7 @@ static void QuitCB(t_x11 *x11,int dlg_mess,int item_id,
 
   hide_mb(gmx);
   if (dlg_mess==DLG_EXIT) {
-    if (strcasecmp("yes",set)==0) 
+    if (gmx_strcasecmp("yes",set)==0) 
       write_gmx(x11,gmx,IDTERM);
   }
 }
@@ -225,7 +225,7 @@ static void ExportCB(t_x11 *x11,int dlg_mess,int item_id,
 #endif
     break;
   case DLG_EXIT:
-    if ((bOk=(strcasecmp("ok",set))==0)) 
+    if ((bOk=(gmx_strcasecmp("ok",set))==0)) 
       strcpy(gmx->confout,EditText(dlg,eExConf));
     HideDlg(dlg);
     if (bOk)
@@ -321,7 +321,7 @@ static void BondsCB(t_x11 *x11,int dlg_mess,int item_id,
     }
     break;
   case DLG_EXIT:
-    bOk=(strcasecmp("ok",set)==0);
+    bOk=(gmx_strcasecmp("ok",set)==0);
     HideDlg(gmx->dlgs[edBonds]);
     if (bOk) {
       if (bBond) {
index f661e566aaeb9aa8052b13820567f9a40c17ae25..21286ee5ea36775f620f92b0ea4b2adab7a8a566 100644 (file)
@@ -346,7 +346,7 @@ void HelpNow(t_dlg *dlg, t_dlgitem *dlgitem)
     fprintf(dlg->x11->console,"buffer: '%s'\n",buf);
     dlg->x11->Flush(dlg->x11);
 #endif
-    if (strcasecmp(buf,"nok")==0) {
+    if (gmx_strcasecmp(buf,"nok")==0) {
       /* An error occurred */
       for(i=0; (i<nlines); i++)
        sfree(lines[i]);
@@ -355,7 +355,7 @@ void HelpNow(t_dlg *dlg, t_dlgitem *dlgitem)
       return;
     }
     else {
-      bCont=(strcasecmp(buf,"ok") != 0);
+      bCont=(gmx_strcasecmp(buf,"ok") != 0);
       if (bCont) {
        srenew(lines,++nlines);
        lines[nlines-1]=strdup(buf);
index a10317a32b7c5b7caed7ffa30aabc3ddc7570809..cb36f4e10bc4c853a1f7724f6f6f985387b8e7ee 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * 
  *                This source code is part of
@@ -260,7 +259,7 @@ static void AddListFItem(t_x11 *x11, t_dlgitemlist *list,
 
       strcpy(buf2,fitem->name[i]);
       buf2[strlen(buf)]='\0'; /* truncate itemname */
-      if (strcasecmp(buf2,buf)==0)
+      if (gmx_strcasecmp(buf2,buf)==0)
        iSel=i;
     }
 
@@ -277,7 +276,7 @@ static void AddListFItem(t_x11 *x11, t_dlgitemlist *list,
   case edlgCB: {
     bool bCheck;
 
-    bCheck=strcasecmp(fitem->def,"TRUE")==0;
+    bCheck=gmx_strcasecmp(fitem->def,"TRUE")==0;
     AddListItem(list,CreateCheckBox(x11,fitem->name[0],bCheck,
                                    (*ID)++,GroupID,x,(*y),0,0,0));
     break;
index d724e0007604de5913cf5a09edc791901a44aaeb..257d802f044e6d00bcc5449d858145cd4bf08f9d 100644 (file)
@@ -68,7 +68,7 @@ static void ApplCallback(t_x11 *x11,int dlg_mess,int item_id,
   dlg=data->appl;
 
   fprintf(stderr,"item_id: %d (%s)\n",item_id,set);
-  if (strcasecmp(set,"OK") == 0) {
+  if (gmx_strcasecmp(set,"OK") == 0) {
     /* Doit */
     sprintf(doit,
            "xterm -geometry +100+100 -n %s"
@@ -112,7 +112,7 @@ static void ApplCallback(t_x11 *x11,int dlg_mess,int item_id,
 
     HideDlg(data->appl);
   }
-  else if (strcasecmp(set,"Cancel") == 0) {
+  else if (gmx_strcasecmp(set,"Cancel") == 0) {
     data->nAppl = -1;
     HideDlg(data->appl);
   }
index 8182680b0486437bb80bd98e1d7f7eb5bb3ddaec..e91c5daa3d312e7bc65df151d213c8f056e7eb97 100644 (file)
@@ -168,7 +168,7 @@ t_dlist *mk_dlist(FILE *log,
       if ((atm.minC != -1) && (atm.minO != -1))
        nc[6]++;
       for(k=0; (k<naa); k++) {
-       if (strcasecmp(aa[k],thisres) == 0)
+       if (gmx_strcasecmp(aa[k],thisres) == 0)
          break;
       }
       dl[nl].index=k;
index 8a62ce7d87f0e1820441437d9cb8a1d6ce14c0f0..f7ec13e3436bd418a782d27518b0afd47ab3ec11 100644 (file)
@@ -1134,7 +1134,7 @@ int gmx_cluster(int argc,char *argv[])
            "         ignoring option -cl %s\n", trx_out_fn);
 
   method=1;
-  while ( method < m_nr && strcasecmp(methodname[0], methodname[method])!=0 )
+  while ( method < m_nr && gmx_strcasecmp(methodname[0], methodname[method])!=0 )
     method++;
   if (method == m_nr)
     gmx_fatal(FARGS,"Invalid method");
index 89fbdf40c71ce522b2d63b86ad0e5ac0453dd1be..b5cc9897fea28adc3f2dff87226100fcf6fb5243 100644 (file)
@@ -65,7 +65,7 @@ static int search_str2(int nstr,char **str,char *key)
   while( (n<keylen) && ((key[n]<'0') || (key[n]>'9')) )
     n++;
   for(i=0; (i<nstr); i++) 
-    if (strncasecmp(str[i],key,n)==0)
+    if (gmx_strncasecmp(str[i],key,n)==0)
       return i;
 
   return -1;
index 3be425e64729ad998f1cfe0d6d9c5a0b10b5f6f8..773393921f20bdb892146e88b8081dcbef02e031 100644 (file)
@@ -248,7 +248,7 @@ static int *select_by_name(int nre,gmx_enxnm_t *nm,int *nset)
            i = strlen(ptr);
            nmatch = 0;
            for(nind=0; nind<nre; nind++) {
-             if (strcasecmp(newnm[nind],ptr) == 0) {
+             if (gmx_strcasecmp(newnm[nind],ptr) == 0) {
                bE[nind] = TRUE;
                nmatch++;
              }
@@ -257,7 +257,7 @@ static int *select_by_name(int nre,gmx_enxnm_t *nm,int *nset)
              i = strlen(ptr);
              nmatch = 0;
              for(nind=0; nind<nre; nind++) {
-               if (strncasecmp(newnm[nind],ptr,i) == 0) {
+               if (gmx_strncasecmp(newnm[nind],ptr,i) == 0) {
                  bE[nind] = TRUE;
                  nmatch++;
                }
@@ -1217,7 +1217,7 @@ static void fec(const char *ene2fn, const char *runavgfn,
   sum=0;
   beta = 1.0/(BOLTZ*reftemp);
   for(i=0; i<nset; i++) {
-    if (strcasecmp(leg[i],enm[set[i]].name)!=0)
+    if (gmx_strcasecmp(leg[i],enm[set[i]].name)!=0)
       fprintf(stderr,"\nWARNING energy set name mismatch %s!=%s\n",
              leg[i],enm[set[i]].name);
     for(j=0; j<nenergy; j++) {
@@ -1468,7 +1468,7 @@ int gmx_energy(int argc,char *argv[])
          }
        }
         if (i == nre) {
-         if (strcasecmp(setnm[j],"Volume")==0) {
+         if (gmx_strcasecmp(setnm[j],"Volume")==0) {
            printf("Enter the box volume (" unit_volume "): ");
            if(1 != scanf("%lf",&dbl))
            {
@@ -1516,7 +1516,7 @@ int gmx_energy(int argc,char *argv[])
       bIsEner[i] = FALSE;
       for (j=0; (j <= F_ETOT); j++)
        bIsEner[i] = bIsEner[i] ||
-         (strcasecmp(interaction_function[j].longname,leg[i]) == 0);
+         (gmx_strcasecmp(interaction_function[j].longname,leg[i]) == 0);
     }
     
     if (bPrAll && nset > 1) {
index 7e13555ed066ca415069b893b85a53ae5f8d5a9b..46aa712baa932b1f9ca8d608ae45bf7639790e56 100644 (file)
@@ -533,8 +533,8 @@ static void update_top(t_atoms *atoms,matrix box,int NFILE,t_filenm fnm[],
          buf2[strlen(buf2)-1]='\0';
          ltrim(buf2);
          rtrim(buf2);
-         bSystem=(strcasecmp(buf2,"system")==0);
-         bMolecules=(strcasecmp(buf2,"molecules")==0);
+         bSystem=(gmx_strcasecmp(buf2,"system")==0);
+         bMolecules=(gmx_strcasecmp(buf2,"molecules")==0);
        }
       } else if (bSystem && nsol && (buf[0]!=';') ) {
        /* if sol present, append "in water" to system name */
index 878147ac4b3998b1742bd77828d09dd9ffd7e97f..64105dd672809f30aa795ed195b200e2e14ac4e4 100644 (file)
@@ -259,7 +259,7 @@ static void update_topol(const char *topinout,int p_num,int n_num,
        buf2[strlen(buf2)-1]='\0';
        ltrim(buf2);
        rtrim(buf2);
-       bMolecules=(strcasecmp(buf2,"molecules")==0);
+       bMolecules=(gmx_strcasecmp(buf2,"molecules")==0);
       }
       fprintf(fpout,"%s",buf);
     } else if (!bMolecules) {
@@ -267,7 +267,7 @@ static void update_topol(const char *topinout,int p_num,int n_num,
     } else {
       /* Check if this is a line with solvent molecules */
       sscanf(buf,"%s",buf2);
-      if (strcasecmp(buf2,grpname) == 0) {
+      if (gmx_strcasecmp(buf2,grpname) == 0) {
        sol_line = nmol_line;
        sscanf(buf,"%*s %d",&nsol_last);
       }
index f75389cd1c520ec33421a357300e821b0183493b..bc64378ad5e833858cf42e5c7a500e448945db77 100644 (file)
@@ -3286,7 +3286,7 @@ int gmx_hbond(int argc,char *argv[])
     /* NN-loop? If so, what estimator to use ?*/
     NN = 1;
     /* Outcommented for now DvdS 2010-07-13
-    while (NN < NN_NR && strcasecmp(NNtype[0], NNtype[NN])!=0)
+    while (NN < NN_NR && gmx_strcasecmp(NNtype[0], NNtype[NN])!=0)
         NN++;
     if (NN == NN_NR)
         gmx_fatal(FARGS, "Invalid NN-loop type.");
@@ -3300,7 +3300,7 @@ int gmx_hbond(int argc,char *argv[])
 
     /* geminate recombination? If so, which flavor? */
     gemmode = 1;
-    while (gemmode < gemNR && strcasecmp(gemType[0], gemType[gemmode])!=0)
+    while (gemmode < gemNR && gmx_strcasecmp(gemType[0], gemType[gemmode])!=0)
         gemmode++;
     if (gemmode == gemNR)
         gmx_fatal(FARGS, "Invalid recombination type.");
index 641a29f13068e395bb1e3f6e047d2fe1e9efa3d4..2948b1b4bb24fca1c72b8ab994aaf219cbc19901 100644 (file)
@@ -161,7 +161,7 @@ int search_string(char *s,int ng,char ***gn)
        int i;
 
        for(i=0; (i<ng); i++)
-               if (strcasecmp(s,*gn[i]) == 0)
+               if (gmx_strcasecmp(s,*gn[i]) == 0)
                        return i;
 
        gmx_fatal(FARGS,"Group %s not found in indexfile.\nMaybe you have non-default groups in your mdp file, while not using the '-n' option of grompp.\nIn that case use the '-n' option.\n",s);
@@ -911,7 +911,7 @@ void top_update(const char *topfile, char *ins, rm_t *rm_p, gmx_mtop_t *mtop)
                                        buf2[strlen(buf2)-1]='\0';
                                        ltrim(buf2);
                                        rtrim(buf2);
-                                       if (strcasecmp(buf2,"molecules")==0)
+                                       if (gmx_strcasecmp(buf2,"molecules")==0)
                                                bMolecules=1;
                                }
                                fprintf(fpout,"%s",buf);
index 5020115ef0cf634870d2f174161da64f57f9c857..d6049270671290cb505c4d767c87b80f70e59df7 100644 (file)
@@ -455,7 +455,7 @@ static bool comp_name(char *name,char *search)
     default:
       /* Compare a single character */
       if (( bCase && strncmp(name,search,1)) ||
-         (!bCase && strncasecmp(name,search,1))) {
+         (!bCase && gmx_strncasecmp(name,search,1))) {
        return FALSE;
       }
     }