.\" Copyright (c) Bruno Haible .\" .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" %%%LICENSE_END .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Translated Mon Oct 18 22:36:21 JST 1999 .\" by FUJIWARA Teruyoshi .\" Updated & Modified Sun Jun 6 13:23:46 JST 2004 .\" by Yuichi SATO .\" Updated 2013-07-22, Akihiro MOTOKI .\" .TH WCSDUP 3 2013\-04\-19 GNU "Linux Programmer's Manual" .SH 名前 wcsdup \- ワイド文字文字列を複製する .SH 書式 .nf \fB#include \fP .sp \fBwchar_t *wcsdup(const wchar_t *\fP\fIs\fP\fB);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBwcsdup\fP(): .PD 0 .ad l .RS 4 .TP 4 glibc 2.10 以降: _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L .TP glibc 2.10 より前: _GNU_SOURCE .RE .ad .PD .SH 説明 \fBwcsdup\fP() 関数は、 \fBstrdup\fP(3) 関数のワイド文字版である。 この関数はポインター \fIs\fP が指し示すワイド文字文字列の複製を 新しい領域に割り当てて返す。 .PP 新しいワイド文字文字列のためのメモリーは \fBmalloc\fP(3) を使って割り当てられる。 この領域は \fBfree\fP(3) を使って解放すべきである。 .SH 返り値 成功すると、 \fBwcsdup\fP() 関数は、新しいワイド文字文字列へのポインターを返す。 エラーの場合、 \-1 が返り、 \fIerrno\fP にエラーの原因を示す値が設定される。 .SH エラー .TP \fBENOMEM\fP 複製文字列を割り当てるのに十分なメモリーがない。 .SH 準拠 .\" present in libc5 and glibc 2.0 and later POSIX.1\-2008. この関数は POSIX.1\-2001 では規定されていないが、 Linux 以外の他のシステムで広く利用可能である。 .SH 関連項目 \fBstrdup\fP(3), \fBwcscpy\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。