1: # include   <stdio.h>
   2: # include   <ctype.h>
   3: 
   4: # define    reg register
   5: 
   6: # define    makelower(c)    (isupper(c) ? tolower(c) : c)
   7: 
   8: /*
   9:  * Compare strings:  s1>s2: >0  s1==s2: 0  s1<s2: <0
  10:  */
  11: 
  12: strcmp(s1, s2)
  13: reg char    *s1, *s2; {
  14: 
  15:     while (makelower(*s1) == makelower(*s2)) {
  16:         if (*s1 == '\0')
  17:             return 0;
  18:         s1++, s2++;
  19:     }
  20:     return *s1 - *s2;
  21: }

Defined functions

strcmp defined in line 12; used 1 times

Defined macros

makelower defined in line 6; used 2 times
  • in line 15(2)
reg defined in line 4; used 1 times
  • in line 13
Last modified: 1982-06-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2380
Valid CSS Valid XHTML 1.0 Strict