File: mbrtowc.3

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (85 lines) | stat: -rw-r--r-- 3,534 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\"   GNU glibc-2 source code and manual
.\"   Dinkumware C library reference http://www.dinkumware.com/
.\"   OpenGroup's Single Unix specification
.\"      http://www.UNIX-systems.org/online.html
.\"   ISO/IEC 9899:1999
.\"
.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated Tue Jan 11 00:56:16 JST 2000
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated Thu Dec 13 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\"
.TH MBRTOWC 3  2001-11-22 "GNU" "Linux Programmer's Manual"
.SH ̾
mbrtowc \- ޥХ磻ʸѴ
.SH 
.nf
.B #include <wchar.h>
.sp
.BI "size_t mbrtowc(wchar_t *" pwc ", const char *" s ", size_t " n ", mbstate_t *" ps );
.fi
.SH 
δؿѤ硢̾ \fIs\fP  NULL Ǥʤ \fIpwc\fP  NULL 
ʤξϡ\fBmbrtowc\fP ؿ \fIs\fP Ϥޤ \fIn\fP ХȤ
ޥХʸ򸡺ơδʥޥХʸФ
磻ʸѴ \fI*pwc\fP ˳Ǽ롣
Ʊ˥եȾ \fI*ps\fP 򹹿롣Ѵ磻ʸ L'\\0' 
ʤС\fIs\fP 񤹤Хȿ֤
Ѵ磻ʸ L'\\0' ξˤϥեȾ \fI*ps\fP 
֤ᤷ 0 ֤
.PP
\fIs\fP Ϥޤ \fIn\fP ХȤʥޥХʸޤǤʤ
ˤϡ\fBmbrtowc\fP  \fI(size_t)(-2)\fP ֤
ޥХʸ˾Ĺʥեȥ󥹤ޤޤƤȡ
\fIn\fP >= \fIMB_CUR_MAX\fP λˤ⤳Τ褦ʤȤꤨ롣
.PP
\fIs\fP ϤޤޥХʸ󤬡δʸ
ʥޥХޤǤˤϡ\fBmbrtowc\fP 
\fI(size_t)(-1)\fP ֤\fBerrno\fP  \fBEILSEQ\fP ꤹ롣
ξ \fI*ps\fP ؤαƶ̤Ǥ롣
.PP
\fIs\fP  NULL Ǥʤ \fIpwc\fP  NULL ξ \fBmbrtowc\fP ؿ
嵭Ʊͤư뤬Ѵ磻ʸϥˤϽ񤭹ޤʤ
.PP
puts \fI*ps\fP in the initial state and returns 0.
ܤξȤ \fIs\fP  NULL ξ硢 \fIpwc\fP  \fIn\fP 
̵뤵롣
\fI*ps\fP ɽѴ֤ԴʥޥХʸѴ򼨤Ƥϡ
\fBmbrtowc\fP ؿ \fI(size_t)(-1)\fP ֤
\fBerrno\fP  \fBEILSEQ\fP 򥻥åȤ
\fI*ps\fP ̤֤Τޤޤˤ롣
ʤС\fBmbrtowc\fP ؿ \fI*ps\fP ֤ˤ 0 ֤
.PP
嵭Ƥξˤơ\fIps\fP  NULL ݥ󥿡ʤ
mbrtowc ؿΤߤѤŪ̾Τʤ֤Ѥ롣
ʤС\fI*ps\fP ͭ \fBmbstate_t\fP ֥Ȥ
ʤФʤʤ
\fBmbstate_t\fP ֥ȤǤ \fIa\fP ϥ뤳Ȥˤä
֤˽Ǥ롣ʲ򼨤
.sp
.RS
memset(&a, 0, sizeof(a));
.RE
.SH ֤
L'\\0' ʳΥ磻ʸǧˤ \fBmbrtowc\fP ؿ \fIs\fP
ϤޤޥХ󤫤ϤХȿ֤
L'\\0' 磻ʸǧˤ 0 ֤
ʥޥХˤ (size_t)(-1) ֤
\fBerrno\fP  \fBEILSEQ\fP ꤹ롣ʥޥХʸ
ϤǤʤäˤ (size_t)(-2) ֤ \fIn\fP ä
ɬפ뤳Ȥ򼨤
.SH 
ISO/ANSI C, UNIX98
.SH Ϣ
.BR mbsrtowcs (3)
.SH 
\fBmbrtowc\fP ưϸߤΥ LC_CTYPE ƥ˰¸Ƥ롣