XawI18n.h revision f353fbad
1/************************************************************
2
3Copyright 1993, 1994, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in 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#if defined(AIXV3) || defined(__SCO__)
42#include <ctype.h>
43#endif
44
45#ifdef NCR
46#define iswspace(c) _Xaw_iswspace(c)
47int _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
67int _Xwcslen
68(
69 wchar_t		*wstr
70 );
71
72#define wcslen(c) _Xwcslen(c)
73
74wchar_t *_Xwcscpy
75(
76 wchar_t		*wstr1,
77 wchar_t		*wstr2
78 );
79
80#define wcscpy(d,s) _Xwcscpy(d,s)
81
82wchar_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
96wchar_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
115int _Xaw_iswalnum
116(
117 wchar_t		c
118 );
119