aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2006-01-13 02:09:44 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2006-01-13 02:09:44 +0000
commit28d88c175143bdbc136bab4e30dd9f8d7299584b (patch)
tree23a00465a49f0162b4cdf1eebc61627bebef44a8 /man3
parent89c9a3145e552606737f11a9ed2f3822b9930460 (diff)
downloadman-pages-28d88c175143bdbc136bab4e30dd9f8d7299584b.tar.gz
Global change to many pages...
Various pages use inconsistent terms for 'null byte' (which is the C99/SUSv3 term for the '\0' character). To rectify this the following changes were made in these pages: Replace 'zero byte' with 'null byte'. Replace 'null character' with 'null byte'. Replace 'nulls' with 'null bytes'. Replace 'NUL-terminated' by 'null-terminated'. Replace 'NUL' by 'null byte'. Replace 'terminating NUL' by 'terminating null byte'. Replace 'final NUL' by 'terminating null byte'. Replace 'NUL character' by 'null byte'.
Diffstat (limited to 'man3')
-rw-r--r--man3/argz_add.313
-rw-r--r--man3/asprintf.32
-rw-r--r--man3/bstring.32
-rw-r--r--man3/bzero.34
-rw-r--r--man3/confstr.32
-rw-r--r--man3/dlopen.36
-rw-r--r--man3/fwide.32
-rw-r--r--man3/gethostbyname.36
-rw-r--r--man3/getline.34
-rw-r--r--man3/getlogin.33
-rw-r--r--man3/getnameinfo.32
-rw-r--r--man3/getpass.32
-rw-r--r--man3/hsearch.32
-rw-r--r--man3/perror.32
-rw-r--r--man3/printf.311
-rw-r--r--man3/readdir.36
-rw-r--r--man3/scanf.34
-rw-r--r--man3/stpcpy.32
-rw-r--r--man3/strdup.32
-rw-r--r--man3/strfmon.34
-rw-r--r--man3/strftime.34
-rw-r--r--man3/string.32
-rw-r--r--man3/strptime.32
-rw-r--r--man3/sysconf.38
-rw-r--r--man3/termios.34
-rw-r--r--man3/ttyname.32
26 files changed, 54 insertions, 49 deletions
diff --git a/man3/argz_add.3 b/man3/argz_add.3
index ab2faa4b54..f7df62100e 100644
--- a/man3/argz_add.3
+++ b/man3/argz_add.3
@@ -66,8 +66,8 @@ These functions are glibc-specific.
.LP
An argz vector is a pointer to a character buffer together with a length.
The intended interpretation of the character buffer is array
-of strings, where the strings are separated by NUL bytes.
-If the length is non-zero, the last byte of the buffer must be a NUL.
+of strings, where the strings are separated by null bytes ('\\0').
+If the length is non-zero, the last byte of the buffer must be a null byte.
.LP
These functions are for handling argz vectors.
The pair (NULL,0) is an argz vector, and, conversely,
@@ -111,7 +111,8 @@ will be increased by
.IR buf_len .)
.LP
.BR argz_count ()
-counts the number of strings, that is, the number of NUL bytes, in
+counts the number of strings, that is,
+the number of null bytes ('\\0'), in
.RI ( argz , argz_len ).
.LP
.BR argz_create ()
@@ -121,7 +122,7 @@ terminated by (char *) 0, into an argz vector
.RI (* argz ,* argz_len ).
.LP
.BR argz_create_sep ()
-converts the NUL-terminated string
+converts the null-terminated string
.I str
into an argz vector
.RI (* argz ,* argz_len )
@@ -193,14 +194,14 @@ will be incremented by the number of replacements.
is the opposite of
.BR argz_create_sep ().
It transforms the argz vector into a normal string by replacing
-all NULs except the last by
+all null bytes ('\\0') except the last by
.IR sep .
.SH "RETURN VALUE"
All argz functions that do memory allocation have a return type of
\fIerror_t\fP, and return 0 for success, and \fBENOMEM\fP
if an allocation error occurs.
.SH BUGS
-Argz vectors without final NUL may lead to Segmentation Faults.
+Argz vectors without a terminating null byte may lead to Segmentation Faults.
.SH NOTES
These functions are a GNU extension. Handle with care.
.SH "SEE ALSO"
diff --git a/man3/asprintf.3 b/man3/asprintf.3
index 4e3c5fe772..897d0ee268 100644
--- a/man3/asprintf.3
+++ b/man3/asprintf.3
@@ -43,7 +43,7 @@ are analogues of
and
.BR vsprintf (),
except that they allocate a string large enough to hold the output
-including the terminating NUL,
+including the terminating null byte,
and return a pointer to it via the first parameter.
This pointer should be passed to
.BR free (3)
diff --git a/man3/bstring.3 b/man3/bstring.3
index b858305ca2..e5940782bc 100644
--- a/man3/bstring.3
+++ b/man3/bstring.3
@@ -62,7 +62,7 @@ memmove, memset \- byte string operations
.fi
.SH DESCRIPTION
The byte string functions perform operations on strings (byte arrays)
-that are not necessarily NUL-terminated. See the individual man pages
+that are not necessarily null-terminated. See the individual man pages
for descriptions of each function.
.SH NOTE
The functions
diff --git a/man3/bzero.3 b/man3/bzero.3
index 8bdb2d8491..2e5a5c4e23 100644
--- a/man3/bzero.3
+++ b/man3/bzero.3
@@ -28,7 +28,7 @@
.\" Modified Tue Oct 22 23:49:37 1996 by Eric S. Raymond <esr@thyrsus.com>
.TH BZERO 3 2002-12-31 "Linux" "Linux Programmer's Manual"
.SH NAME
-bzero \- write zero bytes
+bzero \- write zero-valued bytes
.SH SYNOPSIS
.nf
.B #include <strings.h>
@@ -42,7 +42,7 @@ function sets the first
.I n
bytes of the byte area starting at
.I s
-to zero.
+to zero (bytes containing '\\0').
.SH "RETURN VALUE"
None.
.SH "CONFORMING TO"
diff --git a/man3/confstr.3 b/man3/confstr.3
index d39cf12d6a..5af591a8b4 100644
--- a/man3/confstr.3
+++ b/man3/confstr.3
@@ -72,7 +72,7 @@ copies the value of the string to
.I buf
truncated to
.I len \- 1
-characters if necessary, with a null character as termination.
+characters if necessary, with a null byte ('\\0') as terminator.
This can be detected by comparing the return value of
.BR confstr ()
against
diff --git a/man3/dlopen.3 b/man3/dlopen.3
index 61976e18bc..a2c84ff3fa 100644
--- a/man3/dlopen.3
+++ b/man3/dlopen.3
@@ -191,8 +191,10 @@ fails for any reason, it returns NULL.
.SS "dlsym"
The function
.BR dlsym ()
-takes a "handle" of a dynamic library returned by dlopen and the
-NUL-terminated symbol name, returning the address where that symbol is
+takes a "handle" of a dynamic library returned by
+.BR dlopen ()
+and the
+null-terminated symbol name, returning the address where that symbol is
loaded into memory. If the symbol is not found, in the specified
library or any of the libraries that were automatically loaded by
.BR dlopen ()
diff --git a/man3/fwide.3 b/man3/fwide.3
index 00aaa16b7e..eb07ac93d7 100644
--- a/man3/fwide.3
+++ b/man3/fwide.3
@@ -41,7 +41,7 @@ current orientation, as above.
.SH "RETURN VALUE"
The \fBfwide\fP() function returns the stream's orientation, after possibly
changing it. A return value > 0 means wide-character oriented. A return value
-< 0 means byte oriented. A return value zero means undecided.
+< 0 means byte oriented. A return value of zero means undecided.
.SH "CONFORMING TO"
ISO/ANSI C, UNIX98
.SH "SEE ALSO"
diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index f7dd2a5b6e..a985cb8d88 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -180,7 +180,7 @@ The members of the \fIhostent\fP structure are:
The official name of the host.
.TP
.I h_aliases
-A zero-terminated array of alternative names for the host.
+An array of alternative names for the host, terminated by a NULL pointer.
.TP
.I h_addrtype
The type of address; always
@@ -193,8 +193,8 @@ at present.
The length of the address in bytes.
.TP
.I h_addr_list
-A zero-terminated array of network addresses for the host in network byte
-order.
+An array of pointers to network addresses for the host (in network byte
+order), terminated by a NULL pointer.
.TP
.I h_addr
The first address in \fIh_addr_list\fP for backward compatibility.
diff --git a/man3/getline.3 b/man3/getline.3
index 615192c0e0..7b0e01daf7 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -85,8 +85,8 @@ On success,
and
.BR getdelim ()
return the number of characters read, including the delimiter character,
-but not including the terminating null character. This value can be used
-to handle embedded null characters in the line read.
+but not including the terminating null byte. This value can be used
+to handle embedded null bytes in the line read.
Both functions return \-1 on failure to read a line (including end of file
condition).
diff --git a/man3/getlogin.3 b/man3/getlogin.3
index 29f085f54c..0ac600c703 100644
--- a/man3/getlogin.3
+++ b/man3/getlogin.3
@@ -88,7 +88,8 @@ The calling process has no controlling tty.
.TP
.B ERANGE
(getlogin_r)
-The length of the user name, including final NUL, is larger than
+The length of the user name, including the terminating null byte,
+is larger than
.IR bufsize .
.LP
Linux/glibc also has
diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index 6d1ff86878..a3bc0ba18c 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -89,7 +89,7 @@ stream (TCP) based. This is required for the few ports (512-514)
that have different services for UDP and TCP.
.SH "RETURN VALUE"
On success 0 is returned, and node and service names, if requested,
-are filled with NUL-terminated strings, possibly truncated to fit
+are filled with null-terminated strings, possibly truncated to fit
the specified buffer lengths.
On error one of the following non-zero error codes is returned:
.TP
diff --git a/man3/getpass.3 b/man3/getpass.3
index 4138158117..dd025dd5f7 100644
--- a/man3/getpass.3
+++ b/man3/getpass.3
@@ -45,7 +45,7 @@ The function
.BR getpass ()
returns a pointer to a static buffer containing the
(first PASS_MAX bytes of) the password without the trailing
-newline, terminated by a NUL.
+newline, terminated by a null byte ('\\0').
This buffer may be overwritten by a following call.
On error, the terminal state is restored,
.I errno
diff --git a/man3/hsearch.3 b/man3/hsearch.3
index b0705db980..d631cbed4b 100644
--- a/man3/hsearch.3
+++ b/man3/hsearch.3
@@ -77,7 +77,7 @@ The argument \fIitem\fP is of type \fBENTRY\fP, which is a typedef defined in
} ENTRY;
.fi
.sp
-The field \fIkey\fP points to the NUL-terminated string which is the
+The field \fIkey\fP points to the null-terminated string which is the
search key.
The field \fIdata\fP points to the data associated with that key.
The function \fBhsearch\fP() searches the hash table for an
diff --git a/man3/perror.3 b/man3/perror.3
index 49d10c83f9..60cba0db4b 100644
--- a/man3/perror.3
+++ b/man3/perror.3
@@ -51,7 +51,7 @@ First (if
.I s
is not NULL and
.RI * s
-is not NUL) the argument string
+is not a null byte ('\\0')) the argument string
.I s
is printed, followed by a colon and a blank.
Then the message and a new-line.
diff --git a/man3/printf.3 b/man3/printf.3
index fddecc210d..30c6cc1fbd 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -642,14 +642,11 @@ modifier is present: The
.I "const char *"
argument is expected to be a pointer to an array of character type (pointer
to a string). Characters from the array are written up to (but not
-including) a terminating
-.B NUL
-character; if a precision is specified, no more than the number specified
-are written. If a precision is given, no null character need be present;
+including) a terminating null byte ('\\0');
+if a precision is specified, no more than the number specified
+are written. If a precision is given, no null byte need be present;
if the precision is not specified, or is greater than the size of the
-array, the array must contain a terminating
-.B NUL
-character.
+array, the array must contain a terminating null byte.
If an
.B l
diff --git a/man3/readdir.3 b/man3/readdir.3
index 63066001b5..914ccdfd87 100644
--- a/man3/readdir.3
+++ b/man3/readdir.3
@@ -67,7 +67,7 @@ structure contains a field
.I "char d_name[]"
of unspecified size, with at most
.B NAME_MAX
-characters preceding the terminating null character.
+characters preceding the terminating null byte.
POSIX 1003.1-2001 also documents the field
.I "ino_t d_ino"
as an XSI extension.
@@ -76,7 +76,9 @@ as an XSI extension.
The data returned by \fBreaddir\fP() may be overwritten by subsequent
calls to \fBreaddir\fP() for the same directory stream.
.SH "RETURN VALUE"
-The \fBreaddir\fP() function returns a pointer to a dirent structure, or
+The \fBreaddir\fP() function returns a pointer to a
+.I dirent
+structure, or
NULL if an error occurs or end-of-file is reached.
On error,
.I errno
diff --git a/man3/scanf.3 b/man3/scanf.3
index aea5ed2f91..a2a5926020 100644
--- a/man3/scanf.3
+++ b/man3/scanf.3
@@ -440,7 +440,7 @@ Matches a sequence of characters whose length is specified by the
(default 1); the next pointer must be a pointer to
.IR char ,
and there must be enough room for all the characters (no terminating
-null character
+null byte
is added). The usual skip of leading white space is suppressed. To skip
white space first, use an explicit space in the format.
.TP
@@ -449,7 +449,7 @@ Matches a nonempty sequence of characters from the specified set of
accepted characters; the next pointer must be a pointer to
.IR char ,
and there must be enough room for all the characters in the string, plus a
-terminating null character.
+terminating null byte.
The usual skip of leading white space is suppressed. The
string is to be made up of characters in (or not in) a particular set; the
set is defined by the characters between the open bracket
diff --git a/man3/stpcpy.3 b/man3/stpcpy.3
index b6b98c2500..58e076721b 100644
--- a/man3/stpcpy.3
+++ b/man3/stpcpy.3
@@ -40,7 +40,7 @@ The \fBstpcpy\fP() function copies the string pointed to by \fIsrc\fP
\fIdest\fP must be large enough to receive the copy.
.SH "RETURN VALUE"
\fBstpcpy\fP() returns a pointer to the \fBend\fP of the string
-\fIdest\fP (that is, the address of the terminating null character)
+\fIdest\fP (that is, the address of the terminating null byte)
rather than the beginning.
.SH EXAMPLE
For example, this program uses \fBstpcpy\fP() to concatenate \fBfoo\fP and
diff --git a/man3/strdup.3 b/man3/strdup.3
index 075982bbb1..83bec938fa 100644
--- a/man3/strdup.3
+++ b/man3/strdup.3
@@ -53,7 +53,7 @@ obtained with \fBmalloc\fP(3), and can be freed with \fBfree\fP(3).
The \fBstrndup\fP() function is similar, but only copies at most
\fIn\fP characters. If \fIs\fP is longer than \fIn\fP, only \fIn\fP
-characters are copied, and a terminating NUL is added.
+characters are copied, and a terminating null byte ('\\0') is added.
\fBstrdupa\fP() and \fBstrndupa\fP() are similar, but use \fBalloca(3)\fP
to allocate the buffer. They are only available when using the GNU
diff --git a/man3/strfmon.3 b/man3/strfmon.3
index e26609c571..694a151592 100644
--- a/man3/strfmon.3
+++ b/man3/strfmon.3
@@ -102,8 +102,8 @@ One argument of type double is converted using the locale's
national currency format.
.SH "RETURN VALUE"
The \fBstrfmon\fP() function returns the number of characters placed
-in the array \fIs\fP, not including the terminating NUL character,
-provided the string, including the terminating NUL, fits.
+in the array \fIs\fP, not including the terminating null byte,
+provided the string, including the terminating null byte, fits.
Otherwise, it sets
.I errno
to E2BIG, returns \-1, and the contents of the array is undefined.
diff --git a/man3/strftime.3 b/man3/strftime.3
index ca79556278..d063ced724 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -237,8 +237,8 @@ See also
.BR ctime (3).
.SH "RETURN VALUE"
The \fBstrftime\fP() function returns the number of characters placed
-in the array \fIs\fP, not including the terminating NUL character,
-provided the string, including the terminating NUL, fits.
+in the array \fIs\fP, not including the terminating null byte,
+provided the string, including the terminating null byte, fits.
Otherwise, it returns 0, and the contents of the array is undefined.
(Thus at least since libc 4.4.4; very old versions of libc,
such as libc 4.4.1, would return \fImax\fP if the array was too small.)
diff --git a/man3/string.3 b/man3/string.3
index ac5cf85046..e5243c0ac1 100644
--- a/man3/string.3
+++ b/man3/string.3
@@ -84,7 +84,7 @@ strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex
.BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n );
.fi
.SH DESCRIPTION
-The string functions perform string operations on NUL-terminated
+The string functions perform string operations on null-terminated
strings. See the individual man pages for descriptions of each
function.
.SH "SEE ALSO"
diff --git a/man3/strptime.3 b/man3/strptime.3
index e14133873d..cd50aa37d8 100644
--- a/man3/strptime.3
+++ b/man3/strptime.3
@@ -259,7 +259,7 @@ The return value of the function is a pointer to the first character
not processed in this function call. In case the input string
contains more characters than required by the format string the return
value points right after the last consumed input character. In case
-the whole input string is consumed the return value points to the NUL
+the whole input string is consumed the return value points to the null
byte at the end of the string. If \fBstrptime\fP() fails to match all
of the format string and therefore an error occurred the function
returns NULL.
diff --git a/man3/sysconf.3 b/man3/sysconf.3
index 00f30172bb..cac103cd36 100644
--- a/man3/sysconf.3
+++ b/man3/sysconf.3
@@ -133,12 +133,13 @@ The max number of simultaneous processes per user ID.
Must not be less than _POSIX_CHILD_MAX (25).
.TP
.BR HOST_NAME_MAX " - " _SC_HOST_NAME_MAX
-Max length of a hostname, not including the final NUL, as returned by
+Max length of a hostname, not including the terminating null byte,
+as returned by
.BR gethostname (2).
Must not be less than _POSIX_HOST_NAME_MAX (255).
.TP
.BR LOGIN_NAME_MAX " - " _SC_LOGIN_NAME_MAX
-Maximum length of a login name, including the final NUL.
+Maximum length of a login name, including the terminating null byte.
Must not be less than _POSIX_LOGIN_NAME_MAX (9).
.TP
.BR "" "clock ticks - " _SC_CLK_TCK
@@ -175,7 +176,8 @@ The maximum number of symbolic links seen in a pathname before resolution
returns ELOOP. Must not be less than _POSIX_SYMLOOP_MAX (8).
.TP
.BR TTY_NAME_MAX " - " _SC_TTY_NAME_MAX
-The maximum length of terminal device name, including final NUL.
+The maximum length of terminal device name,
+including the terminating null byte.
Must not be less than _POSIX_TTY_NAME_MAX (9).
.TP
.BR TZNAME_MAX " - " _SC_TZNAME_MAX
diff --git a/man3/termios.3 b/man3/termios.3
index c0bb21d392..b73c664544 100644
--- a/man3/termios.3
+++ b/man3/termios.3
@@ -98,7 +98,7 @@ queues to be flushed, and if the terminal is the controlling
terminal of a foreground process group, it will cause a
\fBSIGINT\fP to be sent to this foreground process group.
When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
-reads as a NUL character, except when \fBPARMRK\fP is set,
+reads as a null byte ('\\0'), except when \fBPARMRK\fP is set,
in which case it reads as the sequence \\377 \\0 \\0.
.TP
.B IGNPAR
@@ -169,7 +169,7 @@ Send fill characters for a delay, rather than using a timed delay.
.TP
.B OFDEL
(not in POSIX) Fill character is ASCII DEL (0177).
-If unset, fill character is ASCII NUL.
+If unset, fill character is ASCII NUL ('\\0').
.TP
.B NLDLY
Newline delay mask. Values are \fBNL0\fP and \fBNL1\fP.
diff --git a/man3/ttyname.3 b/man3/ttyname.3
index 5d78d7c14c..d8e7777eb1 100644
--- a/man3/ttyname.3
+++ b/man3/ttyname.3
@@ -37,7 +37,7 @@ ttyname, ttyname_r \- return name of a terminal
.SH DESCRIPTION
The function
.BR ttyname ()
-returns a pointer to the NUL-terminated pathname of the terminal device
+returns a pointer to the null-terminated pathname of the terminal device
that is open on the file descriptor \fIfd\fP, or NULL on error
(for example, if \fIfd\fP is not connected to a terminal).
The return value may point to static data, possibly overwritten by the