* Makefile.in (ENVSETUP): Don't assume POSIX make semantics for
[s-roff.git] / src / libs / libgroff / htmlindicate.cc
blob91e53a26b5edcd197e610abd057756a30436e14d
1 /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
2 Written by Gaius Mulley (gaius@glam.ac.uk)
4 This file is part of groff.
6 groff is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
11 groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License along
17 with groff; see the file COPYING. If not, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 #include <stddef.h>
21 #include <stdlib.h>
22 #include <string.h>
24 #include "posix.h"
25 #include "stringclass.h"
28 * this file contains a very simple set of routines shared by
29 * tbl, pic, eqn which help the html device driver to make
30 * sensible formatting choices. Currently it simply indicates
31 * when a region of gyphs should be rendered as an image rather
32 * than html. In the future it should be expanded so to enable:
34 * tbl to inform grohtml about table widths.
35 * troff to inform grohtml about tab positions and whether
36 * we are entering two/three column mode.
40 static int is_in_graphic_start = 0;
43 * graphic_start - emit a html graphic start indicator, but only
44 * if one has not already been issued.
47 void graphic_start (void)
49 if (! is_in_graphic_start) {
50 put_string(".if '\\*(.T'html' \\X(graphic-start(\\c\n", stdout);
51 is_in_graphic_start = 1;
56 * graphic_end - emit a html graphic end indicator, but only
57 * if a corresponding matching graphic-start has
58 * been issued.
61 void graphic_end (void)
63 if (is_in_graphic_start) {
64 put_string(".if '\\*(.T'html' \\X(graphic-end(\\c\n", stdout);
65 is_in_graphic_start = 0;