No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / groff / src / roff / troff / request.h
blob331091c6d905ebc3b32214847da575feb4adf115
1 /* $NetBSD$ */
3 // -*- C++ -*-
4 /* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004
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
13 version.
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
18 for more details.
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. */
24 typedef void (*REQUEST_FUNCP)();
26 class macro;
28 class request_or_macro : public object {
29 public:
30 request_or_macro();
31 virtual void invoke(symbol s) = 0;
32 virtual macro *to_macro();
35 class request : public request_or_macro {
36 REQUEST_FUNCP p;
37 public:
38 void invoke(symbol);
39 request(REQUEST_FUNCP);
42 void delete_request_or_macro(request_or_macro *);
44 extern object_dictionary request_dictionary;
46 class macro_header;
47 struct node;
49 class macro : public request_or_macro {
50 const char *filename; // where was it defined?
51 int lineno;
52 int len;
53 int empty_macro;
54 int is_a_diversion;
55 public:
56 macro_header *p;
57 macro();
58 ~macro();
59 macro(const macro &);
60 macro(int);
61 macro &operator=(const macro &);
62 void append(unsigned char);
63 void append(node *);
64 void append_unsigned(unsigned int i);
65 void append_int(int i);
66 void append_str(const char *);
67 void set(unsigned char, int);
68 unsigned char get(int);
69 int length();
70 void invoke(symbol);
71 macro *to_macro();
72 void print_size();
73 int empty();
74 int is_diversion();
75 friend class string_iterator;
76 friend void chop_macro();
77 friend void substring_request();
78 friend int operator==(const macro &, const macro &);
81 extern void init_input_requests();
82 extern void init_markup_requests();
83 extern void init_div_requests();
84 extern void init_node_requests();
85 extern void init_reg_requests();
86 extern void init_env_requests();
87 extern void init_hyphen_requests();
88 extern void init_request(const char *s, REQUEST_FUNCP f);
90 class charinfo;
91 class environment;
93 node *charinfo_to_node_list(charinfo *, const environment *);