Sync-to-go: update copyright for 2015
[s-roff.git] / src / troff / troff.h
blobea0663c1bc743a6a133998d9aad287f3c87ec3de
1 /*@
2 * Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 1989 - 1992, 2000 - 2002, 2004
5 * Free Software Foundation, Inc.
6 * Written by James Clark (jjc@jclark.com)
8 * This is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2, or (at your option) any later
11 * version.
13 * This is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with groff; see the file COPYING. If not, write to the Free Software
20 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef _TROFF_H
23 #define _TROFF_H
25 #include "config.h"
26 #include "troff-config.h"
28 #include <assert.h>
29 #include <ctype.h>
30 #include <errno.h>
31 #include <stddef.h>
32 #include <stdlib.h>
33 #include <time.h>
35 #include "cset.h"
36 #include "cmap.h"
37 #include "color.h"
38 #include "device.h"
39 #include "errarg.h"
40 #include "error.h"
41 #include "lib.h"
42 #include "searchpath.h"
44 typedef int units;
46 extern units scale(units n, units x, units y); // scale n by x/y
48 extern units units_per_inch;
50 extern int ascii_output_flag;
51 extern int suppress_output_flag;
52 extern int color_flag;
53 extern int is_html;
55 extern int tcommand_flag;
56 extern int vresolution;
57 extern int hresolution;
58 extern int sizescale;
60 extern search_path *mac_path;
62 enum warning_type {
63 WARN_CHAR = 01,
64 WARN_NUMBER = 02,
65 WARN_BREAK = 04,
66 WARN_DELIM = 010,
67 WARN_EL = 020,
68 WARN_SCALE = 040,
69 WARN_RANGE = 0100,
70 WARN_SYNTAX = 0200,
71 WARN_DI = 0400,
72 WARN_MAC = 01000,
73 WARN_REG = 02000,
74 WARN_TAB = 04000,
75 WARN_RIGHT_BRACE = 010000,
76 WARN_MISSING = 020000,
77 WARN_INPUT = 040000,
78 WARN_ESCAPE = 0100000,
79 WARN_SPACE = 0200000,
80 WARN_FONT = 0400000,
81 WARN_IG = 01000000,
82 WARN_COLOR = 02000000
83 // change WARN_TOTAL if you add more warning types
86 const int WARN_TOTAL = 03777777;
88 int warning(warning_type, const char *,
89 const errarg & = empty_errarg,
90 const errarg & = empty_errarg,
91 const errarg & = empty_errarg);
92 int output_warning(warning_type, const char *,
93 const errarg & = empty_errarg,
94 const errarg & = empty_errarg,
95 const errarg & = empty_errarg);
97 #endif // _TROFF_H
98 // s-it2-mode