]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/toascii.3
f37562580ff93b1af17a55619c9ada67212a74a8
[thirdparty/man-pages.git] / man3 / toascii.3
1 '\" t
2 .\" Copyright (c) 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\" Added BUGS section, aeb, 950919
7 .\"
8 .TH toascii 3 (date) "Linux man-pages (unreleased)"
9 .SH NAME
10 toascii \- convert character to ASCII
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #include <ctype.h>
17 .PP
18 .BI "[[deprecated]] int toascii(int " c );
19 .fi
20 .PP
21 .RS -4
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .RE
25 .PP
26 .BR toascii ():
27 .nf
28 _XOPEN_SOURCE
29 || /* glibc >= 2.19: */ _DEFAULT_SOURCE
30 || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
31 .fi
32 .SH DESCRIPTION
33 .BR toascii ()
34 converts
35 .I c
36 to a 7-bit
37 .I "unsigned char"
38 value that fits into the ASCII character set, by clearing the
39 high-order bits.
40 .SH RETURN VALUE
41 The value returned is that of the converted character.
42 .SH ATTRIBUTES
43 For an explanation of the terms used in this section, see
44 .BR attributes (7).
45 .ad l
46 .nh
47 .TS
48 allbox;
49 lbx lb lb
50 l l l.
51 Interface Attribute Value
52 T{
53 .BR toascii ()
54 T} Thread safety MT-Safe
55 .TE
56 .hy
57 .ad
58 .sp 1
59 .SH STANDARDS
60 POSIX.1-2008.
61 .SH HISTORY
62 SVr4, BSD, POSIX.1-2001.
63 Obsolete in POSIX.1-2008,
64 noting that it cannot be used portably in a localized application.
65 .SH BUGS
66 Many people will be unhappy if you use this function.
67 This function will convert accented letters into random characters.
68 .SH SEE ALSO
69 .BR isascii (3),
70 .BR tolower (3),
71 .BR toupper (3)