1/* cmds.c -- Texinfo commands.
2 $Id: cmds.c,v 1.69 2002/02/09 00:54:51 karl Exp $
3
4 Copyright (C) 1998, 99, 2000, 01 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 29 unchanged lines hidden (view full) ---
42
43void
44 cm_TeX (), cm_acronym (), cm_asterisk (), cm_b (), cm_bullet (), cm_cite (),
45 cm_code (), cm_copyright (), cm_ctrl (), cm_dfn (), cm_dircategory (),
46 cm_direntry (), cm_dmn (), cm_dots (), cm_emph (), cm_enddots (), cm_i (),
47 cm_image (), cm_kbd (), cm_key (), cm_no_op (),
48 cm_novalidate (), cm_not_fixed_width (), cm_r (),
49 cm_strong (), cm_var (), cm_sc (), cm_w (), cm_email (), cm_url (),
50 cm_verb (), cm_documentdescription ();
51
52void
53 cm_anchor (), cm_node (), cm_menu (), cm_xref (), cm_ftable (),
54 cm_vtable (), cm_pxref (), cm_inforef (), cm_uref (), cm_email (),
55 cm_quotation (), cm_display (), cm_smalldisplay (), cm_itemize (),
56 cm_enumerate (), cm_tab (), cm_table (), cm_itemx (), cm_noindent (),
57 cm_setfilename (), cm_br (), cm_sp (), cm_page (), cm_group (),
58 cm_center (), cm_ref (), cm_include (), cm_bye (), cm_item (), cm_end (),
59 cm_kindex (), cm_cindex (), cm_findex (), cm_pindex (), cm_vindex (),
60 cm_tindex (), cm_synindex (), cm_printindex (), cm_minus (),
61 cm_example (), cm_smallexample (), cm_smalllisp (), cm_lisp (),
62 cm_format (), cm_smallformat (), cm_exdent (), cm_defindex (),
63 cm_defcodeindex (), cm_result (), cm_expansion (), cm_equiv (),
64 cm_print (), cm_error (), cm_point (), cm_today (), cm_flushleft (),
65 cm_flushright (), cm_finalout (), cm_cartouche (), cm_detailmenu (),
66 cm_multitable (), cm_settitle (), cm_titlefont (), cm_tt (),
67 cm_verbatim (), cm_verbatiminclude (), cm_titlepage ();
68
69/* Conditionals. */
70void cm_set (), cm_clear (), cm_ifset (), cm_ifclear ();
71void cm_value (), cm_ifeq ();
72
73/* Options. */
74static void cm_paragraphindent (), cm_exampleindent ();
75
--- 14 unchanged lines hidden (view full) ---
90 { "*", cm_asterisk, NO_BRACE_ARGS },
91 { ",", cm_accent_cedilla, MAYBE_BRACE_ARGS },
92 { "-", cm_no_op, NO_BRACE_ARGS },
93 { ".", insert_self, NO_BRACE_ARGS },
94 { ":", cm_no_op, NO_BRACE_ARGS },
95 { "=", cm_accent, MAYBE_BRACE_ARGS },
96 { "?", insert_self, NO_BRACE_ARGS },
97 { "@", insert_self, NO_BRACE_ARGS },
98 { "^", cm_accent_hat, MAYBE_BRACE_ARGS },
99 { "`", cm_accent_grave, MAYBE_BRACE_ARGS },
100 { "{", insert_self, NO_BRACE_ARGS },
101 { "|", cm_no_op, NO_BRACE_ARGS },
102 { "}", insert_self, NO_BRACE_ARGS },
103 { "~", cm_accent_tilde, MAYBE_BRACE_ARGS },
104 { "AA", cm_special_char, BRACE_ARGS },
105 { "AE", cm_special_char, BRACE_ARGS },
--- 28 unchanged lines hidden (view full) ---
134 { "chapter", cm_chapter, NO_BRACE_ARGS },
135 { "cindex", cm_cindex, NO_BRACE_ARGS },
136 { "cite", cm_cite, BRACE_ARGS },
137 { "clear", cm_clear, NO_BRACE_ARGS },
138 { "code", cm_code, BRACE_ARGS },
139 { "command", cm_code, BRACE_ARGS },
140 { "comment", cm_ignore_line, NO_BRACE_ARGS },
141 { "contents", cm_contents, NO_BRACE_ARGS },
142 { "copyright", cm_copyright, BRACE_ARGS },
143 { "ctrl", cm_obsolete, BRACE_ARGS },
144 { "defcodeindex", cm_defcodeindex, NO_BRACE_ARGS },
145 { "defcv", cm_defun, NO_BRACE_ARGS },
146 { "defcvx", cm_defun, NO_BRACE_ARGS },
147 { "deffn", cm_defun, NO_BRACE_ARGS },
148 { "deffnx", cm_defun, NO_BRACE_ARGS },
149 { "defindex", cm_defindex, NO_BRACE_ARGS },
--- 47 unchanged lines hidden (view full) ---
197 { "email", cm_email, BRACE_ARGS },
198 { "emph", cm_emph, BRACE_ARGS },
199 { "end", cm_end, NO_BRACE_ARGS },
200 { "enddots", cm_enddots, BRACE_ARGS },
201 { "enumerate", cm_enumerate, NO_BRACE_ARGS },
202 { "env", cm_code, BRACE_ARGS },
203 { "equiv", cm_equiv, BRACE_ARGS },
204 { "error", cm_error, BRACE_ARGS },
205 { "example", cm_example, NO_BRACE_ARGS },
206 { "exampleindent", cm_exampleindent, NO_BRACE_ARGS },
207 { "exclamdown", cm_special_char, BRACE_ARGS },
208 { "exdent", cm_exdent, NO_BRACE_ARGS },
209 { "expansion", cm_expansion, BRACE_ARGS },
210 { "file", cm_code, BRACE_ARGS },
211 { "finalout", cm_no_op, NO_BRACE_ARGS },
212 { "findex", cm_findex, NO_BRACE_ARGS },
--- 10 unchanged lines hidden (view full) ---
223 { "hyphenation", cm_ignore_arg, BRACE_ARGS },
224 { "i", cm_i, BRACE_ARGS },
225 { "ifclear", cm_ifclear, NO_BRACE_ARGS },
226 { "ifeq", cm_ifeq, NO_BRACE_ARGS },
227 { "ifhtml", cm_ifhtml, NO_BRACE_ARGS },
228 { "ifinfo", cm_ifinfo, NO_BRACE_ARGS },
229 { "ifnothtml", cm_ifnothtml, NO_BRACE_ARGS },
230 { "ifnotinfo", cm_ifnotinfo, NO_BRACE_ARGS },
231 { "ifnottex", cm_ifnottex, NO_BRACE_ARGS },
232 { "ifset", cm_ifset, NO_BRACE_ARGS },
233 { "iftex", cm_iftex, NO_BRACE_ARGS },
234 { "ignore", command_name_condition, NO_BRACE_ARGS },
235 { "image", cm_image, BRACE_ARGS },
236 { "include", cm_include, NO_BRACE_ARGS },
237 { "inforef", cm_inforef, BRACE_ARGS },
238 { "item", cm_item, NO_BRACE_ARGS },
239 { "itemize", cm_itemize, NO_BRACE_ARGS },
240 { "itemx", cm_itemx, NO_BRACE_ARGS },
241 { "kbd", cm_kbd, BRACE_ARGS },
242 { "kbdinputstyle", cm_ignore_line, NO_BRACE_ARGS },
243 { "key", cm_key, BRACE_ARGS },
244 { "kindex", cm_kindex, NO_BRACE_ARGS },
245 { "l", cm_special_char, BRACE_ARGS },
--- 6 unchanged lines hidden (view full) ---
252 { "minus", cm_minus, BRACE_ARGS },
253 { "multitable", cm_multitable, NO_BRACE_ARGS },
254 { "need", cm_ignore_line, NO_BRACE_ARGS },
255 { "node", cm_node, NO_BRACE_ARGS },
256 { "noindent", cm_noindent, NO_BRACE_ARGS },
257 { "noindent", cm_novalidate, NO_BRACE_ARGS },
258 { "nwnode", cm_node, NO_BRACE_ARGS },
259 { "o", cm_special_char, BRACE_ARGS },
260 { "oe", cm_special_char, BRACE_ARGS },
261 { "option", cm_code, BRACE_ARGS },
262 { "page", cm_no_op, NO_BRACE_ARGS },
263 { "pagesizes", cm_ignore_line, NO_BRACE_ARGS },
264 { "paragraphindent", cm_paragraphindent, NO_BRACE_ARGS },
265 { "pindex", cm_pindex, NO_BRACE_ARGS },
266 { "point", cm_point, BRACE_ARGS },
267 { "pounds", cm_special_char, BRACE_ARGS },
--- 689 unchanged lines hidden (view full) ---
957 free (filename);
958}
959
960void
961cm_settitle ()
962{
963 if (xml)
964 {
965 xml_begin_document ();
966 xml_insert_element (SETTITLE, START);
967 get_rest_of_line (0, &title);
968 execute_string ("%s", title);
969 xml_insert_element (SETTITLE, END);
970 }
971 else
972 get_rest_of_line (0, &title);
973}
--- 37 unchanged lines hidden (view full) ---
1011 else
1012 {
1013 /* Must disable filling since otherwise multiple newlines is like
1014 multiple spaces. Must close paragraph since that's what the
1015 manual says and that's what TeX does. */
1016 int save_filling_enabled = filling_enabled;
1017 filling_enabled = 0;
1018
1019 close_paragraph ();
1020
1021 if (lines && html && !executing_string)
1022 html_output_head ();
1023
1024 while (lines--)
1025 {
1026 if (html)
1027 insert_string ("<br><p>\n");
--- 337 unchanged lines hidden ---
2 $Id: cmds.c,v 1.69 2002/02/09 00:54:51 karl Exp $
3
4 Copyright (C) 1998, 99, 2000, 01 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 29 unchanged lines hidden (view full) ---
42
43void
44 cm_TeX (), cm_acronym (), cm_asterisk (), cm_b (), cm_bullet (), cm_cite (),
45 cm_code (), cm_copyright (), cm_ctrl (), cm_dfn (), cm_dircategory (),
46 cm_direntry (), cm_dmn (), cm_dots (), cm_emph (), cm_enddots (), cm_i (),
47 cm_image (), cm_kbd (), cm_key (), cm_no_op (),
48 cm_novalidate (), cm_not_fixed_width (), cm_r (),
49 cm_strong (), cm_var (), cm_sc (), cm_w (), cm_email (), cm_url (),
50 cm_verb (), cm_documentdescription ();
51
52void
53 cm_anchor (), cm_node (), cm_menu (), cm_xref (), cm_ftable (),
54 cm_vtable (), cm_pxref (), cm_inforef (), cm_uref (), cm_email (),
55 cm_quotation (), cm_display (), cm_smalldisplay (), cm_itemize (),
56 cm_enumerate (), cm_tab (), cm_table (), cm_itemx (), cm_noindent (),
57 cm_setfilename (), cm_br (), cm_sp (), cm_page (), cm_group (),
58 cm_center (), cm_ref (), cm_include (), cm_bye (), cm_item (), cm_end (),
59 cm_kindex (), cm_cindex (), cm_findex (), cm_pindex (), cm_vindex (),
60 cm_tindex (), cm_synindex (), cm_printindex (), cm_minus (),
61 cm_example (), cm_smallexample (), cm_smalllisp (), cm_lisp (),
62 cm_format (), cm_smallformat (), cm_exdent (), cm_defindex (),
63 cm_defcodeindex (), cm_result (), cm_expansion (), cm_equiv (),
64 cm_print (), cm_error (), cm_point (), cm_today (), cm_flushleft (),
65 cm_flushright (), cm_finalout (), cm_cartouche (), cm_detailmenu (),
66 cm_multitable (), cm_settitle (), cm_titlefont (), cm_tt (),
67 cm_verbatim (), cm_verbatiminclude (), cm_titlepage ();
68
69/* Conditionals. */
70void cm_set (), cm_clear (), cm_ifset (), cm_ifclear ();
71void cm_value (), cm_ifeq ();
72
73/* Options. */
74static void cm_paragraphindent (), cm_exampleindent ();
75
--- 14 unchanged lines hidden (view full) ---
90 { "*", cm_asterisk, NO_BRACE_ARGS },
91 { ",", cm_accent_cedilla, MAYBE_BRACE_ARGS },
92 { "-", cm_no_op, NO_BRACE_ARGS },
93 { ".", insert_self, NO_BRACE_ARGS },
94 { ":", cm_no_op, NO_BRACE_ARGS },
95 { "=", cm_accent, MAYBE_BRACE_ARGS },
96 { "?", insert_self, NO_BRACE_ARGS },
97 { "@", insert_self, NO_BRACE_ARGS },
98 { "^", cm_accent_hat, MAYBE_BRACE_ARGS },
99 { "`", cm_accent_grave, MAYBE_BRACE_ARGS },
100 { "{", insert_self, NO_BRACE_ARGS },
101 { "|", cm_no_op, NO_BRACE_ARGS },
102 { "}", insert_self, NO_BRACE_ARGS },
103 { "~", cm_accent_tilde, MAYBE_BRACE_ARGS },
104 { "AA", cm_special_char, BRACE_ARGS },
105 { "AE", cm_special_char, BRACE_ARGS },
--- 28 unchanged lines hidden (view full) ---
134 { "chapter", cm_chapter, NO_BRACE_ARGS },
135 { "cindex", cm_cindex, NO_BRACE_ARGS },
136 { "cite", cm_cite, BRACE_ARGS },
137 { "clear", cm_clear, NO_BRACE_ARGS },
138 { "code", cm_code, BRACE_ARGS },
139 { "command", cm_code, BRACE_ARGS },
140 { "comment", cm_ignore_line, NO_BRACE_ARGS },
141 { "contents", cm_contents, NO_BRACE_ARGS },
142 { "copyright", cm_copyright, BRACE_ARGS },
143 { "ctrl", cm_obsolete, BRACE_ARGS },
144 { "defcodeindex", cm_defcodeindex, NO_BRACE_ARGS },
145 { "defcv", cm_defun, NO_BRACE_ARGS },
146 { "defcvx", cm_defun, NO_BRACE_ARGS },
147 { "deffn", cm_defun, NO_BRACE_ARGS },
148 { "deffnx", cm_defun, NO_BRACE_ARGS },
149 { "defindex", cm_defindex, NO_BRACE_ARGS },
--- 47 unchanged lines hidden (view full) ---
197 { "email", cm_email, BRACE_ARGS },
198 { "emph", cm_emph, BRACE_ARGS },
199 { "end", cm_end, NO_BRACE_ARGS },
200 { "enddots", cm_enddots, BRACE_ARGS },
201 { "enumerate", cm_enumerate, NO_BRACE_ARGS },
202 { "env", cm_code, BRACE_ARGS },
203 { "equiv", cm_equiv, BRACE_ARGS },
204 { "error", cm_error, BRACE_ARGS },
205 { "example", cm_example, NO_BRACE_ARGS },
206 { "exampleindent", cm_exampleindent, NO_BRACE_ARGS },
207 { "exclamdown", cm_special_char, BRACE_ARGS },
208 { "exdent", cm_exdent, NO_BRACE_ARGS },
209 { "expansion", cm_expansion, BRACE_ARGS },
210 { "file", cm_code, BRACE_ARGS },
211 { "finalout", cm_no_op, NO_BRACE_ARGS },
212 { "findex", cm_findex, NO_BRACE_ARGS },
--- 10 unchanged lines hidden (view full) ---
223 { "hyphenation", cm_ignore_arg, BRACE_ARGS },
224 { "i", cm_i, BRACE_ARGS },
225 { "ifclear", cm_ifclear, NO_BRACE_ARGS },
226 { "ifeq", cm_ifeq, NO_BRACE_ARGS },
227 { "ifhtml", cm_ifhtml, NO_BRACE_ARGS },
228 { "ifinfo", cm_ifinfo, NO_BRACE_ARGS },
229 { "ifnothtml", cm_ifnothtml, NO_BRACE_ARGS },
230 { "ifnotinfo", cm_ifnotinfo, NO_BRACE_ARGS },
231 { "ifnottex", cm_ifnottex, NO_BRACE_ARGS },
232 { "ifset", cm_ifset, NO_BRACE_ARGS },
233 { "iftex", cm_iftex, NO_BRACE_ARGS },
234 { "ignore", command_name_condition, NO_BRACE_ARGS },
235 { "image", cm_image, BRACE_ARGS },
236 { "include", cm_include, NO_BRACE_ARGS },
237 { "inforef", cm_inforef, BRACE_ARGS },
238 { "item", cm_item, NO_BRACE_ARGS },
239 { "itemize", cm_itemize, NO_BRACE_ARGS },
240 { "itemx", cm_itemx, NO_BRACE_ARGS },
241 { "kbd", cm_kbd, BRACE_ARGS },
242 { "kbdinputstyle", cm_ignore_line, NO_BRACE_ARGS },
243 { "key", cm_key, BRACE_ARGS },
244 { "kindex", cm_kindex, NO_BRACE_ARGS },
245 { "l", cm_special_char, BRACE_ARGS },
--- 6 unchanged lines hidden (view full) ---
252 { "minus", cm_minus, BRACE_ARGS },
253 { "multitable", cm_multitable, NO_BRACE_ARGS },
254 { "need", cm_ignore_line, NO_BRACE_ARGS },
255 { "node", cm_node, NO_BRACE_ARGS },
256 { "noindent", cm_noindent, NO_BRACE_ARGS },
257 { "noindent", cm_novalidate, NO_BRACE_ARGS },
258 { "nwnode", cm_node, NO_BRACE_ARGS },
259 { "o", cm_special_char, BRACE_ARGS },
260 { "oe", cm_special_char, BRACE_ARGS },
261 { "option", cm_code, BRACE_ARGS },
262 { "page", cm_no_op, NO_BRACE_ARGS },
263 { "pagesizes", cm_ignore_line, NO_BRACE_ARGS },
264 { "paragraphindent", cm_paragraphindent, NO_BRACE_ARGS },
265 { "pindex", cm_pindex, NO_BRACE_ARGS },
266 { "point", cm_point, BRACE_ARGS },
267 { "pounds", cm_special_char, BRACE_ARGS },
--- 689 unchanged lines hidden (view full) ---
957 free (filename);
958}
959
960void
961cm_settitle ()
962{
963 if (xml)
964 {
965 xml_begin_document ();
966 xml_insert_element (SETTITLE, START);
967 get_rest_of_line (0, &title);
968 execute_string ("%s", title);
969 xml_insert_element (SETTITLE, END);
970 }
971 else
972 get_rest_of_line (0, &title);
973}
--- 37 unchanged lines hidden (view full) ---
1011 else
1012 {
1013 /* Must disable filling since otherwise multiple newlines is like
1014 multiple spaces. Must close paragraph since that's what the
1015 manual says and that's what TeX does. */
1016 int save_filling_enabled = filling_enabled;
1017 filling_enabled = 0;
1018
1019 close_paragraph ();
1020
1021 if (lines && html && !executing_string)
1022 html_output_head ();
1023
1024 while (lines--)
1025 {
1026 if (html)
1027 insert_string ("<br><p>\n");
--- 337 unchanged lines hidden ---