scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

strcmp.c (186B)


      1 #include <string.h>
      2 
      3 #undef strcmp
      4 
      5 int
      6 strcmp(const char *s1, const char *s2)
      7 {
      8 	while (*s1 && *s2 && *s1 == *s2)
      9 		++s1, ++s2;
     10 	return *(unsigned char *) s1 - *(unsigned char *) s2;
     11 }