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