[BACK]Return to stdfn.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/stdfn.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:16:02 version 1.1.1.3, 2003/09/15 07:09:26
Line 342  sleep(delay)
Line 342  sleep(delay)
     portable implementation of strnicmp (hopefully)      portable implementation of strnicmp (hopefully)
 *****************************************************************/  *****************************************************************/
   
   #ifndef HAVE_STRCASECMP
   # ifndef HAVE_STRICMP
   
   /* return (see MSVC documentation and strcasecmp()):
    *  -1  if str1 < str2
    *   0  if str1 == str2
    *   1  if str1 > str2
    */
   int
   gp_stricmp(s1, s2)
       const char *s1;
       const char *s2;
   {
       unsigned char c1, c2;
   
       do {
           c1 = *s1++;
           if (islower(c1))
               c1 = toupper(c1);
           c2 = *s2++;
           if (islower(c2))
               c2 = toupper(c2);
       } while (c1 == c2 && c1 && c2);
   
       if (c1 == c2)
           return 0;
       if (c1 == '\0' || c1 > c2)
           return 1;
       return -1;
   }
   # endif /* !HAVE_STRICMP */
   #endif /* !HAVE_STRCASECMP */
   
 #ifndef HAVE_STRNICMP  #ifndef HAVE_STRNICMP
 # ifndef HAVE_STRNCASECMP  # ifndef HAVE_STRNCASECMP
 int strnicmp __PROTO((char *, char *, int));  int strnicmp __PROTO((char *, char *, int));

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>