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#include <stdlib.h>
42
43#ifdef USE_XWCHAR_STRING
44int _Xwcslen
45(
46 wchar_t		*wstr
47 );
48
49#define wcslen(c) _Xwcslen(c)
50
51wchar_t *_Xwcscpy
52(
53 wchar_t		*wstr1,
54 wchar_t		*wstr2
55 );
56
57#define wcscpy(d,s) _Xwcscpy(d,s)
58
59wchar_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
73wchar_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
98int _Xaw_iswalnum
99(
100 wchar_t		c
101 );
102