Permalink
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 455 Bytes
/* Public domain. */
#include "str.h"
int str_diff(register const char *s,register const char *t)
{
register 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);
}