scc

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

strcmp.c (183B)


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