groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / roff / troff / troff.h
CommitLineData
92d0a6a6 1// -*- C++ -*-
4d3e9548 2/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2009
92d0a6a6
JR
3 Free Software Foundation, Inc.
4 Written by James Clark (jjc@jclark.com)
5
6This file is part of groff.
7
8groff is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
4d3e9548
JL
10Software Foundation, either version 3 of the License, or
11(at your option) any later version.
92d0a6a6
JR
12
13groff is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
4d3e9548
JL
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>. */
92d0a6a6
JR
20
21
22#include "lib.h"
23
24#include <ctype.h>
25#include <time.h>
26#include <stddef.h>
27#include <stdlib.h>
28#include <errno.h>
29
30#include "assert.h"
31#include "color.h"
32#include "device.h"
33#include "searchpath.h"
34
35typedef int units;
36
37extern units scale(units n, units x, units y); // scale n by x/y
38
39extern units units_per_inch;
40
41extern int ascii_output_flag;
42extern int suppress_output_flag;
43extern int color_flag;
44extern int is_html;
45
46extern int tcommand_flag;
47extern int vresolution;
48extern int hresolution;
49extern int sizescale;
50
51extern search_path *mac_path;
52
53#include "cset.h"
54#include "cmap.h"
55#include "errarg.h"
56#include "error.h"
57
58enum warning_type {
59 WARN_CHAR = 01,
60 WARN_NUMBER = 02,
61 WARN_BREAK = 04,
62 WARN_DELIM = 010,
63 WARN_EL = 020,
64 WARN_SCALE = 040,
65 WARN_RANGE = 0100,
66 WARN_SYNTAX = 0200,
67 WARN_DI = 0400,
68 WARN_MAC = 01000,
69 WARN_REG = 02000,
70 WARN_TAB = 04000,
71 WARN_RIGHT_BRACE = 010000,
72 WARN_MISSING = 020000,
73 WARN_INPUT = 040000,
74 WARN_ESCAPE = 0100000,
75 WARN_SPACE = 0200000,
76 WARN_FONT = 0400000,
77 WARN_IG = 01000000,
78 WARN_COLOR = 02000000
79 // change WARN_TOTAL if you add more warning types
80};
81
82const int WARN_TOTAL = 03777777;
83
84int warning(warning_type, const char *,
85 const errarg & = empty_errarg,
86 const errarg & = empty_errarg,
87 const errarg & = empty_errarg);
88int output_warning(warning_type, const char *,
89 const errarg & = empty_errarg,
90 const errarg & = empty_errarg,
91 const errarg & = empty_errarg);