insertion.h revision 256281
1219820Sjeff/* insertion.h -- declarations for insertion.c.
2331769Shselasky   $Id: insertion.h,v 1.10 2004/04/11 17:56:47 karl Exp $
3219820Sjeff
4219820Sjeff   Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
5219820Sjeff
6219820Sjeff   This program is free software; you can redistribute it and/or modify
7219820Sjeff   it under the terms of the GNU General Public License as published by
8219820Sjeff   the Free Software Foundation; either version 2, or (at your option)
9219820Sjeff   any later version.
10219820Sjeff
11219820Sjeff   This program is distributed in the hope that it will be useful,
12219820Sjeff   but WITHOUT ANY WARRANTY; without even the implied warranty of
13219820Sjeff   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14219820Sjeff   GNU General Public License for more details.
15219820Sjeff
16219820Sjeff   You should have received a copy of the GNU General Public License
17219820Sjeff   along with this program; if not, write to the Free Software Foundation,
18219820Sjeff   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19219820Sjeff
20219820Sjeff#ifndef INSERTION_H
21219820Sjeff#define INSERTION_H
22219820Sjeff
23219820Sjeff/* Must match list in insertion.c.  */
24219820Sjeffenum insertion_type
25219820Sjeff{
26219820Sjeff  cartouche, copying, defcv, deffn, defivar, defmac, defmethod, defop,
27219820Sjeff  defopt, defspec, deftp, deftypecv, deftypefn, deftypefun, deftypeivar,
28219820Sjeff  deftypemethod, deftypeop, deftypevar, deftypevr, defun, defvar, defvr,
29219820Sjeff  detailmenu, direntry, display, documentdescription, enumerate,
30219820Sjeff  example, floatenv, flushleft, flushright, format, ftable, group,
31219820Sjeff  ifclear, ifdocbook, ifhtml, ifinfo, ifnotdocbook, ifnothtml, ifnotinfo,
32219820Sjeff  ifnotplaintext, ifnottex, ifnotxml, ifplaintext, ifset, iftex, ifxml,
33219820Sjeff  itemize, lisp, menu, multitable, quotation, rawdocbook, rawhtml, rawtex,
34331769Shselasky  rawxml, smalldisplay, smallexample, smallformat, smalllisp, verbatim,
35331769Shselasky  table, tex, vtable, titlepage, bad_type
36331769Shselasky};
37331769Shselasky
38331769Shselaskytypedef struct istack_elt
39331769Shselasky{
40219820Sjeff  struct istack_elt *next;
41219820Sjeff  char *item_function;
42219820Sjeff  char *filename;
43219820Sjeff  int line_number;
44219820Sjeff  int filling_enabled;
45219820Sjeff  int indented_fill;
46219820Sjeff  int insertion;
47219820Sjeff  int inhibited;
48219820Sjeff  int in_fixed_width_font;
49219820Sjeff} INSERTION_ELT;
50219820Sjeff
51219820Sjeffextern int insertion_level;
52219820Sjeffextern INSERTION_ELT *insertion_stack;
53219820Sjeffextern int in_menu;
54219820Sjeffextern int in_detailmenu;
55219820Sjeffextern int had_menu_commentary;
56219820Sjeffextern int in_paragraph;
57219820Sjeff
58219820Sjeffextern int headitem_flag;
59331769Shselaskyextern int after_headitem;
60331769Shselasky
61331769Shselaskyextern void init_insertion_stack (void);
62331769Shselaskyextern void command_name_condition (void);
63331769Shselaskyextern void cm_ifdocbook (void), cm_ifnotdocbook(void), cm_docbook (int arg);
64331769Shselaskyextern void cm_ifhtml (void), cm_ifnothtml(void), cm_html (int arg);
65331769Shselaskyextern void cm_ifinfo (void), cm_ifnotinfo (void);
66219820Sjeffextern void cm_ifplaintext (void), cm_ifnotplaintext(void);
67219820Sjeffextern void cm_iftex (void), cm_ifnottex (void), cm_tex (void);
68219820Sjeffextern void cm_ifxml (void), cm_ifnotxml (void), cm_xml (int arg);
69219820Sjeffextern void handle_verbatim_environment (int find_end_verbatim);
70219820Sjeffextern void begin_insertion (enum insertion_type type);
71219820Sjeffextern void pop_insertion (void);
72219820Sjeffextern void discard_insertions (int specials_ok);
73219820Sjeff
74219820Sjeffextern int is_in_insertion_of_type (int type);
75219820Sjeffextern int command_needs_braces (char *cmd);
76219820Sjeff
77219820Sjeffextern enum insertion_type find_type_from_name (char *name);
78219820Sjeff#endif /* !INSERTION_H */
79219820Sjeff