diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libc/string/Makefile.inc | 32 | ||||
| -rw-r--r-- | src/lib/libc/string/wcscasecmp.3 | 77 | ||||
| -rw-r--r-- | src/lib/libc/string/wcscat.3 | 93 | ||||
| -rw-r--r-- | src/lib/libc/string/wcschr.3 | 77 | ||||
| -rw-r--r-- | src/lib/libc/string/wcscmp.3 | 82 | ||||
| -rw-r--r-- | src/lib/libc/string/wcscpy.3 | 97 | ||||
| -rw-r--r-- | src/lib/libc/string/wcscspn.3 | 75 | ||||
| -rw-r--r-- | src/lib/libc/string/wcslcpy.3 | 139 | ||||
| -rw-r--r-- | src/lib/libc/string/wcslen.3 | 62 | ||||
| -rw-r--r-- | src/lib/libc/string/wcspbrk.3 | 73 | ||||
| -rw-r--r-- | src/lib/libc/string/wcsrchr.3 | 77 | ||||
| -rw-r--r-- | src/lib/libc/string/wcsspn.3 | 71 | ||||
| -rw-r--r-- | src/lib/libc/string/wcsstr.3 | 80 | ||||
| -rw-r--r-- | src/lib/libc/string/wmemchr.3 | 150 | ||||
| -rw-r--r-- | src/lib/libc/string/wmemcmp.3 | 70 | ||||
| -rw-r--r-- | src/lib/libc/string/wmemcpy.3 | 77 | ||||
| -rw-r--r-- | src/lib/libc/string/wmemmove.3 | 70 | ||||
| -rw-r--r-- | src/lib/libc/string/wmemset.3 | 64 |
18 files changed, 1327 insertions, 139 deletions
diff --git a/src/lib/libc/string/Makefile.inc b/src/lib/libc/string/Makefile.inc index bb285e135e..40713956e5 100644 --- a/src/lib/libc/string/Makefile.inc +++ b/src/lib/libc/string/Makefile.inc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.26 2011/07/04 04:37:34 nicm Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.27 2011/07/09 16:32:11 nicm Exp $ |
| 2 | 2 | ||
| 3 | # string sources | 3 | # string sources |
| 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/string ${LIBCSRCDIR}/string | 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/string ${LIBCSRCDIR}/string |
| @@ -144,7 +144,9 @@ MAN+= bm.3 bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 memccpy.3 memchr.3 \ | |||
| 144 | strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strerror.3 \ | 144 | strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strerror.3 \ |
| 145 | string.3 strlen.3 strmode.3 strdup.3 strpbrk.3 strrchr.3 strsep.3 \ | 145 | string.3 strlen.3 strmode.3 strdup.3 strpbrk.3 strrchr.3 strsep.3 \ |
| 146 | strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 strlcpy.3 \ | 146 | strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 strlcpy.3 \ |
| 147 | wcstok.3 wmemchr.3 wcswidth.3 wcsdup.3 | 147 | wcscasecmp.3 wcscat.3 wcschr.3 wcscmp.3 wcscpy.3 wcscspn.3 wcsdup.3 \ |
| 148 | wcslcpy.3 wcslen.3 wcspbrk.3 wcsrchr.3 wcsspn.3 wcsstr.3 wcstok.3 \ | ||
| 149 | wcswidth.3 wmemchr.3 wmemcmp.3 wmemcpy.3 wmemmove.3 wmemset.3 | ||
| 148 | 150 | ||
| 149 | MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3 | 151 | MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3 |
| 150 | MLINKS+=memchr.3 memrchr.3 | 152 | MLINKS+=memchr.3 memrchr.3 |
| @@ -160,25 +162,9 @@ MLINKS+=strlen.3 strnlen.3 | |||
| 160 | MLINKS+=strstr.3 strcasestr.3 | 162 | MLINKS+=strstr.3 strcasestr.3 |
| 161 | MLINKS+=strtok.3 strtok_r.3 | 163 | MLINKS+=strtok.3 strtok_r.3 |
| 162 | MLINKS+=strerror.3 strerror_r.3 | 164 | MLINKS+=strerror.3 strerror_r.3 |
| 163 | MLINKS+=wmemchr.3 wmemcmp.3 | 165 | MLINKS+=wcscasecmp.3 wcsncasecmp.3 |
| 164 | MLINKS+=wmemchr.3 wmemcpy.3 | 166 | MLINKS+=wcscat.3 wcsncat.3 |
| 165 | MLINKS+=wmemchr.3 wmemmove.3 | 167 | MLINKS+=wcscmp.3 wcsncmp.3 |
| 166 | MLINKS+=wmemchr.3 wmemset.3 | 168 | MLINKS+=wcscpy.3 wcsncpy.3 |
| 167 | MLINKS+=wmemchr.3 wcscat.3 | 169 | MLINKS+=wcslcpy.3 wcslcat.3 |
| 168 | MLINKS+=wmemchr.3 wcschr.3 | ||
| 169 | MLINKS+=wmemchr.3 wcscmp.3 | ||
| 170 | MLINKS+=wmemchr.3 wcscasecmp.3 | ||
| 171 | MLINKS+=wmemchr.3 wcscpy.3 | ||
| 172 | MLINKS+=wmemchr.3 wcscspn.3 | ||
| 173 | MLINKS+=wmemchr.3 wcslcat.3 | ||
| 174 | MLINKS+=wmemchr.3 wcslcpy.3 | ||
| 175 | MLINKS+=wmemchr.3 wcslen.3 | ||
| 176 | MLINKS+=wmemchr.3 wcsncat.3 | ||
| 177 | MLINKS+=wmemchr.3 wcsncmp.3 | ||
| 178 | MLINKS+=wmemchr.3 wcsncasecmp.3 | ||
| 179 | MLINKS+=wmemchr.3 wcsncpy.3 | ||
| 180 | MLINKS+=wmemchr.3 wcspbrk.3 | ||
| 181 | MLINKS+=wmemchr.3 wcsrchr.3 | ||
| 182 | MLINKS+=wmemchr.3 wcsspn.3 | ||
| 183 | MLINKS+=wmemchr.3 wcsstr.3 | ||
| 184 | MLINKS+=bcmp.3 timingsafe_bcmp.3 | 170 | MLINKS+=bcmp.3 timingsafe_bcmp.3 |
diff --git a/src/lib/libc/string/wcscasecmp.3 b/src/lib/libc/string/wcscasecmp.3 new file mode 100644 index 0000000000..d76d33bd5c --- /dev/null +++ b/src/lib/libc/string/wcscasecmp.3 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | .\" $OpenBSD: wcscasecmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 1990, 1991, 1993 | ||
| 4 | .\" The Regents of the University of California. All rights reserved. | ||
| 5 | .\" | ||
| 6 | .\" This code is derived from software contributed to Berkeley by | ||
| 7 | .\" Chris Torek. | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSCASECMP 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcscasecmp , | ||
| 39 | .Nm wcsncasecmp | ||
| 40 | .Nd compare wide strings, ignoring case | ||
| 41 | .Sh SYNOPSIS | ||
| 42 | .Fd #include <wchar.h> | ||
| 43 | .Ft int | ||
| 44 | .Fn wcscasecmp "const wchar_t *s1" "const wchar_t *s2" | ||
| 45 | .Ft int | ||
| 46 | .Fn wcsncasecmp "const wchar_t *s1" "const wchar_t *s2" "size_t len" | ||
| 47 | .Sh DESCRIPTION | ||
| 48 | The | ||
| 49 | .Fn wcscasecmp | ||
| 50 | and | ||
| 51 | .Fn wcsncasecmp | ||
| 52 | functions compare the wide strings | ||
| 53 | .Fa s1 | ||
| 54 | and | ||
| 55 | .Fa s2 | ||
| 56 | and return an integer greater than, equal to, or less than 0, | ||
| 57 | according to whether | ||
| 58 | .Fa s1 | ||
| 59 | is lexicographically greater than, equal to, or less than | ||
| 60 | .Fa s2 | ||
| 61 | after translation of each corresponding wide character to lower case. | ||
| 62 | The wide strings themselves are not modified. | ||
| 63 | .Pp | ||
| 64 | .Fn wcsncasecmp | ||
| 65 | compares at most | ||
| 66 | .Fa len | ||
| 67 | wide characters. | ||
| 68 | .Sh SEE ALSO | ||
| 69 | .Xr wcscmp 3 , | ||
| 70 | .Xr wmemcmp 3 | ||
| 71 | .Sh STANDARDS | ||
| 72 | The | ||
| 73 | .Fn wcscasecmp | ||
| 74 | and | ||
| 75 | .Fn wcsncasecmp | ||
| 76 | functions conform to | ||
| 77 | .St -p1003.1-2008 . | ||
diff --git a/src/lib/libc/string/wcscat.3 b/src/lib/libc/string/wcscat.3 new file mode 100644 index 0000000000..c5321d5a2a --- /dev/null +++ b/src/lib/libc/string/wcscat.3 | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcscat.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSCAT 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcscat , | ||
| 39 | .Nm wcsncat | ||
| 40 | .Nd concatenate wide strings | ||
| 41 | .Sh SYNOPSIS | ||
| 42 | .Fd #include <wchar.h> | ||
| 43 | .Ft wchar_t * | ||
| 44 | .Fn wcscat "wchar_t * restrict s" "const wchar_t * restrict append" | ||
| 45 | .Ft wchar_t * | ||
| 46 | .Fo strncat | ||
| 47 | .Fa "wchar_t * restrict s" | ||
| 48 | .Fa "const wchar_t * restrict append" | ||
| 49 | .Fa "size_t count" | ||
| 50 | .Fc | ||
| 51 | .Sh DESCRIPTION | ||
| 52 | The | ||
| 53 | .Fn wcscat | ||
| 54 | and | ||
| 55 | .Fn wcsncat | ||
| 56 | functions append a copy of the wide string | ||
| 57 | .Fa append | ||
| 58 | to the end of the wide string | ||
| 59 | .Fa s , | ||
| 60 | then add a terminating null wide character (L'\e0'). | ||
| 61 | The wide string | ||
| 62 | .Fa s | ||
| 63 | must have sufficient space to hold the result. | ||
| 64 | .Pp | ||
| 65 | The | ||
| 66 | .Fn wcsncat | ||
| 67 | function appends not more than | ||
| 68 | .Fa count | ||
| 69 | wide characters where space for the terminating null wide character | ||
| 70 | should not be included in | ||
| 71 | .Fa count . | ||
| 72 | .Sh RETURN VALUES | ||
| 73 | The | ||
| 74 | .Fn wcscat | ||
| 75 | and | ||
| 76 | .Fn wcsncat | ||
| 77 | functions return the pointer | ||
| 78 | .Fa s . | ||
| 79 | .Sh SEE ALSO | ||
| 80 | .Xr wcscpy 3 , | ||
| 81 | .Xr wcslcat 3 , | ||
| 82 | .Xr wcslcpy 3 , | ||
| 83 | .Xr wmemcpy 3 , | ||
| 84 | .Xr wmemmove 3 | ||
| 85 | .Sh STANDARDS | ||
| 86 | The | ||
| 87 | .Fn wcscat | ||
| 88 | and | ||
| 89 | .Fn wcsncat | ||
| 90 | functions conform to | ||
| 91 | .St -isoC-99 | ||
| 92 | and were first introduced in | ||
| 93 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcschr.3 b/src/lib/libc/string/wcschr.3 new file mode 100644 index 0000000000..10c78f34e1 --- /dev/null +++ b/src/lib/libc/string/wcschr.3 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcschr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt STRCHR 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcschr | ||
| 39 | .Nd locate first occurrence of a wide character in a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wcschr "const wchar_t *s" "wchar_t c" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcschr | ||
| 47 | function locates the first occurrence of the wide character | ||
| 48 | .Fa c | ||
| 49 | in the wide string | ||
| 50 | .Fa s . | ||
| 51 | The terminating null wide character is considered part of the wide string. | ||
| 52 | If | ||
| 53 | .Fa c | ||
| 54 | is the null wide character (L'\e0'), | ||
| 55 | .Fn wcschr | ||
| 56 | locates the terminating null wide character. | ||
| 57 | .Sh RETURN VALUES | ||
| 58 | The | ||
| 59 | .Fn wcschr | ||
| 60 | function returns a pointer to the located wide character or | ||
| 61 | .Dv NULL | ||
| 62 | if the wide character does not appear in the wide string. | ||
| 63 | .Sh SEE ALSO | ||
| 64 | .Xr wcscspn 3 , | ||
| 65 | .Xr wcspbrk 3 , | ||
| 66 | .Xr wcsrchr 3 , | ||
| 67 | .Xr wcsspn 3 , | ||
| 68 | .Xr wcsstr 3 , | ||
| 69 | .Xr wcstok 3 , | ||
| 70 | .Xr wmemchr 3 | ||
| 71 | .Sh STANDARDS | ||
| 72 | The | ||
| 73 | .Fn wcschr | ||
| 74 | function conforms to | ||
| 75 | .St -isoC-99 | ||
| 76 | and was first introduced in | ||
| 77 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcscmp.3 b/src/lib/libc/string/wcscmp.3 new file mode 100644 index 0000000000..15952b9022 --- /dev/null +++ b/src/lib/libc/string/wcscmp.3 | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcscmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSCMP 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcscmp , | ||
| 39 | .Nm wcsncmp | ||
| 40 | .Nd compare wide strings | ||
| 41 | .Sh SYNOPSIS | ||
| 42 | .Fd #include <wchar.h> | ||
| 43 | .Ft int | ||
| 44 | .Fn wcscmp "const wchar_t *s1" "const wchar_t *s2" | ||
| 45 | .Ft int | ||
| 46 | .Fn wcsncmp "const wchar_t *s1" "const wchar_t *s2" "size_t len" | ||
| 47 | .Sh DESCRIPTION | ||
| 48 | The | ||
| 49 | .Fn wcscmp | ||
| 50 | and | ||
| 51 | .Fn wcsncmp | ||
| 52 | functions lexicographically compare the wide strings | ||
| 53 | .Fa s1 | ||
| 54 | and | ||
| 55 | .Fa s2 . | ||
| 56 | The | ||
| 57 | .Fn wcsncmp | ||
| 58 | compares at most | ||
| 59 | .Fa len | ||
| 60 | wide characters. | ||
| 61 | .Sh RETURN VALUES | ||
| 62 | The | ||
| 63 | .Fn wcscmp | ||
| 64 | and | ||
| 65 | .Fn wcsncmp | ||
| 66 | functions return an integer greater than, equal to, or less than 0, according | ||
| 67 | to whether the wide string | ||
| 68 | .Fa s1 | ||
| 69 | is greater than, equal to, or less than the wide string | ||
| 70 | .Fa s2 . | ||
| 71 | .Sh SEE ALSO | ||
| 72 | .Xr wcscasecmp 3 , | ||
| 73 | .Xr wmemcmp 3 | ||
| 74 | .Sh STANDARDS | ||
| 75 | The | ||
| 76 | .Fn wcscmp | ||
| 77 | and | ||
| 78 | .Fn wcsncmp | ||
| 79 | functions conform to | ||
| 80 | .St -isoC-99 | ||
| 81 | and were first introduced in | ||
| 82 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcscpy.3 b/src/lib/libc/string/wcscpy.3 new file mode 100644 index 0000000000..a71d54f886 --- /dev/null +++ b/src/lib/libc/string/wcscpy.3 | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcscpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSCPY 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcscpy , | ||
| 39 | .Nm wcsncpy | ||
| 40 | .Nd copy wide strings | ||
| 41 | .Sh SYNOPSIS | ||
| 42 | .Fd #include <wchar.h> | ||
| 43 | .Ft wchar_t * | ||
| 44 | .Fn wcscpy "wchar_t * restrict dst" "const wchar_t * restrict src" | ||
| 45 | .Ft wchar_t * | ||
| 46 | .Fo wcsncpy | ||
| 47 | .Fa "wchar_t * restrict dst" | ||
| 48 | .Fa "const wchar_t * restrict src" | ||
| 49 | .Fa "size_t len" | ||
| 50 | .Fc | ||
| 51 | .Sh DESCRIPTION | ||
| 52 | The | ||
| 53 | .Fn wcscpy | ||
| 54 | function copies the wide string | ||
| 55 | .Fa src | ||
| 56 | to | ||
| 57 | .Fa dst | ||
| 58 | (including the terminating null wide character). | ||
| 59 | .Pp | ||
| 60 | The | ||
| 61 | .Fn wcsncpy | ||
| 62 | function copies not more than | ||
| 63 | .Fa len | ||
| 64 | wide characters to | ||
| 65 | .Fa dst , | ||
| 66 | appending null wide characters if the length of | ||
| 67 | .Fa src | ||
| 68 | is less than | ||
| 69 | .Fa len , | ||
| 70 | and | ||
| 71 | .Em not | ||
| 72 | terminating | ||
| 73 | .Fa dst | ||
| 74 | if the length of | ||
| 75 | .Fa src | ||
| 76 | is greater than or equal to | ||
| 77 | .Fa len . | ||
| 78 | .Sh RETURN VALUES | ||
| 79 | The | ||
| 80 | .Fn wcscpy | ||
| 81 | and | ||
| 82 | .Fn wcsncpy | ||
| 83 | functions return | ||
| 84 | .Fa dst . | ||
| 85 | .Sh SEE ALSO | ||
| 86 | .Xr wcslcpy 3 , | ||
| 87 | .Xr wmemcpy 3 , | ||
| 88 | .Xr wmemmove 3 | ||
| 89 | .Sh STANDARDS | ||
| 90 | The | ||
| 91 | .Fn wcscpy | ||
| 92 | and | ||
| 93 | .Fn wcsncpy | ||
| 94 | functions conform to | ||
| 95 | .St -isoC-99 | ||
| 96 | and were first introduced in | ||
| 97 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcscspn.3 b/src/lib/libc/string/wcscspn.3 new file mode 100644 index 0000000000..7623e9985f --- /dev/null +++ b/src/lib/libc/string/wcscspn.3 | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcscspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSCSPN 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcscspn | ||
| 39 | .Nd span the complement of a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft size_t | ||
| 43 | .Fn wcscspn "const wchar_t *s" "const wchar_t *charset" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcscspn | ||
| 47 | function spans the initial part of the wide string | ||
| 48 | .Fa s | ||
| 49 | as long as the wide characters from | ||
| 50 | .Fa s | ||
| 51 | do not occur in string | ||
| 52 | .Fa charset | ||
| 53 | (it spans the | ||
| 54 | .Em complement | ||
| 55 | of | ||
| 56 | .Fa charset ) . | ||
| 57 | .Sh RETURN VALUES | ||
| 58 | The | ||
| 59 | .Fn wcscspn | ||
| 60 | function returns the number of wide characters spanned. | ||
| 61 | .Sh SEE ALSO | ||
| 62 | .Xr wcschr 3 , | ||
| 63 | .Xr wcspbrk 3 , | ||
| 64 | .Xr wcsrchr 3 , | ||
| 65 | .Xr wcsspn 3 , | ||
| 66 | .Xr wcsstr 3 , | ||
| 67 | .Xr wcstok 3 , | ||
| 68 | .Xr wmemchr 3 | ||
| 69 | .Sh STANDARDS | ||
| 70 | The | ||
| 71 | .Fn wcscspn | ||
| 72 | function conforms to | ||
| 73 | .St -isoC-99 | ||
| 74 | and was first introduced in | ||
| 75 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcslcpy.3 b/src/lib/libc/string/wcslcpy.3 new file mode 100644 index 0000000000..6f068dc9df --- /dev/null +++ b/src/lib/libc/string/wcslcpy.3 | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | .\" $OpenBSD: wcslcpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: July 9 2011 $ | ||
| 18 | .Dt WCSLCPY 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm wcslcpy , | ||
| 22 | .Nm wcslcat | ||
| 23 | .Nd size-bounded wide string copying and concatenation | ||
| 24 | .Sh SYNOPSIS | ||
| 25 | .Fd #include <wchar.h> | ||
| 26 | .Ft size_t | ||
| 27 | .Fn wcslcpy "wchar_t *dst" "const wchar_t *src" "size_t size" | ||
| 28 | .Ft size_t | ||
| 29 | .Fn wcslcat "wchar_t *dst" "const wchar_t *src" "size_t size" | ||
| 30 | .Sh DESCRIPTION | ||
| 31 | The | ||
| 32 | .Fn wcslcpy | ||
| 33 | and | ||
| 34 | .Fn wcslcat | ||
| 35 | functions copy and concatenate wide strings respectively. | ||
| 36 | They are designed to be safer, more consistent, and less error prone | ||
| 37 | replacements for | ||
| 38 | .Xr wcsncpy 3 | ||
| 39 | and | ||
| 40 | .Xr wcsncat 3 . | ||
| 41 | Unlike those functions, | ||
| 42 | .Fn wcslcpy | ||
| 43 | and | ||
| 44 | .Fn wcslcat | ||
| 45 | take the full size of the buffer (not just the length) and guarantee to | ||
| 46 | terminate the result with a null wide character (as long as | ||
| 47 | .Fa size | ||
| 48 | is larger than 0 or, in the case of | ||
| 49 | .Fn wcslcat , | ||
| 50 | as long as there is at least one wide character free in | ||
| 51 | .Fa dst ) . | ||
| 52 | Note that a wide character for the null wide character should be included in | ||
| 53 | .Fa size . | ||
| 54 | Also note that | ||
| 55 | .Fn wcslcpy | ||
| 56 | and | ||
| 57 | .Fn wcslcat | ||
| 58 | only operate on wide strings that are terminated with a null wide character | ||
| 59 | (L'\e0'). | ||
| 60 | This means that for | ||
| 61 | .Fn wcslcpy | ||
| 62 | .Fa src | ||
| 63 | must be terminated with a null wide character and for | ||
| 64 | .Fn wcslcat | ||
| 65 | both | ||
| 66 | .Fa src | ||
| 67 | and | ||
| 68 | .Fa dst | ||
| 69 | must be terminated with a null wide character. | ||
| 70 | .Pp | ||
| 71 | The | ||
| 72 | .Fn wcslcpy | ||
| 73 | function copies up to | ||
| 74 | .Fa size | ||
| 75 | \(mi 1 wide characters from the wide string | ||
| 76 | .Fa src | ||
| 77 | to | ||
| 78 | .Fa dst , | ||
| 79 | terminating the result with a null wide character. | ||
| 80 | .Pp | ||
| 81 | The | ||
| 82 | .Fn wcslcat | ||
| 83 | function appends the wide string | ||
| 84 | .Fa src | ||
| 85 | to the end of | ||
| 86 | .Fa dst . | ||
| 87 | It will append at most | ||
| 88 | .Fa size | ||
| 89 | \(mi wcslen(dst) \(mi 1 wide characters, terminating the result with a null | ||
| 90 | wide character. | ||
| 91 | .Sh RETURN VALUES | ||
| 92 | The | ||
| 93 | .Fn wcslcpy | ||
| 94 | and | ||
| 95 | .Fn wcslcat | ||
| 96 | functions return the total length of the wide string they tried to create. | ||
| 97 | For | ||
| 98 | .Fn wcslcpy | ||
| 99 | that means the length of | ||
| 100 | .Fa src . | ||
| 101 | For | ||
| 102 | .Fn wcslcat | ||
| 103 | that means the initial length of | ||
| 104 | .Fa dst | ||
| 105 | plus | ||
| 106 | the length of | ||
| 107 | .Fa src . | ||
| 108 | While this may seem somewhat confusing, it was done to make | ||
| 109 | truncation detection simple. | ||
| 110 | .Pp | ||
| 111 | Note, however, that if | ||
| 112 | .Fn wcslcat | ||
| 113 | traverses | ||
| 114 | .Fa size | ||
| 115 | wide characters without finding a null wide character, the length of the | ||
| 116 | string is considered to be | ||
| 117 | .Fa size | ||
| 118 | and the destination wide string will not be terminated with a null wide | ||
| 119 | character (since there was no space for it). | ||
| 120 | This keeps | ||
| 121 | .Fn wcslcat | ||
| 122 | from running off the end of a wide string. | ||
| 123 | In practice this should not happen (as it means that either | ||
| 124 | .Fa size | ||
| 125 | is incorrect or that | ||
| 126 | .Fa dst | ||
| 127 | is not terminated with a null wide character). | ||
| 128 | The check exists to prevent potential security problems in incorrect code. | ||
| 129 | .Sh SEE ALSO | ||
| 130 | .Xr swprintf 3 , | ||
| 131 | .Xr wcsncat 3 , | ||
| 132 | .Xr wcsncpy 3 | ||
| 133 | .Sh HISTORY | ||
| 134 | The | ||
| 135 | .Fn wcslcpy | ||
| 136 | and | ||
| 137 | .Fn wcslcat | ||
| 138 | functions first appeared in | ||
| 139 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcslen.3 b/src/lib/libc/string/wcslen.3 new file mode 100644 index 0000000000..cf4813c4a4 --- /dev/null +++ b/src/lib/libc/string/wcslen.3 | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcslen.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSLEN 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcslen | ||
| 39 | .Nd find length of a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft size_t | ||
| 43 | .Fn wcslen "const wchar_t *s" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcslen | ||
| 47 | function computes the length of the wide string | ||
| 48 | .Fa s . | ||
| 49 | .Sh RETURN VALUES | ||
| 50 | The | ||
| 51 | .Fn wcslen | ||
| 52 | function returns the number of wide characters that precede the terminating | ||
| 53 | null wide character. | ||
| 54 | .Sh SEE ALSO | ||
| 55 | .Xr wcswidth 3 | ||
| 56 | .Sh STANDARDS | ||
| 57 | The | ||
| 58 | .Fn wcslen | ||
| 59 | function conforms to | ||
| 60 | .St -isoC-99 | ||
| 61 | and was first introduced in | ||
| 62 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcspbrk.3 b/src/lib/libc/string/wcspbrk.3 new file mode 100644 index 0000000000..81f08a8f1e --- /dev/null +++ b/src/lib/libc/string/wcspbrk.3 | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcspbrk.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSPBRK 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcspbrk | ||
| 39 | .Nd locate multiple wide characters in a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wcspbrk "const wchar_t *s" "const wchar_t *charset" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcspbrk | ||
| 47 | function locates in the wide string | ||
| 48 | .Fa s | ||
| 49 | the first occurrence of any wide character in the wide string | ||
| 50 | .Fa charset | ||
| 51 | and returns a pointer to this wide character. | ||
| 52 | If no wide characters from | ||
| 53 | .Fa charset | ||
| 54 | occur anywhere in | ||
| 55 | .Fa s , | ||
| 56 | .Fn wcspbrk | ||
| 57 | returns | ||
| 58 | .Dv NULL . | ||
| 59 | .Sh SEE ALSO | ||
| 60 | .Xr wmemchr 3 , | ||
| 61 | .Xr wcschr 3 , | ||
| 62 | .Xr wcscspn 3 , | ||
| 63 | .Xr wcsrchr 3 , | ||
| 64 | .Xr wcsspn 3 , | ||
| 65 | .Xr wcsstr 3 , | ||
| 66 | .Xr wcstok 3 | ||
| 67 | .Sh STANDARDS | ||
| 68 | The | ||
| 69 | .Fn wcspbrk | ||
| 70 | function conforms to | ||
| 71 | .St -isoC-99 | ||
| 72 | and was first introduced in | ||
| 73 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcsrchr.3 b/src/lib/libc/string/wcsrchr.3 new file mode 100644 index 0000000000..5e0c1f8835 --- /dev/null +++ b/src/lib/libc/string/wcsrchr.3 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcsrchr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSRCHR 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcsrchr | ||
| 39 | .Nd locate last occurrence of a wide character in a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wcsrchr "const wchar_t *s" "wchar_t c" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcsrchr | ||
| 47 | function locates the last occurrence of the wide character | ||
| 48 | .Fa c | ||
| 49 | in the wide string | ||
| 50 | .Fa s . | ||
| 51 | The terminating null wide character is considered part of the wide string. | ||
| 52 | If | ||
| 53 | .Fa c | ||
| 54 | is the null wide character (L'\e0'), | ||
| 55 | .Fn wcsrchr | ||
| 56 | locates the terminating null wide character. | ||
| 57 | .Sh RETURN VALUES | ||
| 58 | The | ||
| 59 | .Fn wcsrchr | ||
| 60 | function returns a pointer to the located wide character or | ||
| 61 | .Dv NULL | ||
| 62 | if the wide character does not appear in the wide string. | ||
| 63 | .Sh SEE ALSO | ||
| 64 | .Xr wcschr 3 , | ||
| 65 | .Xr wcscspn 3 , | ||
| 66 | .Xr wcspbrk 3 , | ||
| 67 | .Xr wcsspn 3 , | ||
| 68 | .Xr wcsstr 3 , | ||
| 69 | .Xr wcstok 3 , | ||
| 70 | .Xr wmemchr 3 | ||
| 71 | .Sh STANDARDS | ||
| 72 | The | ||
| 73 | .Fn wcsrchr | ||
| 74 | function conforms to | ||
| 75 | .St -isoC-99 | ||
| 76 | and was first introduced in | ||
| 77 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcsspn.3 b/src/lib/libc/string/wcsspn.3 new file mode 100644 index 0000000000..c73e13076e --- /dev/null +++ b/src/lib/libc/string/wcsspn.3 | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcsspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSSPN 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcsspn | ||
| 39 | .Nd span a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft size_t | ||
| 43 | .Fn wcsspn "const wchar_t *s" "const wchar_t *charset" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcsspn | ||
| 47 | function spans the initial part of the wide string | ||
| 48 | .Fa s | ||
| 49 | as long as the wide characters from | ||
| 50 | .Fa s | ||
| 51 | occur in the wide string | ||
| 52 | .Fa charset . | ||
| 53 | .Sh RETURN VALUES | ||
| 54 | The | ||
| 55 | .Fn wcsspn | ||
| 56 | function returns the number of wide characters spanned. | ||
| 57 | .Sh SEE ALSO | ||
| 58 | .Xr wcschr 3 , | ||
| 59 | .Xr wcscspn 3 , | ||
| 60 | .Xr wcspbrk 3 , | ||
| 61 | .Xr wcsrchr 3 , | ||
| 62 | .Xr wcsstr 3 , | ||
| 63 | .Xr wcstok 3 , | ||
| 64 | .Xr wmemchr 3 | ||
| 65 | .Sh STANDARDS | ||
| 66 | The | ||
| 67 | .Fn wcsspn | ||
| 68 | function conforms to | ||
| 69 | .St -isoC-99 | ||
| 70 | and was first introduced in | ||
| 71 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wcsstr.3 b/src/lib/libc/string/wcsstr.3 new file mode 100644 index 0000000000..dc99b70667 --- /dev/null +++ b/src/lib/libc/string/wcsstr.3 | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wcsstr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WCSSTR 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wcsstr | ||
| 39 | .Nd locate a wide substring in a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wcsstr "const wchar_t *big" "const wchar_t *little" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wcsstr | ||
| 47 | function locates the first occurrence of the wide string | ||
| 48 | .Fa little | ||
| 49 | in the wide string | ||
| 50 | .Fa big . | ||
| 51 | .Pp | ||
| 52 | If | ||
| 53 | .Fa little | ||
| 54 | is an empty wide string, | ||
| 55 | .Fa big | ||
| 56 | is returned; | ||
| 57 | if | ||
| 58 | .Fa little | ||
| 59 | occurs nowhere in | ||
| 60 | .Fa big , | ||
| 61 | .Dv NULL | ||
| 62 | is returned; | ||
| 63 | otherwise a pointer to the first wide character of the first occurrence of | ||
| 64 | .Fa little | ||
| 65 | is returned. | ||
| 66 | .Sh SEE ALSO | ||
| 67 | .Xr wcschr 3 , | ||
| 68 | .Xr wcscspn 3 , | ||
| 69 | .Xr wcspbrk 3 , | ||
| 70 | .Xr wcsrchr 3 , | ||
| 71 | .Xr wcsspn 3 , | ||
| 72 | .Xr wcstok 3 , | ||
| 73 | .Xr wmemchr 3 , | ||
| 74 | .Sh STANDARDS | ||
| 75 | The | ||
| 76 | .Fn wcsstr | ||
| 77 | function conforms to | ||
| 78 | .St -isoC-99 | ||
| 79 | and was first introduced in | ||
| 80 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wmemchr.3 b/src/lib/libc/string/wmemchr.3 index 529f27b05b..40a68bf28d 100644 --- a/src/lib/libc/string/wmemchr.3 +++ b/src/lib/libc/string/wmemchr.3 | |||
| @@ -1,9 +1,5 @@ | |||
| 1 | .\" $OpenBSD: wmemchr.3,v 1.6 2011/05/28 17:12:43 jmc Exp $ | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
| 2 | .\" | 2 | .\" All rights reserved. |
| 3 | .\" $NetBSD: wmemchr.3,v 1.9 2003/09/08 17:54:33 wiz Exp $ | ||
| 4 | .\" | ||
| 5 | .\" Copyright (c) 1990, 1991, 1993 | ||
| 6 | .\" The Regents of the University of California. All rights reserved. | ||
| 7 | .\" | 3 | .\" |
| 8 | .\" This code is derived from software contributed to Berkeley by | 4 | .\" This code is derived from software contributed to Berkeley by |
| 9 | .\" Chris Torek and the American National Standards Committee X3, | 5 | .\" Chris Torek and the American National Standards Committee X3, |
| @@ -33,123 +29,45 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 35 | .\" | 31 | .\" |
| 36 | .\" from: @(#)strcpy.3 8.1 (Berkeley) 6/4/93 | 32 | .\" $OpenBSD: wmemchr.3,v 1.7 2011/07/09 16:32:11 nicm Exp $ |
| 37 | .\" | 33 | .\" |
| 38 | .Dd $Mdocdate: May 28 2011 $ | 34 | .Dd $Mdocdate: July 9 2011 $ |
| 39 | .Dt WMEMCHR 3 | 35 | .Dt WMEMCHR 3 |
| 40 | .Os | 36 | .Os |
| 41 | .Sh NAME | 37 | .Sh NAME |
| 42 | .Nm wmemchr , | 38 | .Nm wmemchr |
| 43 | .Nm wmemcmp , | 39 | .Nd locate wide character in wide string |
| 44 | .Nm wmemcpy , | ||
| 45 | .Nm wmemmove , | ||
| 46 | .Nm wmemset , | ||
| 47 | .Nm wcscat , | ||
| 48 | .Nm wcschr , | ||
| 49 | .Nm wcscmp , | ||
| 50 | .Nm wcscasecmp , | ||
| 51 | .Nm wcscpy , | ||
| 52 | .Nm wcscspn , | ||
| 53 | .Nm wcslcat , | ||
| 54 | .Nm wcslcpy , | ||
| 55 | .Nm wcslen , | ||
| 56 | .Nm wcsncat , | ||
| 57 | .Nm wcsncmp , | ||
| 58 | .Nm wcsncasecmp , | ||
| 59 | .Nm wcsncpy , | ||
| 60 | .Nm wcspbrk , | ||
| 61 | .Nm wcsrchr , | ||
| 62 | .Nm wcsspn , | ||
| 63 | .Nm wcsstr | ||
| 64 | .Nd wide-character string manipulation operations | ||
| 65 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
| 66 | .In wchar.h | 41 | .Fd #include <wchar.h> |
| 67 | .Ft wchar_t * | ||
| 68 | .Fn wmemchr "const wchar_t *s" "wchar_t c" "size_t n" | ||
| 69 | .Ft int | ||
| 70 | .Fn wmemcmp "const wchar_t *s1" "const wchar_t *s2" "size_t n" | ||
| 71 | .Ft wchar_t * | ||
| 72 | .Fn wmemcpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" | ||
| 73 | .Ft wchar_t * | ||
| 74 | .Fn wmemmove "wchar_t *s1" "const wchar_t *s2" "size_t n" | ||
| 75 | .Ft wchar_t * | ||
| 76 | .Fn wmemset "wchar_t *s" "wchar_t c" "size_t n" | ||
| 77 | .Ft wchar_t * | ||
| 78 | .Fn wcscat "wchar_t * restrict s1" "const wchar_t * restrict s2" | ||
| 79 | .Ft wchar_t * | ||
| 80 | .Fn wcschr "const wchar_t *s" "wchar_t c" | ||
| 81 | .Ft int | ||
| 82 | .Fn wcscmp "const wchar_t *s1" "const wchar_t *s2" | ||
| 83 | .Ft int | ||
| 84 | .Fn wcscasecmp "const wchar_t *s1" "const wchar_t *s2" | ||
| 85 | .Ft wchar_t * | ||
| 86 | .Fn wcscpy "wchar_t * restrict s1" "const wchar_t * restrict s2" | ||
| 87 | .Ft size_t | ||
| 88 | .Fn wcscspn "const wchar_t *s1" "const wchar_t *s2" | ||
| 89 | .Ft size_t | ||
| 90 | .Fn wcslcat "wchar_t *s1" "const wchar_t *s2" "size_t n" | ||
| 91 | .Ft size_t | ||
| 92 | .Fn wcslcpy "wchar_t *s1" "const wchar_t *s2" "size_t n" | ||
| 93 | .Ft size_t | ||
| 94 | .Fn wcslen "const wchar_t *s" | ||
| 95 | .Ft wchar_t * | ||
| 96 | .Fn wcsncat "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" | ||
| 97 | .Ft int | ||
| 98 | .Fn wcsncmp "const wchar_t *s1" "const wchar_t * s2" "size_t n" | ||
| 99 | .Ft int | ||
| 100 | .Fn wcsncasecmp "const wchar_t *s1" "const wchar_t * s2" "size_t n" | ||
| 101 | .Ft wchar_t * | ||
| 102 | .Fn wcsncpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" | ||
| 103 | .Ft wchar_t * | ||
| 104 | .Fn wcspbrk "const wchar_t *s1" "const wchar_t *s2" | ||
| 105 | .Ft wchar_t * | ||
| 106 | .Fn wcsrchr "const wchar_t *s" "wchar_t c" | ||
| 107 | .Ft size_t | ||
| 108 | .Fn wcsspn "const wchar_t *s1" "const wchar_t *s2" | ||
| 109 | .Ft wchar_t * | 42 | .Ft wchar_t * |
| 110 | .Fn wcsstr "const wchar_t *s1" "const wchar_t *s2" | 43 | .Fn memchr "const wchar_t *b" "wchar_t c" "size_t len" |
| 111 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
| 112 | These functions implement string manipulation operations over wide-character | 45 | The |
| 113 | strings. | 46 | .Fn wmemchr |
| 114 | For a detailed description, refer to documents for the respective single-byte | 47 | function locates the first occurrence of |
| 115 | counterpart, such as | 48 | .Fa c |
| 116 | .Xr memchr 3 . | 49 | in wide string |
| 50 | .Fa b . | ||
| 51 | .Sh RETURN VALUES | ||
| 52 | The | ||
| 53 | .Fn wmemchr | ||
| 54 | function returns a pointer to the wide character located, or | ||
| 55 | .Dv NULL | ||
| 56 | if no such wide character exists within | ||
| 57 | .Fa len | ||
| 58 | wide characters. | ||
| 117 | .Sh SEE ALSO | 59 | .Sh SEE ALSO |
| 118 | .Xr memchr 3 , | 60 | .Xr wcschr 3 , |
| 119 | .Xr memcmp 3 , | 61 | .Xr wcscspn 3 , |
| 120 | .Xr memcpy 3 , | 62 | .Xr wcspbrk 3 , |
| 121 | .Xr memmove 3 , | 63 | .Xr wcsrchr 3 , |
| 122 | .Xr memset 3 , | 64 | .Xr wcsspn 3 , |
| 123 | .Xr strcasecmp 3 , | 65 | .Xr wcsstr 3 , |
| 124 | .Xr strcat 3 , | 66 | .Xr wcstok 3 |
| 125 | .Xr strchr 3 , | ||
| 126 | .Xr strcmp 3 , | ||
| 127 | .Xr strcpy 3 , | ||
| 128 | .Xr strcspn 3 , | ||
| 129 | .Xr strlcat 3 , | ||
| 130 | .Xr strlcpy 3 , | ||
| 131 | .Xr strlen 3 , | ||
| 132 | .Xr strncasecmp 3 , | ||
| 133 | .Xr strncat 3 , | ||
| 134 | .Xr strncmp 3 , | ||
| 135 | .Xr strncpy 3 , | ||
| 136 | .Xr strpbrk 3 , | ||
| 137 | .Xr strrchr 3 , | ||
| 138 | .Xr strspn 3 , | ||
| 139 | .Xr strstr 3 | ||
| 140 | .Sh STANDARDS | 67 | .Sh STANDARDS |
| 141 | These functions conform to | 68 | The |
| 69 | .Fn memchr | ||
| 70 | function conforms to | ||
| 142 | .St -isoC-99 | 71 | .St -isoC-99 |
| 143 | and were first introduced in | 72 | and was first introduced in |
| 144 | .St -isoC-amd1 , | 73 | .St -isoC-amd1 . |
| 145 | except for | ||
| 146 | .Fn wcscasecmp | ||
| 147 | and | ||
| 148 | .Fn wcsncasecmp , | ||
| 149 | which conform to | ||
| 150 | .St -p1003.1-2008 , | ||
| 151 | and | ||
| 152 | .Fn wcslcat | ||
| 153 | and | ||
| 154 | .Fn wcslcpy , | ||
| 155 | which are extensions. | ||
diff --git a/src/lib/libc/string/wmemcmp.3 b/src/lib/libc/string/wmemcmp.3 new file mode 100644 index 0000000000..e1d56ec30e --- /dev/null +++ b/src/lib/libc/string/wmemcmp.3 | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wmemcmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WMEMCMP 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wmemcmp | ||
| 39 | .Nd compare wide strings | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft int | ||
| 43 | .Fn wmemcmp "const wchar_t *s1" "const wchar_t *s2" "size_t len" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wmemcmp | ||
| 47 | function compares the wide string | ||
| 48 | .Fa s1 | ||
| 49 | against the wide string | ||
| 50 | .Fa s2 . | ||
| 51 | Both wide strings are assumed to be | ||
| 52 | .Fa len | ||
| 53 | wide characters long. | ||
| 54 | .Sh RETURN VALUES | ||
| 55 | The | ||
| 56 | .Fn wmemcmp | ||
| 57 | function returns zero if the two wide strings are identical, | ||
| 58 | otherwise the difference between the first two differing wide characters is | ||
| 59 | returned. | ||
| 60 | Zero-length wide strings are always identical. | ||
| 61 | .Sh SEE ALSO | ||
| 62 | .Xr wcscasecmp 3 , | ||
| 63 | .Xr wcscmp 3 , | ||
| 64 | .Sh STANDARDS | ||
| 65 | The | ||
| 66 | .Fn wmemcmp | ||
| 67 | function conforms to | ||
| 68 | .St -isoC-99 | ||
| 69 | and was first introduced in | ||
| 70 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wmemcpy.3 b/src/lib/libc/string/wmemcpy.3 new file mode 100644 index 0000000000..8f4293c979 --- /dev/null +++ b/src/lib/libc/string/wmemcpy.3 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wmemcpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt MEMCPY 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wmemcpy | ||
| 39 | .Nd copy wide characters | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn memcpy "wchar_t * restrict dst" "const wchar_t * restrict src" "size_t len" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wmemcpy | ||
| 47 | function copies | ||
| 48 | .Fa len | ||
| 49 | wide characters from buffer | ||
| 50 | .Fa src | ||
| 51 | to buffer | ||
| 52 | .Fa dst . | ||
| 53 | .Sh RETURN VALUES | ||
| 54 | The | ||
| 55 | .Fn wmemcpy | ||
| 56 | function returns the original value of | ||
| 57 | .Fa dst . | ||
| 58 | .Sh SEE ALSO | ||
| 59 | .Xr wcscpy 3 , | ||
| 60 | .Xr wcslcpy 3 , | ||
| 61 | .Xr wmemmove 3 | ||
| 62 | .Sh STANDARDS | ||
| 63 | The | ||
| 64 | .Fn wmemcpy | ||
| 65 | function conforms to | ||
| 66 | .St -isoC-99 | ||
| 67 | and was first introduced in | ||
| 68 | .St -isoC-amd1 . | ||
| 69 | .Sh BUGS | ||
| 70 | In this implementation | ||
| 71 | .Fn wmemcpy | ||
| 72 | is implemented using | ||
| 73 | .Xr bcopy 3 , | ||
| 74 | and therefore the buffers may overlap. | ||
| 75 | On other systems, copying overlapping buffers may produce surprises. | ||
| 76 | A simpler solution is to not use | ||
| 77 | .Fn wmemcpy . | ||
diff --git a/src/lib/libc/string/wmemmove.3 b/src/lib/libc/string/wmemmove.3 new file mode 100644 index 0000000000..b018bd5cbc --- /dev/null +++ b/src/lib/libc/string/wmemmove.3 | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wmemmove.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WMEMMOVE 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wmemmove | ||
| 39 | .Nd copy wide characters | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wmemmove "wchar_t *dst" "const wchar_t *src" "size_t len" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wmemmove | ||
| 47 | function copies | ||
| 48 | .Fa len | ||
| 49 | wide characters from buffer | ||
| 50 | .Fa src | ||
| 51 | to buffer | ||
| 52 | .Fa dst . | ||
| 53 | The two buffers may overlap; | ||
| 54 | the copy is always done in a non-destructive manner. | ||
| 55 | .Sh RETURN VALUES | ||
| 56 | The | ||
| 57 | .Fn wmemmove | ||
| 58 | function returns the original value of | ||
| 59 | .Fa dst . | ||
| 60 | .Sh SEE ALSO | ||
| 61 | .Xr wcscpy 3 , | ||
| 62 | .Xr wcslcpy 3 , | ||
| 63 | .Xr wmemcpy 3 | ||
| 64 | .Sh STANDARDS | ||
| 65 | The | ||
| 66 | .Fn wmemmove | ||
| 67 | function conforms to | ||
| 68 | .St -isoC-99 | ||
| 69 | and was first introduced in | ||
| 70 | .St -isoC-amd1 . | ||
diff --git a/src/lib/libc/string/wmemset.3 b/src/lib/libc/string/wmemset.3 new file mode 100644 index 0000000000..c43fc1079f --- /dev/null +++ b/src/lib/libc/string/wmemset.3 | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
| 2 | .\" All rights reserved. | ||
| 3 | .\" | ||
| 4 | .\" This code is derived from software contributed to Berkeley by | ||
| 5 | .\" Chris Torek and the American National Standards Committee X3, | ||
| 6 | .\" on Information Processing Systems. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 15 | .\" documentation and/or other materials provided with the distribution. | ||
| 16 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 17 | .\" may be used to endorse or promote products derived from this software | ||
| 18 | .\" without specific prior written permission. | ||
| 19 | .\" | ||
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | .\" SUCH DAMAGE. | ||
| 31 | .\" | ||
| 32 | .\" $OpenBSD: wmemset.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | ||
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: July 9 2011 $ | ||
| 35 | .Dt WMEMSET 3 | ||
| 36 | .Os | ||
| 37 | .Sh NAME | ||
| 38 | .Nm wmemset | ||
| 39 | .Nd write a wide string | ||
| 40 | .Sh SYNOPSIS | ||
| 41 | .Fd #include <wchar.h> | ||
| 42 | .Ft wchar_t * | ||
| 43 | .Fn wmemset "wchar_t *s" "wchar_t c" "size_t len" | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | The | ||
| 46 | .Fn wmemset | ||
| 47 | function writes | ||
| 48 | .Fa len | ||
| 49 | wide characters of value | ||
| 50 | .Fa c | ||
| 51 | to the wide string | ||
| 52 | .Fa s . | ||
| 53 | .Sh RETURN VALUES | ||
| 54 | The | ||
| 55 | .Fn wmemset | ||
| 56 | function returns the original value of | ||
| 57 | .Fa s . | ||
| 58 | .Sh STANDARDS | ||
| 59 | The | ||
| 60 | .Fn memset | ||
| 61 | function conforms to | ||
| 62 | .St -isoC-99 | ||
| 63 | and was first introduced in | ||
| 64 | .St -isoC-amd1 . | ||
