]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/groff/src/libs/libgroff/htmlhint.cpp
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / groff / src / libs / libgroff / htmlhint.cpp
1 /* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
2      Written by Gaius Mulley (gaius@glam.ac.uk)
3
4 This file is part of groff.
5
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.
10
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.
15
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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
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 and once with -Tps.
37  *  troff -Thtml device driver emits a <src='image'.png> tag
38  *  and the postscript device driver works out the min/max limits
39  *  of the graphic region.  These region limits are read by pre-html
40  *  and an image is generated via troff -Tps -> gs -> png
41  */
42
43 /*
44  *  html_begin_suppress - emit a start of image tag which will be seen
45  *                        by pre-html.
46  */
47 void html_begin_suppress()
48 {
49   put_string(HTML_IMAGE_INLINE_BEGIN, stdout);
50 }
51
52 /*
53  *  html_end_suppress - emit an end of image tag which will be seen
54  *                      by pre-html.
55  */
56 void html_end_suppress()
57 {
58   put_string(HTML_IMAGE_INLINE_END, stdout);
59 }