scc

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

casecmp.c (246B)


      1 static char sccsid[] = "@(#) ./lib/scc/casecmp.c";
      2 #include <ctype.h>
      3 #include <scc/scc.h>
      4 
      5 int
      6 casecmp(const char *s1, const char *s2)
      7 {
      8         while (*s1 && toupper(*s1) == toupper(*s2))
      9                 ++s1, ++s2;
     10         return *s1 - *s2;
     11 }