Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtdocbook / sgmls / sgmldecl.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: sgmldecl.h /main/3 1996/06/19 17:17:34 drk $ */
24 /* sgmldecl.h: SGML declaration parsing. */
25
26 #define QATTCNT 0 
27 #define QATTSPLEN 1 
28 #define QBSEQLEN 2 
29 #define QDTAGLEN 3 
30 #define QDTEMPLEN 4 
31 #define QENTLVL 5 
32 #define QGRPCNT 6 
33 #define QGRPGTCNT 7 
34 #define QGRPLVL 8 
35 #define QLITLEN 9 
36 #define QNAMELEN 10
37 #define QNORMSEP 11
38 #define QPILEN 12
39 #define QTAGLEN 13
40 #define QTAGLVL 14
41
42 #define NQUANTITY (QTAGLVL+1)
43
44 #define TOTALCAP 0 
45 #define ENTCAP 1 
46 #define ENTCHCAP 2 
47 #define ELEMCAP 3 
48 #define GRPCAP 4 
49 #define EXGRPCAP 5 
50 #define EXNMCAP 6 
51 #define ATTCAP 7 
52 #define ATTCHCAP 8 
53 #define AVGRPCAP 9 
54 #define NOTCAP 10
55 #define NOTCHCAP 11
56 #define IDCAP 12
57 #define IDREFCAP 13
58 #define MAPCAP 14
59 #define LKSETCAP 15
60 #define LKNMCAP 16
61
62 extern char *captab[];
63
64 struct sgmldecl {
65      long capacity[NCAPACITY];
66      long subdoc;
67      UNCH formal;
68      UNCH omittag;
69      UNCH shorttag;
70      UNCH shortref;
71      UNCH namecase[2];          /* case translation of general/entity names */
72      int quantity[NQUANTITY];
73 };
74
75 extern struct sgmldecl sd;
76
77 #define OMITTAG (sd.omittag)
78 #define SUBDOC (sd.subdoc)
79 #define SHORTTAG (sd.shorttag)
80 #define FORMAL (sd.formal)
81
82 #define ATTCNT (sd.quantity[QATTCNT])
83 #define ATTSPLEN (sd.quantity[QATTSPLEN])
84 #define BSEQLEN (sd.quantity[QBSEQLEN])
85 #define ENTLVL (sd.quantity[QENTLVL])
86 #define GRPGTCNT (sd.quantity[QGRPGTCNT])
87 #define GRPCNT (sd.quantity[QGRPCNT])
88 #define GRPLVL (sd.quantity[QGRPLVL])
89 #define LITLEN (sd.quantity[QLITLEN])
90 #define NAMELEN (sd.quantity[QNAMELEN])
91 #define NORMSEP (sd.quantity[QNORMSEP])
92 #define PILEN (sd.quantity[QPILEN])
93 #define TAGLEN (sd.quantity[QTAGLEN])
94 #define TAGLVL (sd.quantity[QTAGLVL])
95
96 #define NAMECASE (sd.namecase[0])
97 #define ENTCASE (sd.namecase[1])
98
99 #define YES 1
100 #define NO 0
101
102 #define UNUSED -1
103 #define UNKNOWN -2
104 #define UNDESC -3
105 #define UNKNOWN_SET -4
106
107 extern int asciicharset[];