| /* Public domain, from daemontools-0.76. */ | |
| #include "str.h" | |
| int str_diff(const char *s,const char *t) | |
| { | |
| char x; | |
| for (;;) { | |
| x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
| x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
| x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
| x = *s; if (x != *t) break; if (!x) break; ++s; ++t; | |
| } | |
| return ((int)(unsigned int)(unsigned char) x) | |
| - ((int)(unsigned int)(unsigned char) *t); | |
| } |