Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / programs / dthelp / parser / pass2 / util / basic.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: basic.h /main/3 1995/11/08 11:02:02 rswiston $ */
24 /* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
25 /* Basic.h has a few very primitive #define's used by all MARKUP programs */
26 #include <stdlib.h>
27
28 /* hpux protects stdio.h from multiple includes thru stdlib.h . */
29 #include <stdio.h>
30
31 #define TRUE 1
32 #define FALSE 0
33 typedef unsigned char LOGICAL;
34
35 /* End of String marker */
36 #define M_EOS '\0'
37
38 /* Integer null value marker */
39 #define M_NULLVAL 0
40
41 /* 8-bit data characters */
42 typedef unsigned char M_CHAR8;
43
44 /* wide characters */
45 typedef wchar_t M_WCHAR;
46
47 /* For function prototypes */
48 typedef char * M_POINTER;
49
50 char *MakeMByteString(const M_WCHAR *from);
51
52 M_WCHAR *MakeWideCharString(const char *from);
53
54 int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
55
56 int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max);
57
58 M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
59
60 M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
61
62 int w_strlen(const M_WCHAR *string);
63
64 M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
65
66 M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
67
68 void *m_malloc(int size, char *msg);
69
70 void m_free(void *block, char *msg);
71
72 void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
73
74 int mb_getwc(void *m_ptr);