Browse Source

update HISTORY and SEE ALSO for all of string(3), together with various

smaller improvements; jmc@ and nicm@ both ask me to get this in because
further tweaking will be easier in-tree
OPENBSD_5_0
schwarze 13 years ago
parent
commit
52886b1c8c
53 changed files with 642 additions and 237 deletions
  1. +3
    -3
      src/lib/libc/string/bcmp.3
  2. +4
    -4
      src/lib/libc/string/bcopy.3
  3. +10
    -2
      src/lib/libc/string/bm.3
  4. +20
    -10
      src/lib/libc/string/bstring.3
  5. +5
    -5
      src/lib/libc/string/bzero.3
  6. +4
    -4
      src/lib/libc/string/ffs.3
  7. +5
    -3
      src/lib/libc/string/memccpy.3
  8. +12
    -4
      src/lib/libc/string/memchr.3
  9. +12
    -4
      src/lib/libc/string/memcmp.3
  10. +15
    -7
      src/lib/libc/string/memcpy.3
  11. +10
    -4
      src/lib/libc/string/memmove.3
  12. +12
    -4
      src/lib/libc/string/memset.3
  13. +12
    -4
      src/lib/libc/string/strcasecmp.3
  14. +13
    -5
      src/lib/libc/string/strcat.3
  15. +16
    -4
      src/lib/libc/string/strchr.3
  16. +17
    -9
      src/lib/libc/string/strcmp.3
  17. +7
    -2
      src/lib/libc/string/strcoll.3
  18. +16
    -5
      src/lib/libc/string/strcpy.3
  19. +12
    -4
      src/lib/libc/string/strcspn.3
  20. +10
    -9
      src/lib/libc/string/strdup.3
  21. +11
    -2
      src/lib/libc/string/strerror.3
  22. +11
    -3
      src/lib/libc/string/strlcpy.3
  23. +7
    -5
      src/lib/libc/string/strlen.3
  24. +3
    -3
      src/lib/libc/string/strmode.3
  25. +12
    -4
      src/lib/libc/string/strpbrk.3
  26. +16
    -4
      src/lib/libc/string/strrchr.3
  27. +7
    -9
      src/lib/libc/string/strsep.3
  28. +9
    -2
      src/lib/libc/string/strsignal.3
  29. +12
    -4
      src/lib/libc/string/strspn.3
  30. +13
    -5
      src/lib/libc/string/strstr.3
  31. +26
    -12
      src/lib/libc/string/strtok.3
  32. +7
    -2
      src/lib/libc/string/strxfrm.3
  33. +4
    -4
      src/lib/libc/string/swab.3
  34. +19
    -2
      src/lib/libc/string/wcscasecmp.3
  35. +27
    -5
      src/lib/libc/string/wcscat.3
  36. +12
    -4
      src/lib/libc/string/wcschr.3
  37. +14
    -4
      src/lib/libc/string/wcscmp.3
  38. +30
    -4
      src/lib/libc/string/wcscpy.3
  39. +11
    -3
      src/lib/libc/string/wcscspn.3
  40. +16
    -13
      src/lib/libc/string/wcsdup.3
  41. +10
    -2
      src/lib/libc/string/wcslcpy.3
  42. +11
    -3
      src/lib/libc/string/wcslen.3
  43. +13
    -5
      src/lib/libc/string/wcspbrk.3
  44. +11
    -3
      src/lib/libc/string/wcsrchr.3
  45. +11
    -3
      src/lib/libc/string/wcsspn.3
  46. +12
    -4
      src/lib/libc/string/wcsstr.3
  47. +20
    -5
      src/lib/libc/string/wcstok.3
  48. +12
    -3
      src/lib/libc/string/wcswidth.3
  49. +11
    -3
      src/lib/libc/string/wmemchr.3
  50. +12
    -4
      src/lib/libc/string/wmemcmp.3
  51. +14
    -6
      src/lib/libc/string/wmemcpy.3
  52. +11
    -3
      src/lib/libc/string/wmemmove.3
  53. +12
    -3
      src/lib/libc/string/wmemset.3

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

@ -27,9 +27,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bcmp.3,v 1.8 2010/09/24 13:33:00 matthew Exp $
.\" $OpenBSD: bcmp.3,v 1.9 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: September 24 2010 $
.Dd $Mdocdate: July 25 2011 $
.Dt BCMP 3
.Os
.Sh NAME
@ -77,7 +77,7 @@ making it vulnerable to timing attacks.
.Xr strcoll 3 ,
.Xr strxfrm 3
.Sh HISTORY
A
The
.Fn bcmp
function first appeared in
.Bx 4.2 .


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

@ -28,9 +28,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bcopy.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: bcopy.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt BCOPY 3
.Os
.Sh NAME
@ -61,7 +61,7 @@ is zero, no bytes are copied.
.Xr strlcpy 3 ,
.Xr strncpy 3
.Sh HISTORY
A
The
.Fn bcopy
function appeared in
function first appeared in
.Bx 4.2 .

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

