diff options
author | Robert Drehmel <robert@FreeBSD.org> | 2002-08-30 21:07:40 +0000 |
---|---|---|
committer | Robert Drehmel <robert@FreeBSD.org> | 2002-08-30 21:07:40 +0000 |
commit | 9abf5797a0987be44fffbdf7fe99714c956b8350 (patch) | |
tree | e3d0d3ae87c4237a426a4acdbc56a7dee4e7a8f6 /lib | |
parent | cbc98d05412e3ad5ed3de42a06dc8f7993586359 (diff) | |
download | src-9abf5797a0987be44fffbdf7fe99714c956b8350.tar.gz src-9abf5797a0987be44fffbdf7fe99714c956b8350.zip |
- Update the manual page of bcmp(3) by replacing
.In string.h
with
.In strings.h
and adding a sentence to the HISTORY section.
- Use an ANSI-C function definition.
- Include <strings.h> instead of <string.h>.
- Apply style(9): Put a space after return keywords.
Notes
Notes:
svn path=/head/; revision=102642
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/string/bcmp.3 | 9 | ||||
-rw-r--r-- | lib/libc/string/bcmp.c | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/libc/string/bcmp.3 b/lib/libc/string/bcmp.3 index c33dd21eb5ed..aa7c2cd49cdb 100644 --- a/lib/libc/string/bcmp.3 +++ b/lib/libc/string/bcmp.3 @@ -43,7 +43,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In strings.h .Ft int .Fn bcmp "const void *b1" "const void *b2" "size_t len" .Sh DESCRIPTION @@ -72,3 +72,10 @@ A .Fn bcmp function first appeared in .Bx 4.2 . +Its prototype existed previously in +.Aq Pa string.h +before it was moved to +.Aq Pa strings.h +for +.St -p1003.1-2001 +compliance. diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c index 013d0d6928b6..6c757671d0c0 100644 --- a/lib/libc/string/bcmp.c +++ b/lib/libc/string/bcmp.c @@ -37,25 +37,23 @@ static char sccsid[] = "@(#)bcmp.c 8.1 (Berkeley) 6/4/93"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <string.h> +#include <strings.h> /* * bcmp -- vax cmpc3 instruction */ int -bcmp(b1, b2, length) - const void *b1, *b2; - size_t length; +bcmp(const void *b1, const void *b2, size_t length) { char *p1, *p2; if (length == 0) - return(0); + return (0); p1 = (char *)b1; p2 = (char *)b2; do if (*p1++ != *p2++) break; while (--length); - return(length); + return (length); } |