/contrib/groff/src/libs/libgroff/htmlhint.cpp

https://bitbucket.org/freebsd/freebsd-head/ · C++ · 59 lines · 14 code · 6 blank · 39 comment · 0 complexity · ece6ea1b11c53285c9ce1d800a7ae83e MD5 · raw file

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