File: bcmp.c

package info (click to toggle)
smail 3.2.0.102-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 4,228 kB
  • ctags: 3,924
  • sloc: ansic: 41,366; sh: 3,434; makefile: 2,349; awk: 689; perl: 598; yacc: 427; sed: 2
file content (18 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* @(#) bcmp.c,v 1.2 1990/10/24 05:19:19 tron Exp */

/*
 * bcmp(b1, b2, n)  -  compare block b1 to b2 for n bytes, return 0 if same
 */
bcmp(b1, b2, n)
    char *b1;
    char *b2;
    unsigned n;
{
    while (n > 0) {
	if (*b1++ != *b2++) {
	    return 1;
	}
	--n;
    }
    return 0;
}