OSDN Git Service

608b7590e579e72e31c9bad911d88c9a00fdd875
[linuxjm/LDP_man-pages.git] / release / 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 .SH 名前
26 btowc \- シングルバイトをワイド文字にコンバートする
27 .SH 書式
28 .nf
29 .B #include <wchar.h>
30 .sp
31 .BI "wint_t btowc(int " c );
32 .fi
33 .SH 説明
34 .BR btowc ()
35 関数は初期シフト状態から始まる長さ 1 のマルチバイトのシーケンスとして
36 解釈され、\fIc\fP をワイド文字にコンバートして返す。
37 \fIc\fP が
38 .B EOF
39 もしくは長さ 1 の無効なマルチバイトシーケンスの場合、
40 .BR btowc ()
41 関数は
42 .B WEOF
43 を返す。
44 .SH 返り値
45 .BR btowc ()
46 関数はシングルバイト \fIc\fP からコンバートされたワイド文字を返す。
47 \fIc\fP が
48 .B EOF
49 もしくは長さ 1 の無効なマルチバイトシーケンスの場合、
50 .BR btowc ()
51 関数は
52 .B WEOF
53 を返す。
54 .SH 準拠
55 C99, POSIX.1-2001.
56 .SH 注意
57 .BR btowc ()
58 の振る舞いは、現在のロケールの
59 .B LC_CTYPE
60 カテゴリーに依存する。
61 .PP
62 この関数は使用されるべきではない。状態(state)を持ったエンコードには使えず、
63 マルチバイトシーケンスとは違い、必ずしもシングルバイト
64 を取り扱えるとは限らない。代わりに
65 .BR mbtowc ()
66 か、スレッドセーフな
67 .BR mbrtowc ()
68 を使用すること。
69 .SH 関連項目
70 .BR mbtowc (3),
71 .BR mbrtowc (3),
72 .BR wctob (3)