OSDN Git Service

(split) LDP: Update draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / scanf.3
index 47bc7e4..44e17c4 100644 (file)
@@ -128,14 +128,11 @@ failure)\fP と \fI「一致の失敗」 (matching failure)\fP のいずれか
 \fIpointer\fP 引き数は必要なく、 \fBscanf\fP()  が返す代入が成功した数にこの指定は含まれない。
 .TP 
 \(bu
-An optional \(aqm\(aq character.  This is used with string conversions
-(\fI%s\fP, \fI%c\fP, \fI%[\fP), and relieves the caller of the need to allocate a
-corresponding buffer to hold the input: instead, \fBscanf\fP()  allocates a
-buffer of sufficient size, and assigns the address of this buffer to the
-corresponding \fIpointer\fP argument, which should be a pointer to a \fIchar\ *\fP
-variable (this variable does not need to be initialized before the call).
-The caller should subsequently \fBfree\fP(3)  this buffer when it is no longer
-required.
+文字 \(aqm\(aq (省略可能)。これは文字列変換 (\fI%s\fP, \fI%c\fP, \fI%[\fP) とともに使用され、これを使うと
+呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わりに \fBscanf\fP()
+が必要な大きさのバッファを確保し、このバッファのアドレスを 対応する \fIpointer\fP 引き数に代入する。 \fIpointer\fP 引き数は
+\fIchar\ *\fP 型の変数へのポインタでなければならない (変数自体は呼び出し前に初期化されている必要はない)。
+呼び出し元は、不要になった時点で、このバッファを \fBfree\fP(3) すべきである。
 .TP 
 \(bu
 \fI「最大フィールド幅」\fP を指定する 10進数 (省略可能)。 この最大値に達するか、一致しない文字が見つかるか、のどちらかに