xref: /netbsd/external/gpl2/texinfo/dist/makeinfo/xml.h (revision dc174305)
1 /*	$NetBSD: xml.h,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $	*/
2 
3 /* xml.h -- xml output declarations.
4    Id: xml.h,v 1.24 2004/11/26 00:48:35 karl Exp
5 
6    Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7 
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2, or (at your option)
11    any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 
22    Originally written by Philippe Martin <feloy@free.fr>.  */
23 
24 #ifndef XML_H
25 #define XML_H
26 
27 /* Options. */
28 
29 /* Separate index entries into divisions for each letters. */
30 extern int xml_index_divisions;
31 extern int xml_sort_index;
32 
33 extern int xml_no_indent;
34 
35 extern int xml_node_open;
36 extern int xml_no_para;
37 extern char *xml_node_id;
38 extern int xml_last_section_output_position;
39 
40 extern int xml_in_xref_token;
41 extern int xml_in_bookinfo;
42 extern int xml_in_book_title;
43 extern int xml_in_abstract;
44 
45 /* Non-zero if we are handling an element that can appear between
46    @item and @itemx, @deffn and @deffnx.  */
47 extern int xml_dont_touch_items_defs;
48 
49 /* Non-zero if whitespace in the source document should be kept as-is.  */
50 extern int xml_keep_space;
51 
52 enum xml_element
53 {
54   TEXINFO=0, SETFILENAME, TITLEFONT, SETTITLE, DOCUMENTDESCRIPTION,
55   /* Node */
56   NODE, NODENEXT, NODEPREV, NODEUP,
57   /* Structuring */
58   CHAPTER, SECTION, SUBSECTION, SUBSUBSECTION,
59   TOP, UNNUMBERED, UNNUMBEREDSEC, UNNUMBEREDSUBSEC,
60     UNNUMBEREDSUBSUBSEC,
61   APPENDIX, APPENDIXSEC, APPENDIXSUBSEC, APPENDIXSUBSUBSEC,
62   MAJORHEADING, CHAPHEADING, HEADING, SUBHEADING, SUBSUBHEADING,
63   /* Titlepage */
64   TITLEPAGE, AUTHOR, BOOKTITLE, BOOKSUBTITLE,
65   /* Menu */
66   MENU, DETAILMENU, MENUENTRY, MENUTITLE, MENUCOMMENT, MENUNODE,
67   NODENAME,
68   /* -- */
69   ACRONYM, ACRONYMWORD, ACRONYMDESC,
70   ABBREV, ABBREVWORD, ABBREVDESC,
71   TT, CODE, COMMAND_TAG, ENV, FILE_TAG, OPTION, SAMP, KBD, URL, KEY,
72   VAR, SC, DFN, EMPH, STRONG, CITE, NOTFIXEDWIDTH, I, B, R, SLANTED, SANSSERIF,
73   EXDENT,
74   TITLE,
75   IFINFO,
76   SP, CENTER,
77   DIRCATEGORY,
78   QUOTATION, EXAMPLE, SMALLEXAMPLE, LISP, SMALLLISP, CARTOUCHE,
79     COPYING, FORMAT, SMALLFORMAT, DISPLAY, SMALLDISPLAY, VERBATIM,
80   FOOTNOTE, LINEANNOTATION,
81   TIP, NOTE, IMPORTANT, WARNING, CAUTION,
82   ITEMIZE, ITEMFUNCTION, ITEM, ENUMERATE, TABLE, TABLEITEM, TABLETERM,
83   INDEXTERM,
84   MATH, DIMENSION,
85   XREF, XREFNODENAME, XREFINFONAME, XREFPRINTEDDESC, XREFINFOFILE,
86     XREFPRINTEDNAME,
87   INFOREF, INFOREFNODENAME, INFOREFREFNAME, INFOREFINFONAME,
88   UREF, UREFURL, UREFDESC, UREFREPLACEMENT,
89   EMAIL, EMAILADDRESS, EMAILNAME,
90   GROUP, FLOAT, FLOATTYPE, FLOATPOS, CAPTION, SHORTCAPTION,
91   FLOATTABLE, FLOATFIGURE, FLOATEXAMPLE, FLOATCARTOUCHE,
92   PRINTINDEX, LISTOFFLOATS,
93   ANCHOR,
94   IMAGE, INLINEIMAGE, IMAGEALTTEXT,
95   PRIMARY, SECONDARY, INFORMALFIGURE, MEDIAOBJECT, IMAGEOBJECT,
96     IMAGEDATA, TEXTOBJECT,
97   INDEXENTRY, PRIMARYIE, SECONDARYIE, INDEXDIV,
98   MULTITABLE, TGROUP, COLSPEC, THEAD, TBODY, ENTRY, ROW,
99   BOOKINFO, ABSTRACT, REPLACEABLE, ENVAR, COMMENT, FUNCTION, LEGALNOTICE,
100   CONTENTS, SHORTCONTENTS, DOCUMENTLANGUAGE,
101   SETVALUE, CLEARVALUE,
102   DEFINITION, DEFINITIONTERM, DEFINITIONITEM,
103   DEFCATEGORY, DEFFUNCTION, DEFVARIABLE, DEFPARAM, DEFDELIMITER, DEFTYPE,
104   DEFPARAMTYPE, DEFDATATYPE, DEFCLASS, DEFCLASSVAR, DEFOPERATION,
105   PARA
106 };
107 
108 extern void xml_add_char (int character),
109   xml_asterisk (void),
110   xml_insert_element (int elt, int arg),
111   xml_insert_entity (char *entity_name),
112   xml_insert_footnote (char *note),
113   xml_insert_quotation (char *type, int arg),
114   xml_insert_indexentry (char *entry, char *node),
115   xml_insert_indexterm (char *indexterm, char *index),
116   xml_insert_docbook_image (char *name_arg),
117   xml_synindex (char *from, char *to),
118   xml_start_para (void),
119   xml_end_para (void),
120   xml_begin_document (char *output_filename),
121   xml_end_document (void),
122   xml_start_menu_entry (char *tem),
123   xml_end_menu (void),
124   xml_end_current_element (void),
125   xml_open_section (int level, char *name),
126   xml_close_sections (int level),
127   xml_begin_node (void),
128   xml_begin_index (void),
129   xml_end_index (void),
130   xml_begin_multitable (int ncolumns, int *column_widths),
131   xml_end_multitable (void),
132   xml_end_multitable_row (int first_row),
133   xml_end_multitable_column (void),
134   xml_begin_table (int type, char *item_function),
135   xml_end_table (int type),
136   xml_begin_item (void),
137   xml_begin_table_item (void),
138   xml_continue_table_item (void),
139   xml_begin_enumerate (char *enum_arg),
140   xml_end_enumerate (void),
141   xml_begin_docbook_float (int elt);
142 
143 extern char *xml_id (char *id);
144 
145 extern void xml_begin_definition (void),
146   xml_end_definition (void),
147   xml_process_defun_args (char **defun_args, int auto_var_p),
148   xml_begin_def_term (int base_type, const char *category,
149       char *defined_name, char *type_name, char *type_name2),
150   xml_end_def_term (void);
151 
152 extern int xml_current_stack_index (void),
153   xml_element (char *name);
154 
155 #if defined (VA_FPRINTF) && __STDC__
156 void xml_insert_element_with_attribute (int elt, int arg, char *format, ...);
157 #else
158 void xml_insert_element_with_attribute ();
159 #endif
160 
161 #endif /* XML_H */
162