@ -28,9 +28,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bm.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: bm.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt BM 3
.Os
.Sh NAME
@ -110,3 +110,11 @@ is
.%V Volume 21, 11 (November 1991)
.%P 1221-48
.Re
.Sh HISTORY
The
.Fn bm_comp ,
.Fn bm_exec ,
and
.Fn bm_free
functions first appeared in
.Nx 1.0 .

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

@ -27,9 +27,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bstring.3,v 1.8 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: bstring.3,v 1.9 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt BSTRING 3
.Os
.Sh NAME
@ -85,14 +85,24 @@ conform to
.St -ansiC .
.Sh HISTORY
The
.Fn bzero
.Fn bcmp ,
.Fn bcopy ,
and
.Fn memccpy
functions appeared in
.Bx 4.3 .
.Fn bzero
functions first appeared in
.Bx 4.2 .
The
.Fn bcmp
.Fn memchr ,
.Fn memcmp ,
.Fn memccpy ,
.Fn memcpy ,
and
.Fn bcopy
functions appeared in
.Bx 4.2 .
.Fn memset
functions first appeared in
.At V
and were reimplemented for
.Bx 4.3 Tahoe .
The
.Fn memmove
function first appeared in
.Bx 4.3 Reno .

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

@ -27,9 +27,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: bzero.3,v 1.7 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: bzero.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt BZERO 3
.Os
.Sh NAME
@ -55,7 +55,7 @@ does nothing.
.Xr memset 3 ,
.Xr swab 3
.Sh HISTORY
A
The
.Fn bzero
function appeared in
.Bx 4.3 .
function first appeared in
.Bx 4.2 .

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

@ -27,9 +27,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: ffs.3,v 1.5 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: ffs.3,v 1.6 2011/07/25 00:38:52 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt FFS 3
.Os
.Sh NAME
@ -52,5 +52,5 @@ A return value of 0 means that the argument was zero.
.Sh HISTORY
The
.Fn ffs
function appeared in
.Bx 4.3 .
function first appeared in
.Bx 4.2 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: memccpy.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: memccpy.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMCCPY 3
.Os
.Sh NAME
@ -70,4 +70,6 @@ bytes are copied, and a null pointer is returned.
The
.Fn memccpy
function first appeared in
.Bx 4.4 .
.At V
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: memchr.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memchr.3,v 1.9 2007/09/03 16:50:14 jmc Exp $
.\"
.Dd $Mdocdate: September 3 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMCHR 3
.Os
.Sh NAME
@ -79,7 +79,8 @@ bytes.
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wmemchr 3
.Sh STANDARDS
The
.Fn memchr
@ -91,3 +92,10 @@ The
function is an
.Ox
extension.
.Sh HISTORY
The
.Fn memchr
function first appeared in
.At V
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: memcmp.3,v 1.7 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memcmp.3,v 1.6 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMCMP 3
.Os
.Sh NAME
@ -69,9 +69,17 @@ Zero-length strings are always identical.
.Xr strcasecmp 3 ,
.Xr strcmp 3 ,
.Xr strcoll 3 ,
.Xr strxfrm 3
.Xr strxfrm 3 ,
.Xr wmemcmp 3
.Sh STANDARDS
The
.Fn memcmp
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn memcmp
function first appeared in
.At V
and was reimplemented for
.Bx 4.3 Tahoe .

+ 15
- 7
src/lib/libc/string/memcpy.3 View File

