Line data Source code
1 : /* Copyright 2000-2024 Free Software Foundation, Inc. 2 : Written by Gaius Mulley (gaius@glam.ac.uk) 3 : 4 : This file is part of groff, the GNU roff typesetting system. 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 3 of the License, or 9 : (at your option) any later 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 17 : along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 : 19 : #ifdef HAVE_CONFIG_H 20 : #include <config.h> 21 : #endif 22 : 23 : #include <stddef.h> 24 : #include <stdlib.h> 25 : 26 : #include "lib.h" 27 : 28 : #include "nonposix.h" 29 : #include "stringclass.h" 30 : #include "html-strings.h" 31 : 32 : /* 33 : * This file contains a very simple set of routines which might 34 : * be shared by preprocessors. It allows a preprocessor to indicate 35 : * when an inline image should be created. 36 : * This string is intercepted by pre-grohtml and substituted for 37 : * the image name and suppression escapes. 38 : * 39 : * pre-html runs troff twice, once with -Thtml (or -Txhtml) and once 40 : * with -Tps. 'troff -Thtml' (and 'troff -Txhtml') emits a 41 : * <src='image'.png> tag and the postscript device driver works out 42 : * the min/max limits of the graphic region. These region limits are 43 : * read by pre-html and an image is generated via 44 : * 45 : * troff -Tps -> gs -> png 46 : */ 47 : 48 : /* 49 : * html_begin_suppress - emit a start of image tag which will be seen 50 : * by pre-html. 51 : */ 52 2 : void html_begin_suppress() 53 : { 54 2 : put_string(HTML_IMAGE_INLINE_BEGIN, stdout); 55 2 : } 56 : 57 : /* 58 : * html_end_suppress - emit an end of image tag which will be seen 59 : * by pre-html. 60 : */ 61 2 : void html_end_suppress() 62 : { 63 2 : put_string(HTML_IMAGE_INLINE_END, stdout); 64 2 : }