XawI18n.h revision 7a84e134
17a84e134Smrg/* $XdotOrg: xc/lib/Xaw/XawI18n.h,v 1.2 2004/04/23 18:43:38 eich Exp $ */ 27a84e134Smrg/* $Xorg: XawI18n.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ 37a84e134Smrg 47a84e134Smrg/************************************************************ 57a84e134Smrg 67a84e134SmrgCopyright 1993, 1994, 1998 The Open Group 77a84e134Smrg 87a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its 97a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that 107a84e134Smrgthe above copyright notice appear in all copies and that both that 117a84e134Smrgcopyright notice and this permission notice appear in supporting 127a84e134Smrgdocumentation. 137a84e134Smrg 147a84e134SmrgThe above copyright notice and this permission notice shall be included in 157a84e134Smrgall copies or substantial portions of the Software. 167a84e134Smrg 177a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 187a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 197a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 207a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 217a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 227a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 237a84e134Smrg 247a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be 257a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings 267a84e134Smrgin this Software without prior written authorization from The Open Group. 277a84e134Smrg 287a84e134Smrg********************************************************/ 297a84e134Smrg/* $XFree86: xc/lib/Xaw/XawI18n.h,v 3.14 2001/12/14 19:54:46 dawes Exp $ */ 307a84e134Smrg 317a84e134Smrg#ifdef HAS_WCTYPE_H 327a84e134Smrg#include <wctype.h> 337a84e134Smrg#ifndef NO_WIDEC_H 347a84e134Smrg#include <widec.h> 357a84e134Smrg#define wcslen(c) wslen(c) 367a84e134Smrg#define wcscpy(d, s) wscpy(d, s) 377a84e134Smrg#define wcsncpy(d, s, l) wsncpy(d, s, l) 387a84e134Smrg#endif 397a84e134Smrg#endif 407a84e134Smrg 417a84e134Smrg#ifdef HAS_WCHAR_H 427a84e134Smrg#include <wchar.h> 437a84e134Smrg#endif 447a84e134Smrg 457a84e134Smrg#if defined(AIXV3) || defined(__SCO__) 467a84e134Smrg#include <ctype.h> 477a84e134Smrg#endif 487a84e134Smrg 497a84e134Smrg#ifdef NCR 507a84e134Smrg#define iswspace(c) _Xaw_iswspace(c) 517a84e134Smrgint _Xaw_iswspace 527a84e134Smrg( 537a84e134Smrg wchar_t c 547a84e134Smrg ); 557a84e134Smrg#endif 567a84e134Smrg 577a84e134Smrg#ifdef sony 587a84e134Smrg#ifndef SVR4 597a84e134Smrg#include <jctype.h> 607a84e134Smrg#define iswspace(c) jisspace(c) 617a84e134Smrg#endif 627a84e134Smrg#endif 637a84e134Smrg 647a84e134Smrg#ifdef QNX4 657a84e134Smrg#define toascii( c ) ((unsigned)(c) & 0x007f) 667a84e134Smrg#endif 677a84e134Smrg 687a84e134Smrg#include <stdlib.h> 697a84e134Smrg 707a84e134Smrg#ifdef USE_XWCHAR_STRING 717a84e134Smrgint _Xwcslen 727a84e134Smrg( 737a84e134Smrg wchar_t *wstr 747a84e134Smrg ); 757a84e134Smrg 767a84e134Smrg#define wcslen(c) _Xwcslen(c) 777a84e134Smrg 787a84e134Smrgwchar_t *_Xwcscpy 797a84e134Smrg( 807a84e134Smrg wchar_t *wstr1, 817a84e134Smrg wchar_t *wstr2 827a84e134Smrg ); 837a84e134Smrg 847a84e134Smrg#define wcscpy(d,s) _Xwcscpy(d,s) 857a84e134Smrg 867a84e134Smrgwchar_t *_Xwcsncpy 877a84e134Smrg( 887a84e134Smrg wchar_t *wstr1, 897a84e134Smrg wchar_t *wstr2, 907a84e134Smrg int len 917a84e134Smrg ); 927a84e134Smrg 937a84e134Smrg#define wcsncpy(d, s, l) _Xwcsncpy(d, s, l) 947a84e134Smrg 957a84e134Smrg#ifdef USE_XMBTOWC 967a84e134Smrg#define mbtowc(wc, s, l) _Xmbtowc(wc, s, l) 977a84e134Smrg#endif 987a84e134Smrg#endif 997a84e134Smrg 1007a84e134Smrgwchar_t _Xaw_atowc 1017a84e134Smrg( 1027a84e134Smrg#if NeedWidePrototypes 1037a84e134Smrg int c 1047a84e134Smrg#else 1057a84e134Smrg unsigned char c 1067a84e134Smrg#endif 1077a84e134Smrg ); 1087a84e134Smrg 1097a84e134Smrg#ifndef HAS_ISW_FUNCS 1107a84e134Smrg#include <ctype.h> 1117a84e134Smrg#ifndef iswspace 1127a84e134Smrg#define iswspace(c) (isascii(c) && isspace(toascii(c))) 1137a84e134Smrg#endif 1147a84e134Smrg#endif 1157a84e134Smrg 1167a84e134Smrg#if !defined(iswalnum) && !defined(HAVE_ISWALNUM) 1177a84e134Smrg#define iswalnum(c) _Xaw_iswalnum(c) 1187a84e134Smrgint _Xaw_iswalnum 1197a84e134Smrg( 1207a84e134Smrg wchar_t c 1217a84e134Smrg ); 1227a84e134Smrg#endif 123