home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / troff / groff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-30  |  2.1 KB  |  92 lines

  1. // -*- C++ -*-
  2. /* Copyright (C) 1989, 1990 Free Software Foundation, Inc.
  3.      Written by James Clark (jjc@jclark.uucp)
  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 1, or (at your option) any later
  10. 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 along
  18. with groff; see the file LICENSE.  If not, write to the Free Software
  19. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  20.  
  21.  
  22. #include <stdio.h>
  23. #include <ctype.h>
  24. #include <string.h>
  25. #include <time.h>
  26. #include <stddef.h>
  27. #include <stdlib.h>
  28. #include <osfcn.h>
  29. #include <errno.h>
  30.  
  31. #include "lib.h"
  32. #include "assert.h"
  33.  
  34. #ifdef __GNUG__
  35. #define NO_RETURN volatile
  36. #else
  37. #define NO_RETURN
  38. #endif
  39.  
  40. NO_RETURN void cleanup_and_exit(int n);
  41.  
  42. typedef int units;
  43.  
  44. extern units scale(units n, units x, units y); // scale n by x/y
  45.  
  46. extern units units_per_inch;
  47.  
  48. extern units points_to_units(units n);
  49. extern units scale(units, double);
  50.  
  51. extern const char *device;
  52. extern int ascii_output_flag;
  53. extern int suppress_output_flag;
  54.  
  55. extern int tcommand_flag;
  56. extern int vresolution;
  57. extern int hresolution;
  58. extern int sizescale;
  59.  
  60. #include "cset.h"
  61. #include "cmap.h"
  62. #include "errarg.h"
  63. #include "error.h"
  64.  
  65. enum warning_type {
  66.   WARN_CHAR = 01,
  67.   WARN_NUMBER = 02,
  68.   WARN_BREAK = 04,
  69.   WARN_DELIM = 010,
  70.   WARN_EL = 020,
  71.   WARN_SCALE = 040,
  72.   WARN_RANGE = 0100,
  73.   WARN_SYNTAX = 0200,
  74.   WARN_DI = 0400,
  75.   WARN_MAC = 01000,
  76.   WARN_REG = 02000,
  77.   WARN_TAB = 04000,
  78.   WARN_RIGHT_BRACE = 010000,
  79.   WARN_MISSING = 020000,
  80.   WARN_INPUT = 040000,
  81.   WARN_ESCAPE = 0100000,
  82.   WARN_SPACE = 0200000,
  83.   // change WARN_TOTAL if you add more warning types
  84. };
  85.  
  86. const int WARN_TOTAL = 0377777;
  87.  
  88. int warning(warning_type, const char *,
  89.         const errarg & = empty_errarg,
  90.         const errarg & = empty_errarg,
  91.         const errarg & = empty_errarg);
  92.