Project

General

Profile

patches.diff

Patches - Kyle Beauchamp, 08/22/2010 10:29 PM

View differences:

src/gmxlib/atomprop.c
355 355
  
356 356
  set_prop(aps,epropElement);
357 357
  for(i=0; (i<ap->prop[epropElement].nprop); i++) {
358
    if (strcasecmp(ap->prop[epropElement].atomnm[i],elem) == 0) {
358
    if (gmx_strcasecmp(ap->prop[epropElement].atomnm[i],elem) == 0) {
359 359
      return gmx_nint(ap->prop[epropElement].value[i]);
360 360
    }
361 361
  }
src/gmxlib/checkpoint.c
2106 2106
                }
2107 2107
                fn = outputfiles[0].filename;
2108 2108
                if (strlen(fn) < 4 ||
2109
                    strcasecmp(fn+strlen(fn)-4,ftp2ext(efLOG)) == 0)
2109
                    gmx_strcasecmp(fn+strlen(fn)-4,ftp2ext(efLOG)) == 0)
2110 2110
                {
2111 2111
                    gmx_fatal(FARGS,"File appending requested, but the log file is not the first file listed in the checkpoint file");
2112 2112
                }
src/gmxlib/filenm.c
545 545

  
546 546
    for (i = 0; (i < efNR); i++)
547 547
        if ((eptr = deffile[i].ext) != NULL)
548
            if (strcasecmp(feptr, eptr) == 0)
548
            if (gmx_strcasecmp(feptr, eptr) == 0)
549 549
                break;
550 550

  
551 551
    return i;
......
560 560
    df = &(deffile[ftp]);
561 561
    len = strlen(buf);
562 562
    extlen = strlen(df->ext);
563
    if ((len <= extlen) || (strcasecmp(&(buf[len - extlen]), df->ext) != 0))
563
    if ((len <= extlen) || (gmx_strcasecmp(&(buf[len - extlen]), df->ext) != 0))
564 564
        strcat(buf, df->ext);
565 565
}
566 566

  
......
661 661
            extlen = strlen(z_ext[i]);
662 662
            if (len > extlen)
