Category : Modula II Source Code
Archive   : PCKERM.ZIP
Filename : FILES.DEF

 
Output of file : FILES.DEF contained in archive : PCKERM.ZIP
DEFINITION MODULE Files; (* File I/O for Kermit *)

FROM FileSystem IMPORT
File;

EXPORT QUALIFIED
Status, FileType, Open, Create, CloseFile, Get, Put, DoWrite;

TYPE
Status = (Done, Error, EOF);
FileType = (Input, Output);

PROCEDURE Open (VAR f : File; name : ARRAY OF CHAR) : Status;
(* opens an existing file for reading, returns status *)

PROCEDURE Create (VAR f : File; name : ARRAY OF CHAR) : Status;
(* creates a new file for writing, returns status *)

PROCEDURE CloseFile (VAR f : File; Which : FileType) : Status;
(* closes a file after reading or writing *)

PROCEDURE Get (VAR f : File; VAR ch : CHAR) : Status;
(* Reads one character from the file, returns status *)

PROCEDURE Put (ch : CHAR);
(* Writes one character to the file buffer *)

PROCEDURE DoWrite (VAR f : File) : Status;
(* Writes buffer to disk only if nearly full *)

END Files.

  3 Responses to “Category : Modula II Source Code
Archive   : PCKERM.ZIP
Filename : FILES.DEF

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/