OSDN Git Service

(split) LDP: Update draft and release (from the previous commit)
[linuxjm/LDP_man-pages.git] / draft / man3 / isalpha.3
index dbe560b..5929a59 100644 (file)
 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
 .\"
-.TH ISALPHA 3 2010\-09\-20 GNU "Linux Programmer's Manual"
+.TH ISALPHA 3 2014\-03\-18 GNU "Linux Programmer's Manual"
 .SH 名前
 isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
-isprint, ispunct, isspace, isupper, isxdigit \- 文字を分類する
+isprint, ispunct, isspace, isupper, isxdigit, isalnum_l, isalpha_l,
+isascii_l, isblank_l, iscntrl_l, isdigit_l, isgraph_l, islower_l, isprint_l,
+ispunct_l, isspace_l, isupper_l, isxdigit_l \- 文字を分類する
 .SH 書式
 .nf
 \fB#include <ctype.h>\fP
 .sp
 \fBint isalnum(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isalpha(int \fP\fIc\fP\fB);\fP
-.br
-\fBint isascii(int \fP\fIc\fP\fB);\fP
-.br
-\fBint isblank(int \fP\fIc\fP\fB);\fP
-.br
 \fBint iscntrl(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isdigit(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isgraph(int \fP\fIc\fP\fB);\fP
-.br
 \fBint islower(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isprint(int \fP\fIc\fP\fB);\fP
-.br
 \fBint ispunct(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isspace(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isupper(int \fP\fIc\fP\fB);\fP
-.br
 \fBint isxdigit(int \fP\fIc\fP\fB);\fP
+
+\fBint isascii(int \fP\fIc\fP\fB);\fP
+\fBint isblank(int \fP\fIc\fP\fB);\fP
+
+\fBint isalnum_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isalpha_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isblank_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint iscntrl_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isdigit_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isgraph_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint islower_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isprint_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint ispunct_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isspace_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isupper_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint isxdigit_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+
+\fBint isascii_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
 .fi
 .sp
 .in -4n
@@ -85,15 +91,54 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
 .br
 .RE
+
 \fBisblank\fP():
 .RS 4
 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
 .br
 or \fIcc\ \-std=c99\fP
 .RE
+
+\fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(), \fBiscntrl_l\fP(),
+\fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(), \fBisprint_l\fP(),
+\fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(), \fBisxdigit_l\fP():
+.PD 0
+.RS 4
+.TP 
+Since glibc 2.10:
+_XOPEN_SOURCE\ >=\ 700
+.TP 
+Before glibc 2.10:
+_GNU_SOURCE
+.RE
+.PD
+
+\fBisascii_l\fP(),
+.PD 0
+.RS 4
+.TP 
+Since glibc 2.10:
+_XOPEN_SOURCE\ >=\ 700 && (_SVID_SOURCE || _BSD_SOURCE)
+.TP 
+Before glibc 2.10:
+_GNU_SOURCE
+.RE
+.PD
 .ad
 .SH 説明
-これらの関数は、現在のロケールに従って \fIc\fP を分類する。 \fIc\fP は \fIunsigned char\fP か \fBEOF\fP でなければならない。
+These functions check whether \fIc\fP, which must have the value of an
+\fIunsigned char\fP or \fBEOF\fP, falls into a certain character class according
+to the specified locale.  The functions without the "_l" suffix perform the
+check based on the current locale.
+
+The functions with the "_l" suffix perform the check based on the locale
+specified by the locale object \fIlocale\fP.  The behavior of these functions
+is undefined if \fIlocale\fP is the special locale object \fBLC_GLOBAL_LOCALE\fP
+(see \fBduplocale\fP(3))  or is not a valid locale object handle.
+
+The list below explains the operation of the functions without the "_l"
+suffix; the functions with the "_l" suffix differ only in using the locale
+object \fIlocale\fP instead of the current locale.
 .TP 
 \fBisalnum\fP()
 英字または数字であるかを調べる。 \fB(isalpha(\fP\fIc\fP\fB) || isdigit(\fP\fIc\fP\fB))\fP と等価である。
@@ -140,11 +185,33 @@ or \fIcc\ \-std=c99\fP
 \fB0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F\fP の文字であるかどうかを調べることと等価である。
 .SH 返り値
 文字 \fIc\fP が調べた文字の種類に合っていれば 0 以外を返す。 そうでなければ 0 を返す。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+.\" FIXME: need a thread-safety statement about the *_l functions
+関数 \fBisalnum\fP(), \fBisalpha\fP(), \fBisascii\fP(), \fBisblank\fP(), \fBiscntrl\fP(),
+\fBisdigit\fP(), \fBisgraph\fP(), \fBislower\fP(), \fBisprint\fP(), \fBispunct\fP(),
+\fBisspace\fP(), \fBisupper\fP(), \fBisxdigit\fP() はスレッドセーフである。
+.SH バージョン
+\fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(), \fBiscntrl_l\fP(),
+\fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(), \fBisprint_l\fP(),
+\fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(), \fBisxdigit_l\fP(),
+\fBisascii_l\fP() は glibc 2.3 以降で利用可能である。
 .SH 準拠
-C99, 4.3BSD.  C89 では、これらの関数のうち \fBisascii\fP()  と \fBisblank\fP()  以外の
-すべてが規定されている。 \fBisascii\fP()  は BSD や SVr4 の拡張である。 \fBisblank\fP()  は POSIX.1\-2001
-と C99 7.4.1.3 に準拠している。 POSIX.1\-2008 は、 \fBisascii\fP()  を廃止予定としている。
-ローカライズされたアプリケーションでは、移植性を確保しつつ、 この関数を使用することはできない点に注意すること。
+C89 では \fBisalnum\fP(), \fBisalpha\fP(), \fBiscntrl\fP(), \fBisdigit\fP(), \fBisgraph\fP(),
+\fBislower\fP(), \fBisprint\fP(), \fBispunct\fP(), \fBisspace\fP(), \fBisupper\fP(),
+\fBisxdigit\fP() が規定されているが、 \fBisascii\fP() と \fBisblank\fP() は規定されていない。 POSIX.1\-2001
+でもこれらの関数は規定されており、\fBisascii\fP() と \fBisblank\fP() も規定されている (\fBisascii\fP() は XSI
+拡張)。 C99 では、ここで挙げた関数のうち \fBisascii\fP() 以外の全てが規定されている。
+
+POSIX.1\-2008 では \fBisascii\fP()
+は廃止予定とされている。ローカライズするアプリケーションで移植性がある形では使用できない点に注意すること。
+
+POSIX.\-1\-2008 では \fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(),
+\fBiscntrl_l\fP(), \fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(),
+\fBisprint_l\fP(), \fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(),
+\fBisxdigit_l\fP() が規定されている。
+
+\fBisascii_l\fP() は GNU 拡張である。
 .SH 注意
 ある文字がどの種類に入るかということは、現在のロケールに依存する。 たとえば、デフォルトの \fBC\fP ロケールでは \fBisupper\fP()  は A
 のウムラウトを認識できないので、それが大文字だということがわからない。
@@ -152,9 +219,9 @@ C99, 4.3BSD.  C89 では、これらの関数のうち \fBisascii\fP()  と \fBi
 \fBiswalnum\fP(3), \fBiswalpha\fP(3), \fBiswblank\fP(3), \fBiswcntrl\fP(3),
 \fBiswdigit\fP(3), \fBiswgraph\fP(3), \fBiswlower\fP(3), \fBiswprint\fP(3),
 \fBiswpunct\fP(3), \fBiswspace\fP(3), \fBiswupper\fP(3), \fBiswxdigit\fP(3),
-\fBsetlocale\fP(3), \fBtoascii\fP(3), \fBtolower\fP(3), \fBtoupper\fP(3), \fBascii\fP(7),
-\fBlocale\fP(7)
+\fBnewlocale\fP(3), \fBsetlocale\fP(3), \fBuselocale\fP(3), \fBtoascii\fP(3),
+\fBtolower\fP(3), \fBtoupper\fP(3), \fBascii\fP(7), \fBlocale\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.63 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。