Commit | Line | Data |
---|---|---|
dc0d77d7 CE |
1 | #include "str.h" |
2 | ||
3 | int str_diff(register const char *s,register const char *t) | |
4 | { | |
5 | register char x; | |
6 | ||
7 | for (;;) { | |
8 | x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
9 | x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
10 | x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
11 | x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
12 | } | |
13 | return ((int)(unsigned int)(unsigned char) x) | |
14 | - ((int)(unsigned int)(unsigned char) *t); | |
15 | } |