From 67e61f91527f9a7cd6b9a16b0cd90dd56607d505 Mon Sep 17 00:00:00 2001 From: cloder <> Date: Fri, 25 Feb 2005 03:12:44 +0000 Subject: 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@ --- src/lib/libc/crypt/crypt.3 | 8 ++++---- src/lib/libc/net/getrrsetbyname.3 | 4 ++-- src/lib/libc/net/if_indextoname.3 | 6 +++--- src/lib/libc/net/link_addr.3 | 4 ++-- src/lib/libc/stdlib/a64l.3 | 4 ++-- src/lib/libc/stdlib/getsubopt.3 | 4 ++-- src/lib/libc/string/bstring.3 | 4 ++-- src/lib/libc/string/strcasecmp.3 | 4 ++-- src/lib/libc/string/strcat.3 | 6 +++--- src/lib/libc/string/strcmp.3 | 4 ++-- src/lib/libc/string/strcoll.3 | 4 ++-- src/lib/libc/string/strcpy.3 | 10 +++++----- src/lib/libc/string/strcspn.3 | 4 ++-- src/lib/libc/string/strdup.3 | 4 ++-- src/lib/libc/string/string.3 | 6 +++--- src/lib/libc/string/strmode.3 | 4 ++-- src/lib/libc/string/strpbrk.3 | 4 ++-- src/lib/libc/string/strspn.3 | 4 ++-- src/lib/libc/string/strstr.3 | 6 +++--- src/lib/libc/string/strtok.3 | 4 ++-- 20 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/lib/libc/crypt/crypt.3 b/src/lib/libc/crypt/crypt.3 index 9908750f07..2bc03fdd41 100644 --- a/src/lib/libc/crypt/crypt.3 +++ b/src/lib/libc/crypt/crypt.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: crypt.3,v 1.22 2004/04/06 11:00:32 djm Exp $ +.\" $OpenBSD: crypt.3,v 1.23 2005/02/25 03:12:43 cloder Exp $ .\" .\" FreeSec: libcrypt .\" @@ -72,7 +72,7 @@ stronger hashing algorithms. The first argument to .Fn crypt is a -.Dv null Ns -terminated +.Dv NUL Ns -terminated string, typically a user's typed password. The second is in one of three forms: if it begins with an underscore @@ -198,8 +198,8 @@ The DES key is used to encrypt a 64-bit constant using iterations of .Tn DES . The value returned is a -.Dv null Ns -terminated -string, 20 or 13 bytes (plus null) in length, consisting of the +.Dv NUL Ns -terminated +string, 20 or 13 bytes (plus NUL) in length, consisting of the .Ar setting followed by the encoded 64-bit encryption. .Pp diff --git a/src/lib/libc/net/getrrsetbyname.3 b/src/lib/libc/net/getrrsetbyname.3 index 65a4635724..621ff31b81 100644 --- a/src/lib/libc/net/getrrsetbyname.3 +++ b/src/lib/libc/net/getrrsetbyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getrrsetbyname.3,v 1.12 2004/07/10 05:34:21 jakob Exp $ +.\" $OpenBSD: getrrsetbyname.3,v 1.13 2005/02/25 03:12:43 cloder Exp $ .\" .\" Copyright (C) 2000, 2001 Internet Software Consortium. .\" @@ -36,7 +36,7 @@ gets a set of resource records associated with a and .Fa rdtype . .Fa hostname -is a pointer a to null-terminated string. +is a pointer to a NUL-terminated string. The .Fa flags field is currently unused and must be zero. diff --git a/src/lib/libc/net/if_indextoname.3 b/src/lib/libc/net/if_indextoname.3 index 30293dcdf2..e7bfde4900 100644 --- a/src/lib/libc/net/if_indextoname.3 +++ b/src/lib/libc/net/if_indextoname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: if_indextoname.3,v 1.7 2003/08/08 09:26:02 jmc Exp $ +.\" $OpenBSD: if_indextoname.3,v 1.8 2005/02/25 03:12:43 cloder Exp $ .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -72,7 +72,7 @@ returned. .Pf ( Dv IF_NAMESIZE is also defined in .Aq Pa net/if.h -and its value includes a terminating null byte at the end of the +and its value includes a terminating NUL byte at the end of the interface name.) This pointer is also the return value of the function. If there is no interface corresponding to the specified index, @@ -90,7 +90,7 @@ and is as follows: .Bd -literal -offset struct if_nameindex { unsigned int if_index; /* 1, 2, ... */ - char *if_name; /* null terminated name: "le0", ... */ + char *if_name; /* NUL-terminated name: "le0", ... */ }; .Ed .Pp diff --git a/src/lib/libc/net/link_addr.3 b/src/lib/libc/net/link_addr.3 index b34afafc7e..0f8787e191 100644 --- a/src/lib/libc/net/link_addr.3 +++ b/src/lib/libc/net/link_addr.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: link_addr.3,v 1.9 2004/07/15 23:40:39 jmc Exp $ +.\" $OpenBSD: link_addr.3,v 1.10 2005/02/25 03:12:43 cloder Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -90,7 +90,7 @@ represents an Ethernet address to be transmitted on the first Lance Ethernet interface. .Sh RETURN VALUES .Fn link_ntoa -always returns a null-terminated string. +always returns a NUL-terminated string. .Fn link_addr has no return value. (See diff --git a/src/lib/libc/stdlib/a64l.3 b/src/lib/libc/stdlib/a64l.3 index de70d0af71..f2957a7ad4 100644 --- a/src/lib/libc/stdlib/a64l.3 +++ b/src/lib/libc/stdlib/a64l.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: a64l.3,v 1.8 2003/06/17 21:56:24 millert Exp $ +.\" $OpenBSD: a64l.3,v 1.9 2005/02/25 03:12:44 cloder Exp $ .\" .\" Copyright (c) 1997 Todd C. Miller .\" @@ -60,7 +60,7 @@ for 38-63. .Pp The .Fn a64l -function takes a pointer to a null-terminated radix-64 representation +function takes a pointer to a NUL-terminated radix-64 representation and returns a corresponding 32-bit value. If the string pointed to by .Fa s diff --git a/src/lib/libc/stdlib/getsubopt.3 b/src/lib/libc/stdlib/getsubopt.3 index 8513cfb66a..6cb4975ced 100644 --- a/src/lib/libc/stdlib/getsubopt.3 +++ b/src/lib/libc/stdlib/getsubopt.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getsubopt.3,v 1.8 2004/01/23 23:08:46 jmc Exp $ +.\" $OpenBSD: getsubopt.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. @@ -78,7 +78,7 @@ On return from .Fn getsubopt , .Fa optionp will be set to point to the start of the next token in the string, -or the null at the end of the string if no more tokens are present. +or the NUL at the end of the string if no more tokens are present. The external variable .Fa suboptarg will be set to point to the start of the current token, or diff --git a/src/lib/libc/string/bstring.3 b/src/lib/libc/string/bstring.3 index d33a3c1e79..bcb5ac98fc 100644 --- a/src/lib/libc/string/bstring.3 +++ b/src/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/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 index e1f5d416d1..c4253e5afd 100644 --- a/src/lib/libc/string/strcasecmp.3 +++ b/src/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/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3 index 5b878c3e8c..89d368c3fb 100644 --- a/src/lib/libc/string/strcat.3 +++ b/src/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/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3 index d025b9cf7c..953181e8de 100644 --- a/src/lib/libc/string/strcmp.3 +++ b/src/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/src/lib/libc/string/strcoll.3 b/src/lib/libc/string/strcoll.3 index fe0ff35510..d1a4e60dc6 100644 --- a/src/lib/libc/string/strcoll.3 +++ b/src/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/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 8304508df6..504f42f2ba 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/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/src/lib/libc/string/strcspn.3 b/src/lib/libc/string/strcspn.3 index 6dfe1b276e..c28d99a901 100644 --- a/src/lib/libc/string/strcspn.3 +++ b/src/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/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3 index 59b77f7a16..a434312c42 100644 --- a/src/lib/libc/string/strdup.3 +++ b/src/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/src/lib/libc/string/string.3 b/src/lib/libc/string/string.3 index 89034ac24c..690cf4dbda 100644 --- a/src/lib/libc/string/string.3 +++ b/src/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/src/lib/libc/string/strmode.3 b/src/lib/libc/string/strmode.3 index bc45c4ce1f..3a7a4bb3fa 100644 --- a/src/lib/libc/string/strmode.3 +++ b/src/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/src/lib/libc/string/strpbrk.3 b/src/lib/libc/string/strpbrk.3 index 7e54f9de54..e91776a0ca 100644 --- a/src/lib/libc/string/strpbrk.3 +++ b/src/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/src/lib/libc/string/strspn.3 b/src/lib/libc/string/strspn.3 index 54077b810c..5dc7e9746a 100644 --- a/src/lib/libc/string/strspn.3 +++ b/src/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/src/lib/libc/string/strstr.3 b/src/lib/libc/string/strstr.3 index 47777dd89f..64396e7885 100644 --- a/src/lib/libc/string/strstr.3 +++ b/src/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/src/lib/libc/string/strtok.3 b/src/lib/libc/string/strtok.3 index 29eea4847e..03a93980ab 100644 --- a/src/lib/libc/string/strtok.3 +++ b/src/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 -- cgit v1.2.3-55-g6feb