xref: /netbsd-src/external/gpl2/groff/dist/src/preproc/html/pushback.h (revision 89a07cf815a29524268025a1139fac4c5190f765)
1 /*	$NetBSD: pushback.h,v 1.1.1.1 2016/01/13 18:41:49 christos Exp $	*/
2 
3 // -*- C -*-
4 /* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
5      Written by Gaius Mulley (gaius@glam.ac.uk).
6 
7 This file is part of groff.
8 
9 groff is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
12 version.
13 
14 groff is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17 for more details.
18 
19 You should have received a copy of the GNU General Public License along
20 with groff; see the file COPYING.  If not, write to the Free Software
21 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
22 
23 
24 #define eof              (char)-1
25 
26 
27 /*
28  *  defines the class and methods implemented within pushback.cpp
29  */
30 
31 class pushBackBuffer
32 {
33  private:
34   char       *charStack;
35   int         stackPtr;   /* index to push back stack        */
36   int         debug;
37   int         verbose;
38   int         eofFound;
39   char       *fileName;
40   int         lineNo;
41   int         stdIn;
42 
43  public:
44          pushBackBuffer (char *);
45   ~      pushBackBuffer ();
46   char   getPB          (void);
47   char   putPB          (char ch);
48   void   skipUntilToken (void);
49   void   skipToNewline  (void);
50   double readNumber     (void);
51   int    readInt        (void);
52   char  *readString     (void);
53   int    isString       (const char *string);
54 };
55 
56 
57