09ab51b23def8b25b1c747c5f5c494c32c638c77
[framework/uifw/xorg/lib/libxaw.git] / src / XawI18n.h
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 HAS_WCTYPE_H
28 #include <wctype.h>
29 #ifndef NO_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 HAS_WCHAR_H
38 #include <wchar.h>
39 #endif
40
41 #if defined(AIXV3) || defined(__SCO__)
42 #include <ctype.h>
43 #endif
44
45 #ifdef NCR
46 #define iswspace(c) _Xaw_iswspace(c)
47 int _Xaw_iswspace
48 (
49  wchar_t                c
50  );
51 #endif
52
53 #ifdef sony
54 #ifndef SVR4
55 #include <jctype.h>
56 #define iswspace(c) jisspace(c)
57 #endif
58 #endif
59
60 #ifdef QNX4
61 #define toascii( c ) ((unsigned)(c) & 0x007f)
62 #endif
63
64 #include <stdlib.h>
65
66 #ifdef USE_XWCHAR_STRING
67 int _Xwcslen
68 (
69  wchar_t                *wstr
70  );
71
72 #define wcslen(c) _Xwcslen(c)
73
74 wchar_t *_Xwcscpy
75 (
76  wchar_t                *wstr1,
77  wchar_t                *wstr2
78  );
79
80 #define wcscpy(d,s) _Xwcscpy(d,s)
81
82 wchar_t *_Xwcsncpy
83 (
84  wchar_t                *wstr1,
85  wchar_t                *wstr2,
86  int                    len
87  );
88
89 #define wcsncpy(d, s, l)        _Xwcsncpy(d, s, l)
90
91 #ifdef USE_XMBTOWC
92 #define mbtowc(wc, s, l)        _Xmbtowc(wc, s, l)
93 #endif
94 #endif
95
96 wchar_t _Xaw_atowc
97 (
98 #if NeedWidePrototypes
99  int                    c
100 #else
101  unsigned char          c
102 #endif
103  );
104
105 #ifndef HAS_ISW_FUNCS
106 #include <ctype.h>
107 #ifndef iswspace
108 #define iswspace(c) (isascii(c) && isspace(toascii(c)))
109 #endif
110 #endif
111
112 #if !defined(iswalnum) && !defined(HAVE_ISWALNUM)
113 #define iswalnum(c) _Xaw_iswalnum(c)
114 #endif
115 int _Xaw_iswalnum
116 (
117  wchar_t                c
118  );