2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /* $XConsortium: sgmlaux.h /main/3 1996/06/19 17:17:25 drk $ */
24 /* This file controls the interface between the parser core and the auxiliary
25 functions in entgen.c, sgmlio.c, and sgmlmsg.c */
31 /* Error types (ERRTYPE) for calls to error-handling services
32 performed for SGML by the text processor (SGMLIO).
33 NOTE: Strings in these blocks have no lengths, but cannot exceed
34 NAMELEN (plus 1 more byte for the zero terminator).
36 #define FILERR 0 /* Error: file access. */
37 #define DOCERR 1 /* Error: in document markup. */
38 #define MDERR 2 /* Error: in markup declaration with subdcl. */
39 #define MDERR2 3 /* Error: in markup declaration with no subdcl. */
40 #define EXITERR 4 /* Error: terminal error in document markup. */
41 /* Quantities affecting error messages and their arguments.
43 #define MAXARGS 2 /* Maximum number of arguments in a msg. */
45 /* NOTE: Error handler must return, or next call to SGML must be RSET or END,
46 except for EXITERR errors which must not return.
48 struct error { /* IPB for error messages. */
49 UNS errtype; /* Type of error: DOC, MD, MD2, FIL. */
50 UNS errnum; /* Error number. */
51 UNS errsp; /* Special parameter index in message file. */
52 int sverrno; /* Saved value of errno. */
53 int parmno; /* MDERROR: declaration parameter number. */
54 UNCH *subdcl; /* MDERROR: subject of declaration. */
55 UNIV eparm[MAXARGS]; /* Ptrs to arguments (no length, but EOS). */
68 int ioopen P((UNIV, UNIV*));
69 VOID ioclose P((UNIV));
70 int ioread P((UNIV, UNCH *, int *));
71 VOID iopend P((UNIV, int, UNCH *));
73 VOID ioinit P((struct switches *));
74 char *ioflid P((UNIV));
76 UNIV entgen P((struct fpi *));
78 VOID msgprint P((struct error *));
79 VOID msginit P((struct switches *));
80 UNIV msgsave P((struct error *));
81 VOID msgsprint P((UNIV));
82 VOID msgsfree P((UNIV));
83 int msgcnterr P((void));
86 int inprolog P((void));
89 int getlocation P((int, struct location *));
90 UNIV rmalloc P((unsigned int));
91 UNIV rrealloc P((UNIV, UNS));
93 VOID exiterr P((unsigned int,struct parse *));