OSDN Git Service

(split) LDP_man-pages: update original to v3.34.
[linuxjm/LDP_man-pages.git] / original / man3 / wctob.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 .TH WCTOB 3 2011-09-22 "GNU" "Linux Programmer's Manual"
15 .SH NAME
16 wctob \- try to represent a wide character as a single byte
17 .SH SYNOPSIS
18 .nf
19 .B #include <wchar.h>
20 .sp
21 .BI "int wctob(wint_t " c );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wctob ()
26 function tests whether
27 the multibyte representation of the
28 wide character \fIc\fP, starting in the initial state, consists of a single
29 byte.
30 If so, it is returned as an
31 .IR "unsigned char" .
32 .PP
33 Never use this function.
34 It cannot help you in writing internationalized
35 programs.
36 Internationalized programs must never distinguish single-byte and
37 multibyte characters.
38 .SH "RETURN VALUE"
39 The
40 .BR wctob ()
41 function returns the single-byte representation of \fIc\fP,
42 if it exists, of \fBEOF\fP otherwise.
43 .SH "CONFORMING TO"
44 C99.
45 .SH NOTES
46 The behavior of
47 .BR wctob ()
48 depends on the
49 .B LC_CTYPE
50 category of the
51 current locale.
52 .PP
53 This function should never be used.
54 Internationalized programs must never
55 distinguish single-byte and multibyte characters.
56 Use either
57 .BR wctomb (3)
58 or the thread-safe
59 .BR wcrtomb (3)
60 instead.
61 .SH "SEE ALSO"
62 .BR btowc (3),
63 .BR wcrtomb (3),
64 .BR wctomb (3)