From fca8d05c769a8158bda24aac39207cc8aef2509f Mon Sep 17 00:00:00 2001 From: nicm <> Date: Sat, 9 Jul 2011 16:32:11 +0000 Subject: Instead of documenting all the wide string functions in wmemchr(3), add individual pages (based on the existing string man pages). By Tim van der Molen (tbvdm at xs4all dot nl) after a suggestion by millert@. ok deraadt --- src/lib/libc/string/wmemchr.3 | 150 ++++++++++-------------------------------- 1 file changed, 34 insertions(+), 116 deletions(-) (limited to 'src/lib/libc/string/wmemchr.3') 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 @@ -.\" $OpenBSD: wmemchr.3,v 1.6 2011/05/28 17:12:43 jmc Exp $ -.\" -.\" $NetBSD: wmemchr.3,v 1.9 2003/09/08 17:54:33 wiz Exp $ -.\" -.\" Copyright (c) 1990, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, @@ -33,123 +29,45 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)strcpy.3 8.1 (Berkeley) 6/4/93 +.\" $OpenBSD: wmemchr.3,v 1.7 2011/07/09 16:32:11 nicm Exp $ .\" -.Dd $Mdocdate: May 28 2011 $ +.Dd $Mdocdate: July 9 2011 $ .Dt WMEMCHR 3 .Os .Sh NAME -.Nm wmemchr , -.Nm wmemcmp , -.Nm wmemcpy , -.Nm wmemmove , -.Nm wmemset , -.Nm wcscat , -.Nm wcschr , -.Nm wcscmp , -.Nm wcscasecmp , -.Nm wcscpy , -.Nm wcscspn , -.Nm wcslcat , -.Nm wcslcpy , -.Nm wcslen , -.Nm wcsncat , -.Nm wcsncmp , -.Nm wcsncasecmp , -.Nm wcsncpy , -.Nm wcspbrk , -.Nm wcsrchr , -.Nm wcsspn , -.Nm wcsstr -.Nd wide-character string manipulation operations +.Nm wmemchr +.Nd locate wide character in wide string .Sh SYNOPSIS -.In wchar.h -.Ft wchar_t * -.Fn wmemchr "const wchar_t *s" "wchar_t c" "size_t n" -.Ft int -.Fn wmemcmp "const wchar_t *s1" "const wchar_t *s2" "size_t n" -.Ft wchar_t * -.Fn wmemcpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" -.Ft wchar_t * -.Fn wmemmove "wchar_t *s1" "const wchar_t *s2" "size_t n" -.Ft wchar_t * -.Fn wmemset "wchar_t *s" "wchar_t c" "size_t n" -.Ft wchar_t * -.Fn wcscat "wchar_t * restrict s1" "const wchar_t * restrict s2" -.Ft wchar_t * -.Fn wcschr "const wchar_t *s" "wchar_t c" -.Ft int -.Fn wcscmp "const wchar_t *s1" "const wchar_t *s2" -.Ft int -.Fn wcscasecmp "const wchar_t *s1" "const wchar_t *s2" -.Ft wchar_t * -.Fn wcscpy "wchar_t * restrict s1" "const wchar_t * restrict s2" -.Ft size_t -.Fn wcscspn "const wchar_t *s1" "const wchar_t *s2" -.Ft size_t -.Fn wcslcat "wchar_t *s1" "const wchar_t *s2" "size_t n" -.Ft size_t -.Fn wcslcpy "wchar_t *s1" "const wchar_t *s2" "size_t n" -.Ft size_t -.Fn wcslen "const wchar_t *s" -.Ft wchar_t * -.Fn wcsncat "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" -.Ft int -.Fn wcsncmp "const wchar_t *s1" "const wchar_t * s2" "size_t n" -.Ft int -.Fn wcsncasecmp "const wchar_t *s1" "const wchar_t * s2" "size_t n" -.Ft wchar_t * -.Fn wcsncpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n" -.Ft wchar_t * -.Fn wcspbrk "const wchar_t *s1" "const wchar_t *s2" -.Ft wchar_t * -.Fn wcsrchr "const wchar_t *s" "wchar_t c" -.Ft size_t -.Fn wcsspn "const wchar_t *s1" "const wchar_t *s2" +.Fd #include .Ft wchar_t * -.Fn wcsstr "const wchar_t *s1" "const wchar_t *s2" +.Fn memchr "const wchar_t *b" "wchar_t c" "size_t len" .Sh DESCRIPTION -These functions implement string manipulation operations over wide-character -strings. -For a detailed description, refer to documents for the respective single-byte -counterpart, such as -.Xr memchr 3 . +The +.Fn wmemchr +function locates the first occurrence of +.Fa c +in wide string +.Fa b . +.Sh RETURN VALUES +The +.Fn wmemchr +function returns a pointer to the wide character located, or +.Dv NULL +if no such wide character exists within +.Fa len +wide characters. .Sh SEE ALSO -.Xr memchr 3 , -.Xr memcmp 3 , -.Xr memcpy 3 , -.Xr memmove 3 , -.Xr memset 3 , -.Xr strcasecmp 3 , -.Xr strcat 3 , -.Xr strchr 3 , -.Xr strcmp 3 , -.Xr strcpy 3 , -.Xr strcspn 3 , -.Xr strlcat 3 , -.Xr strlcpy 3 , -.Xr strlen 3 , -.Xr strncasecmp 3 , -.Xr strncat 3 , -.Xr strncmp 3 , -.Xr strncpy 3 , -.Xr strpbrk 3 , -.Xr strrchr 3 , -.Xr strspn 3 , -.Xr strstr 3 +.Xr wcschr 3 , +.Xr wcscspn 3 , +.Xr wcspbrk 3 , +.Xr wcsrchr 3 , +.Xr wcsspn 3 , +.Xr wcsstr 3 , +.Xr wcstok 3 .Sh STANDARDS -These functions conform to +The +.Fn memchr +function conforms to .St -isoC-99 -and were first introduced in -.St -isoC-amd1 , -except for -.Fn wcscasecmp -and -.Fn wcsncasecmp , -which conform to -.St -p1003.1-2008 , -and -.Fn wcslcat -and -.Fn wcslcpy , -which are extensions. +and was first introduced in +.St -isoC-amd1 . -- cgit v1.2.3-55-g6feb