@ -1,3 +1,5 @@
.\" $OpenBSD: memcpy.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memcpy.3,v 1.7 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMCPY 3
.Os
.Sh NAME
@ -60,18 +60,26 @@ function returns the original value of
.Xr memccpy 3 ,
.Xr memmove 3 ,
.Xr strcpy 3 ,
.Xr strlcpy 3
.Xr strlcpy 3 ,
.Xr wmemcpy 3
.Sh STANDARDS
The
.Fn memcpy
function conforms to
.St -ansiC .
.Sh BUGS
.Sh HISTORY
The
.Fn memcpy
function first appeared in
.At V
and was reimplemented for
.Bx 4.3 Tahoe .
.Sh CAVEATS
In this implementation
.Fn memcpy
is implemented using
.Xr bcopy 3 ,
and therefore the buffers may overlap.
On other systems, copying overlapping buffers may produce surprises.
A simpler solution is to not use
.Fn memcpy .
A portable, safe solution is to use
.Xr memmove 3 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: memmove.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memmove.3,v 1.7 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMMOVE 3
.Os
.Sh NAME
@ -62,9 +62,15 @@ function returns the original value of
.Xr memccpy 3 ,
.Xr memcpy 3 ,
.Xr strcpy 3 ,
.Xr strlcpy 3
.Xr strlcpy 3 ,
.Xr wmemmove 3
.Sh STANDARDS
The
.Fn memmove
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn memmove
function first appeared in
.Bx 4.3 Reno .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: memset.3,v 1.7 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: memset.3,v 1.6 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt MEMSET 3
.Os
.Sh NAME
@ -59,9 +59,17 @@ function returns the original value of
.Fa b .
.Sh SEE ALSO
.Xr bzero 3 ,
.Xr swab 3
.Xr swab 3 ,
.Xr wmemset 3
.Sh STANDARDS
The
.Fn memset
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn memset
function first appeared in
.At V
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: strcasecmp.3,v 1.10 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strcasecmp.3,v 1.11 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -31,7 +31,7 @@
.\"
.\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCASECMP 3
.Os
.Sh NAME
@ -74,11 +74,19 @@ characters.
.Xr memcmp 3 ,
.Xr strcmp 3 ,
.Xr strcoll 3 ,
.Xr strxfrm 3
.Xr strxfrm 3 ,
.Xr wcscasecmp 3
.Sh STANDARDS
The
.Fn strcasecmp
and
.Fn strncasecmp
functions conform to
.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn strcasecmp
and
.Fn strncasecmp
functions first appeared in
.Bx 4.4 .
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strcat.3,v 1.13 2011/07/25 00:38:52 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcat.3,v 1.12 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCAT 3
.Os
.Sh NAME
@ -122,8 +122,9 @@ functions are a better choice, as shown below.
.Xr memcpy 3 ,
.Xr memmove 3 ,
.Xr strcpy 3 ,
.Xr strlcat 3 ,
.Xr strlcpy 3
.Xr strlcpy 3 ,
.Xr wcscat 3 ,
.Xr wcslcpy 3
.Sh STANDARDS
The
.Fn strcat
@ -131,3 +132,10 @@ and
.Fn strncat
functions conform to
.St -ansiC .
.Sh HISTORY
The
.Fn strcat
and
.Fn strncat
functions first appeared in
.At v7 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strchr.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strchr.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCHR 3
.Os
.Sh NAME
@ -90,7 +90,8 @@ p = strchr(s, 'o');
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcschr 3
.Sh STANDARDS
The
.Fn strchr
@ -100,3 +101,14 @@ function conforms to
The
.Fn index
function is deprecated and shouldn't be used in new code.
.Sh HISTORY
The
.Fn index
function first appeared in
.At v7 .
The
.Fn strchr
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strcmp.3,v 1.11 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcmp.3,v 1.10 2009/12/05 07:45:48 jmc Exp $
.\"
.Dd $Mdocdate: December 5 2009 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCMP 3
.Os
.Sh NAME
@ -53,6 +53,11 @@ functions lexicographically compare the NUL-terminated strings
.Fa s1
and
.Fa s2 .
The
.Fn strncmp
function compares at most
.Fa len
characters.
.Sh RETURN VALUES
The
.Fn strcmp
@ -67,17 +72,13 @@ The comparison is done using unsigned characters, so that
.Ql \e200
is greater than
.Ql \e0 .
.Pp
.Fn strncmp
compares at most
.Fa len
characters.
.Sh SEE ALSO
.Xr bcmp 3 ,
.Xr memcmp 3 ,
.Xr strcasecmp 3 ,
.Xr strcoll 3 ,
.Xr strxfrm 3
.Xr strxfrm 3 ,
.Xr wcscmp
.Sh STANDARDS
The
.Fn strcmp
@ -85,3 +86,10 @@ and
.Fn strncmp
functions conform to
.St -ansiC .
.Sh HISTORY
The
.Fn strcmp
and
.Fn strncmp
functions first appeared in
.At v7 .

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

