Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/iso/ctype_iso.h
+++ new/usr/src/head/iso/ctype_iso.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /* Copyright (c) 1988 AT&T */
23 23 /* All Rights Reserved */
24 24
25 -
26 25 /*
26 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 + *
27 28 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 29 * Use is subject to license terms.
29 30 */
30 -/*
31 - * Copyright 2013 Garrett D'Amore <garrett@damore.org>
32 - */
33 31
34 32 /*
35 33 * An application should not include this header directly. Instead it
36 34 * should be included only through the inclusion of other Sun headers.
37 35 *
38 36 * The contents of this header is limited to identifiers specified in the
39 37 * C Standard. Any new identifiers specified in future amendments to the
40 38 * C Standard must be placed in this header. If these new identifiers
41 39 * are required to also be in the C++ Standard "std" namespace, then for
42 40 * anything other than macro definitions, corresponding "using" directives
43 41 * must also be added to <ctype.h>.
44 42 */
45 43
46 44 #ifndef _ISO_CTYPE_ISO_H
47 45 #define _ISO_CTYPE_ISO_H
48 46
49 47 #include <sys/feature_tests.h>
50 48
51 49 #ifdef __cplusplus
52 50 extern "C" {
53 51 #endif
54 52
55 53 #define _U 0x00000001 /* Upper case */
56 54 #define _L 0x00000002 /* Lower case */
57 55 #define _N 0x00000004 /* Numeral (digit) */
58 56 #define _S 0x00000008 /* Spacing character */
59 57 #define _P 0x00000010 /* Punctuation */
60 58 #define _C 0x00000020 /* Control character */
61 59 #define _B 0x00000040 /* Blank */
62 60 #define _X 0x00000080 /* heXadecimal digit */
63 61
64 62 #define _ISUPPER _U
65 63 #define _ISLOWER _L
66 64 #define _ISDIGIT _N
67 65 #define _ISSPACE _S
68 66 #define _ISPUNCT _P
69 67 #define _ISCNTRL _C
70 68 #define _ISBLANK _B
71 69 #define _ISXDIGIT _X
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
72 70 #define _ISGRAPH 0x00002000
73 71 #define _ISALPHA 0x00004000
74 72 #define _ISPRINT 0x00008000
75 73 #define _ISALNUM (_ISALPHA | _ISDIGIT)
76 74
77 75 extern unsigned char __ctype[];
78 76 extern unsigned int *__ctype_mask;
79 77 extern int *__trans_upper;
80 78 extern int *__trans_lower;
81 79
82 -#if defined(__STDC__)
83 -
84 80 #if __cplusplus >= 199711L
85 81 namespace std {
86 82 #endif
87 83
88 84 /*
89 85 * These used to be macros, which while more efficient, precludes operation
90 86 * with thread specific locales. The old macros will still work, but new
91 87 * code compiles to use functions. This is specifically permitted by the
92 88 * various standards. Only _tolower and _toupper were required to be
93 89 * delivered in macro form.
94 90 */
95 91 extern int isalnum(int);
96 92 extern int isalpha(int);
97 93 extern int iscntrl(int);
98 94 extern int isdigit(int);
99 95 extern int isgraph(int);
100 96 extern int islower(int);
101 97 extern int isprint(int);
102 98 extern int ispunct(int);
103 99 extern int isspace(int);
104 100 extern int isupper(int);
105 101 extern int isxdigit(int);
106 102 #if defined(_XPG6) || defined(_STDC_C99) || !defined(_STRICT_SYMBOLS)
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
107 103 extern int isblank(int);
108 104 #endif
109 105
110 106 extern int tolower(int);
111 107 extern int toupper(int);
112 108
113 109 #if __cplusplus >= 199711L
114 110 } /* end of namespace std */
115 111 #endif
116 112
117 -#else /* defined(__STDC__) */
118 -
119 -#if !defined(__lint)
120 -
121 -extern int isalpha();
122 -extern int isupper();
123 -extern int islower();
124 -extern int isdigit();
125 -extern int isxdigit();
126 -extern int isalnum();
127 -extern int isspace();
128 -extern int ispunct();
129 -extern int isprint();
130 -extern int isgraph();
131 -extern int iscntrl();
132 -extern int isblank();
133 -
134 -#endif /* !defined(__lint) */
135 -
136 -#endif /* defined(__STDC__) */
137 -
138 113 #ifdef __cplusplus
139 114 }
140 115 #endif
141 116
142 117 #endif /* _ISO_CTYPE_ISO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX