home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib1 / v_01_06 / 1n06040c < prev    next >
Encoding:
Text File  |  1995-11-01  |  507 b   |  27 lines

  1.  
  2. Listing 8
  3.  
  4. type
  5.     textbuf = array [0 .. 127] of char;
  6.     textrec =
  7.         record
  8.         handle, mode, bufsize : word;
  9.         private, bufpos, bufend : word;
  10.         bufptr : ^textbuf;
  11.         openfunc, inoutfunc : pointer;
  12.         flushfunc, closefunc : pointer;
  13.         userdata : array [1 .. 16] of byte;
  14.         name : array [0 .. 79] of char;
  15.         buffer : textbuf;
  16.         end;
  17.  
  18. {*
  19.  * backup the file pointer so the last character read
  20.  * can be read again
  21.  *}
  22. procedure unread(var f : text);
  23.     begin
  24.     dec(textrec(f).bufpos);
  25.     end;
  26.  
  27.