@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcoll.3,v 1.7 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strcoll.3,v 1.8 2011/07/25 00:38:53 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCOLL 3
.Os
.Sh NAME
@ -66,3 +66,8 @@ The
.Fn strcoll
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strcoll
function first appeared in
.Bx 4.3 Reno .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strcpy.3,v 1.16 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcpy.3,v 1.15 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCPY 3
.Os
.Sh NAME
@ -57,8 +57,9 @@ to
.Ql \e0
character).
.Pp
The
.Fn strncpy
copies not more than
function copies not more than
.Fa len
characters into
.Fa dst ,
@ -141,7 +142,10 @@ is simply:
.Xr memccpy 3 ,
.Xr memcpy 3 ,
.Xr memmove 3 ,
.Xr strlcpy 3
.Xr strcat 3 ,
.Xr strlcpy 3 ,
.Xr wcscpy 3 ,
.Xr wcslcpy 3
.Sh STANDARDS
The
.Fn strcpy
@ -149,3 +153,10 @@ and
.Fn strncpy
functions conform to
.St -ansiC .
.Sh HISTORY
The
.Fn strcpy
and
.Fn strncpy
functions first appeared in
.At v7 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strcspn.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strcspn.3,v 1.9 2007/08/08 07:20:45 ray Exp $
.\"
.Dd $Mdocdate: August 8 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRCSPN 3
.Os
.Sh NAME
@ -92,9 +92,17 @@ if (fgets(line, sizeof(line), fp) != NULL)
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcscspn 3
.Sh STANDARDS
The
.Fn strcspn
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strcspn
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: strdup.3,v 1.17 2010/05/19 06:32:43 jmc Exp $
.\" $OpenBSD: strdup.3,v 1.18 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: May 19 2010 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRDUP 3
.Os
.Sh NAME
@ -73,10 +73,8 @@ to an allocated area of memory containing the NUL-terminated string
char *p;
p = strdup("foobar");
if (p == NULL) {
fprintf(stderr, "Out of memory.\en");
exit(1);
}
if (p == NULL)
err(1, NULL);
.Ed
.Sh ERRORS
The
@ -90,7 +88,8 @@ for any of the errors specified for the library function
.Xr malloc 3 ,
.Xr strcpy 3 ,
.Xr strlcpy 3 ,
.Xr strlen 3
.Xr strlen 3 ,
.Xr wcsdup 3
.Sh STANDARDS
The
.Fn strdup
@ -102,8 +101,10 @@ functions conform to
The
.Fn strdup
function first appeared in
.Bx 4.4 .
.Bx 4.3 Reno .
The
.Fn strndup
function first appeared in
function appeared in glibc 2.0, was reimplemented for
.Nx 4.0 ,
and ported to
.Ox 4.8 .

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

@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strerror.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strerror.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRERROR 3
.Os
.Sh NAME
@ -111,3 +111,12 @@ The
.Fn strerror_r
function conforms to
.St -p1003.1 .
.Sh HISTORY
The
.Fn strerror
function first appeared in
.Bx 4.3 Reno .
The
.Fn strerror_r
function first appeared in
.Ox 3.3 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: strlcpy.3,v 1.19 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strlcpy.3,v 1.20 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRLCPY 3
.Os
.Sh NAME
@ -176,7 +176,8 @@ As a matter of fact, the first version of this manual page got it wrong.
.Sh SEE ALSO
.Xr snprintf 3 ,
.Xr strncat 3 ,
.Xr strncpy 3
.Xr strncpy 3 ,
.Xr wcslcpy 3
.Sh HISTORY
The
.Fn strlcpy
@ -184,3 +185,10 @@ and
.Fn strlcat
functions first appeared in
.Ox 2.4 .
.Sh AUTHORS
The
.Fn strlcpy
and
.Fn strlcat
functions were created by
.An Todd C. Miller Aq Todd.Miller@courtesan.com .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strlen.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strlen.3,v 1.9 2010/05/24 21:27:25 millert Exp $
.\"
.Dd $Mdocdate: May 24 2010 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRLEN 3
.Os
.Sh NAME
@ -78,7 +78,8 @@ or
.Fa maxlen ,
whichever is smaller.
.Sh SEE ALSO
.Xr string 3
.Xr string 3 ,
.Xr wcslen 3
.Sh STANDARDS
The
.Fn strlen
@ -98,5 +99,6 @@ function first appeared in
.At v7 .
The
.Fn strnlen
function first appeared in
function appeared in glibc 2.0
and was reimplemented for
.Ox 4.8 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: strmode.3,v 1.14 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strmode.3,v 1.15 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)strmode.3 8.3 (Berkeley) 7/28/94
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRMODE 3
.Os
.Sh NAME
@ -154,4 +154,4 @@ function always returns 0.
The
.Fn strmode
function first appeared in
.Bx 4.4 .
.Bx 4.3 Reno .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strpbrk.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strpbrk.3,v 1.8 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRPBRK 3
.Os
.Sh NAME
@ -64,9 +64,17 @@ returns
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcspbrk 3
.Sh STANDARDS
The
.Fn strpbrk
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strpbrk
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strrchr.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strrchr.3,v 1.8 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRRCHR 3
.Os
.Sh NAME
@ -92,7 +92,8 @@ p = strrchr(s, 'o');
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcsrchr 3
.Sh STANDARDS
The
.Fn strrchr
@ -102,3 +103,14 @@ function conforms to
The
.Fn rindex
function is deprecated and shouldn't be used in new code.
.Sh HISTORY
The
.Fn rindex
function first appeared in
.At v7 .
The
.Fn strrchr
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .

