Merge branch 'vendor/OPENSSH'
[dragonfly.git] / contrib / groff / src / libs / libgroff / htmlhint.cpp
1 /* Copyright (C) 2000, 2001, 2002, 2008, 2009
2      Free Software Foundation, Inc.
3      Written by Gaius Mulley (gaius@glam.ac.uk)
4
5 This file is part of groff.
6
7 groff is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
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  *
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
43  */
44
45 /*
46  *  html_begin_suppress - emit a start of image tag which will be seen
47  *                        by pre-html.
48  */
49 void 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  */
58 void html_end_suppress()
59 {
60   put_string(HTML_IMAGE_INLINE_END, stdout);
61 }