toc.h revision 93139
156160Sru/* toc.h -- table of contents handling.
293139Sru   $Id: toc.h,v 1.5 2002/02/09 00:54:51 karl Exp $
356160Sru
456160Sru   Copyright (C) 1999 Free Software Foundation, Inc.
556160Sru
656160Sru   This program is free software; you can redistribute it and/or modify
756160Sru   it under the terms of the GNU General Public License as published by
856160Sru   the Free Software Foundation; either version 2, or (at your option)
956160Sru   any later version.
1056160Sru
1156160Sru   This program is distributed in the hope that it will be useful,
1256160Sru   but WITHOUT ANY WARRANTY; without even the implied warranty of
1356160Sru   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1456160Sru   GNU General Public License for more details.
1556160Sru
1656160Sru   You should have received a copy of the GNU General Public License
1756160Sru   along with this program; if not, write to the Free Software
1856160Sru   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1956160Sru
2056160Sru   Written by Karl Heinz Marbaise <kama@hippo.fido.de>.  */
2156160Sru
2256160Sru#ifndef TOC_H
2356160Sru#define TOC_H
2456160Sru
2556160Sru/* the file where we found the @contents directive */
2656160Sruextern char *contents_filename;
2756160Sru
2856160Sru/* the file where we found the @shortcontents directive */
2956160Sruextern char *shortcontents_filename;
3056160Sru
3156160Sru/* Structure to hold one entry for the toc. */
3256160Srutypedef struct toc_entry_elt {
3356160Sru  char *name;
3456160Sru  char *containing_node; /* Name of node containing this section.  */
3593139Sru  char *html_file;       /* Name of HTML node-file in split-HTML mode */
3656160Sru  int number;            /* counting number from 0...n independent from
3756160Sru                            chapter/section can be used for anchors or
3856160Sru                            references to it.  */
3956160Sru  int level;             /* level: chapter, section, subsection... */
4056160Sru} TOC_ENTRY_ELT;
4156160Sru
4256160Sru/* all routines which have relationship with TOC should start with
4356160Sru   toc_ (this is a kind of name-space) */
4456160Sruextern int toc_add_entry (); /* return the number for the toc-entry */
4556160Sruextern void toc_free ();
4656160Sruextern char *toc_find_section_of_node ();
4756160Sru
4856160Sruextern void cm_contents (), cm_shortcontents ();
4956160Sru
5056160Sru#endif /* not TOC_H */
51