Browse Source

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@
OPENBSD_3_7
cloder 19 years ago
parent
commit
907ea60a25
17 changed files with 42 additions and 42 deletions
  1. +4
    -4
      src/lib/libc/crypt/crypt.3
  2. +2
    -2
      src/lib/libc/stdlib/a64l.3
  3. +2
    -2
      src/lib/libc/stdlib/getsubopt.3
  4. +2
    -2
      src/lib/libc/string/bstring.3
  5. +2
    -2
      src/lib/libc/string/strcasecmp.3
  6. +3
    -3
      src/lib/libc/string/strcat.3
  7. +2
    -2
      src/lib/libc/string/strcmp.3
  8. +2
    -2
      src/lib/libc/string/strcoll.3
  9. +5
    -5
      src/lib/libc/string/strcpy.3
  10. +2
    -2
      src/lib/libc/string/strcspn.3
  11. +2
    -2
      src/lib/libc/string/strdup.3
  12. +3
    -3
      src/lib/libc/string/string.3
  13. +2
    -2
      src/lib/libc/string/strmode.3
  14. +2
    -2
      src/lib/libc/string/strpbrk.3
  15. +2
    -2
      src/lib/libc/string/strspn.3
  16. +3
    -3
      src/lib/libc/string/strstr.3
  17. +2
    -2
      src/lib/libc/string/strtok.3

+ 4
- 4
src/lib/libc/crypt/crypt.3 View File

@ -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 .\" FreeSec: libcrypt
.\" .\"
@ -72,7 +72,7 @@ stronger hashing algorithms.
The first argument to The first argument to
.Fn crypt .Fn crypt
is a is a
.Dv null Ns -terminated
.Dv NUL Ns -terminated
string, typically a user's typed password. string, typically a user's typed password.
The second is in one of three forms: The second is in one of three forms:
if it begins with an underscore if it begins with an underscore
@ -198,8 +198,8 @@ The DES key is used to encrypt a 64-bit constant using
iterations of iterations of
.Tn DES . .Tn DES .
The value returned is a 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 .Ar setting
followed by the encoded 64-bit encryption. followed by the encoded 64-bit encryption.
.Pp .Pp


+ 2
- 2
src/lib/libc/stdlib/a64l.3 View File

@ -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 <Todd.Miller@courtesan.com> .\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
.\" .\"
@ -60,7 +60,7 @@ for 38-63.
.Pp .Pp
The The
.Fn a64l .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. and returns a corresponding 32-bit value.
If the string pointed to by If the string pointed to by
.Fa s .Fa s


+ 2
- 2
src/lib/libc/stdlib/getsubopt.3 View File

@ -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 .\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -78,7 +78,7 @@ On return from
.Fn getsubopt , .Fn getsubopt ,
.Fa optionp .Fa optionp
will be set to point to the start of the next token in the string, 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 The external variable
.Fa suboptarg .Fa suboptarg
will be set to point to the start of the current token, or will be set to point to the start of the current token, or


+ 2
- 2
src/lib/libc/string/bstring.3 View File

@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt BSTRING 3 .Dt BSTRING 3
@ -57,7 +57,7 @@
.Fn memset "void *b" "int c" "size_t len" .Fn memset "void *b" "int c" "size_t len"
.Sh DESCRIPTION .Sh DESCRIPTION
These functions operate on variable length strings of bytes. 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 listed in
.Xr string 3 .Xr string 3
do. do.


+ 2
- 2
src/lib/libc/string/strcasecmp.3 View File

@ -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 .\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -49,7 +49,7 @@ The
.Fn strcasecmp .Fn strcasecmp
and and
.Fn strncasecmp .Fn strncasecmp
functions compare the null-terminated strings
functions compare the NUL-terminated strings
.Fa s1 .Fa s1
and and
.Fa s2 .Fa s2


+ 3
- 3
src/lib/libc/string/strcat.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd July 8, 1997
.Dt STRCAT 3 .Dt STRCAT 3
@ -49,9 +49,9 @@ The
.Fn strcat .Fn strcat
and and
.Fn strncat .Fn strncat
functions append a copy of the null-terminated string
functions append a copy of the NUL-terminated string
.Fa append .Fa append
to the end of the null-terminated string
to the end of the NUL-terminated string
.Fa s , .Fa s ,
then add a terminating then add a terminating
.Ql \e0 . .Ql \e0 .


+ 2
- 2
src/lib/libc/string/strcmp.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRCMP 3 .Dt STRCMP 3
@ -49,7 +49,7 @@ The
.Fn strcmp .Fn strcmp
and and
.Fn strncmp .Fn strncmp
functions lexicographically compare the null-terminated strings
functions lexicographically compare the NUL-terminated strings
.Fa s1 .Fa s1
and and
.Fa s2 . .Fa s2 .