663 663
            {
664
                if (strcasecmp(name+len-extlen,z_ext[i]) == 0)
664
                if (gmx_strcasecmp(name+len-extlen,z_ext[i]) == 0)
665 665
                {
666 666
                    buf[len-extlen]='\0';
667 667
                    break;
src/gmxlib/futil.c
754 754
     * too, or we wont be able to detect that the file exists
755 755
     */
756 756
#if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || defined __CYGWIN__ || defined __CYGWIN32__)
757
    if(strlen(bin_name)<3 || strncasecmp(bin_name+strlen(bin_name)-4,".exe",4))
757
    if(strlen(bin_name)<3 || gmx_strncasecmp(bin_name+strlen(bin_name)-4,".exe",4))
758 758
        strcat(bin_name,".exe");
759 759
#endif
760 760

  
src/gmxlib/index.c
383 383
	  while (isdigit(atnm[0]))
384 384
	    atnm++;
385 385
	  if ( (wholename[i]==-1) || (j<wholename[i]) ) {
386
	    if (strcasecmp(chains[i][j],atnm) == 0)
386
	    if (gmx_strcasecmp(chains[i][j],atnm) == 0)
387 387
	      match=TRUE;
388 388
	  } else {
389
	    if (strncasecmp(chains[i][j],atnm,strlen(chains[i][j])) == 0)
389
	    if (gmx_strncasecmp(chains[i][j],atnm,strlen(chains[i][j])) == 0)
390 390
	      match=TRUE;
391 391
	  }
392 392
	}
......
411 411
	  for(;((atoms->atom[n].resind==resind) && (n<atoms->nr));n++) {
412 412
	    match=FALSE;
413 413
	    for(j=0;(j<sizes[i]); j++) 
414
	      if (strcasecmp(chains[i][j],*atoms->atomname[n]) == 0)
414
	      if (gmx_strcasecmp(chains[i][j],*atoms->atomname[n]) == 0)
415 415
		match=TRUE;
416 416
	    if (match != complement[i])
417 417
	      aid[nra++]=n;
src/gmxlib/libxdrf.c
801 801
    int *buf = NULL;
802 802
    bool bRead;
803 803
    
804
    bRead = (xdrs->x_op == XDR_DECODE);
804

  
805 805
    
806 806
    /* preallocate a small buffer and ip on the stack - if we need more
807 807
       we can always malloc(). This is faster for small values of size: */
......
824 824
    float inv_precision;
825 825
    int errval = 1;
826 826
    int rc;
827
	
827
    bRead = (xdrs->x_op == XDR_DECODE);	
828 828
    bitsizeint[0] = bitsizeint[1] = bitsizeint[2] = 0;
829 829
    prevcoord[0]  = prevcoord[1]  = prevcoord[2]  = 0;
830 830
   
src/gmxlib/pargs.c
111 111
                        for(k=1; (pa[j].u.c[k] != NULL); k++)
112 112
                            /* only check ptr against beginning of 
113 113
                               pa[j].u.c[k] */
114
                            if (strncasecmp(ptr,pa[j].u.c[k],strlen(ptr)) == 0)
114
                            if (gmx_strncasecmp(ptr,pa[j].u.c[k],strlen(ptr)) == 0)
115 115
                                if ( ( match == NOTSET ) || 
116 116
                                        ( strlen(pa[j].u.c[k]) < 
117 117
                                          strlen(pa[j].u.c[match]) ) )
src/gmxlib/pdbio.c
323 323
	     "%-6s%5u %-4.4s %3.3s %c%4d%c   %10.5f%10.5f%10.5f%8.4f%8.4f    %2s\n");
324 324
    else {
325 325
      /* Check whether atomname is an element name */
326
      if ((strlen(nm)<4) && (strcasecmp(nm,atoms->atom[i].elem) != 0))
326
      if ((strlen(nm)<4) && (gmx_strcasecmp(nm,atoms->atom[i].elem) != 0))
327 327
	strcpy(pdbform,pdbformat);
328 328
      else {
329 329
	strcpy(pdbform,pdbformat4);
src/gmxlib/strdb.c
136 136

  
137 137
  /* Linear search */
138 138
  for(i=0; (i<nstr); i++)
139
    if (strcasecmp(str[i],key)==0)
139
    if (gmx_strcasecmp(str[i],key)==0)
140 140
      return i;
141 141

  
142 142
  return -1;
src/gmxlib/tpxio.c
188 188
      
189 189
      do {
190 190
	gmx_fio_do_string(fio,buf);
191
      } while ((strcasecmp(buf,itemstr[key]) != 0));
191
      } while ((gmx_strcasecmp(buf,itemstr[key]) != 0));
192 192
      
193
      if (strcasecmp(buf,itemstr[key]) != 0) 
193
      if (gmx_strcasecmp(buf,itemstr[key]) != 0) 
194 194
	gmx_fatal(FARGS,"\nCould not find section heading %s",itemstr[key]);
195 195
      else if (gmx_fio_getdebug(fio))
196 196
	fprintf(stderr," and found it\n");
src/gmxlib/wman.c
284 284
    links->nsr=n;
285 285
    snew(links->sr,n);
286 286
    for(i=0,j=0; (i<n); i++) {
287
      if (!program || (strcasecmp(program,filestr[i])  != 0)) {
287
      if (!program || (gmx_strcasecmp(program,filestr[i])  != 0)) {
288 288
	links->sr[j].search=strdup(filestr[i]);
289 289
	if (bWiki)
290 290
	  sprintf(buf,"[[%s]]",filestr[i]);
src/gmxlib/xvgr.c
182 182
                /* Check for special symbol */
183 183
                i = 0;
184 184
                while (sym[i] != NULL &&
185
                       strncasecmp(sym[i],gmx+g,strlen(sym[i])) != 0)
185
                       gmx_strncasecmp(sym[i],gmx+g,strlen(sym[i])) != 0)
186 186
                {
187 187
                    i++;
188 188
                }
src/kernel/gctio.c
65 65
  res=-1;
66 66
  
67 67
  for(i=0; (i<eoNR); i++)
68
    if (strcasecmp(s,eoNames[i]) == 0) {
68
    if (gmx_strcasecmp(s,eoNames[i]) == 0) {
69 69
      res=i;
70 70
      fprintf(stderr,"Coupling to observable %d (%s)\n",res,eoNames[res]);
71 71
      break;
......
453 453
  
454 454
  for(i=0; (i<ninp); i++) {
455 455
    bWrong=FALSE;
456
    if (strcasecmp(inp[i].name,"LJ") == 0) 
456
    if (gmx_strcasecmp(inp[i].name,"LJ") == 0) 
457 457
      bWrong=add_lj(&nLJ,&(tcr->tcLJ),inp[i].value,tcr->bObsUsed);
458
    else if (strcasecmp(inp[i].name,"BU") == 0) 
458
    else if (gmx_strcasecmp(inp[i].name,"BU") == 0) 
459 459
      bWrong=add_bu(&nBU,&(tcr->tcBU),inp[i].value,tcr->bObsUsed);
460
    else if (strcasecmp(inp[i].name,"Q") == 0) 
460
    else if (gmx_strcasecmp(inp[i].name,"Q") == 0) 
461 461
      bWrong=add_q(&nQ,&(tcr->tcQ),inp[i].value,tcr->bObsUsed);
462
    else if (strcasecmp(inp[i].name,"Bonds") == 0)
462
    else if (gmx_strcasecmp(inp[i].name,"Bonds") == 0)
463 463
      bWrong=add_ip(&nIP,&(tcr->tIP),inp[i].value,F_BONDS,tcr->bObsUsed);
464 464
      
465 465
    if (bWrong)