OSDN Git Service

(split) LDP: Update original to LDP v3.50.
[linuxjm/LDP_man-pages.git] / original / man3 / wctob.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"   ISO/IEC 9899:1999
15 .\"
16 .TH WCTOB 3 2011-09-22 "GNU" "Linux Programmer's Manual"
17 .SH NAME
18 wctob \- try to represent a wide character as a single byte
19 .SH SYNOPSIS
20 .nf
21 .B #include <wchar.h>
22 .sp
23 .BI "int wctob(wint_t " c );
24 .fi
25 .SH DESCRIPTION
26 The
27 .BR wctob ()
28 function tests whether
29 the multibyte representation of the
30 wide character \fIc\fP, starting in the initial state, consists of a single
31 byte.
32 If so, it is returned as an
33 .IR "unsigned char" .
34 .PP
35 Never use this function.
36 It cannot help you in writing internationalized
37 programs.
38 Internationalized programs must never distinguish single-byte and
39 multibyte characters.
40 .SH RETURN VALUE
41 The
42 .BR wctob ()
43 function returns the single-byte representation of \fIc\fP,
44 if it exists, of \fBEOF\fP otherwise.
45 .SH CONFORMING TO
46 C99.
47 .SH NOTES
48 The behavior of
49 .BR wctob ()
50 depends on the
51 .B LC_CTYPE
52 category of the
53 current locale.
54 .PP
55 This function should never be used.
56 Internationalized programs must never
57 distinguish single-byte and multibyte characters.
58 Use either
59 .BR wctomb (3)
60 or the thread-safe
61 .BR wcrtomb (3)
62 instead.
63 .SH SEE ALSO
64 .BR btowc (3),
65 .BR wcrtomb (3),
66 .BR wctomb (3)