+ 7
- 9
src/lib/libc/string/strsep.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: strsep.3,v 1.12 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strsep.3,v 1.13 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -32,7 +32,7 @@
.\"
.\" @(#)strsep.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRSEP 3
.Os
.Sh NAME
@ -96,17 +96,15 @@ for (ap = argv; ap < &argv[9] &&
.Sh HISTORY
The
.Fn strsep
function is intended as a replacement for the
.Fn strtok
function first appeared in
.Bx 4.3 Reno .
It is intended as a replacement for the
.Xr strtok 3
function.
While the
.Fn strtok
.Xr strtok 3
function should be preferred for portability reasons (it conforms to
.St -ansiC )
it is unable to handle empty fields, i.e., detect fields delimited by
two adjacent delimiter characters, or to be used for more than a single
string at a time.
The
.Fn strsep
function first appeared in
.Bx 4.4 .

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

@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strsignal.3,v 1.5 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strsignal.3,v 1.6 2011/07/25 00:38:53 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRSIGNAL 3
.Os
.Sh NAME
@ -54,3 +54,10 @@ overwritten by subsequent calls to
.Xr intro 2 ,
.Xr psignal 3 ,
.Xr setlocale 3
.Sh HISTORY
The
.Fn strsignal
function first appeared in
.At V.4
and was reimplemented for
.Nx 1.0 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strspn.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strspn.3,v 1.9 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRSPN 3
.Os
.Sh NAME
@ -76,9 +76,17 @@ span = strspn(s, charset);
.Xr strrchr 3 ,
.Xr strsep 3 ,
.Xr strstr 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcsspn 3
.Sh STANDARDS
The
.Fn strspn
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strspn
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strstr.3,v 1.11 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strstr.3,v 1.10 2007/09/19 16:06:45 jmc Exp $
.\"
.Dd $Mdocdate: September 19 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRSTR 3
.Os
.Sh NAME
@ -79,7 +79,8 @@ is returned.
.Xr strrchr 3 ,
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strtok 3
.Xr strtok 3 ,
.Xr wcsstr 3
.Sh STANDARDS
The
.Fn strstr
@ -87,6 +88,13 @@ function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strcasestr
.Fn strstr
function first appeared in
.Bx 4.3 Reno .
The
.Fn strcasestr
function appeared in glibc 2.1,
was reimplemented for
.Fx 4.5
and ported to
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: strtok.3,v 1.20 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1988, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strtok.3,v 1.19 2007/05/31 19:19:32 jmc Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRTOK 3
.Os
.Sh NAME
@ -73,6 +73,14 @@ function is a version of
.Fn strtok
that takes an explicit context argument and is reentrant.
.Pp
Since
.Fn strtok
and
.Fn strtok_r
modify the string,
.Fa str
should not point to an area in the initialized data segment.
.Sh RETURN VALUES
The
.Fn strtok
and
@ -82,14 +90,6 @@ in the string, after replacing the separator character itself with an
.Tn ASCII NUL
character.
When no more tokens remain, a null pointer is returned.
.Pp
Since
.Fn strtok
and
.Fn strtok_r
modify the string,
.Fa str
should not point to an area in the initialized data segment.
.Sh EXAMPLES
The following will construct an array of pointers to each individual word in
the string
@ -133,12 +133,26 @@ will point to
.Xr strrchr 3 ,
.Xr strsep 3 ,
.Xr strspn 3 ,
.Xr strstr 3
.Xr strstr 3 ,
.Xr wcstok 3
.Sh STANDARDS
The
.Fn strtok
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strtok
function first appeared in
.At III
and was reimplemented for
.Bx 4.3 Tahoe .
The
.Fn strtok_r
function first appeared in
.Nx 1.3
and was reimplemented for
.Ox 2.7 .
.Sh BUGS
The System V
.Fn strtok ,


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

@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: strxfrm.3,v 1.8 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: strxfrm.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt STRXFRM 3
.Os
.Sh NAME
@ -67,6 +67,11 @@ The
.Fn strxfrm
function conforms to
.St -ansiC .
.Sh HISTORY
The
.Fn strxfrm
function first appeared in
.Bx 4.3 Reno .
.Sh BUGS
Since locales are not fully implemented on
.Ox ,


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

@ -25,9 +25,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: swab.3,v 1.6 2007/05/31 19:19:32 jmc Exp $
.\" $OpenBSD: swab.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $
.\"
.Dd $Mdocdate: May 31 2007 $
.Dd $Mdocdate: July 25 2011 $
.Dt SWAB 3
.Os
.Sh NAME
@ -55,7 +55,7 @@ must be an even number.
.Xr bzero 3 ,
.Xr memset 3
.Sh HISTORY
A
The
.Fn swab
function appeared in
function first appeared in
.At v7 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: wcscasecmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\" $OpenBSD: wcscasecmp.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -31,7 +31,7 @@
.\"
.\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCASECMP 3
.Os
.Sh NAME
@ -66,6 +66,7 @@ compares at most
.Fa len
wide characters.
.Sh SEE ALSO
.Xr strcasecmp 3 ,
.Xr wcscmp 3 ,
.Xr wmemcmp 3
.Sh STANDARDS
@ -75,3 +76,19 @@ and
.Fn wcsncasecmp
functions conform to
.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn wcscasecmp
and
.Fn wcsncasecmp
functions first appeared in
.Ox 5.0 .
.Sh AUTHORS
The
.Ox
versions of
.Fn wcscasecmp
and
.Fn wcsncasecmp
were implemented by
.An Marc Espie Aq espie@openbsd.org .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcscat.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcscat.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCAT 3
.Os
.Sh NAME
@ -43,7 +43,7 @@
.Ft wchar_t *
.Fn wcscat "wchar_t * restrict s" "const wchar_t * restrict append"
.Ft wchar_t *
.Fo strncat
.Fo wcsncat
.Fa "wchar_t * restrict s"
.Fa "const wchar_t * restrict append"
.Fa "size_t count"
@ -77,8 +77,9 @@ and
functions return the pointer
.Fa s .
.Sh SEE ALSO
.Xr strcat 3 ,
.Xr strlcpy 3 ,
.Xr wcscpy 3 ,
.Xr wcslcat 3 ,
.Xr wcslcpy 3 ,
.Xr wmemcpy 3 ,
.Xr wmemmove 3
@ -91,3 +92,24 @@ functions conform to
.St -isoC-99
and were first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcscat
and
.Fn wcsncat
functions were ported from
.Nx
and first appeared in
.Ox 3.8 .
.Sh CAVEATS
Using the functions
.Fn wcscat
and
.Fn wcsncat
is very error-prone with respect to buffer overflows;
see the EXAMPLES section in
.Xr strcat 3
for correct usage.
Using
.Xr wcslcat 3
is a better choice in most cases.

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcschr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,10 +31,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcschr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dt STRCHR 3
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCHR 3
.Os
.Sh NAME
.Nm wcschr
@ -61,6 +61,7 @@ function returns a pointer to the located wide character or
.Dv NULL
if the wide character does not appear in the wide string.
.Sh SEE ALSO
.Xr strchr 3 ,
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
.Xr wcsrchr 3 ,
@ -75,3 +76,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcschr
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcscmp.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcscmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCMP 3
.Os
.Sh NAME
@ -55,7 +55,7 @@ and
.Fa s2 .
The
.Fn wcsncmp
compares at most
function compares at most
.Fa len
wide characters.
.Sh RETURN VALUES
@ -69,6 +69,7 @@ to whether the wide string
is greater than, equal to, or less than the wide string
.Fa s2 .
.Sh SEE ALSO
.Xr strcmp 3 ,
.Xr wcscasecmp 3 ,
.Xr wmemcmp 3
.Sh STANDARDS
@ -80,3 +81,12 @@ functions conform to
.St -isoC-99
and were first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcscmp
and
.Fn wcsncmp
functions were ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcscpy.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcscpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCPY 3
.Os
.Sh NAME
@ -51,7 +51,9 @@
.Sh DESCRIPTION
The
.Fn wcscpy
function copies the wide string
and
.Fn wcsncpy
functions copy the wide string
.Fa src
to
.Fa dst
@ -83,6 +85,9 @@ and
functions return
.Fa dst .
.Sh SEE ALSO
.Xr strcpy 3 ,
.Xr strlcpy 3 ,
.Xr wcscat 3 ,
.Xr wcslcpy 3 ,
.Xr wmemcpy 3 ,
.Xr wmemmove 3
@ -95,3 +100,24 @@ functions conform to
.St -isoC-99
and were first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcscpy
and
.Fn wcsncpy
functions were ported from
.Nx
and first appeared in
.Ox 3.8 .
.Sh CAVEATS
Using the functions
.Fn wcscpy
and
.Fn wcsncpy
is very error-prone with respect to buffer overflows;
see the EXAMPLES section in
.Xr strcpy 3
for correct usage.
Using
.Xr wcslcpy 3
is a better choice in most cases.

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcscspn.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcscspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSCSPN 3
.Os
.Sh NAME
@ -59,6 +59,7 @@ The
.Fn wcscspn
function returns the number of wide characters spanned.
.Sh SEE ALSO
.Xr strcspn 3 ,
.Xr wcschr 3 ,
.Xr wcspbrk 3 ,
.Xr wcsrchr 3 ,
@ -73,3 +74,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcscspn
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

+ 16
- 13
src/lib/libc/string/wcsdup.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: wcsdup.3,v 1.3 2011/07/08 17:46:45 nicm Exp $
.\" $OpenBSD: wcsdup.3,v 1.4 2011/07/25 00:38:53 schwarze Exp $
.\" $NetBSD: wcsdup.3,v 1.3 2010/12/16 17:42:28 wiz Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
@ -28,14 +28,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" from: @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\" @(#)strdup.3 8.1 (Berkeley) 6/9/93
.\"
.Dd $Mdocdate: July 8 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSDUP 3
.Os
.Sh NAME
.Nm wcsdup
.Nd save a copy of a string
.Nd save a copy of a wide string
.Sh SYNOPSIS
.In wchar.h
.Ft wchar_t *
@ -66,15 +66,11 @@ wchar_t *p, b[32];
size_t blen;
blen = sizeof(b) / sizeof(b[0]);
if (mbstowcs(b, o, blen) == (size_t)-1) {
fprintf(stderr, "Failed to convert string.\en");
exit(1);
}
if (mbstowcs(b, o, blen) == (size_t)-1)
err(1, NULL);
b[blen - 1] = 0;
if ((p = wcsdup(b)) == NULL) {
fprintf(stderr, "Out of memory.\en");
exit(1);
}
if ((p = wcsdup(b)) == NULL)
err(1, NULL);
.Ed
.Sh ERRORS
The
@ -87,8 +83,15 @@ for any of the errors specified for the library function
.Xr free 3 ,
.Xr malloc 3 ,
.Xr strdup 3
.Sh STANDARDS
The
.Fn wcsdup
function conforms to
.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn wcsdup
function first appeared in
function was ported from
.Nx
and first appeared in
.Ox 5.0 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: wcslcpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\" $OpenBSD: wcslcpy.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSLCPY 3
.Os
.Sh NAME
@ -127,6 +127,7 @@ is incorrect or that
is not terminated with a null wide character).
The check exists to prevent potential security problems in incorrect code.
.Sh SEE ALSO
.Xr strlcpy 3 ,
.Xr swprintf 3 ,
.Xr wcsncat 3 ,
.Xr wcsncpy 3
@ -137,3 +138,10 @@ and
.Fn wcslcat
functions first appeared in
.Ox 3.8 .
.Sh AUTHORS
The
.Fn wcslcpy
and
.Fn wcslcat
functions are based on code by
.An Todd C. Miller Aq Todd.Miller@courtesan.com .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcslen.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcslen.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSLEN 3
.Os
.Sh NAME
@ -52,6 +52,7 @@ The
function returns the number of wide characters that precede the terminating
null wide character.
.Sh SEE ALSO
.Xr strlen 3 ,
.Xr wcswidth 3
.Sh STANDARDS
The
@ -60,3 +61,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcslen
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcspbrk.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcspbrk.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSPBRK 3
.Os
.Sh NAME
@ -57,13 +57,14 @@ occur anywhere in
returns
.Dv NULL .
.Sh SEE ALSO
.Xr wmemchr 3 ,
.Xr strpbrk 3 ,
.Xr wcschr 3 ,
.Xr wcscspn 3 ,
.Xr wcsrchr 3 ,
.Xr wcsspn 3 ,
.Xr wcsstr 3 ,
.Xr wcstok 3
.Xr wcstok 3 ,
.Xr wmemchr 3
.Sh STANDARDS
The
.Fn wcspbrk
@ -71,3 +72,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcspbrk
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcsrchr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcsrchr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSRCHR 3
.Os
.Sh NAME
@ -61,6 +61,7 @@ function returns a pointer to the located wide character or
.Dv NULL
if the wide character does not appear in the wide string.
.Sh SEE ALSO
.Xr strrchr 3 ,
.Xr wcschr 3 ,
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
@ -75,3 +76,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcsrchr
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcsspn.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcsspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSSPN 3
.Os
.Sh NAME
@ -55,6 +55,7 @@ The
.Fn wcsspn
function returns the number of wide characters spanned.
.Sh SEE ALSO
.Xr strspn 3 ,
.Xr wcschr 3 ,
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
@ -69,3 +70,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcsspn
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wcsstr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wcsstr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSSTR 3
.Os
.Sh NAME
@ -64,13 +64,14 @@ otherwise a pointer to the first wide character of the first occurrence of
.Fa little
is returned.
.Sh SEE ALSO
.Xr strstr 3 ,
.Xr wcschr 3 ,
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
.Xr wcsrchr 3 ,
.Xr wcsspn 3 ,
.Xr wcstok 3 ,
.Xr wmemchr 3 ,
.Xr wmemchr 3
.Sh STANDARDS
The
.Fn wcsstr
@ -78,3 +79,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wcsstr
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,4 +1,4 @@
.\" $OpenBSD: wcstok.3,v 1.6 2010/09/10 18:38:20 jmc Exp $
.\" $OpenBSD: wcstok.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $
.\"
@ -54,7 +54,7 @@
.\" Original version ID:
.\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp
.\"
.Dd $Mdocdate: September 10 2010 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSTOK 3
.Os
.Sh NAME
@ -90,8 +90,14 @@ must be provided on each call.
The
.Fn wcstok
function is the wide-character counterpart of the
.Fn strtok_r
.Xr strtok_r 3
function.
.Pp
Since
.Fn wcstok
modifies the string,
.Fa str
should not point to an area in the initialized data segment.
.Sh RETURN VALUES
The
.Fn wcstok
@ -118,7 +124,9 @@ for (tok = wcstok(text, seps, &last); tok != NULL;
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
.Xr wcsrchr 3 ,
.Xr wcsspn 3
.Xr wcsspn 3 ,
.Xr wcsstr 3 ,
.Xr wmemchr 3
.Sh STANDARDS
The
.Fn wcstok
@ -126,11 +134,18 @@ function
conforms to
.St -isoC-99 .
.Sh HISTORY
The
.Fn wcstok
function was ported from
.Nx
and first appeared in
.Ox 3.8 .
.Pp
Some early implementations of
.Fn wcstok
omit the
context pointer argument,
.Fa last ,
and maintain state across calls in a static variable like
.Fn strtok
.Xr strtok 3
does.

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

@ -1,4 +1,5 @@
.\" $OpenBSD: wcswidth.3,v 1.1 2011/04/04 18:16:24 stsp Exp $
.\" $OpenBSD: wcswidth.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 2002 Tim J. Robbins
.\" All rights reserved.
.\"
@ -23,8 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"
.Dd $Mdocdate: April 4 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WCSWIDTH 3
.Os
.Sh NAME
@ -52,9 +52,18 @@ is an empty string (L""),
otherwise it returns the number of column positions occupied.
.Sh SEE ALSO
.Xr iswprint 3 ,
.Xr strlen 3 ,
.Xr wcslen 3 ,
.Xr wcwidth 3
.Sh STANDARDS
The
.Fn wcswidth
function conforms to
.St -p1003.1-2001 .
.Sh HISTORY
The
.Fn wcswidth
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wmemchr.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wmemchr.3,v 1.8 2011/07/09 16:46:58 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WMEMCHR 3
.Os
.Sh NAME
@ -57,6 +57,7 @@ if no such wide character exists within
.Fa len
wide characters.
.Sh SEE ALSO
.Xr memchr 3 ,
.Xr wcschr 3 ,
.Xr wcscspn 3 ,
.Xr wcspbrk 3 ,
@ -71,3 +72,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wmemchr
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wmemcmp.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wmemcmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WMEMCMP 3
.Os
.Sh NAME
@ -59,8 +59,9 @@ otherwise the difference between the first two differing wide characters is
returned.
Zero-length wide strings are always identical.
.Sh SEE ALSO
.Xr memcmp 3 ,
.Xr wcscasecmp 3 ,
.Xr wcscmp 3 ,
.Xr wcscmp 3
.Sh STANDARDS
The
.Fn wmemcmp
@ -68,3 +69,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wmemcmp
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

+ 14
- 6
src/lib/libc/string/wmemcpy.3 View File

@ -1,3 +1,5 @@
.\" $OpenBSD: wmemcpy.3,v 1.3 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wmemcpy.3,v 1.2 2011/07/09 16:46:58 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WMEMCPY 3
.Os
.Sh NAME
@ -56,6 +56,7 @@ The
function returns the original value of
.Fa dst .
.Sh SEE ALSO
.Xr memcpy 3 ,
.Xr wcscpy 3 ,
.Xr wcslcpy 3 ,
.Xr wmemmove 3
@ -66,12 +67,19 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh BUGS
.Sh HISTORY
The
.Fn wmemcpy
function was ported from
.Nx
and first appeared in
.Ox 3.8 .
.Sh CAVEATS
In this implementation
.Fn wmemcpy
is implemented using
.Xr bcopy 3 ,
and therefore the buffers may overlap.
On other systems, copying overlapping buffers may produce surprises.
A simpler solution is to not use
.Fn wmemcpy .
A portable, safe solution is to use
.Xr wmemmove 3 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wmemmove.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wmemmove.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WMEMMOVE 3
.Os
.Sh NAME
@ -58,6 +58,7 @@ The
function returns the original value of
.Fa dst .
.Sh SEE ALSO
.Xr memmove 3 ,
.Xr wcscpy 3 ,
.Xr wcslcpy 3 ,
.Xr wmemcpy 3
@ -68,3 +69,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wmemmove
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

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

@ -1,3 +1,5 @@
.\" $OpenBSD: wmemset.3,v 1.3 2011/07/25 00:38:53 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: wmemset.3,v 1.2 2011/07/09 16:46:58 nicm Exp $
.\"
.Dd $Mdocdate: July 9 2011 $
.Dd $Mdocdate: July 25 2011 $
.Dt WMEMSET 3
.Os
.Sh NAME
@ -55,6 +55,8 @@ The
.Fn wmemset
function returns the original value of
.Fa s .
.Sh SEE ALSO
.Xr memset 3
.Sh STANDARDS
The
.Fn wmemset
@ -62,3 +64,10 @@ function conforms to
.St -isoC-99
and was first introduced in
.St -isoC-amd1 .
.Sh HISTORY
The
.Fn wmemset
function was ported from
.Nx
and first appeared in
.Ox 3.8 .

Loading…
Cancel
Save