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