From e232d9863a8486cf94eaa4bc06c2e9ff52bf3140 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Sun, 21 Dec 2014 12:10:32 +0000 Subject: [PATCH] 5464 missing ffs() and fsl() family of manual pages Reviewed by: Jerry Jelinek Approved by: Richard Lowe --- usr/src/man/man3c/Makefile | 11 ++++++++ usr/src/man/man3c/ffs.3c | 35 ++++++++++++++++++-------- usr/src/man/man3lib/libc.3lib | 6 +++-- usr/src/pkg/manifests/system-library.man3c.inc | 5 ++++ 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile index 92830c3d85..517319c7fb 100644 --- a/usr/src/man/man3c/Makefile +++ b/usr/src/man/man3c/Makefile @@ -734,6 +734,8 @@ MANLINKS= FD_CLR.3c \ fdopendir.3c \ fdwalk.3c \ feof.3c \ + ffsl.3c \ + ffsll.3c \ fgetgrent.3c \ fgetgrent_r.3c \ fgetpwent.3c \ @@ -746,6 +748,9 @@ MANLINKS= FD_CLR.3c \ file_to_decimal.3c \ fileno.3c \ finite.3c \ + fls.3c \ + flsl.3c \ + flsll.3c \ fpclass.3c \ fpgetmask.3c \ fpgetsticky.3c \ @@ -1565,6 +1570,12 @@ clearerr.3c := LINKSRC = ferror.3c feof.3c := LINKSRC = ferror.3c fileno.3c := LINKSRC = ferror.3c +ffsl.3c := LINKSRC = ffs.3c +ffsll.3c := LINKSRC = ffs.3c +fls.3c := LINKSRC = ffs.3c +flsl.3c := LINKSRC = ffs.3c +flsll.3c := LINKSRC = ffs.3c + fsetattr.3c := LINKSRC = fgetattr.3c getattrat.3c := LINKSRC = fgetattr.3c setattrat.3c := LINKSRC = fgetattr.3c diff --git a/usr/src/man/man3c/ffs.3c b/usr/src/man/man3c/ffs.3c index 88d5e5b92f..62c6a3d247 100644 --- a/usr/src/man/man3c/ffs.3c +++ b/usr/src/man/man3c/ffs.3c @@ -1,4 +1,5 @@ '\" te +.\" Copyright (c) 2014, Joyent, Inc. .\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. @@ -15,26 +16,41 @@ ffs \- find first set bit .nf #include -\fBint\fR \fBffs\fR(\fBconst int\fR \fIi\fR); +\fBint\fR \fBffs\fR(\fBint\fR \fIi\fR); + +\fBint\fR \fBffsl\fR(\flong\fR \fIi\fR); + +\fBint\fR \fBffsll\fR(\fBlong long\fR \fIi\fR); + +\fBint\fR \fBfls\fR(\fBint\fR \fIi\fR); + +\fBint\fR \fBflsl\fR(\fBlong\fR \fIi\fR); + +\fBint\fR \fBflsl\fR(\fBlong long\fR \fIi\fR); .fi .SH DESCRIPTION +.LP +The \fBffs()\fR, \fBffsl()\, and \fBffsll()\fR functions finds the first bit set +(beginning with the least significant bit) and return the index of that bit. +Bits are numbered starting at one (the least significant bit). .sp .LP -The \fBffs()\fR function finds the first bit set (beginning with the least -significant bit) and returns the index of that bit. Bits are numbered starting -at one (the least significant bit). +The \fBfls()\fR, \fBflsl()\fR, and \fBflsll()\fR functions find the last bit set +(beginning with the most significant bit) and return the index of that bit. +Bits are numbered starting at one (the least significant bit). .SH RETURN VALUES +.LP +The \fBffs()\fR, \fBffsl()\fR, and \fBffsll()\fR functions returns the index of +the first bit set. If \fIi\fR is 0, then they return 0. .sp .LP -The \fBffs()\fR function returns the index of the first bit set. If \fIi\fR is -0, then \fBffs()\fR returns 0. +The \fBfls()\fR, \fBflsl()\fR, and \fBflsll()\fR functions return the index of +the last bit set. If \fIi\fR is 0, then they return 0. .SH ERRORS -.sp .LP No errors are defined. .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -46,12 +62,11 @@ c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ -Interface Stability Standard +Interface Stability Committed _ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index 7ba395c349..a976fb256c 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -230,8 +230,10 @@ l l . \fBfdopen\fR \fBfdopendir\fR \fBfdwalk\fR \fBfeof\fR \fBferror\fR \fBfflush\fR -\fBffs\fR \fBfgetattr\fR -\fBfgetc\fR +\fBffs\fR \fBffsl\fR +\fBffsll\fR \fBfls\fR +\fBflsl\fR \fBflsll\fR +\fBfgetattr\fR \fBfgetc\fR \fBfgetgrent\fR \fBfgetgrent_r\fR \fBfgetpos\fR \fBfgetpwent\fR \fBfgetpwent_r\fR \fBfgets\fR diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc index 12df716f76..2bb5fabf58 100644 --- a/usr/src/pkg/manifests/system-library.man3c.inc +++ b/usr/src/pkg/manifests/system-library.man3c.inc @@ -735,6 +735,8 @@ link path=usr/share/man/man3c/fcvt.3c target=ecvt.3c link path=usr/share/man/man3c/fdopendir.3c target=opendir.3c link path=usr/share/man/man3c/fdwalk.3c target=closefrom.3c link path=usr/share/man/man3c/feof.3c target=ferror.3c +link path=usr/share/man/man3c/ffsl.3c target=ffs.3c +link path=usr/share/man/man3c/ffsll.3c target=ffs.3c link path=usr/share/man/man3c/fgetgrent.3c target=getgrnam.3c link path=usr/share/man/man3c/fgetgrent_r.3c target=getgrnam.3c link path=usr/share/man/man3c/fgetpwent.3c target=getpwnam.3c @@ -747,6 +749,9 @@ link path=usr/share/man/man3c/fgetws.3c target=getws.3c link path=usr/share/man/man3c/file_to_decimal.3c target=string_to_decimal.3c link path=usr/share/man/man3c/fileno.3c target=ferror.3c link path=usr/share/man/man3c/finite.3c target=isnand.3c +link path=usr/share/man/man3c/fls.3c target=ffs.3c +link path=usr/share/man/man3c/flsl.3c target=ffs.3c +link path=usr/share/man/man3c/flsll.3c target=ffs.3c link path=usr/share/man/man3c/fpclass.3c target=isnand.3c link path=usr/share/man/man3c/fpgetmask.3c target=fpgetround.3c link path=usr/share/man/man3c/fpgetsticky.3c target=fpgetround.3c -- 2.11.4.GIT