s/qmail  3.3.23
Next generation secure email transport
byte_diff.c
Go to the documentation of this file.
1 #include "byte.h"
2 
3 int byte_diff(register char *s,register unsigned int n,register char *t)
4 {
5  for (;;) {
6  if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
7  if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
8  if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
9  if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
10  }
11  return ((int)(unsigned int)(unsigned char) *s)
12  - ((int)(unsigned int)(unsigned char) *t);
13 }
int byte_diff(register char *s, register unsigned int n, register char *t)
Definition: byte_diff.c:3
unsigned n
Definition: matchup.c:36