Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / nsgmls / types.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 librararies 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: types.h /main/1 1996/07/29 17:10:18 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
26
27 #ifndef types_INCLUDED
28 #define types_INCLUDED 1
29
30 #include <limits.h>
31 #include <stddef.h>
32
33 #ifdef SP_NAMESPACE
34 namespace SP_NAMESPACE {
35 #endif
36
37 #if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
38 typedef unsigned int Unsigned32;
39 #else
40 typedef unsigned long Unsigned32;
41 #endif
42
43 // Number holds values between 0 and 99999999 (eight nines).
44 typedef Unsigned32 Number;
45 typedef Unsigned32 Offset;
46 typedef Unsigned32 Index;
47
48 #ifdef SP_MULTI_BYTE
49
50 #ifdef SP_WCHAR_T_USHORT
51 typedef wchar_t Char;
52 #else
53 typedef unsigned short Char;
54 #endif
55
56 #if INT_MAX > 65535L
57 typedef int Xchar;
58 #else /* INT_MAX <= 65535L */
59 typedef long Xchar;
60 #endif /* INT_MAX <= 65535L */
61
62 #else /* not SP_MULTI_BYTE */
63
64 typedef unsigned char Char;
65 // This holds any value of type Char plus InputSource:eE (= -1).
66 typedef int Xchar;
67
68 #endif /* not SP_MULTI_BYTE */
69
70 typedef Unsigned32 UnivChar;
71 typedef Unsigned32 WideChar;
72
73 // A character in a syntax reference character set.
74 // We might want to compile with wide syntax reference characters
75 // (since they're cheap) but not with wide document characters.
76 typedef Unsigned32 SyntaxChar;
77
78 typedef unsigned short CharClassIndex;
79
80 typedef unsigned Token;
81
82 #ifdef SP_MULTI_BYTE
83 typedef unsigned short EquivCode;
84 #else
85 typedef unsigned char EquivCode;
86 #endif
87
88 #ifdef SP_NAMESPACE
89 }
90 #endif
91
92 #endif /* not types_INCLUDED */