xref: /onnv-gate/usr/src/cmd/man/src/util/nsgmls.src/include/types.h (revision 0:68f95e015346)
1 // Copyright (c) 1994 James Clark
2 // See the file COPYING for copying permission.
3 #pragma ident	"%Z%%M%	%I%	%E% SMI"
4 
5 #ifndef types_INCLUDED
6 #define types_INCLUDED 1
7 
8 #include <limits.h>
9 #include <stddef.h>
10 
11 #ifdef SP_NAMESPACE
12 namespace SP_NAMESPACE {
13 #endif
14 
15 #if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
16 typedef unsigned int Unsigned32;
17 #else
18 typedef unsigned long Unsigned32;
19 #endif
20 
21 // Number holds values between 0 and 99999999 (eight nines).
22 typedef Unsigned32 Number;
23 typedef Unsigned32 Offset;
24 typedef Unsigned32 Index;
25 
26 #ifdef SP_MULTI_BYTE
27 
28 #ifdef SP_WCHAR_T_USHORT
29 typedef wchar_t Char;
30 #else
31 typedef unsigned short Char;
32 #endif
33 
34 #if INT_MAX > 65535L
35 typedef int Xchar;
36 #else /* INT_MAX <= 65535L */
37 typedef long Xchar;
38 #endif /* INT_MAX <= 65535L */
39 
40 #else /* not SP_MULTI_BYTE */
41 
42 typedef unsigned char Char;
43 // This holds any value of type Char plus InputSource:eE (= -1).
44 typedef int Xchar;
45 
46 #endif /* not SP_MULTI_BYTE */
47 
48 typedef Unsigned32 UnivChar;
49 typedef Unsigned32 WideChar;
50 
51 // A character in a syntax reference character set.
52 // We might want to compile with wide syntax reference characters
53 // (since they're cheap) but not with wide document characters.
54 typedef Unsigned32 SyntaxChar;
55 
56 typedef unsigned short CharClassIndex;
57 
58 typedef unsigned Token;
59 
60 #ifdef SP_MULTI_BYTE
61 typedef unsigned short EquivCode;
62 #else
63 typedef unsigned char EquivCode;
64 #endif
65 
66 #ifdef SP_NAMESPACE
67 }
68 #endif
69 
70 #endif /* not types_INCLUDED */
71