OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / wordexp.3
index 7d9c36e..9fde61e 100644 (file)
 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
 .\" USA.
 .\"
-.\" Japanese Version Copyright (c) 2004 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated Sun Sep 12 05:05:19 JST 2004
-.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"*******************************************************************
 .\"
-.TH WORDEXP 3 2008-07-14  "" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH WORDEXP 3 2008\-07\-14 "" "Linux Programmer's Manual"
 .SH 名前
-.\"O wordexp, wordfree \- perform word expansion like a posix-shell
 wordexp, wordfree \- posix シェルのように単語の展開を行う
-.\"O .SH SYNOPSIS
 .SH 書式
-.B "#include <wordexp.h>"
+\fB#include <wordexp.h>\fP
 .sp
-.BI "int wordexp(const char *" s ", wordexp_t *" p ", int " flags );
+\fBint wordexp(const char *\fP\fIs\fP\fB, wordexp_t *\fP\fIp\fP\fB, int \fP\fIflags\fP\fB);\fP
 .sp
-.BI "void wordfree(wordexp_t *" p );
+\fBvoid wordfree(wordexp_t *\fP\fIp\fP\fB);\fP
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR wordexp (),
-.BR wordfree ():
-_XOPEN_SOURCE
-.\"O .SH DESCRIPTION
+\fBwordexp\fP(), \fBwordfree\fP(): _XOPEN_SOURCE
 .SH 説明
