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