streamfile.def 748 B

12345678910111213141516171819202122232425
  1. DEFINITION MODULE StreamFile;
  2. (* ISO 10514-1: opening and closing sequential-stream channels.
  3. Layered on IOChan; the read flag implies old, and text is implied
  4. unless raw is requested. *)
  5. IMPORT IOChan, ChanConsts;
  6. TYPE
  7. ChanId = IOChan.ChanId;
  8. FlagSet = ChanConsts.FlagSet;
  9. OpenResults = ChanConsts.OpenResults;
  10. CONST
  11. read = FlagSet{ChanConsts.readFlag};
  12. write = FlagSet{ChanConsts.writeFlag};
  13. old = FlagSet{ChanConsts.oldFlag};
  14. text = FlagSet{ChanConsts.textFlag};
  15. raw = FlagSet{ChanConsts.rawFlag};
  16. PROCEDURE Open (VAR cid : ChanId; name : ARRAY OF CHAR;
  17. flags : FlagSet; VAR res : OpenResults);
  18. PROCEDURE IsStreamFile (cid : ChanId) : BOOLEAN;
  19. PROCEDURE Close (VAR cid : ChanId);
  20. END StreamFile.