home *** CD-ROM | disk | FTP | other *** search
-
- Listing 8
-
- type
- textbuf = array [0 .. 127] of char;
- textrec =
- record
- handle, mode, bufsize : word;
- private, bufpos, bufend : word;
- bufptr : ^textbuf;
- openfunc, inoutfunc : pointer;
- flushfunc, closefunc : pointer;
- userdata : array [1 .. 16] of byte;
- name : array [0 .. 79] of char;
- buffer : textbuf;
- end;
-
- {*
- * backup the file pointer so the last character read
- * can be read again
- *}
- procedure unread(var f : text);
- begin
- dec(textrec(f).bufpos);
- end;
-
-