Debian Codegraph @

src/XawI18n.h

raw
1 /************************************************************
2
3 Copyright 1993, 1994, 1998 The Open Group
4
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24
25 ********************************************************/
26
27 #ifdef HAVE_WCTYPE_H
28 #include <wctype.h>
29 #ifdef HAVE_WIDEC_H
30 #include <widec.h>
31 #define wcslen(c) wslen(c)
32 #define wcscpy(d, s) wscpy(d, s)
33 #define wcsncpy(d, s, l) wsncpy(d, s, l)
34 #endif
35 #endif
36
37 #ifdef HAVE_WCHAR_H
38 #include <wchar.h>
39 #endif
40
41 #include <stdlib.h>
42
43 #ifdef USE_XWCHAR_STRING
44 int _Xwcslen
45 (
46 wchar_t *wstr
47 );
48
49 #define wcslen(c) _Xwcslen(c)
50
51 wchar_t *_Xwcscpy
52 (
53 wchar_t *wstr1,
54 wchar_t *wstr2
55 );
56
57 #define wcscpy(d,s) _Xwcscpy(d,s)
58
59 wchar_t *_Xwcsncpy
60 (
61 wchar_t *wstr1,
62 wchar_t *wstr2,
63 int len
64 );
65
66 #define wcsncpy(d, s, l) _Xwcsncpy(d, s, l)
67
68 #ifdef USE_XMBTOWC
69 #define mbtowc(wc, s, l) _Xmbtowc(wc, s, l)
70 #endif
71 #endif
72
73 wchar_t _Xaw_atowc
74 (
75 #if NeedWidePrototypes
76 int c
77 #else
78 unsigned char c
79 #endif
80 );
81
82 #ifndef HAS_ISW_FUNCS
83 # include <ctype.h>
84 # ifndef isascii
85 # define isascii(c) ((unsigned char)(c) < 127)
86 # endif
87 # ifndef toascii
88 # define toascii(c) ((c) & 0x7f)
89 # endif
90 # ifndef iswspace
91 # define iswspace(c) (isascii(c) && isspace(toascii(c)))
92 # endif
93 #endif
94
95 #if !defined(iswalnum) && !defined(HAVE_ISWALNUM)
96 #define iswalnum(c) _Xaw_iswalnum(c)
97 #endif
98 int _Xaw_iswalnum
99 (
100 wchar_t c
101 );