OSDN Git Service

7d2d715f3192556766cb79f2ae334d2911b1e3a5
[linuxjm/LDP_man-pages.git] / draft / man3 / btowc.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 source code and manual
10 .\"   Dinkumware C library reference http://www.dinkumware.com/
11 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
12 .\"   ISO/IEC 9899:1999
13 .\"
14 .\" Japanese Version Copyright (c) 1999 HAYAKAWA Hitoshi
15 .\"         all rights reserved.
16 .\" Translated Sep 11 1999, HAYAKAWA Hitoshi <cz8cb01@linux.or.jp>
17 .\"
18 .\"WORD:    locale  ロケール
19 .\"WORD:    convert コンバート
20 .\"WORD:    single byte シングルバイト
21 .\"WORD:    wide character ワイドキャラクター
22 .\"WORD:    state 状態
23 .\"
24 .TH BTOWC 3 2011-09-22 "GNU" "Linux Programmer's Manual"
25 .\"O .SH NAME
26 .\"O btowc \- convert single byte to wide character
27 .SH 名前
28 btowc \- シングルバイトをワイド文字にコンバートする
29 .\"O .SH SYNOPSIS
30 .SH 書式
31 .nf
32 .B #include <wchar.h>
33 .sp
34 .BI "wint_t btowc(int " c );
35 .fi
36 .\"O .SH DESCRIPTION
37 .SH 説明
38 .\"O The
39 .\"O .BR btowc ()
40 .\"O function converts \fIc\fP, interpreted as a multibyte sequence
41 .\"O of length 1, starting in the initial shift state, to a wide character and
42 .\"O returns it.
43 .\"O If \fIc\fP is
44 .\"O .B EOF
45 .\"O or not a valid multibyte sequence of length 1,
46 .\"O the
47 .\"O .BR btowc ()
48 .\"O function returns
49 .\"O .BR WEOF .
50 .BR btowc ()
51 関数は初期シフト状態から始まる長さ 1 のマルチバイトのシーケンスとして
52 解釈され、\fIc\fP をワイド文字にコンバートして返す。
53 \fIc\fP が
54 .B EOF
55 もしくは長さ 1 の無効なマルチバイトシーケンスの場合、
56 .BR btowc ()
57 関数は
58 .B WEOF
59 を返す。
60 .\"O .SH "RETURN VALUE"
61 .SH 返り値
62 .\"O The
63 .\"O .BR btowc ()
64 .\"O function returns the wide character
65 .\"O converted from the single byte \fIc\fP.
66 .\"O If \fIc\fP is
67 .\"O .B EOF
68 .\"O or not a valid multibyte sequence of length 1,
69 .\"O it returns
70 .\"O .BR WEOF .
71 .BR btowc ()
72 関数はシングルバイト \fIc\fP からコンバートされたワイド文字を返す。
73 \fIc\fP が
74 .B EOF
75 もしくは長さ 1 の無効なマルチバイトシーケンスの場合、
76 .BR btowc ()
77 関数は
78 .B WEOF
79 を返す。
80 .\"O .SH "CONFORMING TO"
81 .SH 準拠
82 C99, POSIX.1-2001.
83 .\"O .SH NOTES
84 .\"O The behavior of
85 .\"O .BR btowc ()
86 .\"O depends on the
87 .\"O .B LC_CTYPE
88 .\"O category of the
89 .\"O current locale.
90 .\"O .PP
91 .\"O This function should never be used.
92 .\"O It does not work for encodings which have
93 .\"O state, and unnecessarily treats single bytes differently from multibyte
94 .\"O sequences.
95 .\"O Use either
96 .\"O .BR mbtowc (3)
97 .\"O or the thread-safe
98 .\"O .BR mbrtowc (3)
99 .\"O instead.
100 .SH 注意
101 .BR btowc ()
102 の振る舞いは、現在のロケールの
103 .B LC_CTYPE
104 カテゴリーに依存する。
105 .PP
106 この関数は使用されるべきではない。状態(state)を持ったエンコードには使えず、
107 マルチバイトシーケンスとは違い、必ずしもシングルバイト
108 を取り扱えるとは限らない。代わりに
109 .BR mbtowc ()
110 か、スレッドセーフな
111 .BR mbrtowc ()
112 を使用すること。
113 .\"O .SH "SEE ALSO"
114 .SH 関連項目
115 .BR mbtowc (3),
116 .BR mbrtowc (3),
117 .BR wctob (3)