summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>1999-06-29 18:01:30 +0000
committeraaron <aaron@openbsd.org>1999-06-29 18:01:30 +0000
commitdb02f4c950da85a6d011c636bf98ac7e43280464 (patch)
tree5c520bdd24de9ca10542e06dbbec5a2abf64dd9f /lib/libc
parentnew mdoc bm(3) man page (diff)
downloadwireguard-openbsd-db02f4c950da85a6d011c636bf98ac7e43280464.tar.xz
wireguard-openbsd-db02f4c950da85a6d011c636bf98ac7e43280464.zip
repairs
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/bcmp.34
-rw-r--r--lib/libc/string/bcopy.34
-rw-r--r--lib/libc/string/bzero.34
-rw-r--r--lib/libc/string/index.38
-rw-r--r--lib/libc/string/memccpy.34
-rw-r--r--lib/libc/string/memchr.36
-rw-r--r--lib/libc/string/rindex.310
-rw-r--r--lib/libc/string/strcpy.320
-rw-r--r--lib/libc/string/strpbrk.35
-rw-r--r--lib/libc/string/strstr.35
-rw-r--r--lib/libc/string/strtok.34
11 files changed, 41 insertions, 33 deletions
diff --git a/lib/libc/string/bcmp.3 b/lib/libc/string/bcmp.3
index 9012f31baa4..15ebd39cccc 100644
--- a/lib/libc/string/bcmp.3
+++ b/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.3 1999/05/23 14:11:03 aaron Exp $
+.\" $OpenBSD: bcmp.3,v 1.4 1999/06/29 18:01:30 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BCMP 3
@@ -67,5 +67,5 @@ The strings may overlap.
.Sh HISTORY
A
.Fn bcmp
-function first appeared in
+function first appeared in
.Bx 4.2 .
diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3
index 43cb59e4b59..da144e7d178 100644
--- a/lib/libc/string/bcopy.3
+++ b/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.3 1999/05/23 14:11:03 aaron Exp $
+.\" $OpenBSD: bcopy.3,v 1.4 1999/06/29 18:01:31 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BCOPY 3
@@ -67,5 +67,5 @@ is zero, no bytes are copied.
.Sh HISTORY
A
.Fn bcopy
-function appeared in
+function appeared in
.Bx 4.2 .
diff --git a/lib/libc/string/bzero.3 b/lib/libc/string/bzero.3
index b567e075325..4a35aafa1be 100644
--- a/lib/libc/string/bzero.3
+++ b/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.3 1999/05/23 14:11:03 aaron Exp $
+.\" $OpenBSD: bzero.3,v 1.4 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BZERO 3
@@ -63,5 +63,5 @@ does nothing.
A
.Fn bzero
function
-appeared in
+appeared in
.Bx 4.3 .
diff --git a/lib/libc/string/index.3 b/lib/libc/string/index.3
index d236a73a48f..e70b13c55b4 100644
--- a/lib/libc/string/index.3
+++ b/lib/libc/string/index.3
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: index.3,v 1.4 1997/12/30 01:09:49 deraadt Exp $
+.\" $OpenBSD: index.3,v 1.5 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd April 19, 1991
.Dt INDEX 3
@@ -50,13 +50,13 @@ function
locates the first character matching
.Fa c
(converted to a
-.Em char )
+.Li char )
in the null-terminated string
.Fa s .
.Sh RETURN VALUES
If the character
.Fa c
-is found, a pointer to it is returned; otherwise
+is found, a pointer to it is returned; otherwise,
.Dv NULL
is returned.
If
@@ -78,5 +78,5 @@ locates the terminating '\e0'.
.Sh HISTORY
An
.Fn index
-function appeared in
+function appeared in
.At v6 .
diff --git a/lib/libc/string/memccpy.3 b/lib/libc/string/memccpy.3
index c2e15b1405d..873d3f784b5 100644
--- a/lib/libc/string/memccpy.3
+++ b/lib/libc/string/memccpy.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: memccpy.3,v 1.4 1998/06/15 17:55:09 mickey Exp $
+.\" $OpenBSD: memccpy.3,v 1.5 1999/06/29 18:01:32 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -62,7 +62,7 @@ in the string
is returned.
Otherwise,
.Fa len
-bytes are copied, and a NULL pointer is returned.
+bytes are copied, and a null pointer is returned.
.Sh SEE ALSO
.Xr bcopy 3 ,
.Xr memcpy 3 ,
diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3
index 56a2aee9ce7..81c524458ca 100644
--- a/lib/libc/string/memchr.3
+++ b/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.2 1996/08/19 08:34:04 tholo Exp $
+.\" $OpenBSD: memchr.3,v 1.3 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd June 29, 1991
.Dt MEMCHR 3
@@ -59,7 +59,9 @@ The
.Fn memchr
function
returns a pointer to the byte located,
-or NULL if no such byte exists within
+or
+.Dv NULL
+if no such byte exists within
.Fa len
bytes.
.Sh SEE ALSO
diff --git a/lib/libc/string/rindex.3 b/lib/libc/string/rindex.3
index db7f8e1cd82..d4bcbbea541 100644
--- a/lib/libc/string/rindex.3
+++ b/lib/libc/string/rindex.3
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: rindex.3,v 1.3 1997/12/30 01:09:49 deraadt Exp $
+.\" $OpenBSD: rindex.3,v 1.4 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd April 19, 1991
.Dt RINDEX 3
@@ -51,10 +51,12 @@ locates the last character
matching
.Fa c
(converted to a
-.Em char )
+.Li char )
in the null-terminated string
.Fa s .
-If the character c is found, a pointer to it is returned; otherwise NULL is returned.
+If the character c is found, a pointer to it is returned; otherwise,
+.Dv NULL
+is returned.
If
.Fa c
is
@@ -76,5 +78,5 @@ locates the terminating
.Sh HISTORY
A
.Fn rindex
-function appeared in
+function appeared in
.At v6 .
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
index 36434ca04b8..aab10f9ba8e 100644
--- a/lib/libc/string/strcpy.3
+++ b/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.8 1999/06/06 15:17:32 aaron Exp $
+.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRCPY 3
@@ -92,20 +92,22 @@ return
.Fa dst .
.Sh EXAMPLES
The following sets
-.Dq Li chararray
+.Va chararray
to
-.Dq Li abc\e0\e0\e0 :
+.Dq abc\e0\e0\e0 :
.Bd -literal -offset indent
(void)strncpy(chararray, "abc", 6);
.Ed
.Pp
The following sets
-.Dq Li chararray
+.Va chararray
to
-.Dq Li abcdef
+.Dq abcdef
and does
.Em not
-null terminate chararray because the source string is >= the length parameter.
+null terminate
+.Va chararray
+because the source string is >= the length parameter.
.Fn strncpy
.Em only
null terminates the destination string when then length of the source
@@ -115,9 +117,9 @@ string is less than the length parameter.
.Ed
.Pp
The following copies as many characters from
-.Dq Li input
+.Va input
to
-.Dq Li buf
+.Va buf
as will fit and null terminates the result. Because
.Fn strncpy
does
@@ -143,7 +145,7 @@ is simply:
.Xr memccpy 3 ,
.Xr memcpy 3 ,
.Xr memmove 3 ,
-.Xr strlcpy 3
+.Xr strlcpy 3
.Sh STANDARDS
The
.Fn strcpy
diff --git a/lib/libc/string/strpbrk.3 b/lib/libc/string/strpbrk.3
index 5876f560a95..66b9cb26838 100644
--- a/lib/libc/string/strpbrk.3
+++ b/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.2 1996/08/19 08:34:22 tholo Exp $
+.\" $OpenBSD: strpbrk.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRPBRK 3
@@ -59,7 +59,8 @@ If no characters from
occur anywhere in
.Fa s
.Fn strpbrk
-returns NULL.
+returns
+.Dv NULL .
.Sh SEE ALSO
.Xr index 3 ,
.Xr memchr 3 ,
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
index fa455b426ae..773163ecc65 100644
--- a/lib/libc/string/strstr.3
+++ b/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.2 1996/08/19 08:34:26 tholo Exp $
+.\" $OpenBSD: strstr.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRSTR 3
@@ -64,7 +64,8 @@ if
occurs nowhere in
.Fa big ,
.Fn strstr
-returns NULL;
+returns
+.Dv NULL ;
otherwise
.Fn strstr
returns a pointer to the first character of the first occurrence of
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
index 62f0d7a5010..c8463200bf3 100644
--- a/lib/libc/string/strtok.3
+++ b/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.5 1999/06/04 19:14:56 aaron Exp $
+.\" $OpenBSD: strtok.3,v 1.6 1999/06/29 18:01:34 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRTOK 3
@@ -47,7 +47,7 @@
.Fn strtok "char *str" "const char *sep"
.Sh DESCRIPTION
.Bf -symbolic
-This interface is obsoleted by
+This interface is obsoleted by
.Xr strsep 3 .
.Ef
.Pp