OSDN Git Service

(split) LDP man-pages の original/ を v3.29 に更新。
[linuxjm/LDP_man-pages.git] / original / man3 / wcsdup.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 source code and manual
10 .\"   Dinkumware C library reference http://www.dinkumware.com/
11 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
12 .\"
13 .TH WCSDUP 3  2010-09-15 "GNU" "Linux Programmer's Manual"
14 .SH NAME
15 wcsdup \- duplicate a wide-character string
16 .SH SYNOPSIS
17 .nf
18 .B #include <wchar.h>
19 .sp
20 .BI "wchar_t *wcsdup(const wchar_t *" s );
21 .fi
22 .sp
23 .in -4n
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
26 .in
27 .sp
28 .BR wcsdup ():
29 .PD 0
30 .ad l
31 .RS 4
32 .TP 4
33 Since glibc 2.10:
34 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
35 .TP
36 Before glibc 2.10:
37 _GNU_SOURCE
38 .RE
39 .ad
40 .PD
41 .SH DESCRIPTION
42 The
43 .BR wcsdup ()
44 function is the wide-character equivalent
45 of the
46 .BR strdup (3)
47 function.
48 It allocates and returns a new wide-character string whose initial
49 contents is a duplicate of the wide-character string pointed to by \fIs\fP.
50 .PP
51 Memory for the new wide-character string is
52 obtained with
53 .BR malloc (3),
54 and should be freed with
55 .BR free (3).
56 .SH "RETURN VALUE"
57 The
58 .BR wcsdup ()
59 function returns a pointer
60 to the new wide-character string,
61 or NULL if sufficient memory was not available.
62 .SH ERRORS
63 .TP
64 .B ENOMEM
65 Insufficient memory available to allocate duplicate string.
66 .SH "CONFORMING TO"
67 POSIX.1-2008.
68 This function is not specified in POSIX.1-2001,
69 and is not widely available on other systems.
70 .\" present in libc5 and glibc 2.0 and later
71 .SH "SEE ALSO"
72 .BR strdup (3),
73 .BR wcscpy (3),
74 .BR feature_test_macros (7)