diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-08-06 03:21:37 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-08-06 03:21:37 +0000 |
commit | f320f58a3a41c09f59d2dd240920f4625a1068c3 (patch) | |
tree | a1ed0a11f7c583f6f82cd0efbcc2aeb69bd131d8 | |
parent | be8de76c3e14547badca9fa4309adeeb909afcf1 (diff) |
- macro, punctuation, and rewording tweaks
- avoid first person.
ok jmc
-rw-r--r-- | lib/libc/string/strcat.3 | 12 | ||||
-rw-r--r-- | lib/libc/string/strcpy.3 | 7 | ||||
-rw-r--r-- | lib/libc/string/strlcpy.3 | 12 | ||||
-rw-r--r-- | lib/libc/string/wcstok.3 | 8 |
4 files changed, 21 insertions, 18 deletions
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3 index 89d368c3fb2..b81e724917e 100644 --- a/lib/libc/string/strcat.3 +++ b/lib/libc/string/strcat.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcat.3,v 1.10 2005/02/25 03:12:44 cloder Exp $ +.\" $OpenBSD: strcat.3,v 1.11 2005/08/06 03:21:36 jaredy Exp $ .\" .Dd July 8, 1997 .Dt STRCAT 3 @@ -78,7 +78,7 @@ functions return the pointer The following appends .Dq Li abc to -.Dq Li chararray : +.Va chararray : .Bd -literal -offset indent char *letters = "abcdefghi"; @@ -99,11 +99,13 @@ buf[sizeof(buf) - 1] = '\e0'; .Ed .Pp The above will copy as many characters from -.Dq Li input +.Va input to -.Dq Li buf +.Va buf as will fit. -It then appends as many characters from suffix as will fit (or none +It then appends as many characters from +.Va suffix +as will fit (or none if there is no space). For operations like this, the .Xr strlcpy 3 diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3 index 504f42f2bae..2bc413c6ca7 100644 --- a/lib/libc/string/strcpy.3 +++ b/lib/libc/string/strcpy.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcpy.3,v 1.13 2005/02/25 03:12:44 cloder Exp $ +.\" $OpenBSD: strcpy.3,v 1.14 2005/08/06 03:21:36 jaredy Exp $ .\" .Dd June 29, 1991 .Dt STRCPY 3 @@ -100,7 +100,8 @@ and does .Em not NUL terminate .Va chararray -because the source string is >= the length parameter. +because the length of the source string is greater than or equal to the +length parameter. .Fn strncpy .Em only NUL terminates the destination string when the length of the source @@ -118,7 +119,7 @@ Because .Fn strncpy does .Em not -guarantee to NUL terminate the string itself, we must do this by hand. +guarantee to NUL terminate the string itself, it must be done by hand. .Bd -literal -offset indent char buf[BUFSIZ]; diff --git a/lib/libc/string/strlcpy.3 b/lib/libc/string/strlcpy.3 index b392588879e..c728c75e510 100644 --- a/lib/libc/string/strlcpy.3 +++ b/lib/libc/string/strlcpy.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strlcpy.3,v 1.16 2003/06/17 21:56:24 millert Exp $ +.\" $OpenBSD: strlcpy.3,v 1.17 2005/08/06 03:21:36 jaredy Exp $ .\" .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -49,7 +49,7 @@ is larger than 0 or, in the case of .Fn strlcat , as long as there is at least one byte free in .Fa dst ) . -Note that you should include a byte for the NUL in +Note that a byte for the NUL should be included in .Fa size . Also note that .Fn strlcpy @@ -105,10 +105,10 @@ that means the initial length of plus the length of .Fa src . -While this may seem somewhat confusing it was done to make +While this may seem somewhat confusing, it was done to make truncation detection simple. .Pp -Note however, that if +Note, however, that if .Fn strlcat traverses .Fa size @@ -152,8 +152,8 @@ if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname)) goto toolong; .Ed .Pp -Since we know how many characters we copied the first time, we can -speed things up a bit by using a copy instead of an append: +Since it is known how many characters were copied the first time, things +can be sped up a bit by using a copy instead of an append: .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; diff --git a/lib/libc/string/wcstok.3 b/lib/libc/string/wcstok.3 index dd3f36cfd5b..28291888f5a 100644 --- a/lib/libc/string/wcstok.3 +++ b/lib/libc/string/wcstok.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: wcstok.3,v 1.2 2005/04/13 20:42:48 jmc Exp $ +.\" $OpenBSD: wcstok.3,v 1.3 2005/08/06 03:21:36 jaredy Exp $ .\" .\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $ .\" @@ -68,7 +68,7 @@ The .Fn wcstok function -is used to isolate sequential tokens in a null-terminated wide character +is used to isolate sequential tokens in a NUL-terminated wide character string, .Fa str . These tokens are separated in the string by at least one of the @@ -97,12 +97,12 @@ The .Fn wcstok function returns a pointer to the beginning of each subsequent token in the string, -after replacing the token itself with a null wide character (L'\e0'). +after replacing the token itself with a NUL wide character (L'\e0'). When no more tokens remain, a null pointer is returned. .Sh EXAMPLES The following code fragment splits a wide character string on .Tn ASCII -space, tab and newline characters and writes the tokens to +space, tab, and newline characters and writes the tokens to standard output: .Bd -literal -offset indent const wchar_t *seps = L" \et\en"; |