]> pd.if.org Git - zos/blob - klib/strcmp.c
klib and makefile
[zos] / klib / strcmp.c
1 #include <string.h>
2
3 int strcmp(const char *s1, const char *s2) {
4         while ( *s1 && (*s1 == *s2) ) {
5                 ++s1;
6                 ++s2;
7         }
8         return *(unsigned char *)s1 - *(unsigned char *)s2;
9 }