From 554331bbb9fe7d143663402be8c0a7bd3e7a35cc Mon Sep 17 00:00:00 2001 From: Robert Drehmel Date: Fri, 30 Aug 2002 19:08:53 +0000 Subject: [PATCH] - Update the manual page to show that the associated header file is and not anymore. - Tell the reader about this change in the HISTORY section. - Switch to use an ANSI-C function definition. - Include instead of in the source file. --- lib/libc/string/ffs.3 | 9 ++++++++- lib/libc/string/ffs.c | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/libc/string/ffs.3 b/lib/libc/string/ffs.3 index 71e13b2a617..fd4de44b195 100644 --- a/lib/libc/string/ffs.3 +++ b/lib/libc/string/ffs.3 @@ -43,7 +43,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In strings.h .Ft int .Fn ffs "int value" .Sh DESCRIPTION @@ -62,3 +62,10 @@ The .Fn ffs function appeared in .Bx 4.3 . +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/ffs.c b/lib/libc/string/ffs.c index 14985a4e7bf..f08e0d124e3 100644 --- a/lib/libc/string/ffs.c +++ b/lib/libc/string/ffs.c @@ -37,14 +37,13 @@ static char sccsid[] = "@(#)ffs.c 8.1 (Berkeley) 6/4/93"; #include __FBSDID("$FreeBSD$"); -#include +#include /* * ffs -- vax ffs instruction */ int -ffs(mask) - int mask; +ffs(int mask) { int bit;