OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / wcwidth.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 .\"
13 .TH WCWIDTH 3  1999-07-25 "GNU" "Linux Programmer's Manual"
14 .SH NAME
15 wcwidth \- determine columns needed for a wide character
16 .SH SYNOPSIS
17 .nf
18 .B #define _XOPEN_SOURCE
19 .B #include <wchar.h>
20 .sp
21 .BI "int wcwidth(wchar_t " c );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wcwidth ()
26 function returns the number of columns
27 needed to represent the wide character \fIc\fP.
28 If \fIc\fP is a printable wide character, the value
29 is at least 0.
30 If \fIc\fP is L\(aq\\0\(aq, the value is 0.
31 Otherwise \-1 is returned.
32 .SH "RETURN VALUE"
33 The
34 .BR wcwidth ()
35 function returns the number of
36 column positions for \fIc\fP.
37 .SH "CONFORMING TO"
38 POSIX.1-2001.
39
40 Note that glibc before 2.2.5 used the prototype
41 .br
42 .nf
43 .BI "int wcwidth(wint_t " c );
44 .fi
45 .SH NOTES
46 The behavior of
47 .BR wcwidth ()
48 depends on the
49 .B LC_CTYPE
50 category of the
51 current locale.
52 .SH "SEE ALSO"
53 .BR iswprint (3),
54 .BR wcswidth (3),
55 .BR feature_test_macros (7)