home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume6 / yahp2ps / part02 / io.h < prev    next >
C/C++ Source or Header  |  1989-02-03  |  3KB  |  78 lines

  1. /*
  2.         HPGL to PostScript converter
  3.    Copyright (C) 1988 (and following) Federico Heinz
  4.  
  5. yahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  6. WARRANTY.  No author or distributor accepts responsibility to anyone
  7. for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.
  9. Refer to the Free Software Foundation's General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute yahp2ps,
  12. but only under the conditions described in the GNU General Public
  13. License.  A copy of this license is supposed to have been given to you
  14. along with yahp2ps so you can know your rights and responsibilities.  It
  15. should be in a file named COPYING.  Among other things, the copyright
  16. notice and this notice must be preserved on all copies.
  17.  
  18. In other words, go ahead and share yahp2ps, but don't try to stop
  19. anyone else from sharing it farther.  Help stamp out software hoarding!
  20.  
  21. yahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  22. it is only released under the same conditions.
  23.  
  24.     For bug reports, wishes, etc. send e-mail to
  25.  
  26.     ...!mcvax!unido!tub!actisb!federico  (from Europe)
  27.     ...!uunet!pyramid!actisb!federico    (from anywhere else)
  28.  
  29.     For Physical mail:
  30.  
  31.     Federico Heinz
  32.     Beusselstr. 21
  33.     1000 Berlin 21
  34.  
  35.     Tel. (+49 30) 396 77 92
  36.  
  37. */
  38. /**************************************************************************
  39.  
  40.   Input/Output definitions.
  41.  
  42. ***************************************************************************/
  43.  
  44. #ifndef EOF
  45.  
  46. #define EOF     (-1)
  47.  
  48. #endif
  49.  
  50. /* Check whether char can be beginning of a number */
  51.  
  52. #define isNumeric(x) (isdigit(x) || ((x) == '+') || \
  53.             ((x) == '-') || ((x) == '.'))
  54.  
  55. /* One-char lookahead buffer */
  56.  
  57. extern int LookAhead;
  58.  
  59.  
  60. extern void    skipSeparator(); /* Skip over one or more HPGL separators   */
  61. extern void    skipTerminator();/* Skip over one or more HPGL terminators  */
  62. extern int     getChar();       /* Get the next char from the input stream */
  63. extern void    putChar();    /* Put a char to the output stream         */
  64. extern Boolean getNumber();     /* Get a Number from the input stream      */
  65. extern Boolean ASCIIToNumber(); /* Get a Number from an alpha string       */
  66. extern Boolean getInteger();    /* Get an Integer from the in stream       */
  67.                                 /* Get a CoordinatePair from the in stream */
  68. extern Boolean getCoordinatePair();
  69. extern void    endCommand();    /* Check for excess parameters & skip Term.*/
  70. extern void    writeNumber();   /* Put a Number to the output stream       */
  71.                                 /* Put a CoordinatePair to the out stream  */
  72. extern void    writeCoordinatePair();
  73. extern void    writeString();   /* Put a string to the output stream       */
  74.  
  75. extern Boolean setInput();      /* Reassign the input stream              */
  76. extern Boolean setOutput();     /* Reassign the output stream             */
  77.  
  78.