2 /* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
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. */
23 class reg : public object {
25 virtual const char *get_string() = 0;
26 virtual int get_value(units *);
27 virtual void increment();
28 virtual void decrement();
29 virtual void set_increment(units);
30 virtual void alter_format(char f, int w = 0);
31 virtual const char *get_format();
32 virtual void set_value(units);
35 class constant_int_reg : public reg {
38 constant_int_reg(int *);
39 const char *get_string();
42 class general_reg : public reg {
48 const char *get_string();
51 void alter_format(char f, int w = 0);
52 void set_increment(units);
53 const char *get_format();
54 void add_value(units);
56 void set_value(units) = 0;
57 int get_value(units *) = 0;
60 class variable_reg : public general_reg {
64 void set_value(units);
65 int get_value(units *);
68 extern object_dictionary number_reg_dictionary;
69 extern void set_number_reg(symbol nm, units n);
70 extern void check_output_limits(int x, int y);
71 extern void reset_output_registers (int miny);
73 reg *lookup_number_reg(symbol);
75 void inline_define_reg();