-.\"O The function
-.\"O .BR wordexp ()
-.\"O performs a shell-like expansion of the string
-.\"O .I s
-.\"O and returns the result in the structure pointed to by
-.\"O .IR p .
-関数
-.BR wordexp ()
-はシェルのように文字列
-.I s
-を展開し、
-.I p
-で指し示す構造体に結果を返す。
-.\"O The data type
-.\"O .I wordexp_t
-.\"O is a structure that at least has the fields
-.\"O .IR we_wordc ,
-.\"O .IR we_wordv ,
-.\"O and
-.\"O .IR we_offs .
-データ型
-.I wordexp_t
-は少なくともフィールド
-.IR we_wordc ,
-.IR we_wordv ,
-.I we_offs
-を持つ構造体である。
-.\"O The field
-.\"O .I we_wordc
-.\"O is a
-.\"O .I size_t
-.\"O that gives the number of words in the expansion of
-.\"O .IR s .
-フィールド
-.I we_wordc
-は
-.I size_t
-であり、
-.I s
-を展開した結果に単語がいくつあるかを表す。
-.\"O The field
-.\"O .I we_wordv
-.\"O is a
-.\"O .I char **
-.\"O that points to the array of words found.
-フィールド
-.I we_wordv
-は
-.I char **
-であり、見つかった単語の配列を指し示す。
-.\"O The field
-.\"O .I we_offs
-.\"O of type
-.\"O .I size_t
-.\"O is sometimes (depending on
-.\"O .IR flags ,
-.\"O see below) used to indicate the number of initial elements in the
-.\"O .I we_wordv
-.\"O array that should be filled with NULLs.
-.I size_t
-型のフィールド
-.I we_offs
-は、
-.I we_wordv
-配列にある初期要素のうちいくつが
-NULL で埋められるべきかを表すのに使われたりする
-.RI ( flags
+関数 \fBwordexp\fP()  はシェルのように文字列 \fIs\fP を展開し、 \fIp\fP で指し示す構造体に結果を返す。 データ型
+\fIwordexp_t\fP は少なくともフィールド \fIwe_wordc\fP, \fIwe_wordv\fP, \fIwe_offs\fP を持つ構造体である。
+フィールド \fIwe_wordc\fP は \fIsize_t\fP であり、 \fIs\fP を展開した結果に単語がいくつあるかを表す。 フィールド
+\fIwe_wordv\fP は \fIchar **\fP であり、見つかった単語の配列を指し示す。 \fIsize_t\fP 型のフィールド \fIwe_offs\fP
+は、 \fIwe_wordv\fP 配列にある初期要素のうちいくつが NULL で埋められるべきかを表すのに使われたりする (\fIflags\fP
 により決定される。下記を参照。)。
 .LP
-.\"O The function
-.\"O .BR wordfree ()
-.\"O frees the allocated memory again.
-.\"O More precisely, it does not free
-.\"O its argument, but it frees the array
-.\"O .I we_wordv
-.\"O and the strings that points to.
-関数
-.BR wordfree ()
-は割り当てたメモリを再度解放する。
-より正確にいうと、この関数はその引き数を解放するのではなく、
-配列
-.I we_wordv
-とそれが指し示す文字列を解放する。
-.\"O .SS "The string argument"
-.SS "文字列引き数"
-.\"O Since the expansion is the same as the expansion by the shell (see
-.\"O .BR sh (1))
-.\"O of the parameters to a command, the string
-.\"O .I s
-.\"O must not contain characters that would be illegal in shell command
-.\"O parameters.
-.\"O In particular, there must not be any unescaped
-.\"O newline or |, &, ;, <, >, (, ), {, } characters
-.\"O outside a command substitution or parameter substitution context.
-この展開はシェルによるコマンドのパラメータの展開
-.RB ( sh (1)
-を参照) と同じであるので、文字列
-.I s
-はシェルコマンドパラメータで不正とされる文字を含んではならない。
-特にエスケープされていない改行、|, &, ;, <, >, (, ), {, } 文字を
-コマンド置換やパラメータ置換の場面以外に含めてはならない。
+関数 \fBwordfree\fP()  は割り当てたメモリを再度解放する。 より正確にいうと、この関数はその引き数を解放するのではなく、 配列
+\fIwe_wordv\fP とそれが指し示す文字列を解放する。
+.SS 文字列引き数
+この展開はシェルによるコマンドのパラメータの展開 (\fBsh\fP(1)  を参照) と同じであるので、文字列 \fIs\fP
+はシェルコマンドパラメータで不正とされる文字を含んではならない。 特にエスケープされていない改行、|, &, ;, <, >, (,
+), {, } 文字を コマンド置換やパラメータ置換の場面以外に含めてはならない。
 .LP
-.\"O If the argument
-.\"O .I s
-.\"O contains a word that starts with an unquoted comment character #,
-.\"O then it is unspecified whether that word and all following words
-.\"O are ignored, or the # is treated as a non-comment character.
-引き数
-.I s
-にクォートしていないコメント文字 # で始まる単語が含まれている場合には、
-その単語とそれ以降の単語が無視されるか、
-それとも # がコメント文字として扱わないかは、規定されていない。
-.\"O .SS "The expansion"
-.SS "展開"
-.\"O The expansion done consists of the following stages:
-.\"O tilde expansion (replacing ~user by user's home directory),
-.\"O variable substitution (replacing $FOO by the value of the environment
-.\"O variable FOO), command substitution (replacing $(command) or \`command\`
-.\"O by the output of command), arithmetic expansion, field splitting,
-.\"O wildcard expansion, quote removal.
-実行される展開は、以下の段階で構成される:
-チルダ展開 (~user を user のホームディレクトリに置き換える)、
-変数展開 ($FOO を環境変数 FOO の値に置き換える)、
-コマンド展開 ($(command) または \`command\` を command の出力で置き換える)、
-算術展開、フィールド分割、ワイルドカード展開、クォートの除去。
+引き数 \fIs\fP にクォートしていないコメント文字 # で始まる単語が含まれている場合には、 その単語とそれ以降の単語が無視されるか、 それとも #
+がコメント文字として扱わないかは、規定されていない。
+.SS 展開
+実行される展開は、以下の段階で構成される: チルダ展開 (~user を user のホームディレクトリに置き換える)、 変数展開 ($FOO
+を環境変数 FOO の値に置き換える)、 コマンド展開 ($(command) または \`command\` を command
+の出力で置き換える)、 算術展開、フィールド分割、ワイルドカード展開、クォートの除去。
 .LP
-.\"O The result of expansion of special parameters
-.\"O ($@, $*, $#, $?, $\-, $$, $!, $0) is unspecified.
-特殊なパラメータ ($@, $*, $#, $?, $\-, $$, $!, $0) の
-展開結果は規定されていない。
+特殊なパラメータ ($@, $*, $#, $?, $\-, $$, $!, $0) の 展開結果は規定されていない。
 .LP
-.\"O Field splitting is done using the environment variable $IFS.
-.\"O If it is not set, the field separators are space, tab and newline.
-フィールド分割は環境変数 $IFS を用いて行われる。
-この環境変数が設定されていない場合、
-フィールド区切り文字はスペース・タブ・改行である。
-.\"O .SS "The output array"
-.SS "出力される配列"
-.\"O The array
-.\"O .I we_wordv
-.\"O contains the words found, followed by a NULL.
-配列
-.I we_wordv
-は見つかった単語をを含み、最後に NULL が続く。
-.\"O .SS "The flags argument"
-.\"O The
-.\"O .I flag
-.\"O argument is a bitwise inclusive OR of the following values:
+フィールド分割は環境変数 $IFS を用いて行われる。 この環境変数が設定されていない場合、 フィールド区切り文字はスペース・タブ・改行である。
+.SS 出力される配列
+配列 \fIwe_wordv\fP は見つかった単語をを含み、最後に NULL が続く。
 .SS "flags 引き数"
-.I flags
-引き数は以下の値のビット包含的 OR である:
-.TP
-.B WRDE_APPEND
-.\"O Append the words found to the array resulting from a previous call.
+\fIflags\fP 引き数は以下の値のビット包含的 OR である:
+.TP 
+\fBWRDE_APPEND\fP
 見つかった単語を前回の呼び出し結果の配列に追加する。
-.TP
-.B WRDE_DOOFFS
-.\"O Insert
-.\"O .I we_offs
-.\"O initial NULLs in the array
-.\"O .IR we_wordv .
-.\"O (These are not counted in the returned
-.\"O .IR we_wordc .)
-初期状態である
-.I we_offs
-個の NULL を配列
-.I we_wordv
-に挿入する (これらは返される
-.I we_wordc
+.TP 
+\fBWRDE_DOOFFS\fP
+初期状態である \fIwe_offs\fP 個の NULL を配列 \fIwe_wordv\fP に挿入する (これらは返される \fIwe_wordc\fP
 にはカウントされない)。
-.TP
-.B WRDE_NOCMD
-.\"O Don't do command substitution.
+.TP 
+\fBWRDE_NOCMD\fP
 コマンド置換を行わない。
-.TP
-.B WRDE_REUSE
-.\"O The argument
-.\"O .I p
-.\"O resulted from a previous call to
-.\"O .BR wordexp (),
-.\"O and
-.\"O .BR wordfree ()
-.\"O was not called.
-.\"O Reuse the allocated storage.
-引き数
-.I p
-は前回の
-.BR wordexp ()
-の呼び出し結果であり、
-.BR wordfree ()
-が (まだ) 呼び出されない。
+.TP 
+\fBWRDE_REUSE\fP
+引き数 \fIp\fP は前回の \fBwordexp\fP()  の呼び出し結果であり、 \fBwordfree\fP()  が (まだ) 呼び出されない。
 割り当てられた領域を再利用する。
-.TP
-.B WRDE_SHOWERR
-.\"O Normally during command substitution
-.\"O .I stderr
-.\"O is redirected to
-.\"O .IR /dev/null .
-通常はコマンド置換のときに
-.I stderr
-が
-.I /dev/null
-にリダイレクトされる。
-.\"O This flag specifies that
-.\"O .I stderr
-.\"O is not to be redirected.
-このフラグは
-.I stderr
+.TP 
+\fBWRDE_SHOWERR\fP
+通常はコマンド置換のときに \fIstderr\fP が \fI/dev/null\fP にリダイレクトされる。 このフラグは \fIstderr\fP
 をリダイレクトしないように指定する。
-.TP
-.B WRDE_UNDEF
-.\"O Consider it an error if an undefined shell variable is expanded.
+.TP 
+\fBWRDE_UNDEF\fP
 未定義のシェル変数を展開しようとした場合に、エラーとして扱う。
-.\"O .SH "RETURN VALUE"
 .SH 返り値
-.\"O In case of success 0 is returned.
-.\"O In case of error
-.\"O one of the following five values is returned.
-成功した場合は 0 が返される。
-エラーの場合は以下の 5 つの値のうちの 1 つが返される。
-.TP
-.B WRDE_BADCHAR
-.\"O Illegal occurrence of newline or one of |, &, ;, <, >, (, ), {, }.
+成功した場合は 0 が返される。 エラーの場合は以下の 5 つの値のうちの 1 つが返される。
+.TP 
+\fBWRDE_BADCHAR\fP
 改行または |, &, ;, <, >, (, ), {, } のうちの 1 つが不正に出現した。
-.TP
-.B WRDE_BADVAL
-.\"O An undefined shell variable was referenced, and the
-.\"O .B WRDE_UNDEF
-.\"O flag
-.\"O told us to consider this an error.
-未定義のシェル変数が参照され、かつ
-.B WRDE_UNDEF
-フラグでこれをエラーとして扱うように指示されている。
-.TP
-.B WRDE_CMDSUB
-.\"O Command substitution occurred, and the
-.\"O .B WRDE_NOCMD
-.\"O flag told us to consider this an error.
-コマンド置換が起こり、かつ
-.B WRDE_NOCMD
-フラグでこれをエラーとして扱うように指示されている。
-.TP
-.B WRDE_NOSPACE
-.\"O Out of memory.
+.TP 
+\fBWRDE_BADVAL\fP
+未定義のシェル変数が参照され、かつ \fBWRDE_UNDEF\fP フラグでこれをエラーとして扱うように指示されている。
+.TP 
+\fBWRDE_CMDSUB\fP
+コマンド置換が起こり、かつ \fBWRDE_NOCMD\fP フラグでこれをエラーとして扱うように指示されている。
+.TP 
+\fBWRDE_NOSPACE\fP
 メモリが足りない。
-.TP
-.B WRDE_SYNTAX
-.\"O Shell syntax error, such as unbalanced parentheses or
-.\"O unmatched quotes.
-対応する括弧がない、クォートが合致しないといった、
-シェルの書式エラー。
-.\"O .SH VERSIONS
+.TP 
+\fBWRDE_SYNTAX\fP
+対応する括弧がない、クォートが合致しないといった、 シェルの書式エラー。
 .SH バージョン
-.\"O .BR wordexp ()
-.\"O and
-.\"O .BR wordfree ()
-.\"O are provided in glibc since version 2.1.
-.BR wordexp ()
-と
-.BR wordfree ()
-は、バージョン 2.1 以降の glibc で提供されている。
-.\"O .SH "CONFORMING TO"
+\fBwordexp\fP()  と \fBwordfree\fP()  は、バージョン 2.1 以降の glibc で提供されている。
 .SH 準拠
-POSIX.1-2001.
-.\"O .SH EXAMPLE
+POSIX.1\-2001.
 .SH 例
-.\"O The output of the following example program
-.\"O is approximately that of "ls [a-c]*.c".
-以下のサンプルプログラムの出力はだいたい "ls [a-c]*.c" と同じになる。
+以下のサンプルプログラムの出力はだいたい "ls [a\-c]*.c" と同じになる。
 .LP
 .nf
 #include <stdio.h>
@@ -333,7 +126,7 @@ main(int argc, char **argv)
     char **w;
     int i;
 
-    wordexp("[a-c]*.c", &p, 0);
+    wordexp("[a\-c]*.c", &p, 0);
     w = p.we_wordv;
     for (i = 0; i < p.we_wordc; i++)
         printf("%s\en", w[i]);
@@ -341,7 +134,5 @@ main(int argc, char **argv)
     exit(EXIT_SUCCESS);
 }
 .fi
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR fnmatch (3),
-.BR glob (3)
+\fBfnmatch\fP(3), \fBglob\fP(3)