home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / adaptor / src / include / source.h < prev    next >
C/C++ Source or Header  |  1993-07-08  |  1KB  |  43 lines

  1. # ifndef xySource
  2. # define xySource
  3.  
  4. /* $Id: Source.h,v 1.3 90/07/04 14:34:38 grosch rel $ */
  5.  
  6. extern int    BeginSource    ();
  7.  
  8.    /*
  9.       int BeginSource (FileName)
  10.      char *    FileName;
  11.  
  12.       BeginSource is called from the scanner to open files.
  13.       If not called input is read form standard input.
  14.    */
  15.  
  16. extern int    GetLine        ();
  17.  
  18.    /*
  19.       int GetLine (File, Buffer, Size)
  20.      int        File;
  21.      char *        Buffer;
  22.      unsigned    Size;
  23.  
  24.       GetLine is called to fill a buffer starting at address 'Buffer'
  25.       with a block of maximal 'Size' characters. Lines are terminated
  26.       by newline characters (ASCII = 0xa). GetLine returns the number
  27.       of characters transferred. Reasonable block sizes are between 128
  28.       and 2048 or the length of a line. Smaller block sizes -
  29.       especially block size 1 - will drastically slow down the scanner.
  30.    */
  31.  
  32. extern void    CloseSource    ();
  33.  
  34.    /*
  35.       void CloseSource (File)
  36.      int        File;
  37.  
  38.       CloseSource is called from the scanner at end of file respectively
  39.       at end of input. It can be used to close files.
  40.    */
  41.  
  42. # endif
  43.