Browse Source

repairs

OPENBSD_2_6
aaron 25 years ago
parent
commit
f49d82ce18
11 changed files with 41 additions and 33 deletions
  1. +2
    -2
      src/lib/libc/string/bcmp.3
  2. +2
    -2
      src/lib/libc/string/bcopy.3
  3. +2
    -2
      src/lib/libc/string/bzero.3
  4. +4
    -4
      src/lib/libc/string/index.3
  5. +2
    -2
      src/lib/libc/string/memccpy.3
  6. +4
    -2
      src/lib/libc/string/memchr.3
  7. +6
    -4
      src/lib/libc/string/rindex.3
  8. +11
    -9
      src/lib/libc/string/strcpy.3
  9. +3
    -2
      src/lib/libc/string/strpbrk.3
  10. +3
    -2
      src/lib/libc/string/strstr.3
  11. +2
    -2
      src/lib/libc/string/strtok.3

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

@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bcmp.3,v 1.3 1999/05/23 14:11:03 aaron Exp $
.\" $OpenBSD: bcmp.3,v 1.4 1999/06/29 18:01:30 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BCMP 3
@ -67,5 +67,5 @@ The strings may overlap.
.Sh HISTORY
A
.Fn bcmp
function first appeared in
function first appeared in
.Bx 4.2 .

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

@ -32,7 +32,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bcopy.3,v 1.3 1999/05/23 14:11:03 aaron Exp $
.\" $OpenBSD: bcopy.3,v 1.4 1999/06/29 18:01:31 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BCOPY 3
@ -67,5 +67,5 @@ is zero, no bytes are copied.
.Sh HISTORY
A
.Fn bcopy
function appeared in
function appeared in
.Bx 4.2 .

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

@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bzero.3,v 1.3 1999/05/23 14:11:03 aaron Exp $
.\" $OpenBSD: bzero.3,v 1.4 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd April 19, 1991
.Dt BZERO 3
@ -63,5 +63,5 @@ does nothing.
A
.Fn bzero
function
appeared in
appeared in
.Bx 4.3 .

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

@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: index.3,v 1.4 1997/12/30 01:09:49 deraadt Exp $
.\" $OpenBSD: index.3,v 1.5 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd April 19, 1991
.Dt INDEX 3
@ -50,13 +50,13 @@ function
locates the first character matching
.Fa c
(converted to a
.Em char )
.Li char )
in the null-terminated string
.Fa s .
.Sh RETURN VALUES
If the character
.Fa c
is found, a pointer to it is returned; otherwise
is found, a pointer to it is returned; otherwise,
.Dv NULL
is returned.
If
@ -78,5 +78,5 @@ locates the terminating '\e0'.
.Sh HISTORY
An
.Fn index
function appeared in
function appeared in
.At v6 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: memccpy.3,v 1.4 1998/06/15 17:55:09 mickey Exp $
.\" $OpenBSD: memccpy.3,v 1.5 1999/06/29 18:01:32 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -62,7 +62,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 ,


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

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memchr.3,v 1.2 1996/08/19 08:34:04 tholo Exp $
.\" $OpenBSD: memchr.3,v 1.3 1999/06/29 18:01:32 aaron Exp $
.\"
.Dd June 29, 1991
.Dt MEMCHR 3
@ -59,7 +59,9 @@ The
.Fn memchr
function
returns a pointer to the byte located,
or NULL if no such byte exists within
or
.Dv NULL
if no such byte exists within
.Fa len
bytes.
.Sh SEE ALSO


+ 6
- 4
src/lib/libc/string/rindex.3 View File

@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: rindex.3,v 1.3 1997/12/30 01:09:49 deraadt Exp $
.\" $OpenBSD: rindex.3,v 1.4 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd April 19, 1991
.Dt RINDEX 3
@ -51,10 +51,12 @@ locates the last character
matching
.Fa c
(converted to a
.Em char )
.Li char )
in the null-terminated string
.Fa s .
If the character c is found, a pointer to it is returned; otherwise NULL is returned.
If the character c is found, a pointer to it is returned; otherwise,
.Dv NULL
is returned.
If
.Fa c
is
@ -76,5 +78,5 @@ locates the terminating
.Sh HISTORY
A
.Fn rindex
function appeared in
function appeared in
.At v6 .

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

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcpy.3,v 1.8 1999/06/06 15:17:32 aaron Exp $
.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRCPY 3
@ -92,20 +92,22 @@ return
.Fa dst .
.Sh EXAMPLES
The following sets
.Dq Li chararray
.Va chararray
to
.Dq Li abc\e0\e0\e0 :
.Dq abc\e0\e0\e0 :
.Bd -literal -offset indent
(void)strncpy(chararray, "abc", 6);
.Ed
.Pp
The following sets
.Dq Li chararray
.Va chararray
to
.Dq Li abcdef
.Dq abcdef
and does
.Em not
null terminate chararray because the source string is >= the length parameter.
null terminate
.Va chararray
because the source string is >= the length parameter.
.Fn strncpy
.Em only
null terminates the destination string when then length of the source
@ -115,9 +117,9 @@ string is less than the length parameter.
.Ed
.Pp
The following copies as many characters from
.Dq Li input
.Va input
to
.Dq Li buf
.Va buf
as will fit and null terminates the result. Because
.Fn strncpy
does
@ -143,7 +145,7 @@ is simply:
.Xr memccpy 3 ,
.Xr memcpy 3 ,
.Xr memmove 3 ,
.Xr strlcpy 3
.Xr strlcpy 3
.Sh STANDARDS
The
.Fn strcpy


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

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strpbrk.3,v 1.2 1996/08/19 08:34:22 tholo Exp $
.\" $OpenBSD: strpbrk.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRPBRK 3
@ -59,7 +59,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 ,


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

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strstr.3,v 1.2 1996/08/19 08:34:26 tholo Exp $
.\" $OpenBSD: strstr.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRSTR 3
@ -64,7 +64,8 @@ if
occurs nowhere in
.Fa big ,
.Fn strstr
returns NULL;
returns
.Dv NULL ;
otherwise
.Fn strstr
returns a pointer to the first character of the first occurrence of


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

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strtok.3,v 1.5 1999/06/04 19:14:56 aaron Exp $
.\" $OpenBSD: strtok.3,v 1.6 1999/06/29 18:01:34 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRTOK 3
@ -47,7 +47,7 @@
.Fn strtok "char *str" "const char *sep"
.Sh DESCRIPTION
.Bf -symbolic
This interface is obsoleted by
This interface is obsoleted by
.Xr strsep 3 .
.Ef
.Pp


Loading…
Cancel
Save