home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / linuxdoc-sgml-1.1 / sgmls-1.1 / sgmlaux.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  2.3 KB  |  71 lines

  1. /* This file controls the interface between the parser core and the auxiliary
  2. functions in entgen.c, sgmlio.c, and sgmlmsg.c */
  3.  
  4. #include "std.h"
  5. #include "entity.h"
  6. #include "sgmldecl.h"
  7.  
  8. /* Error types (ERRTYPE) for calls to error-handling services
  9.    performed for SGML by the text processor (SGMLIO).
  10.    NOTE: Strings in these blocks have no lengths, but cannot exceed
  11.    NAMELEN (plus 1 more byte for the zero terminator).
  12. */
  13. #define FILERR    0           /* Error: file access. */
  14. #define DOCERR    1           /* Error: in document markup. */
  15. #define MDERR     2           /* Error: in markup declaration with subdcl. */
  16. #define MDERR2    3           /* Error: in markup declaration with no subdcl. */
  17. #define EXITERR   4           /* Error: terminal error in document markup. */
  18. /* Quantities affecting error messages and their arguments.
  19. */
  20. #define MAXARGS    2          /* Maximum number of arguments in a msg. */
  21.  
  22. /* NOTE: Error handler must return, or next call to SGML must be RSET or END,
  23.          except for EXITERR errors which must not return.
  24. */
  25. struct error {                /* IPB for error messages. */
  26.      UNS errtype;             /* Type of error: DOC, MD, MD2, FIL. */
  27.      UNS errnum;              /* Error number. */
  28.      UNS errsp;               /* Special parameter index in message file. */
  29.      int sverrno;          /* Saved value of errno. */
  30.      int parmno;              /* MDERROR: declaration parameter number. */
  31.      UNCH *subdcl;          /* MDERROR: subject of declaration. */
  32.      UNIV eparm[MAXARGS];     /* Ptrs to arguments (no length, but EOS). */
  33. };
  34.  
  35. struct location {
  36.      int filesw;
  37.      unsigned long rcnt;
  38.      int ccnt;
  39.      UNCH curchar;
  40.      UNCH nextchar;
  41.      UNCH *ename;
  42.      UNIV fcb;
  43. };
  44.  
  45. int ioopen P((UNIV, UNIV*));
  46. VOID ioclose P((UNIV));
  47. int ioread P((UNIV, UNCH *, int *));
  48. VOID iopend P((UNIV, int, UNCH *));
  49. int iocont P((UNIV));
  50. VOID ioinit P((struct switches *));
  51. char *ioflid P((UNIV));
  52.  
  53. UNIV entgen P((struct fpi *));
  54.  
  55. VOID msgprint P((struct error *));
  56. VOID msginit P((struct switches *));
  57. UNIV msgsave P((struct error *));
  58. VOID msgsprint P((UNIV));
  59. VOID msgsfree P((UNIV));
  60. int msgcnterr P((void));
  61.  
  62.  
  63. int inprolog P((void));
  64. UNCH *getgi P((int));
  65.  
  66. int getlocation P((int, struct location *));
  67. UNIV rmalloc P((unsigned int));
  68. UNIV rrealloc P((UNIV, UNS));
  69. VOID frem P((UNIV));
  70. VOID exiterr P((unsigned int,struct parse *));
  71.