groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / libs / libgroff / htmlhint.cpp
CommitLineData
4d3e9548
JL
1/* Copyright (C) 2000, 2001, 2002, 2008, 2009
2 Free Software Foundation, Inc.
92d0a6a6
JR
3 Written by Gaius Mulley (gaius@glam.ac.uk)
4
5This file is part of groff.
6
7groff is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
4d3e9548
JL
9Software Foundation, either version 3 of the License, or
10(at your option) any later version.
92d0a6a6
JR
11
12groff is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
4d3e9548
JL
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>. */
92d0a6a6
JR
19
20#include "lib.h"
21
22#include <stddef.h>
23#include <stdlib.h>
24
25#include "nonposix.h"
26#include "stringclass.h"
27#include "html-strings.h"
28
29/*
30 * This file contains a very simple set of routines which might
31 * be shared by preprocessors. It allows a preprocessor to indicate
32 * when an inline image should be created.
33 * This string is intercepted by pre-grohtml and substituted for
34 * the image name and suppression escapes.
35 *
4d3e9548
JL
36 * pre-html runs troff twice, once with -Thtml (or -Txhtml) and once
37 * with -Tps. `troff -Thtml' (and `troff -Txhtml') emits a
38 * <src='image'.png> tag and the postscript device driver works out
39 * the min/max limits of the graphic region. These region limits are
40 * read by pre-html and an image is generated via
41 *
42 * troff -Tps -> gs -> png
92d0a6a6
JR
43 */
44
45/*
46 * html_begin_suppress - emit a start of image tag which will be seen
47 * by pre-html.
48 */
49void html_begin_suppress()
50{
51 put_string(HTML_IMAGE_INLINE_BEGIN, stdout);
52}
53
54/*
55 * html_end_suppress - emit an end of image tag which will be seen
56 * by pre-html.
57 */
58void html_end_suppress()
59{
60 put_string(HTML_IMAGE_INLINE_END, stdout);
61}