4 /* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005
5 Free Software Foundation, Inc.
6 Written by James Clark (jjc@jclark.com)
8 This file is part of groff.
10 groff is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 2, or (at your option) any later
15 groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License along
21 with groff; see the file COPYING. If not, write to the Free Software
22 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
30 #ifdef NEED_DECLARATION_RAND
35 #endif /* NEED_DECLARATION_RAND */
37 #ifdef NEED_DECLARATION_SRAND
40 #ifdef RET_TYPE_SRAND_IS_VOID
41 void srand(unsigned int);
43 int srand(unsigned int);
46 #endif /* NEED_DECLARATION_SRAND */
50 double fmod(double, double);
56 #include "stringclass.h"
64 #define M_SQRT2 1.41421356237309504880
68 #define M_PI 3.14159265358979323846
76 virtual int get() = 0;
77 virtual int peek() = 0;
78 virtual int get_location(const char **, int *);
79 friend class input_stack
;
80 friend class copy_rest_thru_input
;
83 class file_input
: public input
{
91 file_input(FILE *, const char *);
95 int get_location(const char **, int *);
98 void lex_init(input
*);
99 int get_location(char **, int *);
101 void do_copy(const char *file
);
103 void parse_cleanup();
105 void lex_error(const char *message
,
106 const errarg
&arg1
= empty_errarg
,
107 const errarg
&arg2
= empty_errarg
,
108 const errarg
&arg3
= empty_errarg
);
110 void lex_warning(const char *message
,
111 const errarg
&arg1
= empty_errarg
,
112 const errarg
&arg2
= empty_errarg
,
113 const errarg
&arg3
= empty_errarg
);
117 extern int flyback_flag
;
118 extern int command_char
;
119 // zero_length_line_flag is non-zero if zero-length lines are drawn
120 // as dots by the output device
121 extern int zero_length_line_flag
;
122 extern int driver_extension_flag
;
123 extern int compatible_flag
;
124 extern int safer_flag
;
125 extern char *graphname
;