+ 2
- 2
src/lib/libc/string/strcoll.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRCOLL 3 .Dt STRCOLL 3
@ -44,7 +44,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strcoll .Fn strcoll
function lexicographically compares the null-terminated strings
function lexicographically compares the NUL-terminated strings
.Fa s1 .Fa s1
and and
.Fa s2 .Fa s2


+ 5
- 5
src/lib/libc/string/strcpy.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRCPY 3 .Dt STRCPY 3
@ -98,12 +98,12 @@ to
.Dq abcdef .Dq abcdef
and does and does
.Em not .Em not
null terminate
NUL terminate
.Va chararray .Va chararray
because the source string is >= the length parameter. because the source string is >= the length parameter.
.Fn strncpy .Fn strncpy
.Em only .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. string is less than the length parameter.
.Bd -literal -offset indent .Bd -literal -offset indent
(void)strncpy(chararray, "abcdefgh", 6); (void)strncpy(chararray, "abcdefgh", 6);
@ -113,12 +113,12 @@ The following copies as many characters from
.Va input .Va input
to to
.Va buf .Va buf
as will fit and null terminates the result.
as will fit and NUL terminates the result.
Because Because
.Fn strncpy .Fn strncpy
does does
.Em not .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 .Bd -literal -offset indent
char buf[BUFSIZ]; char buf[BUFSIZ];


+ 2
- 2
src/lib/libc/string/strcspn.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRCSPN 3 .Dt STRCSPN 3
@ -44,7 +44,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strcspn .Fn strcspn
function spans the initial part of the null-terminated string
function spans the initial part of the NUL-terminated string
.Fa s .Fa s
as long as the characters from as long as the characters from
.Fa s .Fa s


+ 2
- 2
src/lib/libc/string/strdup.3 View File

@ -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 .\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -54,7 +54,7 @@ is returned.
.Sh EXAMPLES .Sh EXAMPLES
The following will point The following will point
.Va p .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 : .Qq foobar :
.Bd -literal -offset indent .Bd -literal -offset indent
char *p; char *p;


+ 3
- 3
src/lib/libc/string/string.3 View File

@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt STRING 3 .Dt STRING 3
@ -84,11 +84,11 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The string functions The string functions
manipulate strings terminated by a manipulate strings terminated by a
null byte.
NUL byte.
.Pp .Pp
See the specific manual pages for more information. See the specific manual pages for more information.
For manipulating variable length generic objects as byte 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 . .Xr bstring 3 .
.Pp .Pp
Except as noted in their specific manual pages, Except as noted in their specific manual pages,


+ 2
- 2
src/lib/libc/string/strmode.3 View File

@ -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 .\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -48,7 +48,7 @@ function converts a file
.Xr stat 2 ) .Xr stat 2 )
into a symbolic string which is stored in the location referenced by into a symbolic string which is stored in the location referenced by
.Fa bp . .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 .Pp
The first character is the inode type, and will be one of the following: The first character is the inode type, and will be one of the following:
.Pp .Pp


+ 2
- 2
src/lib/libc/string/strpbrk.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRPBRK 3 .Dt STRPBRK 3
@ -44,7 +44,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strpbrk .Fn strpbrk
function locates in the null-terminated string
function locates in the NUL-terminated string
.Fa s .Fa s
the first occurrence of any character in the string the first occurrence of any character in the string
.Fa charset .Fa charset


+ 2
- 2
src/lib/libc/string/strspn.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRSPN 3 .Dt STRSPN 3
@ -44,7 +44,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strspn .Fn strspn
function spans the initial part of the null-terminated string
function spans the initial part of the NUL-terminated string
.Fa s .Fa s
as long as the characters from as long as the characters from
.Fa s .Fa s


+ 3
- 3
src/lib/libc/string/strstr.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRSTR 3 .Dt STRSTR 3
@ -44,9 +44,9 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strstr .Fn strstr
function locates the first occurrence of the null-terminated string
function locates the first occurrence of the NUL-terminated string
.Fa little .Fa little
in the null-terminated string
in the NUL-terminated string
.Fa big . .Fa big .
If If
.Fa little .Fa little


+ 2
- 2
src/lib/libc/string/strtok.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRTOK 3 .Dt STRTOK 3
@ -52,7 +52,7 @@ This interface is obsoleted by
.Pp .Pp
The The
.Fn strtok .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 . .Fa str .
These tokens are separated in the string by at least one of the These tokens are separated in the string by at least one of the
characters in characters in


Loading…
Cancel
Save