OSDN Git Service

bf59daef9c218a119f5bbab6174eb56011da1c05
[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 2009-02-04 "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 the function
96 .\"O .BR mbtowc ()
97 .\"O instead.
98 .SH Ãí°Õ
99 .BR btowc ()
100 ¤Î¿¶¤ëÉñ¤¤¤Ï¡¢¸½ºß¤Î¥í¥±¡¼¥ë¤Î
101 .B LC_CTYPE
102 ¥«¥Æ¥´¥ê¡¼¤Ë°Í¸¤¹¤ë¡£
103 .PP
104 ¤³¤Î´Ø¿ô¤Ï»ÈÍѤµ¤ì¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£¾õÂÖ(state)¤ò»ý¤Ã¤¿¥¨¥ó¥³¡¼¥É¤Ë¤Ï»È¤¨¤º¡¢
105 ¥Þ¥ë¥Á¥Ð¥¤¥È¥·¡¼¥±¥ó¥¹¤È¤Ï°ã¤¤¡¢É¬¤º¤·¤â¥·¥ó¥°¥ë¥Ð¥¤¥È
106 ¤ò¼è¤ê°·¤¨¤ë¤È¤Ï¸Â¤é¤Ê¤¤¡£
107 .BR mbtowc ()
108 ¤òÂå¤ï¤ê¤È¤·¤Æ»ÈÍѤ·¤Ê¤µ¤¤¡£
109 .\"O .SH "SEE ALSO"
110 .SH ´ØÏ¢¹àÌÜ
111 .BR mbtowc (3),
112 .BR wctob (3)