nul/null/NULL cleanup:
when talking about characters/bytes, use "nul" and "nul-terminate" when talking about pointers, use "null pointer" or ".Dv NULL"
This commit is contained in:
parent
aba3ac5c73
commit
1a64d82da5
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: bm.3,v 1.7 2003/08/07 16:43:47 agc Exp $
|
||||
.\" $NetBSD: bm.3,v 1.8 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -76,7 +76,8 @@ more frequently.
|
||||
than optimal performance, not incorrect results.)
|
||||
If
|
||||
.Fa freq
|
||||
is NULL,
|
||||
is
|
||||
.Dv NULL ,
|
||||
a system default table is used.
|
||||
.Pp
|
||||
.Fn bm_exec
|
||||
@ -84,7 +85,9 @@ returns a pointer to the leftmost occurrence of the string given to
|
||||
.Fn bm_comp
|
||||
within
|
||||
.Fa text ,
|
||||
or NULL if none occurs.
|
||||
or
|
||||
.Dv NULL
|
||||
if none occurs.
|
||||
The number of bytes in
|
||||
.Fa text
|
||||
must be specified by
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)bstring.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: bstring.3,v 1.9 2003/08/07 16:43:47 agc Exp $
|
||||
.\" $NetBSD: bstring.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt BSTRING 3
|
||||
@ -68,7 +68,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.
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)index.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: index.3,v 1.11 2003/08/07 16:43:48 agc Exp $
|
||||
.\" $NetBSD: index.3,v 1.12 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt INDEX 3
|
||||
@ -50,7 +50,7 @@ locates the first character matching
|
||||
.Fa c
|
||||
(converted to a
|
||||
.Em char )
|
||||
in the null-terminated string
|
||||
in the nul-terminated string
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
A pointer to the character is returned if it is found; otherwise
|
||||
|
@ -26,7 +26,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)memccpy.3 8.1 (Berkeley) 6/9/93
|
||||
.\" $NetBSD: memccpy.3,v 1.9 2003/08/07 16:43:48 agc Exp $
|
||||
.\" $NetBSD: memccpy.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 9, 1993
|
||||
.Dt MEMCCPY 3
|
||||
@ -59,7 +59,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 ,
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)memchr.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: memchr.3,v 1.8 2003/08/07 16:43:48 agc Exp $
|
||||
.\" $NetBSD: memchr.3,v 1.9 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt MEMCHR 3
|
||||
@ -57,8 +57,9 @@ in string
|
||||
The
|
||||
.Fn memchr
|
||||
function
|
||||
returns a pointer to the byte located,
|
||||
or NULL if no such byte exists within
|
||||
returns a pointer to the byte located, or
|
||||
.Dv NULL
|
||||
if no such byte exists within
|
||||
.Fa len
|
||||
bytes.
|
||||
.Sh SEE ALSO
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)rindex.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: rindex.3,v 1.10 2003/08/07 16:43:49 agc Exp $
|
||||
.\" $NetBSD: rindex.3,v 1.11 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt RINDEX 3
|
||||
@ -51,11 +51,12 @@ matching
|
||||
.Fa c
|
||||
(converted to a
|
||||
.Em char )
|
||||
in the null-terminated string
|
||||
in the nul-terminated string
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
A pointer to the character is returned if it is found; otherwise
|
||||
NULL is returned.
|
||||
.Dv NULL
|
||||
is returned.
|
||||
If
|
||||
.Fa c
|
||||
is
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93
|
||||
.\" $NetBSD: strcasecmp.3,v 1.16 2003/08/07 16:43:49 agc Exp $
|
||||
.\" $NetBSD: strcasecmp.3,v 1.17 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 9, 1993
|
||||
.Dt STRCASECMP 3
|
||||
@ -51,7 +51,7 @@ The
|
||||
and
|
||||
.Fn strncasecmp
|
||||
functions
|
||||
compare the null-terminated strings
|
||||
compare the nul-terminated strings
|
||||
.Fa s1
|
||||
and
|
||||
.Fa s2
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcat.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strcat.3,v 1.15 2003/09/08 17:54:33 wiz Exp $
|
||||
.\" $NetBSD: strcat.3,v 1.16 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 11, 2002
|
||||
.Dt STRCAT 3
|
||||
@ -53,9 +53,9 @@ The
|
||||
and
|
||||
.Fn strncat
|
||||
functions
|
||||
append a copy of the null-terminated string
|
||||
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 .
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcmp.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strcmp.3,v 1.12 2003/08/07 16:43:49 agc Exp $
|
||||
.\" $NetBSD: strcmp.3,v 1.13 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt STRCMP 3
|
||||
@ -53,7 +53,7 @@ The
|
||||
and
|
||||
.Fn strncmp
|
||||
functions
|
||||
lexicographically compare the null-terminated strings
|
||||
lexicographically compare the nul-terminated strings
|
||||
.Fa s1
|
||||
and
|
||||
.Fa s2 .
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcoll.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strcoll.3,v 1.9 2003/08/07 16:43:50 agc Exp $
|
||||
.\" $NetBSD: strcoll.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt STRCOLL 3
|
||||
@ -48,7 +48,7 @@
|
||||
The
|
||||
.Fn strcoll
|
||||
function
|
||||
lexicographically compares the null-terminated strings
|
||||
lexicographically compares the nul-terminated strings
|
||||
.Fa s1
|
||||
and
|
||||
.Fa s2
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcpy.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strcpy.3,v 1.16 2003/09/08 17:54:33 wiz Exp $
|
||||
.\" $NetBSD: strcpy.3,v 1.17 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd May 6, 2002
|
||||
.Dt STRCPY 3
|
||||
@ -105,12 +105,12 @@ to
|
||||
.Dq Li abcdef
|
||||
and does
|
||||
.Em not
|
||||
null terminate
|
||||
nul-terminate
|
||||
.Va chararray
|
||||
because the source string is \*[Gt]= 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);
|
||||
@ -120,12 +120,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];
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strcspn.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strcspn.3,v 1.9 2003/08/07 16:43:50 agc Exp $
|
||||
.\" $NetBSD: strcspn.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 11, 2002
|
||||
.Dt STRCSPN 3
|
||||
@ -48,7 +48,7 @@
|
||||
The
|
||||
.Fn strcspn
|
||||
function
|
||||
spans the initial part of the null-terminated string
|
||||
spans the initial part of the nul-terminated string
|
||||
.Fa s
|
||||
as long as the characters from
|
||||
.Fa s
|
||||
|
@ -26,7 +26,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strdup.3 8.1 (Berkeley) 6/9/93
|
||||
.\" $NetBSD: strdup.3,v 1.14 2006/08/13 23:19:45 wiz Exp $
|
||||
.\" $NetBSD: strdup.3,v 1.15 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 12, 2006
|
||||
.Dt STRDUP 3
|
||||
@ -71,7 +71,7 @@ terminating the copied string.
|
||||
.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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: strerror.3,v 1.14 2006/05/22 21:55:01 wiz Exp $
|
||||
.\" $NetBSD: strerror.3,v 1.15 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -92,7 +92,7 @@ If the argument
|
||||
.Fa string
|
||||
is
|
||||
.Pf non- Dv NULL
|
||||
and does not point to the null character,
|
||||
and does not point to the nul character,
|
||||
this string is prepended to the message
|
||||
string and separated from it by
|
||||
a colon and space
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)string.3 8.2 (Berkeley) 12/11/93
|
||||
.\" $NetBSD: string.3,v 1.12 2003/08/07 16:43:51 agc Exp $
|
||||
.\" $NetBSD: string.3,v 1.13 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd December 11, 1993
|
||||
.Dt STRING 3
|
||||
@ -105,11 +105,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,
|
||||
|
@ -26,7 +26,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strmode.3 8.3 (Berkeley) 7/28/94
|
||||
.\" $NetBSD: strmode.3,v 1.16 2003/08/07 16:43:51 agc Exp $
|
||||
.\" $NetBSD: strmode.3,v 1.17 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd July 28, 1994
|
||||
.Dt STRMODE 3
|
||||
@ -50,8 +50,7 @@ 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
|
||||
.Dv NULL .
|
||||
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
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strpbrk.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strpbrk.3,v 1.8 2003/08/07 16:43:52 agc Exp $
|
||||
.\" $NetBSD: strpbrk.3,v 1.9 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd June 4, 1993
|
||||
.Dt STRPBRK 3
|
||||
@ -48,7 +48,7 @@
|
||||
The
|
||||
.Fn strpbrk
|
||||
function
|
||||
locates in the null-terminated string
|
||||
locates in the nul-terminated string
|
||||
.Fa s
|
||||
the first occurrence of any character in the string
|
||||
.Fa charset
|
||||
@ -58,7 +58,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 ,
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strrchr.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strrchr.3,v 1.9 2003/08/07 16:43:52 agc Exp $
|
||||
.\" $NetBSD: strrchr.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 11, 2002
|
||||
.Dt STRRCHR 3
|
||||
@ -65,8 +65,7 @@ The
|
||||
.Fn strrchr
|
||||
function
|
||||
returns a pointer to the character,
|
||||
or a null
|
||||
pointer if
|
||||
or a null pointer if
|
||||
.Fa c
|
||||
does not occur anywhere in
|
||||
.Fa s .
|
||||
|
@ -29,7 +29,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strsep.3 8.1 (Berkeley) 6/9/93
|
||||
.\" $NetBSD: strsep.3,v 1.18 2006/08/13 23:20:52 wiz Exp $
|
||||
.\" $NetBSD: strsep.3,v 1.19 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 12, 2006
|
||||
.Dt STRSEP 3
|
||||
@ -49,7 +49,7 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn strsep
|
||||
function locates, in the null-terminated string referenced by
|
||||
function locates, in the nul-terminated string referenced by
|
||||
.Fa *stringp ,
|
||||
the first occurrence of any character in the string
|
||||
.Fa delim
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strspn.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strspn.3,v 1.10 2003/08/07 16:43:52 agc Exp $
|
||||
.\" $NetBSD: strspn.3,v 1.11 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 11, 2002
|
||||
.Dt STRSPN 3
|
||||
@ -48,7 +48,7 @@
|
||||
The
|
||||
.Fn strspn
|
||||
function
|
||||
spans the initial part of the null-terminated string
|
||||
spans the initial part of the nul-terminated string
|
||||
.Fa s
|
||||
as long as the characters from
|
||||
.Fa s
|
||||
|
@ -31,7 +31,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strstr.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $NetBSD: strstr.3,v 1.9 2004/07/03 08:27:25 junyoung Exp $
|
||||
.\" $NetBSD: strstr.3,v 1.10 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd July 3, 2004
|
||||
.Dt STRSTR 3
|
||||
@ -51,9 +51,9 @@
|
||||
The
|
||||
.Fn strstr
|
||||
function
|
||||
locates the first occurrence of the null-terminated string
|
||||
locates the first occurrence of the nul-terminated string
|
||||
.Fa little
|
||||
in the null-terminated string
|
||||
in the nul-terminated string
|
||||
.Fa big .
|
||||
.Pp
|
||||
The
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strtok.3 8.2 (Berkeley) 2/3/94
|
||||
.\" $NetBSD: strtok.3,v 1.21 2004/10/11 14:22:04 dsl Exp $
|
||||
.\" $NetBSD: strtok.3,v 1.22 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.Dd August 11, 2002
|
||||
.Dt STRTOK 3
|
||||
@ -50,7 +50,7 @@
|
||||
The
|
||||
.Fn strtok
|
||||
function
|
||||
is used to isolate sequential tokens in a null-terminated string,
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: wcstok.3,v 1.4 2004/01/24 16:59:30 wiz Exp $
|
||||
.\" $NetBSD: wcstok.3,v 1.5 2006/10/16 08:48:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998 Softweyr LLC. All rights reserved.
|
||||
.\"
|
||||
@ -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,7 +97,7 @@ 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: wcswidth.3,v 1.1 2006/06/03 04:36:45 tnozaki Exp $
|
||||
.\" $NetBSD: wcswidth.3,v 1.2 2006/10/16 08:48:45 wiz Exp $
|
||||
.\" FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp
|
||||
.\"
|
||||
.\" Copyright (c) 2002 Tim J. Robbins
|
||||
@ -45,7 +45,7 @@ function determines the number of column positions required for the first
|
||||
.Fa n
|
||||
characters of
|
||||
.Fa pwcs ,
|
||||
or until a null wide character (L'\e0') is encountered.
|
||||
or until a nul wide character (L'\e0') is encountered.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn wcswidth
|
||||
|
Loading…
Reference in New Issue
Block a user