Print this page
5604 widec.h should expose ws* under __EXTENSIONS__
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/widec.h
+++ new/usr/src/head/widec.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
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 /*
23 23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 24 *
25 25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 28
29 29 /* Copyright (c) 1986 AT&T */
30 30 /* All Rights Reserved */
31 31
32 32
33 33 /* This module is created for NLS on Jun.04.86 */
34 34
35 35 #ifndef _WIDEC_H
36 36 #define _WIDEC_H
37 37
38 38 #include <sys/feature_tests.h>
39 39
40 40 #include <stdio.h> /* For definition of FILE */
41 41 #include <euc.h>
42 42 #include <wchar.h>
43 43
44 44 #ifdef __cplusplus
45 45 extern "C" {
46 46 #endif
47 47
48 48 /* Character based input and output functions */
49 49 extern wchar_t *getws(wchar_t *);
50 50 extern int putws(const wchar_t *);
51 51
52 52 #if !defined(__lint)
53 53 #define getwc(p) fgetwc(p)
54 54 #define putwc(x, p) fputwc((x), (p))
55 55 #define getwchar() getwc(stdin)
56 56 #define putwchar(x) putwc((x), stdout)
57 57 #endif
58 58
59 59 /* wchar_t string operation functions */
60 60 extern wchar_t *strtows(wchar_t *, char *);
61 61 extern wchar_t *wscpy(wchar_t *, const wchar_t *);
62 62 extern wchar_t *wsncpy(wchar_t *, const wchar_t *, size_t);
63 63 extern wchar_t *wscat(wchar_t *, const wchar_t *);
64 64 extern wchar_t *wsncat(wchar_t *, const wchar_t *, size_t);
65 65 extern wchar_t *wschr(const wchar_t *, wchar_t);
66 66 extern wchar_t *wsrchr(const wchar_t *, wchar_t);
67 67 extern wchar_t *wspbrk(const wchar_t *, const wchar_t *);
68 68 extern wchar_t *wstok(wchar_t *, const wchar_t *);
↓ open down ↓ |
68 lines elided |
↑ open up ↑ |
69 69 extern char *wstostr(char *, wchar_t *);
70 70
71 71 extern int wscmp(const wchar_t *, const wchar_t *);
72 72 extern int wsncmp(const wchar_t *, const wchar_t *, size_t);
73 73 extern size_t wslen(const wchar_t *);
74 74 extern size_t wsspn(const wchar_t *, const wchar_t *);
75 75 extern size_t wscspn(const wchar_t *, const wchar_t *);
76 76 extern int wscoll(const wchar_t *, const wchar_t *);
77 77 extern size_t wsxfrm(wchar_t *, const wchar_t *, size_t);
78 78
79 -#if !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)
79 +#if !defined(_STRICT_SYMBOLS)
80 80
81 81 extern wchar_t *wsdup(const wchar_t *);
82 82 extern int wscol(const wchar_t *);
83 83 extern double wstod(const wchar_t *, wchar_t **);
84 84 extern long wstol(const wchar_t *, wchar_t **, int);
85 85 extern int wscasecmp(const wchar_t *, const wchar_t *);
86 86 extern int wsncasecmp(const wchar_t *, const wchar_t *, size_t);
87 87 extern int wsprintf(wchar_t *, const char *, ...);
88 88 #if defined(_LONGLONG_TYPE)
89 89 extern long long wstoll(const wchar_t *, wchar_t **, int);
90 90 #endif /* defined(_LONGLONG_TYPE) */
91 91
92 -#endif /* !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX) */
92 +#endif /* !defined(_STRICT_SYMBOLS) */
93 93
94 94 /* Returns the code set number for the process code c. */
95 95 #define WCHAR_SHIFT 7
96 96 #define WCHAR_S_MASK 0x7f
97 97 #define wcsetno(c) \
98 98 (((c)&0x20000000)?(((c)&0x10000000)?1:3):(((c)&0x10000000)?2:0))
99 99
100 100 /* Aliases... */
101 101 #define windex wschr
102 102 #define wrindex wsrchr
103 103
104 104 #define watol(s) wstol((s), (wchar_t **)0, 10)
105 105 #if defined(_LONGLONG_TYPE) && !defined(__lint)
106 106 #define watoll(s) wstoll((s), (wchar_t **)0, 10)
107 107 #endif /* defined(_LONGLONG_TYPE) && !defined(__lint) */
108 108 #define watoi(s) ((int)wstol((s), (wchar_t **)0, 10))
109 109 #define watof(s) wstod((s), (wchar_t **)0)
110 110
111 111 /*
112 112 * other macros.
113 113 */
114 114 #define WCHAR_CSMASK 0x30000000
115 115 #define EUCMASK 0x30000000
116 116 #define WCHAR_CS0 0x00000000
117 117 #define WCHAR_CS1 0x30000000
118 118 #define WCHAR_CS2 0x10000000
119 119 #define WCHAR_CS3 0x20000000
120 120 #define WCHAR_BYTE_OF(wc, i) (((wc&~0x30000000)>>(7*(3-i)))&0x7f)
121 121
122 122 #ifdef __cplusplus
123 123 }
124 124 #endif
125 125
126 126 #endif /* _WIDEC_H */
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX