130423Smckusick /* 2*61193Sbostic * Copyright (c) 1987, 1993 3*61193Sbostic * The Regents of the University of California. All rights reserved. 435110Sbostic * 542635Sbostic * %sccs.include.redist.c% 630423Smckusick */ 730423Smckusick 830423Smckusick #if defined(LIBC_SCCS) && !defined(lint) 9*61193Sbostic static char sccsid[] = "@(#)bcmp.c 8.1 (Berkeley) 06/04/93"; 1035110Sbostic #endif /* LIBC_SCCS and not lint */ 1130423Smckusick 1242144Sbostic #include <string.h> 1342144Sbostic 1430423Smckusick /* 1530423Smckusick * bcmp -- vax cmpc3 instruction 1630423Smckusick */ 1756416Sbostic int bcmp(b1,b2,length)1830423Smckusickbcmp(b1, b2, length) 1946613Sbostic const void *b1, *b2; 2042144Sbostic register size_t length; 2130423Smckusick { 2246613Sbostic register char *p1, *p2; 2330423Smckusick 2430423Smckusick if (length == 0) 2542144Sbostic return(0); 2646613Sbostic p1 = (char *)b1; 2746613Sbostic p2 = (char *)b2; 2830423Smckusick do 2946613Sbostic if (*p1++ != *p2++) 3030423Smckusick break; 3130423Smckusick while (--length); 3230423Smckusick return(length); 3330423Smckusick } 34