Adapt src/pre-html (src/preproc/html)
[s-roff.git] / src / pre-html / pushback.h
blob00ccc8faf6ad4919ffd9513fac3de4f3bcb82873
1 /*@ Defines the class and methods implemented within pushback.cpp.
3 * Copyright (c) 2014 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
5 * Copyright (C) 2000 - 2004 Free Software Foundation, Inc.
6 * Written by Gaius Mulley (gaius@glam.ac.uk).
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
11 * version.
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
16 * for more details.
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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef _PUSHBACK_H
23 #define _PUSHBACK_H
25 #include "config.h"
26 #include "html-config.h"
28 #define eof (char)-1
30 class pushBackBuffer
32 char *charStack;
33 int stackPtr; // index to push back stack
34 int debug;
35 int verbose;
36 int eofFound;
37 char *fileName;
38 int lineNo;
39 int stdIn;
41 public:
42 pushBackBuffer(char *);
43 ~pushBackBuffer(void);
45 char getPB(void);
46 char putPB(char ch);
47 void skipUntilToken(void);
48 void skipToNewline(void);
49 double readNumber(void);
50 int readInt(void);
51 char * readString(void);
52 int isString(char const *string);
55 #endif // _PUSHBACK_H
56 // s-it2-mode