130423Smckusick /* 230423Smckusick * Copyright (c) 1987 Regents of the University of California. 335110Sbostic * All rights reserved. 435110Sbostic * 542635Sbostic * %sccs.include.redist.c% 630423Smckusick */ 730423Smckusick 830423Smckusick #if defined(LIBC_SCCS) && !defined(lint) 9*56416Sbostic static char sccsid[] = "@(#)bcmp.c 5.7 (Berkeley) 10/04/92"; 1035110Sbostic #endif /* LIBC_SCCS and not lint */ 1130423Smckusick 1242144Sbostic #include <string.h> 1342144Sbostic 1430423Smckusick /* 1530423Smckusick * bcmp -- vax cmpc3 instruction 1630423Smckusick */ 17*56416Sbostic int 1830423Smckusick bcmp(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