OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / draft / man3 / strdup.3
diff --git a/draft/man3/strdup.3 b/draft/man3/strdup.3
deleted file mode 100644 (file)
index 23c4a10..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
-.\"
-.\" %%%LICENSE_START(VERBATIM)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
-.\" References consulted:
-.\"     Linux libc source code
-.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
-.\"     386BSD man pages
-.\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu)
-.\" Modified Wed Oct 17 01:12:26 2001 by John Levon <moz@compsoc.man.ac.uk>
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
-.\"       all rights reserved.
-.\" Translated Mon Jan 20 22:31:05 JST 1997
-.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
-.\" Updated Fri Nov  2 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
-.\"
-.TH STRDUP 3 2013\-04\-19 GNU "Linux Programmer's Manual"
-.SH 名前
-strdup, strndup, strdupa, strndupa \- 文字列を複製する
-.SH 書式
-.nf
-\fB#include <string.h>\fP
-.sp
-\fBchar *strdup(const char *\fP\fIs\fP\fB);\fP
-.sp
-\fBchar *strndup(const char *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP
-.br
-\fBchar *strdupa(const char *\fP\fIs\fP\fB);\fP
-.br
-\fBchar *strndupa(const char *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP
-.fi
-.sp
-.in -4n
-glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
-.in
-.PD 0
-.ad l
-.sp
-\fBstrdup\fP():
-.RS 4
-_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
-.br
-|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
-.RE
-.PP
-\fBstrndup\fP():
-.RS 4
-.TP  4
-glibc 2.10 以降:
-_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700
-.TP 
-glibc 2.10 より前:
-_GNU_SOURCE
-.RE
-.PP
-\fBstrdupa\fP(), \fBstrndupa\fP(): _GNU_SOURCE
-.ad
-.PD
-.SH 説明
-\fBstrdup\fP()  関数は、文字列 \fIs\fPの複製である 新しい文字列へのポインターを返す。 新しい文字列のためのメモリーは
-\fBmalloc\fP(3)  で得ている。 そして、 \fBfree\fP(3)  で解放することができる。
-
-\fBstrndup\fP() 関数は同様であるが、最大で \fIn\fP バイトを複製する。
-\fIs\fP が \fIn\fP よりも長い場合、\fIn\fP バイトだけが複製され、
-終端のヌルバイト (\(aq\e0\(aq)) が追加される。
-
-\fBstrdupa\fP() と \fBstrndupa\fP() も同様だが、バッファーの確保に
-\fBalloca\fP(3) を使用する点が異なる。
-これらが使用できるのは GNU GCC ツール群を使う場合だけであり、
-\fBalloca\fP(3) で説明されているのと同じ制限がある。
-.SH 返り値
-成功すると、 \fBstrdup\fP() 関数は複製された文字列へのポインターを返す。 十分なメモリーが確保できなかった場合には、 NULL を返し、
-\fIerrno\fP にエラーの原因を示す値を設定する。
-.SH エラー
-.TP 
-\fBENOMEM\fP
-複製された文字列を割り当てる十分なメモリーが確保できなかった。
-.SH 準拠
-.\" 4.3BSD-Reno, not (first) 4.3BSD.
-\fBstrdup\fP()  は SVr4, 4.3BSD, POSIX.1\-2001 準拠である。 \fBstrndup\fP()  は
-POSIX.1\-2008 準拠である。 \fBstrdupa\fP(), \fBstrndupa\fP()  は GNU 拡張である。
-.SH 関連項目
-\fBalloca\fP(3), \fBcalloc\fP(3), \fBfree\fP(3), \fBmalloc\fP(3), \fBrealloc\fP(3),
-\fBstring\fP(3), \fBwcsdup\fP(3)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。