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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt BCMP 3 .Dt BCMP 3
@ -67,5 +67,5 @@ The strings may overlap.
.Sh HISTORY .Sh HISTORY
A A
.Fn bcmp .Fn bcmp
function first appeared in
function first appeared in
.Bx 4.2 . .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt BCOPY 3 .Dt BCOPY 3
@ -67,5 +67,5 @@ is zero, no bytes are copied.
.Sh HISTORY .Sh HISTORY
A A
.Fn bcopy .Fn bcopy
function appeared in
function appeared in
.Bx 4.2 . .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt BZERO 3 .Dt BZERO 3
@ -63,5 +63,5 @@ does nothing.
A A
.Fn bzero .Fn bzero
function function
appeared in
appeared in
.Bx 4.3 . .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt INDEX 3 .Dt INDEX 3
@ -50,13 +50,13 @@ function
locates the first character matching locates the first character matching
.Fa c .Fa c
(converted to a (converted to a
.Em char )
.Li char )
in the null-terminated string in the null-terminated string
.Fa s . .Fa s .
.Sh RETURN VALUES .Sh RETURN VALUES
If the character If the character
.Fa c .Fa c
is found, a pointer to it is returned; otherwise
is found, a pointer to it is returned; otherwise,
.Dv NULL .Dv NULL
is returned. is returned.
If If
@ -78,5 +78,5 @@ locates the terminating '\e0'.
.Sh HISTORY .Sh HISTORY
An An
.Fn index .Fn index
function appeared in
function appeared in
.At v6 . .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 .\" 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.
@ -62,7 +62,7 @@ in the string
is returned. is returned.
Otherwise, Otherwise,
.Fa len .Fa len
bytes are copied, and a NULL pointer is returned.
bytes are copied, and a null pointer is returned.
.Sh SEE ALSO .Sh SEE ALSO
.Xr bcopy 3 , .Xr bcopy 3 ,
.Xr memcpy 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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt MEMCHR 3 .Dt MEMCHR 3
@ -59,7 +59,9 @@ The
.Fn memchr .Fn memchr
function function
returns a pointer to the byte located, 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 .Fa len
bytes. bytes.
.Sh SEE ALSO .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd April 19, 1991
.Dt RINDEX 3 .Dt RINDEX 3
@ -51,10 +51,12 @@ locates the last character
matching matching
.Fa c .Fa c
(converted to a (converted to a
.Em char )
.Li char )
in the null-terminated string in the null-terminated string
.Fa s . .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 If
.Fa c .Fa c
is is
@ -76,5 +78,5 @@ locates the terminating
.Sh HISTORY .Sh HISTORY
A A
.Fn rindex .Fn rindex
function appeared in
function appeared in
.At v6 . .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRCPY 3 .Dt STRCPY 3
@ -92,20 +92,22 @@ return
.Fa dst . .Fa dst .
.Sh EXAMPLES .Sh EXAMPLES
The following sets The following sets
.Dq Li chararray
.Va chararray
to to
.Dq Li abc\e0\e0\e0 :
.Dq abc\e0\e0\e0 :
.Bd -literal -offset indent .Bd -literal -offset indent
(void)strncpy(chararray, "abc", 6); (void)strncpy(chararray, "abc", 6);
.Ed .Ed
.Pp .Pp
The following sets The following sets
.Dq Li chararray
.Va chararray
to to
.Dq Li abcdef
.Dq abcdef
and does and does
.Em not .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 .Fn strncpy
.Em only .Em only
null terminates the destination string when then length of the source null terminates the destination string when then length of the source
@ -115,9 +117,9 @@ string is less than the length parameter.
.Ed .Ed
.Pp .Pp
The following copies as many characters from The following copies as many characters from
.Dq Li input
.Va input
to to
.Dq Li buf
.Va buf
as will fit and null terminates the result. Because as will fit and null terminates the result. Because
.Fn strncpy .Fn strncpy
does does
@ -143,7 +145,7 @@ is simply:
.Xr memccpy 3 , .Xr memccpy 3 ,
.Xr memcpy 3 , .Xr memcpy 3 ,
.Xr memmove 3 , .Xr memmove 3 ,
.Xr strlcpy 3
.Xr strlcpy 3
.Sh STANDARDS .Sh STANDARDS
The The
.Fn strcpy .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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRPBRK 3 .Dt STRPBRK 3
@ -59,7 +59,8 @@ If no characters from
occur anywhere in occur anywhere in
.Fa s .Fa s
.Fn strpbrk .Fn strpbrk
returns NULL.
returns
.Dv NULL .
.Sh SEE ALSO .Sh SEE ALSO
.Xr index 3 , .Xr index 3 ,
.Xr memchr 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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRSTR 3 .Dt STRSTR 3
@ -64,7 +64,8 @@ if
occurs nowhere in occurs nowhere in
.Fa big , .Fa big ,
.Fn strstr .Fn strstr
returns NULL;
returns
.Dv NULL ;
otherwise otherwise
.Fn strstr .Fn strstr
returns a pointer to the first character of the first occurrence of 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 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 .Dd June 29, 1991
.Dt STRTOK 3 .Dt STRTOK 3
@ -47,7 +47,7 @@
.Fn strtok "char *str" "const char *sep" .Fn strtok "char *str" "const char *sep"
.Sh DESCRIPTION .Sh DESCRIPTION
.Bf -symbolic .Bf -symbolic
This interface is obsoleted by
This interface is obsoleted by
.Xr strsep 3 . .Xr strsep 3 .
.Ef .Ef
.Pp .Pp


Loading…
Cancel
Save