]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/btowc.3
Automated addition of parentheses by add_parens_for_own_funcs.sh
[thirdparty/man-pages.git] / man3 / btowc.3
CommitLineData
fea681da
MK
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.TH BTOWC 3 1999-07-25 "GNU" "Linux Programmer's Manual"
15.SH NAME
16btowc \- convert single byte to wide character
17.SH SYNOPSIS
18.nf
19.B #include <wchar.h>
20.sp
21.BI "wint_t btowc(int " c );
22.fi
23.SH DESCRIPTION
e511ffb6 24The \fBbtowc\fP() function converts \fIc\fP, interpreted as a multibyte sequence
fea681da
MK
25of length 1, starting in the initial shift state, to a wide character and
26returns it. If \fIc\fP is EOF or not a valid multibyte sequence of length 1,
e511ffb6 27the \fBbtowc\fP() function returns WEOF.
fea681da 28.SH "RETURN VALUE"
e511ffb6 29The \fBbtowc\fP() function returns the wide character converted from the single
fea681da
MK
30byte \fIc\fP. If \fIc\fP is EOF or not a valid multibyte sequence of length 1,
31it returns WEOF.
32.SH "CONFORMING TO"
33ISO/ANSI C, UNIX98
34.SH "SEE ALSO"
35.BR mbtowc (3)
36.SH NOTES
e511ffb6 37The behaviour of \fBbtowc\fP() depends on the LC_CTYPE category of the
fea681da
MK
38current locale.
39.PP
40This function should never be used. It does not work for encodings which have
41state, and unnecessarily treats single bytes differently from multibyte
42sequences. Use the function \fBmbtowc\fP instead.