2 /* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003
3 Free Software Foundation, Inc.
4 Written by James Clark (jjc@jclark.com)
6 This file is part of groff.
8 groff 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
13 groff 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
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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
28 #ifdef NEED_DECLARATION_HYPOT
30 double hypot(double, double);
32 #endif /* NEED_DECLARATION_HYPOT */
34 #ifdef NEED_DECLARATION_RAND
39 #endif /* NEED_DECLARATION_RAND */
41 #ifdef NEED_DECLARATION_SRAND
44 #ifdef RET_TYPE_SRAND_IS_VOID
45 void srand(unsigned int);
47 int srand(unsigned int);
50 #endif /* NEED_DECLARATION_SRAND */
54 double fmod(double, double);
60 #include "stringclass.h"
68 #define M_SQRT2 1.41421356237309504880
72 #define M_PI 3.14159265358979323846
80 virtual int get() = 0;
81 virtual int peek() = 0;
82 virtual int get_location(const char **, int *);
83 friend class input_stack;
84 friend class copy_rest_thru_input;
87 class file_input : public input {
95 file_input(FILE *, const char *);
99 int get_location(const char **, int *);
102 void lex_init(input *);
103 int get_location(char **, int *);
105 void do_copy(const char *file);
107 void parse_cleanup();
109 void lex_error(const char *message,
110 const errarg &arg1 = empty_errarg,
111 const errarg &arg2 = empty_errarg,
112 const errarg &arg3 = empty_errarg);
114 void lex_warning(const char *message,
115 const errarg &arg1 = empty_errarg,
116 const errarg &arg2 = empty_errarg,
117 const errarg &arg3 = empty_errarg);
121 extern int flyback_flag;
122 extern int command_char;
123 // zero_length_line_flag is non-zero if zero-length lines are drawn
124 // as dots by the output device
125 extern int zero_length_line_flag;
126 extern int driver_extension_flag;
127 extern int compatible_flag;
128 extern int safer_flag;
129 extern char *graphname;