Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dthelp / parser / pass2 / util / basic.h
1 /* $XConsortium: basic.h /main/3 1995/11/08 11:02:02 rswiston $ */
2 /* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
3 /* Basic.h has a few very primitive #define's used by all MARKUP programs */
4 #include <stdlib.h>
5
6 /* hpux protects stdio.h from multiple includes thru stdlib.h . */
7 #include <stdio.h>
8
9 #define TRUE 1
10 #define FALSE 0
11 typedef unsigned char LOGICAL;
12
13 /* End of String marker */
14 #define M_EOS '\0'
15
16 /* Integer null value marker */
17 #define M_NULLVAL 0
18
19 /* 8-bit data characters */
20 typedef unsigned char M_CHAR8;
21
22 /* wide characters */
23 typedef wchar_t M_WCHAR;
24
25 /* For function prototypes */
26 typedef char * M_POINTER;
27 #if defined(hpux) || defined(__aix) || defined(sun) || defined(USL) || defined(__uxp__)
28 /* Old unix stuff
29  *#define void int
30  *#define M_NOPAR
31  */
32 /* New Ansi style */
33 #define M_PROTO
34 #define M_NOPAR void
35 #else
36 #define M_PROTO
37 #define M_NOPAR void
38 #endif
39
40 char *MakeMByteString(
41 #if defined(M_PROTO)
42   const M_WCHAR *from
43 #endif
44   );
45
46 M_WCHAR *MakeWideCharString(
47 #if defined(M_PROTO)
48   const char *from
49 #endif
50   );
51
52 int w_strcmp(
53 #if defined(M_PROTO)
54   const M_WCHAR *string1, const M_WCHAR *string2
55 #endif
56   );
57
58 int w_strncmp(
59 #if defined(M_PROTO)
60   const M_WCHAR *string1, const M_WCHAR *string2, int max
61 #endif
62   );
63
64 M_WCHAR *w_strcpy(
65 #if defined(M_PROTO)
66   M_WCHAR *string1, const M_WCHAR *string2
67 #endif
68   );
69
70 M_WCHAR *w_strncpy(
71 #if defined(M_PROTO)
72   M_WCHAR *string1, const M_WCHAR *string2, int max
73 #endif
74   );
75
76 int w_strlen(
77 #if defined(M_PROTO)
78   const M_WCHAR *string
79 #endif
80   );
81
82 M_WCHAR *w_strchr(
83 #if defined(M_PROTO)
84   M_WCHAR *string, const M_WCHAR chr
85 #endif
86   );
87
88 M_WCHAR *w_strstr(
89 #if defined(M_PROTO)
90   M_WCHAR *string1, M_WCHAR *string2
91 #endif
92   );