2 /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
3 Written by James Clark (jjc@jclark.com)
5 This file is part of groff.
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 2, or (at your option) any later
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
17 You should have received a copy of the GNU General Public License along
18 with groff; see the file COPYING. If not, write to the Free Software
19 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
30 #include "stringclass.h"
38 #define M_SQRT2 1.41421356237309504880
46 virtual int get() = 0;
47 virtual int peek() = 0;
48 virtual int get_location(const char **, int *);
49 friend class input_stack
;
50 friend class copy_rest_thru_input
;
53 class file_input
: public input
{
61 file_input(FILE *, const char *);
65 int get_location(const char **, int *);
68 void lex_init(input
*);
69 int get_location(char **, int *);
71 void do_copy(const char *file
);
75 void lex_error(const char *message
,
76 const errarg
&arg1
= empty_errarg
,
77 const errarg
&arg2
= empty_errarg
,
78 const errarg
&arg3
= empty_errarg
);
80 void lex_warning(const char *message
,
81 const errarg
&arg1
= empty_errarg
,
82 const errarg
&arg2
= empty_errarg
,
83 const errarg
&arg3
= empty_errarg
);
87 extern int flyback_flag
;
88 extern int command_char
;
89 // zero_length_line_flag is non-zero if zero-length lines are drawn
90 // as dots by the output device
91 extern int zero_length_line_flag
;
92 extern int driver_extension_flag
;
93 extern int compatible_flag
;