home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / sgml / msdos / sgml07 / sgmldecl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-09  |  1.6 KB  |  84 lines

  1. /* sgmldecl.h: SGML declaration parsing. */
  2.  
  3. enum quantity {
  4.      QATTCNT,
  5.      QATTSPLEN,
  6.      QBSEQLEN,
  7.      QDTAGLEN,
  8.      QDTEMPLEN,
  9.      QENTLVL,
  10.      QGRPCNT,
  11.      QGRPGTCNT,
  12.      QGRPLVL,
  13.      QLITLEN,
  14.      QNAMELEN,
  15.      QNORMSEP,
  16.      QPILEN,
  17.      QTAGLEN,
  18.      QTAGLVL
  19. };
  20.  
  21. #define NQUANTITY ((int)(QTAGLVL+1))
  22.  
  23. enum capacity {
  24.      TOTALCAP,
  25.      ENTCAP,
  26.      ENTCHCAP,
  27.      ELEMCAP,
  28.      GRPCAP,
  29.      EXGRPCAP,
  30.      EXNMCAP,
  31.      ATTCAP,
  32.      ATTCHCAP,
  33.      AVGRPCAP,
  34.      NOTCAP,
  35.      NOTCHCAP,
  36.      IDCAP,
  37.      IDREFCAP,
  38.      MAPCAP,
  39.      LKSETCAP,
  40.      LKNMCAP
  41. };
  42.  
  43. extern char *captab[];
  44.  
  45.  
  46. struct sgmldecl {
  47.      long capacity[NCAPACITY];
  48.      long subdoc;
  49.      UNCH formal;
  50.      UNCH omittag;
  51.      UNCH shorttag;
  52.      UNCH shortref;
  53.      UNCH namecase[2];        /* case translation of general/entity names */
  54.      int quantity[NQUANTITY];
  55. };
  56.  
  57. extern struct sgmldecl sd;
  58. extern UNCH appinfo[];
  59.  
  60. #define OMITTAG (sd.omittag)
  61. #define SUBDOC (sd.subdoc)
  62. #define SHORTTAG (sd.shorttag)
  63. #define FORMAL (sd.formal)
  64.  
  65. #define ATTCNT (sd.quantity[QATTCNT])
  66. #define ATTSPLEN (sd.quantity[QATTSPLEN])
  67. #define BSEQLEN (sd.quantity[QBSEQLEN])
  68. #define ENTLVL (sd.quantity[QENTLVL])
  69. #define GRPGTCNT (sd.quantity[QGRPGTCNT])
  70. #define GRPCNT (sd.quantity[QGRPCNT])
  71. #define GRPLVL (sd.quantity[QGRPLVL])
  72. #define LITLEN (sd.quantity[QLITLEN])
  73. #define NAMELEN (sd.quantity[QNAMELEN])
  74. #define NORMSEP (sd.quantity[QNORMSEP])
  75. #define PILEN (sd.quantity[QPILEN])
  76. #define TAGLEN (sd.quantity[QTAGLEN])
  77. #define TAGLVL (sd.quantity[QTAGLVL])
  78.  
  79. #define NAMECASE (sd.namecase[0])
  80. #define ENTCASE (sd.namecase[1])
  81.  
  82. #define YES 1
  83. #define NO 0
  84.