Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtdocbook / sgmls / sgmlxtrn.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: sgmlxtrn.h /main/3 1996/06/19 17:18:25 drk $ */
24 /* SGMLXTRN.H: External declarations for SGML public variables.
25                Exceptions: Constants lex????? and del????? are defined in
26                LEX?????.C modules; constants pcb????? are defined in PCB?????.c.
27 */
28 #ifndef SGMLXTRN              /* Don't include this file more than once. */
29 #define SGMLXTRN
30 extern int badresw;           /* 1=REF_ out of context; 0=valid. */
31 extern int charmode;          /* >0=in #CHARS; 0=not. */
32 extern int conactsw;          /* 1=return saved content action 0=get new one.*/
33 extern int conrefsw;          /* 1=content reference att specified; 0=no. */
34 extern int contersv;          /* Save contersw while processing pending REF. */
35 extern int contersw;          /* 1=element or #CHARS out of context; 0=valid. */
36 extern int datarc;            /* Return code for data: DAF_ or REF_. */
37 extern int delmscsw;          /* 1=DELMSC must be read on return to es==0. */
38 extern int didreq;            /* 1=required implied tag processed; 0=no. */
39 extern int dostag;            /* 1=retry newetd instead of parsing; 0=parse. */
40 extern int dtdsw;             /* DOCTYPE declaration found: 1=yes; 0=no. */
41 extern int entdatsw;          /* 2=CDATA entity; 4=SDATA; 8=NDATA; 0=none. */
42 extern int entpisw;           /* 4=PI entity occurred; 0=not. */
43 extern int eodsw;             /* 1=eod found in error; 0=not yet. */
44 extern int eofsw;             /* 1=eof found in body of document; 0=not yet. */
45 extern int etagimct;          /* Implicitly ended elements left on stack. */
46 extern int etagimsw;          /* 1=end-tag implied by other end-tag; 0=not. */
47 extern int etagmin;           /* Minim: NONE NULL NET DATA; implied by S/ETAG*/
48 extern int etictr;            /* Number of "NET enabled" tags on stack. */
49 extern int etisw;             /* 1=tag ended with eti; 0=did not. */
50 extern int indtdsw;           /* Are we in the DTD? 1=yes; 0=no. */
51 extern int mslevel;           /* Nesting level of marked sections. */
52 extern int msplevel;          /* Nested MS levels subject to special parse. */
53 extern int prologsw;          /* 1=in prolog; 0=not. */
54 extern int pss;               /* SGMLACT: scbsgml stack level. */
55 extern int sgmlsw;            /* SGML declaration found: 1=yes; 0=no. */
56 extern int stagmin;           /* Minimization: NONE, NULL tag, implied by STAG*/
57 extern int tagctr;            /* Tag source chars read. */
58 extern int ts;                /* Index of current tag in stack. */
59 extern struct parse *propcb;  /* Current PCB for prolog parse. */
60 extern int aentctr;           /* Number of ENTITY tokens in this att list. */
61 extern int conact;            /* Return code from content parse. */
62 extern int conrefsv;          /* Save conrefsw when doing implied start-tag.*/
63 extern int dtdrefsw;          /* External DTD? 1=yes; 0=no. */
64 extern int etiswsv;           /* Save etisw when processing implied start-tag.*/
65 extern int grplvl;            /* Current level of nested grps in model. */
66 extern int idrctr;            /* Number of IDREF tokens in this att list. */
67 extern int mdessv;            /* ES level at start of markup declaration. */
68 extern int notadn;            /* Position of NOTATION attribute in list. */
69 extern int parmno;            /* Current markup declaration parameter number. */
70 extern int pexsw;             /* 1=tag valid solely because of plus exception.*/
71 extern int rcessv;            /* ES level at start of RCDATA content. */
72 extern int tagdelsw;          /* 1=tag ended with delimiter; 0=no delimiter. */
73 extern int tokencnt;          /* Number of tokens found in attribute value. */
74 extern struct entity *ecbdeflt;  /* #DEFAULT ecb (NULL if no default entity). */
75 extern struct etd *docetd;    /* The etd for the document as a whole. */
76 extern struct etd *etagreal;  /* Actual or dummy etd that implied this tag. */
77 extern struct etd *newetd;    /* The etd for a start- or end-tag recognized. */
78 extern struct etd *nextetd;   /* ETD that must come next (only one choice). */
79 extern struct etd *stagreal;  /* Actual or dummy etd that implied this tag. */
80 extern struct parse *conpcb;  /* Current PCB for content parse. */
81 extern UNCH *data;            /* Pointer to returned data in buffer. */
82 extern UNCH *mdname;          /* Name of current markup declaration. */
83 extern UNCH *ptcon;           /* Current pointer into tbuf. */
84 extern UNCH *ptpro;           /* Current pointer into tbuf. */
85 extern UNCH *rbufs;           /* DOS file read area: start position for read. */
86 extern UNCH *subdcl;          /* Subject of markup declaration (e.g., GI). */
87 extern int Tstart;            /* Save starting token for AND group testing. */
88 extern UNS conradn;           /* 1=CONREF attribute in list (0=no). */
89 extern UNS datalen;           /* Length of returned data in buffer. */
90 extern UNS entlen;            /* Length of TAG or EXTERNAL entity text. */
91 extern UNS idadn;             /* Number of ID attribute (0 if none). */
92 extern UNS noteadn;           /* Number of NOTATION attribute (0 if none). */
93 extern UNS reqadn;            /* Num of atts with REQUIRED default (0=none). */
94 extern int grplongs;          /* Number of longs for GRPCNT bitvector. */
95 /* Variable arrays and structures.
96 */
97 extern struct ad *al;        /* Current attribute list work area. */
98 extern struct dcncb *dcntab[];/* List of data content notation names. */
99 extern struct entity *etab[]; /* Entity hash table. */
100 extern struct etd *etdtab[];  /* Element type definition hash table. */
101 extern struct fpi fpidf;      /* Fpi for #DEFAULT entity. */
102 extern struct id *itab[];     /* Unique identifier hash table. */
103 extern struct etd **nmgrp;    /* Element name group */
104 extern PDCB *nnmgrp;          /* Notation name group */
105 extern struct restate *scbsgml;  /* SGMLACT: return action state stack. */
106 extern struct srh *srhtab[];  /* List of SHORTREF table headers. */
107 extern struct sgmlstat ds;    /* Document statistics. */
108 extern struct switches sw;    /* Parser control switches set by text proc. */
109 extern struct tag *tags;     /* Stack of open elements ("tag stack"). */
110 extern struct thdr *gbuf;    /* Buffer for creating group. */
111 extern struct thdr prcon[];   /* 0-2: Model for *DOC content. */
112 extern struct thdr undechdr;  /* 0: Default model hdr for undeclared content. */
113 extern UNCH *dtype;           /* Document type name. */
114 extern UNCH *entbuf;          /* Buffer for entity reference name. */
115 extern UNCH fce[];            /* String form of FCE char (fce[1] must be EOS).*/
116 extern UNCH nonchbuf[];       /* Buffer for valid nonchar character reference.*/
117 extern UNCH *tbuf;           /* Work area for tokenization. */
118 extern UNCH *lbuf;            /* In tbuf: Literal parse area; TAGLEN limit.*/
119 extern struct entity *dumpecb; /* SRMNULL points to this. */
120 extern UNCH *sysibuf;
121 extern UNCH *pubibuf;
122 extern UNCH *nmbuf;            /* Name buffer used by mdentity. */
123 extern struct mpos *savedpos;
124
125 /* Constants.
126 */
127 extern int scbsgmnr;          /* SCBSGML: new record; do not ignore RE. */
128 extern int scbsgmst;          /* SCBSGML: trailing stag or markup; ignore RE. */
129 extern struct map dctab[];    /* Keywords for declared content parameter. */
130 extern struct map deftab[];   /* Default value keywords. */
131 extern struct map dvtab[];    /* Declared value: keywords and type codes.*/
132 extern struct map enttab[];   /* Entity declaration second parameter. */
133 extern struct map exttab[];   /* Keywords for external identifier. */
134 extern struct map extettab[]; /* Keywords for external entity type. */
135 extern struct map funtab[];   /* Function character reference names. */
136 extern struct map mstab[];    /* Marked section keywords. */
137 extern struct map pubcltab[]; /* Keywords for public text class. */
138 extern UNCH indefent[];       /* Internal name: default entity name. */
139 extern UNCH indefetd[];       /* Internal name: default document type. */
140 extern UNCH indocent[];       /* Internal name: SGML document entity. */
141 extern UNCH indocetd[];       /* Internal name: etd for document as a whole. */
142 extern UNCH indtdent[];       /* Internal name: external DTD entity. */
143 extern char license[];        /* SGML Users' Group free license. */
144 #endif /* ndef SGMLXTRN */