1 /*	$NetBSD: cmds.h,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $	*/
2 
3 /* cmds.h -- declarations for cmds.c.
4    Id: cmds.h,v 1.9 2004/11/26 00:48:35 karl Exp
5 
6    Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation,
7    Inc.
8 
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2, or (at your option)
12    any later version.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18 
19    You should have received a copy of the GNU General Public License along
20    with this program; if not, write to the Free Software Foundation, Inc.,
21    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
22 
23 #ifndef CMDS_H
24 #define CMDS_H
25 
26 /* The three arguments a command can get are a flag saying whether it is
27    before argument parsing (START) or after (END), the starting position
28    of the arguments, and the ending position.  */
29 typedef void COMMAND_FUNCTION (); /* So we can say COMMAND_FUNCTION *foo; */
30 
31 /* Each command has an associated function.  When the command is
32    encountered in the text, the associated function is called with START
33    as the argument.  If the function expects arguments in braces, it
34    remembers itself on the stack.  When the corresponding close brace is
35    encountered, the function is called with END as the argument. */
36 #define START 0
37 #define END 1
38 
39 /* Does the command expect braces?  */
40 #define NO_BRACE_ARGS 0
41 #define BRACE_ARGS 1
42 #define MAYBE_BRACE_ARGS 2
43 
44 typedef struct
45 {
46   char *name;
47   COMMAND_FUNCTION *proc;
48   int argument_in_braces;
49 } COMMAND;
50 
51 extern COMMAND command_table[];
52 
53 typedef struct acronym_desc
54 {
55   struct acronym_desc *next;
56   char *acronym;
57   char *description;
58 } ACRONYM_DESC;
59 
60 /* Texinfo commands.  */
61 extern void insert_self (int arg),
62   insert_space (int arg),
63   cm_ignore_line (void),
64   cm_ignore_arg (int arg, int start_pos, int end_pos),
65   cm_comment (void),
66   cm_no_op (void);
67 
68 /* Document structure and meta information.  */
69 extern void cm_setfilename (void),
70   cm_settitle (void),
71   cm_documentdescription (void),
72   cm_node (void),
73   cm_menu (void),
74   cm_detailmenu (void),
75   cm_dircategory (void),
76   cm_direntry (void),
77   cm_bye (void);
78 
79 /* File inclusion.  */
80 extern void cm_include (void),
81   cm_verbatiminclude (void);
82 
83 /* Cross referencing commands.  */
84 extern void cm_anchor (int arg),
85   cm_xref (int arg),
86   cm_pxref (int arg),
87   cm_ref (int arg),
88   cm_inforef (int arg),
89   cm_uref (int arg);
90 
91 /* Special insertions.  */
92 extern void cm_LaTeX (int arg),
93   cm_TeX (int arg),
94   cm_bullet (int arg),
95   cm_colon (void),
96   cm_comma (int arg),
97   cm_copyright (int arg),
98   cm_dots (int arg),
99   cm_enddots (int arg),
100   cm_equiv (int arg),
101   cm_error (int arg),
102   cm_expansion (int arg),
103   cm_image (int arg),
104   cm_insert_copying (void),
105   cm_minus (int arg),
106   cm_point (int arg),
107   cm_print (int arg),
108   cm_punct (int arg),
109   cm_registeredsymbol (int arg),
110   cm_result (int arg);
111 
112 /* Emphasis and markup.  */
113 extern void cm_acronym (int arg),
114   cm_abbr (int arg),
115   cm_b (int arg),
116   cm_cite (int arg, int position),
117   cm_code (int arg),
118   cm_dfn (int arg, int position),
119   cm_dmn (int arg),
120   cm_email (int arg),
121   cm_emph (int arg),
122   cm_i (int arg),
123   cm_kbd (int arg),
124   cm_key (int arg),
125   cm_math (int arg),
126   cm_not_fixed_width (int arg, int start, int end),
127   cm_r (int arg),
128   cm_sansserif (int arg),
129   cm_sc (int arg, int start_pos, int end_pos),
130   cm_slanted (int arg),
131   cm_strong (int arg, int start_pos, int end_pos),
132   cm_tt (int arg),
133   cm_indicate_url (int arg, int start, int end),
134   cm_var (int arg, int start_pos, int end_pos),
135   cm_verb (int arg);
136 
137 /* Block environments.  */
138 extern void cm_cartouche (void),
139   cm_group (void),
140   cm_display (void),
141   cm_smalldisplay (void),
142   cm_example (void),
143   cm_smallexample (void),
144   cm_smalllisp (void),
145   cm_lisp (void),
146   cm_format (void),
147   cm_smallformat (void),
148   cm_quotation (void),
149   cm_copying (void),
150   cm_flushleft (void),
151   cm_flushright (void),
152   cm_verbatim (void),
153   cm_end (void);
154 
155 /* Tables, lists, enumerations.  */
156 extern void cm_table (void),
157   cm_ftable (void),
158   cm_vtable (void),
159   cm_itemize (void),
160   cm_enumerate (void),
161   cm_multitable (void),
162   cm_headitem (void),
163   cm_item (void),
164   cm_itemx (void),
165   cm_tab (void);
166 
167 extern void cm_center (void),
168   cm_exdent (void),
169   cm_indent (void),
170   cm_noindent (void),
171   cm_noindent_cmd (void);
172 
173 /* Line and page breaks.  */
174 extern void cm_asterisk (void),
175   cm_sp (void),
176   cm_page (void);
177 
178 /* Non breaking words.  */
179 extern void cm_tie (int arg),
180   cm_w (int arg);
181 
182 /* Title page creation.  */
183 extern void cm_titlepage (void),
184   cm_author (void),
185   cm_titlepage_cmds (void),
186   cm_titlefont (int arg),
187   cm_today (int arg);
188 
189 /* Floats.  */
190 extern void cm_float (void),
191   cm_caption (int arg),
192   cm_shortcaption (void),
193   cm_listoffloats (void);
194 
195 /* Indices.  */
196 extern void cm_kindex (void),
197   cm_cindex (void),
198   cm_findex (void),
199   cm_pindex (void),
200   cm_vindex (void),
201   cm_tindex (void),
202   cm_defindex (void),
203   cm_defcodeindex (void),
204   cm_synindex (void),
205   cm_printindex (void);
206 
207 /* Conditionals. */
208 extern void cm_set (void),
209   cm_clear (void),
210   cm_ifset (void),
211   cm_ifclear (void),
212   cm_ifeq (void),
213   cm_value (int arg, int start_pos, int end_pos);
214 
215 #endif /* !CMDS_H */
216