home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xco212p.zip / ISODEF / stdchans.def < prev    next >
Text File  |  1994-12-22  |  2KB  |  58 lines

  1. DEFINITION MODULE StdChans;
  2.  
  3.   (* Access to standard and default channels *)
  4.  
  5. IMPORT IOChan;
  6.  
  7. TYPE
  8.   ChanId = IOChan.ChanId;
  9.     (* Values of this type are used to identify channels *)
  10.  
  11.   (* The following functions return the standard channel values.
  12.      These channels cannot be closed.
  13.   *)
  14.  
  15. PROCEDURE StdInChan (): ChanId;
  16.   (* Returns the identity of the implementation-defined standard source for
  17. program
  18.      input.
  19.   *)
  20.  
  21. PROCEDURE StdOutChan (): ChanId;
  22.   (* Returns the identity of the implementation-defined standard source for program
  23.      output.
  24.   *)
  25.  
  26. PROCEDURE StdErrChan (): ChanId;
  27.   (* Returns the identity of the implementation-defined standard destination for program
  28.      error messages.
  29.   *)
  30.  
  31. PROCEDURE NullChan (): ChanId;
  32.   (* Returns the identity of a channel open to the null device. *)
  33.  
  34.   (* The following functions return the default channel values *)
  35.  
  36. PROCEDURE InChan (): ChanId;
  37.   (* Returns the identity of the current default input channel. *)
  38.  
  39. PROCEDURE OutChan (): ChanId;
  40.   (* Returns the identity of the current default output channel. *)
  41.  
  42. PROCEDURE ErrChan (): ChanId;
  43.   (* Returns the identity of the current default error message channel. *)
  44.  
  45.   (* The following procedures allow for redirection of the default channels *)
  46.  
  47. PROCEDURE SetInChan (cid: ChanId);
  48.   (* Sets the current default input channel to that identified by cid. *)
  49.  
  50. PROCEDURE SetOutChan (cid: ChanId);
  51.   (* Sets the current default output channel to that identified by cid. *)
  52.  
  53. PROCEDURE SetErrChan (cid: ChanId);
  54.   (* Sets the current default error channel to that identified by cid. *)
  55.  
  56. END StdChans.
  57.  
  58.