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 86
|
.\" 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:13 JST 2000
.\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\"
.\"WORD: initial shift state եȾ
.\"
.TH MBSINIT 3 2000-11-20 "GNU" "Linux Programmer's Manual"
.SH ̾
mbsinit \- եȾ֤ɤ
.SH
.nf
.B #include <wchar.h>
.sp
.BI "int mbsinit(const mbstate_t *" ps );
.fi
.SH
ʸޥХɽȥ磻ʸɽδ֤Ѵˤ
\fImbstate_t\fP Ѵ֤Ѥ롣ʸѴͭ¾֥ޥ
Ѥ롣餫ʸѴλˡĤʸ
˾֤¸Ƥɬפ뤫⤷ʤΤ褦Ѵ֤
ISO-2022 UTF-7 Τ褦ΤɬפȤ롣
.PP
֤ȤʸѴϤξ֤Ǥ롣֤ˤब
¸ߤĤ
.BR mbsrtowcs (3)
Τ褦ʥޥХȤ磻ʸ
ѴؿǻѤ롣⤦Ĥ
.BR wcsrtombs (3)
Τ褦
磻ʸޥХȤѴؿǻѤ롣ξȤ
\fImbstate_t\fP ˳Ǽ졢֤ȤƱɽġ
.PP
8ӥåˤƤƤξ֤Ͻ֤Ǥ롣
UTF-8, EUC-*, BIG5, SJIS Τ褦¿Хˤƥ磻ʸ
¿ХʸؤѴؿ֤ˤϤʤʤ
.BR mbrtowc (3)
Τ褦¿Хʸ磻ʸؤѴؿǤ
ʸβ֤Ȥʤ礬롣
.PP
֤
.I mbstate_t
ˡΰĤϡꤹ뤳ȤǤ:
.nf
mbstate_t state;
memset(&state,0,sizeof(mbstate_t));
.fi
.PP
Linux ˤƤϰʲˡǤƱͤǤ뤬ѥ顼ηٹ
뤫⤷ʤ
.nf
mbstate_t state = { 0 };
.fi
.PP
.BR mbsinit ()
\fI*ps\fP ֤˰פ뤫ɤ롣
.SH ֤
.BR mbsinit ()
\fI*ps\fP ֤ξ NULL ݥξˤ
ʳ֤ʳξˤϥ֤
.SH
C99.
.SH
.BR mbsinit ()
ưϸߤΥ
.B LC_CTYPE
ƥ˰¸Ƥ롣
.SH Ϣ
.BR mbsrtowcs (3),
.BR wcsrtombs (3)
|