home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / modu1096.zip / GPMsym / termchan.def < prev    next >
Text File  |  1996-08-29  |  1KB  |  37 lines

  1. DEFINITION MODULE TermChan;
  2.  
  3. (* Extra interfaces to the terminal channel, not included in the Standard *)
  4.  
  5. IMPORT IOChan;
  6. FROM   IOConsts  IMPORT ReadResults;
  7.  
  8. TYPE
  9.   ChanId = IOChan.ChanId;
  10.  
  11.  
  12. PROCEDURE LookKey (    cid : ChanId;
  13.                    VAR ok  : BOOLEAN;
  14.            VAR ch  : CHAR;
  15.            VAR res : ReadResults);
  16. (* Performs 'no-wait' input:
  17.    If there is a character available on TermFile channel cid, return ok TRUE
  18.    and the results of a Look(cid/dtp, ch, res);
  19.    otherwise return ok FALSE. *)
  20.  
  21. PROCEDURE Echo ();
  22. (* Enable echo for all terminal channels.
  23.    Echoing is on by default, and can be controlled by use of
  24.    TextIO.Read (echo) cf IOChan.Look/Skip (no echo).
  25.    However NoEcho truns off echoing globally, and this procedure
  26.    allows it to be turned back on. *)
  27.  
  28. PROCEDURE NoEcho ();
  29. (* Disable echoing for all terminal channels.
  30.    LookKey disables echo when it checks for (and reads) a character;
  31.    however a typical LookKey loop will often be outside LookKey when a key is
  32.    pressed, and default operatijg system echo will occur.
  33.    This procedure allows echoing to be globally suppressed, so that LookKey
  34.    echo is entirely under user control. *)
  35.  
  36. END TermChan.
  37.