home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 10 / Fresh_Fish_10_2352.bin / new / dev / lang / sgmls / src / sgmlxtrn.h < prev    next >
C/C++ Source or Header  |  1994-07-10  |  8KB  |  124 lines

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