summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
diff options
context:
space:
mode:
authorcloder <cloder@openbsd.org>2005-02-25 03:12:43 +0000
committercloder <cloder@openbsd.org>2005-02-25 03:12:43 +0000
commit1e5ede29f718fe4f17c128f8fde29ac3824349f1 (patch)
treefd6e65cd34239687cd19bb98f99ffdf5a9155023 /lib/libc/string
parentFix an obviously incorrect call to memset. '0' and 0 are not the same (diff)
downloadwireguard-openbsd-1e5ede29f718fe4f17c128f8fde29ac3824349f1.tar.xz
wireguard-openbsd-1e5ede29f718fe4f17c128f8fde29ac3824349f1.zip
Be correct in our man pages when talking about NUL termination (that is,
termination with '\0') vs. null termination. Input from krw@, jaredy@, jmc@. OK deraadt@
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/bstring.34
-rw-r--r--lib/libc/string/strcasecmp.34
-rw-r--r--lib/libc/string/strcat.36
-rw-r--r--lib/libc/string/strcmp.34
-rw-r--r--lib/libc/string/strcoll.34
-rw-r--r--lib/libc/string/strcpy.310
-rw-r--r--lib/libc/string/strcspn.34
-rw-r--r--lib/libc/string/strdup.34
-rw-r--r--lib/libc/string/string.36
-rw-r--r--lib/libc/string/strmode.34
-rw-r--r--lib/libc/string/strpbrk.34
-rw-r--r--lib/libc/string/strspn.34
-rw-r--r--lib/libc/string/strstr.36
-rw-r--r--lib/libc/string/strtok.34
14 files changed, 34 insertions, 34 deletions
diff --git a/lib/libc/string/bstring.3 b/lib/libc/string/bstring.3
index d33a3c1e79a..bcb5ac98fc0 100644
--- a/lib/libc/string/bstring.3
+++ b/lib/libc/string/bstring.3
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: bstring.3,v 1.6 2004/02/10 14:35:35 jmc Exp $
+.\" $OpenBSD: bstring.3,v 1.7 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd April 19, 1991
.Dt BSTRING 3
@@ -57,7 +57,7 @@
.Fn memset "void *b" "int c" "size_t len"
.Sh DESCRIPTION
These functions operate on variable length strings of bytes.
-They do not check for terminating null bytes as the routines
+They do not check for terminating NUL bytes as the routines
listed in
.Xr string 3
do.
diff --git a/lib/libc/string/strcasecmp.3 b/lib/libc/string/strcasecmp.3
index e1f5d416d14..c4253e5afd2 100644
--- a/lib/libc/string/strcasecmp.3
+++ b/lib/libc/string/strcasecmp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strcasecmp.3,v 1.8 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcasecmp.3,v 1.9 2005/02/25 03:12:44 cloder Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@ The
.Fn strcasecmp
and
.Fn strncasecmp
-functions compare the null-terminated strings
+functions compare the NUL-terminated strings
.Fa s1
and
.Fa s2
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3
index 5b878c3e8c8..89d368c3fb2 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.9 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcat.3,v 1.10 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd July 8, 1997
.Dt STRCAT 3
@@ -49,9 +49,9 @@ The
.Fn strcat
and
.Fn strncat
-functions append a copy of the null-terminated string
+functions append a copy of the NUL-terminated string
.Fa append
-to the end of the null-terminated string
+to the end of the NUL-terminated string
.Fa s ,
then add a terminating
.Ql \e0 .
diff --git a/lib/libc/string/strcmp.3 b/lib/libc/string/strcmp.3
index d025b9cf7c1..953181e8de4 100644
--- a/lib/libc/string/strcmp.3
+++ b/lib/libc/string/strcmp.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strcmp.3,v 1.7 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcmp.3,v 1.8 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRCMP 3
@@ -49,7 +49,7 @@ The
.Fn strcmp
and
.Fn strncmp
-functions lexicographically compare the null-terminated strings
+functions lexicographically compare the NUL-terminated strings
.Fa s1
and
.Fa s2 .
diff --git a/lib/libc/string/strcoll.3 b/lib/libc/string/strcoll.3
index fe0ff355101..d1a4e60dc6b 100644
--- a/lib/libc/string/strcoll.3
+++ b/lib/libc/string/strcoll.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strcoll.3,v 1.5 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcoll.3,v 1.6 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRCOLL 3
@@ -44,7 +44,7 @@
.Sh DESCRIPTION
The
.Fn strcoll
-function lexicographically compares the null-terminated strings
+function lexicographically compares the NUL-terminated strings
.Fa s1
and
.Fa s2
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
index 8304508df61..504f42f2bae 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.12 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcpy.3,v 1.13 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRCPY 3
@@ -98,12 +98,12 @@ to
.Dq abcdef
and does
.Em not
-null terminate
+NUL terminate
.Va chararray
because the source string is >= the length parameter.
.Fn strncpy
.Em only
-null terminates the destination string when the length of the source
+NUL terminates the destination string when the length of the source
string is less than the length parameter.
.Bd -literal -offset indent
(void)strncpy(chararray, "abcdefgh", 6);
@@ -113,12 +113,12 @@ The following copies as many characters from
.Va input
to
.Va buf
-as will fit and null terminates the result.
+as will fit and NUL terminates the result.
Because
.Fn strncpy
does
.Em not
-guarantee to null terminate the string itself, we must do this by hand.
+guarantee to NUL terminate the string itself, we must do this by hand.
.Bd -literal -offset indent
char buf[BUFSIZ];
diff --git a/lib/libc/string/strcspn.3 b/lib/libc/string/strcspn.3
index 6dfe1b276e6..c28d99a9014 100644
--- a/lib/libc/string/strcspn.3
+++ b/lib/libc/string/strcspn.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strcspn.3,v 1.6 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strcspn.3,v 1.7 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRCSPN 3
@@ -44,7 +44,7 @@
.Sh DESCRIPTION
The
.Fn strcspn
-function spans the initial part of the null-terminated string
+function spans the initial part of the NUL-terminated string
.Fa s
as long as the characters from
.Fa s
diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3
index 59b77f7a16d..a434312c425 100644
--- a/lib/libc/string/strdup.3
+++ b/lib/libc/string/strdup.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strdup.3,v 1.12 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strdup.3,v 1.13 2005/02/25 03:12:44 cloder Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -54,7 +54,7 @@ is returned.
.Sh EXAMPLES
The following will point
.Va p
-to an allocated area of memory containing the null-terminated string
+to an allocated area of memory containing the NUL-terminated string
.Qq foobar :
.Bd -literal -offset indent
char *p;
diff --git a/lib/libc/string/string.3 b/lib/libc/string/string.3
index 89034ac24c4..690cf4dbda9 100644
--- a/lib/libc/string/string.3
+++ b/lib/libc/string/string.3
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: string.3,v 1.10 2004/02/09 20:53:12 jmc Exp $
+.\" $OpenBSD: string.3,v 1.11 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd April 19, 1991
.Dt STRING 3
@@ -84,11 +84,11 @@
.Sh DESCRIPTION
The string functions
manipulate strings terminated by a
-null byte.
+NUL byte.
.Pp
See the specific manual pages for more information.
For manipulating variable length generic objects as byte
-strings (without the null byte check), see
+strings (without the NUL-byte check), see
.Xr bstring 3 .
.Pp
Except as noted in their specific manual pages,
diff --git a/lib/libc/string/strmode.3 b/lib/libc/string/strmode.3
index bc45c4ce1f8..3a7a4bb3faf 100644
--- a/lib/libc/string/strmode.3
+++ b/lib/libc/string/strmode.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strmode.3,v 1.11 2003/09/02 18:24:21 jmc Exp $
+.\" $OpenBSD: strmode.3,v 1.12 2005/02/25 03:12:44 cloder Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -48,7 +48,7 @@ function converts a file
.Xr stat 2 )
into a symbolic string which is stored in the location referenced by
.Fa bp .
-This stored string is eleven characters in length plus a trailing null byte.
+This stored string is eleven characters in length plus a trailing NUL byte.
.Pp
The first character is the inode type, and will be one of the following:
.Pp
diff --git a/lib/libc/string/strpbrk.3 b/lib/libc/string/strpbrk.3
index 7e54f9de544..e91776a0cad 100644
--- a/lib/libc/string/strpbrk.3
+++ b/lib/libc/string/strpbrk.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strpbrk.3,v 1.6 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strpbrk.3,v 1.7 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRPBRK 3
@@ -44,7 +44,7 @@
.Sh DESCRIPTION
The
.Fn strpbrk
-function locates in the null-terminated string
+function locates in the NUL-terminated string
.Fa s
the first occurrence of any character in the string
.Fa charset
diff --git a/lib/libc/string/strspn.3 b/lib/libc/string/strspn.3
index 54077b810cb..5dc7e9746ae 100644
--- a/lib/libc/string/strspn.3
+++ b/lib/libc/string/strspn.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strspn.3,v 1.7 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strspn.3,v 1.8 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRSPN 3
@@ -44,7 +44,7 @@
.Sh DESCRIPTION
The
.Fn strspn
-function spans the initial part of the null-terminated string
+function spans the initial part of the NUL-terminated string
.Fa s
as long as the characters from
.Fa s
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
index 47777dd89f1..64396e7885d 100644
--- a/lib/libc/string/strstr.3
+++ b/lib/libc/string/strstr.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strstr.3,v 1.6 2003/06/02 20:18:38 millert Exp $
+.\" $OpenBSD: strstr.3,v 1.7 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRSTR 3
@@ -44,9 +44,9 @@
.Sh DESCRIPTION
The
.Fn strstr
-function locates the first occurrence of the null-terminated string
+function locates the first occurrence of the NUL-terminated string
.Fa little
-in the null-terminated string
+in the NUL-terminated string
.Fa big .
If
.Fa little
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
index 29eea4847e9..03a93980abf 100644
--- a/lib/libc/string/strtok.3
+++ b/lib/libc/string/strtok.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strtok.3,v 1.17 2004/01/20 06:06:48 millert Exp $
+.\" $OpenBSD: strtok.3,v 1.18 2005/02/25 03:12:44 cloder Exp $
.\"
.Dd June 29, 1991
.Dt STRTOK 3
@@ -52,7 +52,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 NUL-terminated string,
.Fa str .
These tokens are separated in the string by at least one of the
characters in