2 /* Copyright (C) 1989-2014 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 3 of the License, or
10 (at your option) any later version.
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
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
26 #ifdef NEED_DECLARATION_RAND
31 #endif /* NEED_DECLARATION_RAND */
33 #ifdef NEED_DECLARATION_SRAND
36 #ifdef RET_TYPE_SRAND_IS_VOID
37 void srand(unsigned int);
39 int srand(unsigned int);
42 #endif /* NEED_DECLARATION_SRAND */
46 double fmod(double, double);
52 #include "stringclass.h"
60 #define M_SQRT2 1.41421356237309504880
64 #define M_PI 3.14159265358979323846
72 virtual int get() = 0;
73 virtual int peek() = 0;
74 virtual int get_location(const char **, int *);
75 friend class input_stack;
76 friend class copy_rest_thru_input;
79 class file_input : public input {
87 file_input(FILE *, const char *);
91 int get_location(const char **, int *);
94 void lex_init(input *);
95 int get_location(char **, int *);
97 void do_copy(const char *file);
101 void lex_error(const char *message,
102 const errarg &arg1 = empty_errarg,
103 const errarg &arg2 = empty_errarg,
104 const errarg &arg3 = empty_errarg);
106 void lex_warning(const char *message,
107 const errarg &arg1 = empty_errarg,
108 const errarg &arg2 = empty_errarg,
109 const errarg &arg3 = empty_errarg);
113 extern int flyback_flag;
114 extern int command_char;
115 // zero_length_line_flag is non-zero if zero-length lines are drawn
116 // as dots by the output device
117 extern int zero_length_line_flag;
118 extern int driver_extension_flag;
119 extern int compatible_flag;
120 extern int safer_flag;
121 extern char *graphname;