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. */
21 typedef void (*REQUEST_FUNCP
)();
25 class request_or_macro
: public object
{
28 virtual void invoke(symbol s
) = 0;
29 virtual macro
*to_macro();
32 class request
: public request_or_macro
{
36 request(REQUEST_FUNCP
);
39 void delete_request_or_macro(request_or_macro
*);
41 extern object_dictionary request_dictionary
;
46 class macro
: public request_or_macro
{
48 const char *filename
; // where was it defined?
55 macro
&operator=(const macro
&);
56 void append(unsigned char);
62 friend class string_iterator
;
63 friend void chop_macro();
64 friend int operator==(const macro
&, const macro
&);
67 extern void init_input_requests();
68 extern void init_div_requests();
69 extern void init_node_requests();
70 extern void init_reg_requests();
71 extern void init_env_requests();
72 extern void init_hyphen_requests();
73 extern void init_request(const char *s
, REQUEST_FUNCP f
);
75 extern int no_break_flag
; // indicates whether request was invoked with . or '
80 node
*charinfo_to_node_list(charinfo
*, const environment
*);