Commit | Line | Data |
---|---|---|
dba1d438 KM |
1 | /* |
2 | * Copyright (c) 1987 Regents of the University of California. | |
acca4551 KB |
3 | * All rights reserved. |
4 | * | |
019bea33 | 5 | * %sccs.include.redist.c% |
dba1d438 KM |
6 | */ |
7 | ||
8 | #if defined(LIBC_SCCS) && !defined(lint) | |
019bea33 | 9 | static char sccsid[] = "@(#)bcmp.c 5.4 (Berkeley) %G%"; |
acca4551 | 10 | #endif /* LIBC_SCCS and not lint */ |
dba1d438 | 11 | |
80acdbfd KB |
12 | #include <string.h> |
13 | ||
dba1d438 KM |
14 | /* |
15 | * bcmp -- vax cmpc3 instruction | |
16 | */ | |
17 | bcmp(b1, b2, length) | |
18 | register char *b1, *b2; | |
80acdbfd | 19 | register size_t length; |
dba1d438 KM |
20 | { |
21 | ||
22 | if (length == 0) | |
80acdbfd | 23 | return(0); |
dba1d438 KM |
24 | do |
25 | if (*b1++ != *b2++) | |
26 | break; | |
27 | while (--length); | |
28 | return(length); | |
29 | } |