1*29619d2aSchristos /* $NetBSD: sectioning.h,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $ */ 2*29619d2aSchristos 3*29619d2aSchristos /* sectioning.h -- all related stuff @chapter, @section... @contents 4*29619d2aSchristos Id: sectioning.h,v 1.5 2004/04/11 17:56:47 karl Exp 5*29619d2aSchristos 6*29619d2aSchristos Copyright (C) 1999, 2003 Free Software Foundation, Inc. 7*29619d2aSchristos 8*29619d2aSchristos This program is free software; you can redistribute it and/or modify 9*29619d2aSchristos it under the terms of the GNU General Public License as published by 10*29619d2aSchristos the Free Software Foundation; either version 2, or (at your option) 11*29619d2aSchristos any later version. 12*29619d2aSchristos 13*29619d2aSchristos This program is distributed in the hope that it will be useful, 14*29619d2aSchristos but WITHOUT ANY WARRANTY; without even the implied warranty of 15*29619d2aSchristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*29619d2aSchristos GNU General Public License for more details. 17*29619d2aSchristos 18*29619d2aSchristos You should have received a copy of the GNU General Public License 19*29619d2aSchristos along with this program; if not, write to the Free Software 20*29619d2aSchristos Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21*29619d2aSchristos 22*29619d2aSchristos Written by Karl Heinz Marbaise <kama@hippo.fido.de>. */ 23*29619d2aSchristos 24*29619d2aSchristos #ifndef SECTIONING_H 25*29619d2aSchristos #define SECTIONING_H 26*29619d2aSchristos 27*29619d2aSchristos /* Sectioning. */ 28*29619d2aSchristos 29*29619d2aSchristos /* Level 4. */ 30*29619d2aSchristos extern void cm_chapter (void), 31*29619d2aSchristos cm_unnumbered (void), 32*29619d2aSchristos cm_appendix (void), 33*29619d2aSchristos cm_top (void); 34*29619d2aSchristos 35*29619d2aSchristos /* Level 3. */ 36*29619d2aSchristos extern void cm_section (void), 37*29619d2aSchristos cm_unnumberedsec (void), 38*29619d2aSchristos cm_appendixsec (void); 39*29619d2aSchristos 40*29619d2aSchristos /* Level 2. */ 41*29619d2aSchristos extern void cm_subsection (void), 42*29619d2aSchristos cm_unnumberedsubsec (void), 43*29619d2aSchristos cm_appendixsubsec (void); 44*29619d2aSchristos 45*29619d2aSchristos /* Level 1. */ 46*29619d2aSchristos extern void cm_subsubsection (void), 47*29619d2aSchristos cm_unnumberedsubsubsec (void), 48*29619d2aSchristos cm_appendixsubsubsec (void); 49*29619d2aSchristos 50*29619d2aSchristos /* Headings. */ 51*29619d2aSchristos extern void cm_heading (void), 52*29619d2aSchristos cm_chapheading (void), 53*29619d2aSchristos cm_subheading (void), 54*29619d2aSchristos cm_subsubheading (void), 55*29619d2aSchristos cm_majorheading (void); 56*29619d2aSchristos 57*29619d2aSchristos extern void cm_raisesections (void), 58*29619d2aSchristos cm_lowersections (void), 59*29619d2aSchristos cm_ideprecated (int arg, int start, int end); 60*29619d2aSchristos 61*29619d2aSchristos extern void 62*29619d2aSchristos sectioning_underscore (char *cmd), 63*29619d2aSchristos insert_and_underscore (int level, char *cmd); 64*29619d2aSchristos 65*29619d2aSchristos /* needed in node.c */ 66*29619d2aSchristos extern int set_top_section_level (int level); 67*29619d2aSchristos 68*29619d2aSchristos extern void sectioning_html (int level, char *cmd); 69*29619d2aSchristos extern int what_section (char *text, char **secname); 70*29619d2aSchristos extern char *current_chapter_number (void), 71*29619d2aSchristos *current_sectioning_number (void), 72*29619d2aSchristos *current_sectioning_name (void); 73*29619d2aSchristos 74*29619d2aSchristos /* The argument of @settitle, used for HTML. */ 75*29619d2aSchristos extern char *title; 76*29619d2aSchristos 77*29619d2aSchristos 78*29619d2aSchristos /* Here is a structure which associates sectioning commands with 79*29619d2aSchristos an integer that reflects the depth of the current section. */ 80*29619d2aSchristos typedef struct 81*29619d2aSchristos { 82*29619d2aSchristos char *name; 83*29619d2aSchristos int level; /* I can't replace the levels with defines 84*29619d2aSchristos because it is changed during run */ 85*29619d2aSchristos int num; /* ENUM_SECT_NO means no enumeration... 86*29619d2aSchristos ENUM_SECT_YES means enumerated version 87*29619d2aSchristos ENUM_SECT_APP appendix (Character enumerated 88*29619d2aSchristos at first position */ 89*29619d2aSchristos int toc; /* TOC_NO means do not enter in toc; 90*29619d2aSchristos TOC_YES means enter it in toc */ 91*29619d2aSchristos } section_alist_type; 92*29619d2aSchristos 93*29619d2aSchristos extern section_alist_type section_alist[]; 94*29619d2aSchristos 95*29619d2aSchristos /* enumerate sections */ 96*29619d2aSchristos #define ENUM_SECT_NO 0 97*29619d2aSchristos #define ENUM_SECT_YES 1 98*29619d2aSchristos #define ENUM_SECT_APP 2 99*29619d2aSchristos 100*29619d2aSchristos /* make entries into toc no/yes */ 101*29619d2aSchristos #define TOC_NO 0 102*29619d2aSchristos #define TOC_YES 1 103*29619d2aSchristos 104*29619d2aSchristos 105*29619d2aSchristos #endif /* not SECTIONING_H */ 106