/contrib/groff/src/preproc/html/pushback.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 54 lines · 24 code · 8 blank · 22 comment · 0 complexity · 622ea72c2c4f6fe636550c3ae5e33566 MD5 · raw file

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