2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: DtNlUtils.h /main/4 1996/06/21 17:22:30 ageorge $ */
25 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
26 * (c) Copyright 1993, 1994 International Business Machines Corp. *
27 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
28 * (c) Copyright 1993, 1994 Novell, Inc. *
30 /**************************************************************************/
32 /* Public include file for Dt localization functions. */
34 /**************************************************************************/
46 #include <X11/Intrinsic.h>
51 #define is_multibyte _DtNl_is_multibyte
52 extern Boolean _DtNl_is_multibyte;
55 extern void Dt_nlInit( void ) ;
56 extern char * Dt_strtok(
59 extern char * Dt_strtok_r(
66 extern int Dt_strcspn(
69 extern char * Dt_strchr(
72 extern char * Dt_strrchr(
75 extern void Dt_lastChar(
79 extern int Dt_charCount(
82 extern char * _Dt_NextChar(char *s);
83 extern char * _Dt_PrevChar(const char *start,char *s);
84 extern int _Dt_isspace(char *s);
85 extern int _Dt_isdigit(char *s);
87 #define DtNlInitialize() (Dt_nlInit())
88 #define DtStrtok(s1, s2) (Dt_strtok(s1, s2))
89 #define DtStrtok_r(s1, s2, ptr) (Dt_strtok_r(s1, s2, ptr))
90 #define DtStrspn(s1, s2) (Dt_strspn(s1, s2))
91 #define DtStrcspn(s1, s2) (Dt_strcspn(s1, s2))
92 #define DtStrchr(s1, c) (Dt_strchr(s1, c))
93 #define DtStrrchr(s1, c) (Dt_strrchr(s1, c))
94 #define DtLastChar(s1, cp, lp) (Dt_lastChar(s1, cp, lp))
95 #define DtCharCount(s1) (Dt_charCount(s1))
96 #define DtNextChar(s) (is_multibyte?_Dt_NextChar(s):((s)+1))
97 #define DtPrevChar(st,s) (is_multibyte?_Dt_PrevChar(st,s):((s)-1))
98 #define DtIsspace(s) (is_multibyte?_Dt_isspace(s):isspace(*(s)))
99 #define DtIsdigit(s) (is_multibyte?_Dt_isdigit(s):isdigit(*(s)))
103 #define DtNlInitialize()
104 #define DtStrtok(s1, s2) (strtok(s1, s2))
105 #define DtStrtok_r(s1, s2, ptr) (strtok_r(s1, s2, ptr))
106 #define DtStrspn(s1, s2) (strspn(s1, s2))
107 #define DtStrcspn(s1, s2) (strcspn(s1, s2))
108 #define DtStrchr(s1, c) (strchr(s1, c))
109 #define DtStrrchr(s1, c) (strrchr(s1, c))
110 #define DtLastChar(s1, cp, lp) {(*cp = s1 + strlen(s1) - 1); *lp = 1;}
111 #define DtCharCount(s1) (strlen(s1))
112 #define DtNextChar(s) ((s)+1)
113 #define DtPrevChar(st,s) ((s)-1)
114 #define DtIsspace(s) (isspace(*s))
115 #define DtIsdigit(s) (isdigit(*s))
118 extern char * _DtGetNthChar(
121 extern char * _dt_strpbrk(
124 extern int _is_previous_single(