diff --git a/src/lib/libc/string/bcmp.3 b/src/lib/libc/string/bcmp.3 index 15ebd39c..d880c1e6 100644 --- a/src/lib/libc/string/bcmp.3 +++ b/src/lib/libc/string/bcmp.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: bcmp.3,v 1.4 1999/06/29 18:01:30 aaron Exp $ +.\" $OpenBSD: bcmp.3,v 1.5 2000/04/21 15:24:18 aaron Exp $ .\" .Dd April 19, 1991 .Dt BCMP 3 @@ -46,8 +46,7 @@ .Sh DESCRIPTION The .Fn bcmp -function -compares byte string +function compares byte string .Fa b1 against byte string .Fa b2 , diff --git a/src/lib/libc/string/bcopy.3 b/src/lib/libc/string/bcopy.3 index da144e7d..b290418f 100644 --- a/src/lib/libc/string/bcopy.3 +++ b/src/lib/libc/string/bcopy.3 @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: bcopy.3,v 1.4 1999/06/29 18:01:31 aaron Exp $ +.\" $OpenBSD: bcopy.3,v 1.5 2000/04/21 15:24:19 aaron Exp $ .\" .Dd April 19, 1991 .Dt BCOPY 3 @@ -47,8 +47,7 @@ .Sh DESCRIPTION The .Fn bcopy -function -copies +function copies .Fa len bytes from string .Fa src diff --git a/src/lib/libc/string/bm.3 b/src/lib/libc/string/bm.3 index afab2334..15277de8 100644 --- a/src/lib/libc/string/bm.3 +++ b/src/lib/libc/string/bm.3 @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: bm.3,v 1.4 1999/06/29 17:49:24 aaron Exp $ +.\" $OpenBSD: bm.3,v 1.5 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1999 .Dt BM 3 @@ -59,7 +59,7 @@ occurrence of a byte string within another byte string. evaluates .Fa patlen bytes starting at -.Fa pattern , +.Fa pattern and returns a pointer to a structure describing them. The bytes referenced by .Fa pattern diff --git a/src/lib/libc/string/bstring.3 b/src/lib/libc/string/bstring.3 index 0dda6c72..85283321 100644 --- a/src/lib/libc/string/bstring.3 +++ b/src/lib/libc/string/bstring.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: bstring.3,v 1.3 1999/06/06 15:17:31 aaron Exp $ +.\" $OpenBSD: bstring.3,v 1.4 2000/04/21 15:24:19 aaron Exp $ .\" .Dd April 19, 1991 .Dt BSTRING 3 @@ -96,14 +96,15 @@ and conform to .St -ansiC . .Sh HISTORY -The functions +The .Fn bzero and .Fn memccpy -appeared in -.Bx 4.3 ; -the functions -.Fn bcmp , -.Fn bcopy , -appeared in +functions appeared in +.Bx 4.3 . +The +.Fn bcmp +and +.Fn bcopy +functions appeared in .Bx 4.2 . diff --git a/src/lib/libc/string/bzero.3 b/src/lib/libc/string/bzero.3 index 4a35aafa..a735d5ef 100644 --- a/src/lib/libc/string/bzero.3 +++ b/src/lib/libc/string/bzero.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: bzero.3,v 1.4 1999/06/29 18:01:32 aaron Exp $ +.\" $OpenBSD: bzero.3,v 1.5 2000/04/21 15:24:19 aaron Exp $ .\" .Dd April 19, 1991 .Dt BZERO 3 @@ -46,8 +46,7 @@ .Sh DESCRIPTION The .Fn bzero -function -writes +function writes .Fa len zero bytes to the string .Fa b . @@ -62,6 +61,5 @@ does nothing. .Sh HISTORY A .Fn bzero -function -appeared in +function appeared in .Bx 4.3 . diff --git a/src/lib/libc/string/ffs.3 b/src/lib/libc/string/ffs.3 index 9ef08aef..dc7a2074 100644 --- a/src/lib/libc/string/ffs.3 +++ b/src/lib/libc/string/ffs.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: ffs.3,v 1.2 1996/08/19 08:34:01 tholo Exp $ +.\" $OpenBSD: ffs.3,v 1.3 2000/04/21 15:24:19 aaron Exp $ .\" .Dd April 19, 1991 .Dt FFS 3 @@ -46,12 +46,10 @@ .Sh DESCRIPTION The .Fn ffs -function -finds the first bit set in +function finds the first bit set in .Fa value and returns the index of that bit. -Bits are numbered starting from 1, starting at the right-most -bit. +Bits are numbered starting from 1, starting at the rightmost bit. A return value of 0 means that the argument was zero. .Sh SEE ALSO .Xr bitstring 3 diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3 index 873d3f78..feedeff3 100644 --- a/src/lib/libc/string/memccpy.3 +++ b/src/lib/libc/string/memccpy.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: memccpy.3,v 1.5 1999/06/29 18:01:32 aaron Exp $ +.\" $OpenBSD: memccpy.3,v 1.6 2000/04/21 15:24:19 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,14 +46,15 @@ .Sh DESCRIPTION The .Fn memccpy -function -copies bytes from string +function copies bytes from string .Fa src to string .Fa dst . If the character .Fa c -(as converted to an unsigned char) occurs in the string +(as converted to an +.Li unsigned char ) +occurs in the string .Fa src , the copy stops and a pointer to the byte after the copy of .Fa c diff --git a/src/lib/libc/string/memchr.3 b/src/lib/libc/string/memchr.3 index 0bcdde69..632c440b 100644 --- a/src/lib/libc/string/memchr.3 +++ b/src/lib/libc/string/memchr.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: memchr.3,v 1.4 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: memchr.3,v 1.5 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt MEMCHR 3 @@ -48,18 +48,16 @@ .Sh DESCRIPTION The .Fn memchr -function -locates the first occurrence of +function locates the first occurrence of .Fa c -(converted to an unsigned char) +(converted to an +.Li unsigned char ) in string .Fa b . .Sh RETURN VALUES The .Fn memchr -function -returns a pointer to the byte located, -or +function returns a pointer to the byte located, or .Dv NULL if no such byte exists within .Fa len @@ -76,6 +74,5 @@ bytes. .Sh STANDARDS The .Fn memchr -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/memcmp.3 b/src/lib/libc/string/memcmp.3 index 34c5f608..db4fef36 100644 --- a/src/lib/libc/string/memcmp.3 +++ b/src/lib/libc/string/memcmp.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: memcmp.3,v 1.3 1996/12/10 09:06:11 deraadt Exp $ +.\" $OpenBSD: memcmp.3,v 1.4 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt MEMCMP 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn memcmp -function -compares byte string +function compares byte string .Fa b1 against byte string .Fa b2 . @@ -59,10 +58,11 @@ bytes long. .Sh RETURN VALUES The .Fn memcmp -function -returns zero if the two strings are identical, +function returns zero if the two strings are identical, otherwise returns the difference between the first two differing bytes -(treated as unsigned char values, so that +(treated as +.Li unsigned char +values, so that .Sq Li \e200 is greater than .Sq Li \&\e0 , @@ -77,6 +77,5 @@ Zero-length strings are always identical. .Sh STANDARDS The .Fn memcmp -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/memcpy.3 b/src/lib/libc/string/memcpy.3 index 75eb00b2..030eadff 100644 --- a/src/lib/libc/string/memcpy.3 +++ b/src/lib/libc/string/memcpy.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: memcpy.3,v 1.2 1996/08/19 08:34:06 tholo Exp $ +.\" $OpenBSD: memcpy.3,v 1.3 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt MEMCPY 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn memcpy -function -copies +function copies .Fa len bytes from string .Fa src @@ -58,8 +57,7 @@ to string .Sh RETURN VALUES The .Fn memcpy -function -returns the original value of +function returns the original value of .Fa dst . .Sh SEE ALSO .Xr bcopy 3 , @@ -69,8 +67,7 @@ returns the original value of .Sh STANDARDS The .Fn memcpy -function -conforms to +function conforms to .St -ansiC . .Sh BUGS In this implementation diff --git a/src/lib/libc/string/memmove.3 b/src/lib/libc/string/memmove.3 index 95f6b759..026dab0f 100644 --- a/src/lib/libc/string/memmove.3 +++ b/src/lib/libc/string/memmove.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: memmove.3,v 1.2 1996/08/19 08:34:07 tholo Exp $ +.\" $OpenBSD: memmove.3,v 1.3 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt MEMMOVE 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn memmove -function -copies +function copies .Fa len bytes from string .Fa src @@ -70,6 +69,5 @@ function returns the original value of .Sh STANDARDS The .Fn memmove -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/memset.3 b/src/lib/libc/string/memset.3 index e1d85837..9da14983 100644 --- a/src/lib/libc/string/memset.3 +++ b/src/lib/libc/string/memset.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: memset.3,v 1.3 1997/08/24 21:56:45 deraadt Exp $ +.\" $OpenBSD: memset.3,v 1.4 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt MEMSET 3 @@ -48,18 +48,18 @@ .Sh DESCRIPTION The .Fn memset -function -writes +function writes .Fa len bytes of value .Fa c -(converted to an unsigned char) to the string +(converted to an +.Li unsigned char ) +to the string .Fa b . .Sh RETURN VALUES The .Fn memset -function -returns the original value of +function returns the original value of .Fa b . .Sh SEE ALSO .Xr bzero 3 , @@ -67,6 +67,5 @@ returns the original value of .Sh STANDARDS The .Fn memset -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 index be4e96a1..3cfc76e3 100644 --- a/src/lib/libc/string/strcasecmp.3 +++ b/src/lib/libc/string/strcasecmp.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strcasecmp.3,v 1.5 1999/06/06 15:17:32 aaron Exp $ +.\" $OpenBSD: strcasecmp.3,v 1.6 2000/04/21 15:24:19 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -53,8 +53,7 @@ The .Fn strcasecmp and .Fn strncasecmp -functions -compare the null-terminated strings +functions compare the null-terminated strings .Fa s1 and .Fa s2 diff --git a/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3 index 6a7c51c4..e9e5163b 100644 --- a/src/lib/libc/string/strcat.3 +++ b/src/lib/libc/string/strcat.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcat.3,v 1.7 1999/06/06 06:57:52 pjanzen Exp $ +.\" $OpenBSD: strcat.3,v 1.8 2000/04/21 15:24:19 aaron Exp $ .\" .Dd July 8, 1997 .Dt STRCAT 3 @@ -53,8 +53,7 @@ The .Fn strcat and .Fn strncat -functions -append a copy of the null-terminated string +functions append a copy of the null-terminated string .Fa append to the end of the null-terminated string .Fa s , @@ -66,8 +65,7 @@ must have sufficient space to hold the result. .Pp The .Fn strncat -function -appends not more than +function appends not more than .Fa count characters where space for the terminating .Ql \e0 @@ -78,8 +76,7 @@ The .Fn strcat and .Fn strncat -functions -return the pointer +functions return the pointer .Fa s . .Sh EXAMPLES The following appends @@ -109,9 +106,10 @@ The above will copy as many characters from .Dq Li input to .Dq Li buf -as will -fit. It then appends as many characters from suffix as will fit (or none -if there is no space). For operations like this, the +as will fit. +It then appends as many characters from suffix as will fit (or none +if there is no space). +For operations like this, the .Xr strlcpy 3 and .Xr strlcat 3 @@ -133,6 +131,5 @@ The .Fn strcat and .Fn strncat -functions -conform to +functions conform to .St -ansiC . diff --git a/src/lib/libc/string/strchr.3 b/src/lib/libc/string/strchr.3 index 5b117b83..1333a305 100644 --- a/src/lib/libc/string/strchr.3 +++ b/src/lib/libc/string/strchr.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strchr.3,v 1.6 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strchr.3,v 1.7 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCHR 3 @@ -98,8 +98,7 @@ p = strchr(s, 'o'); .Sh STANDARDS The .Fn strchr -function -conforms to +function conforms to .St -ansiC . .Pp The diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3 index a1f59b4d..c1173a42 100644 --- a/src/lib/libc/string/strcmp.3 +++ b/src/lib/libc/string/strcmp.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcmp.3,v 1.4 1999/06/06 15:17:32 aaron Exp $ +.\" $OpenBSD: strcmp.3,v 1.5 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCMP 3 @@ -53,8 +53,7 @@ The .Fn strcmp and .Fn strncmp -functions -lexicographically compare the null-terminated strings +functions lexicographically compare the null-terminated strings .Fa s1 and .Fa s2 . @@ -88,6 +87,5 @@ The .Fn strcmp and .Fn strncmp -functions -conform to +functions conform to .St -ansiC . diff --git a/src/lib/libc/string/strcoll.3 b/src/lib/libc/string/strcoll.3 index 20af9988..5d3e44ee 100644 --- a/src/lib/libc/string/strcoll.3 +++ b/src/lib/libc/string/strcoll.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcoll.3,v 1.2 1996/08/19 08:34:12 tholo Exp $ +.\" $OpenBSD: strcoll.3,v 1.3 2000/04/21 15:24:19 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCOLL 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn strcoll -function -lexicographically compares the null-terminated strings +function lexicographically compares the null-terminated strings .Fa s1 and .Fa s2 @@ -69,6 +68,5 @@ is greater than, equal to, or less than .Sh STANDARDS The .Fn strcoll -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index aab10f9b..1dbeafa6 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $ +.\" $OpenBSD: strcpy.3,v 1.10 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCPY 3 @@ -53,8 +53,7 @@ The .Fn strcpy and .Fn strncpy -functions -copy the string +functions copy the string .Fa src to .Fa dst @@ -87,8 +86,7 @@ The .Fn strcpy and .Fn strncpy -functions -return +functions return .Fa dst . .Sh EXAMPLES The following sets @@ -120,7 +118,8 @@ The following copies as many characters from .Va input to .Va buf -as will fit and null terminates the result. Because +as will fit and null terminates the result. +Because .Fn strncpy does .Em not @@ -134,7 +133,8 @@ buf[sizeof(buf) - 1] = '\e0'; .Pp Note that .Xr strlcpy 3 -is a better choice for this kind of operation. The equivalent using +is a better choice for this kind of operation. +The equivalent using .Xr strlcpy 3 is simply: .Bd -literal -offset indent @@ -151,6 +151,5 @@ The .Fn strcpy and .Fn strncpy -functions -conform to +functions conform to .St -ansiC . diff --git a/src/lib/libc/string/strcspn.3 b/src/lib/libc/string/strcspn.3 index 6f7233a3..37e8f163 100644 --- a/src/lib/libc/string/strcspn.3 +++ b/src/lib/libc/string/strcspn.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcspn.3,v 1.4 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strcspn.3,v 1.5 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCSPN 3 @@ -48,23 +48,20 @@ .Sh DESCRIPTION The .Fn strcspn -function -spans the initial part of the null-terminated string +function spans the initial part of the null-terminated string .Fa s as long as the characters from .Fa s do not occur in string .Fa charset -(it -spans the +(it spans the .Em complement of .Fa charset ) . .Sh RETURN VALUES The .Fn strcspn -function -returns the number of characters spanned. +function returns the number of characters spanned. .Sh EXAMPLES The following call to .Fn strcspn @@ -91,6 +88,5 @@ span = strcspn(s, charset); .Sh STANDARDS The .Fn strcspn -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3 index 73c144d6..457b8322 100644 --- a/src/lib/libc/string/strdup.3 +++ b/src/lib/libc/string/strdup.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strdup.3,v 1.7 1999/06/04 19:14:56 aaron Exp $ +.\" $OpenBSD: strdup.3,v 1.8 2000/04/21 15:24:20 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,13 +46,10 @@ .Sh DESCRIPTION The .Fn strdup -function -allocates sufficient memory for a copy -of the string +function allocates sufficient memory for a copy of the string .Fa s , does the copy, and returns a pointer to it. -The pointer may subsequently be used as an -argument to the function +The pointer may subsequently be used as an argument to the function .Xr free 3 . .Pp If insufficient memory is available, diff --git a/src/lib/libc/string/string.3 b/src/lib/libc/string/string.3 index ee742249..7a67b96b 100644 --- a/src/lib/libc/string/string.3 +++ b/src/lib/libc/string/string.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: string.3,v 1.7 1999/06/06 15:17:32 aaron Exp $ +.\" $OpenBSD: string.3,v 1.8 2000/04/21 15:24:20 aaron Exp $ .\" .Dd April 19, 1991 .Dt STRING 3 @@ -157,6 +157,5 @@ The .Fn strstr , and .Fn strtok -functions -conform to +functions conform to .St -ansiC . diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3 index b07e30e6..03a80e6c 100644 --- a/src/lib/libc/string/strlcpy.3 +++ b/src/lib/libc/string/strlcpy.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strlcpy.3,v 1.6 1999/09/04 02:22:46 pjanzen Exp $ +.\" $OpenBSD: strlcpy.3,v 1.7 2000/04/21 15:24:20 aaron Exp $ .\" .\" Copyright (c) 1998 Todd C. Miller .\" All rights reserved. @@ -43,7 +43,8 @@ The .Fn strlcpy and .Fn strlcat -functions copy and concatenate strings respectively. They are designed +functions copy and concatenate strings respectively. +They are designed to be safer, more consistent, and less error prone replacements for .Xr strncpy 3 and @@ -55,7 +56,8 @@ and take the full size of the buffer (not just the length) and guarantee to NUL-terminate the result (as long as .Fa size -is larger than 0). Note that you should include a byte for the NUL in +is larger than 0). +Note that you should include a byte for the NUL in .Fa size . .Pp The @@ -82,8 +84,8 @@ The .Fn strlcpy and .Fn strlcat -functions return the total length of the string they tried to -create. For +functions return the total length of the string they tried to create. +For .Fn strlcpy that means the length of .Fa src . diff --git a/src/lib/libc/string/strlen.3 b/src/lib/libc/string/strlen.3 index 9db28cd1..759e7240 100644 --- a/src/lib/libc/string/strlen.3 +++ b/src/lib/libc/string/strlen.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strlen.3,v 1.3 1999/06/04 19:14:56 aaron Exp $ +.\" $OpenBSD: strlen.3,v 1.4 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRLEN 3 @@ -48,22 +48,18 @@ .Sh DESCRIPTION The .Fn strlen -function -computes the length of the string +function computes the length of the string .Fa s . .Sh RETURN VALUES The .Fn strlen -function -returns -the number of characters that precede the -terminating NUL +function returns the number of characters that precede the terminating +.Tn NUL character. .Sh SEE ALSO .Xr string 3 .Sh STANDARDS The .Fn strlen -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strmode.3 b/src/lib/libc/string/strmode.3 index 3703a7ad..bf311f1f 100644 --- a/src/lib/libc/string/strmode.3 +++ b/src/lib/libc/string/strmode.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strmode.3,v 1.7 2000/02/29 03:45:12 aaron Exp $ +.\" $OpenBSD: strmode.3,v 1.8 2000/04/21 15:24:20 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,8 +46,7 @@ .Sh DESCRIPTION The .Fn strmode -function -converts a file +function converts a file .Fa mode (the type and permission information associated with an inode, see .Xr stat 2 ) @@ -150,8 +149,7 @@ it will be a space. .Sh RETURN VALUES The .Fn strmode -function -always returns 0. +function always returns 0. .Sh SEE ALSO .Xr chmod 1 , .Xr find 1 , diff --git a/src/lib/libc/string/strpbrk.3 b/src/lib/libc/string/strpbrk.3 index c7b7731e..52bf13b9 100644 --- a/src/lib/libc/string/strpbrk.3 +++ b/src/lib/libc/string/strpbrk.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strpbrk.3,v 1.4 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strpbrk.3,v 1.5 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRPBRK 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn strpbrk -function -locates in the null-terminated string +function locates in the null-terminated string .Fa s the first occurrence of any character in the string .Fa charset @@ -57,7 +56,7 @@ and returns a pointer to this character. If no characters from .Fa charset occur anywhere in -.Fa s +.Fa s , .Fn strpbrk returns .Dv NULL . @@ -73,6 +72,5 @@ returns .Sh STANDARDS The .Fn strpbrk -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strrchr.3 b/src/lib/libc/string/strrchr.3 index 8de04181..394fc2aa 100644 --- a/src/lib/libc/string/strrchr.3 +++ b/src/lib/libc/string/strrchr.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strrchr.3,v 1.5 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strrchr.3,v 1.6 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRRCHR 3 @@ -55,7 +55,9 @@ function locates the last occurrence of the character .Fa c in the string .Fa s . -The terminating NUL character is considered part of the string. +The terminating +.Tn NUL +character is considered part of the string. If .Fa c is @@ -98,8 +100,7 @@ p = strrchr(s, 'o'); .Sh STANDARDS The .Fn strrchr -function -conforms to +function conforms to .St -ansiC . .Pp The diff --git a/src/lib/libc/string/strsep.3 b/src/lib/libc/string/strsep.3 index 9f44a22d..b15915ab 100644 --- a/src/lib/libc/string/strsep.3 +++ b/src/lib/libc/string/strsep.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strsep.3,v 1.7 2000/03/04 22:19:32 aaron Exp $ +.\" $OpenBSD: strsep.3,v 1.8 2000/04/21 15:24:20 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -97,8 +97,7 @@ for (ap = argv; (*ap = strsep(&inputstring, " \et")) != NULL;) .Sh HISTORY The .Fn strsep -function -is intended as a replacement for the +function is intended as a replacement for the .Fn strtok function. While the diff --git a/src/lib/libc/string/strspn.3 b/src/lib/libc/string/strspn.3 index 8274a06b..ca965aeb 100644 --- a/src/lib/libc/string/strspn.3 +++ b/src/lib/libc/string/strspn.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strspn.3,v 1.5 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strspn.3,v 1.6 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRSPN 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn strspn -function -spans the initial part of the null-terminated string +function spans the initial part of the null-terminated string .Fa s as long as the characters from .Fa s @@ -58,8 +57,7 @@ occur in string .Sh RETURN VALUES The .Fn strspn -function -returns the number of characters spanned. +function returns the number of characters spanned. .Sh EXAMPLES The following call to .Fn strspn @@ -86,6 +84,5 @@ span = strspn(s, charset); .Sh STANDARDS The .Fn strspn -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strstr.3 b/src/lib/libc/string/strstr.3 index 3287cce0..10beea42 100644 --- a/src/lib/libc/string/strstr.3 +++ b/src/lib/libc/string/strstr.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strstr.3,v 1.4 1999/09/21 16:44:01 espie Exp $ +.\" $OpenBSD: strstr.3,v 1.5 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRSTR 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn strstr -function -locates the first occurrence of the null-terminated string +function locates the first occurrence of the null-terminated string .Fa little in the null-terminated string .Fa big . @@ -82,6 +81,5 @@ returns a pointer to the first character of the first occurrence of .Sh STANDARDS The .Fn strstr -function -conforms to +function conforms to .St -ansiC . diff --git a/src/lib/libc/string/strtok.3 b/src/lib/libc/string/strtok.3 index fa2ec28c..143ffc2e 100644 --- a/src/lib/libc/string/strtok.3 +++ b/src/lib/libc/string/strtok.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strtok.3,v 1.10 1999/11/09 11:20:13 art Exp $ +.\" $OpenBSD: strtok.3,v 1.11 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRTOK 3 @@ -55,8 +55,7 @@ This interface is obsoleted by .Pp The .Fn strtok -function -is used to isolate sequential tokens in a null-terminated string, +function is used to isolate sequential tokens in a null-terminated string, .Fa str . These tokens are separated in the string by at least one of the characters in @@ -81,9 +80,8 @@ The .Fn strtok and .Fn strtok_r -functions -return a pointer to the beginning of each subsequent token in the string, -after replacing the separator character itself with an +functions return a pointer to the beginning of each subsequent token +in the string, after replacing the separator character itself with an .Tn ASCII NUL character. When no more tokens remain, a null pointer is returned. @@ -116,13 +114,19 @@ for ((p = strtok_r(s, " ", &last)); p; (p = strtok_r(NULL, " ", &last)), i++) { tokens[i] = '\e0'; .Ed .Pp -That is, tokens[0] will point to +That is, +.Li tokens[0] +will point to .Qq cat , -tokens[1] will point to +.Li tokens[1] +will point to .Qq dog , -tokens[2] will point to +.Li tokens[2] +will point to .Qq horse , -and tokens[3] will point to +and +.Li tokens[3] +will point to .Qq cow . .Sh SEE ALSO .Xr memchr 3 , @@ -136,8 +140,7 @@ and tokens[3] will point to .Sh STANDARDS The .Fn strtok -function -conforms to +function conforms to .St -ansiC . .Sh BUGS The System V diff --git a/src/lib/libc/string/strxfrm.3 b/src/lib/libc/string/strxfrm.3 index 3ebdd42c..1e533899 100644 --- a/src/lib/libc/string/strxfrm.3 +++ b/src/lib/libc/string/strxfrm.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strxfrm.3,v 1.2 1996/08/19 08:34:28 tholo Exp $ +.\" $OpenBSD: strxfrm.3,v 1.3 2000/04/21 15:24:20 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRXFRM 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn strxfrm -function -does something horrible (see +function does something horrible (see .Tn ANSI standard). In this implementation it just copies. @@ -63,6 +62,5 @@ In this implementation it just copies. .Sh STANDARDS The .Fn strxfrm -function -conforms to +function conforms to .St -ansiC .