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

  1. (*
  2.  * =========== macro processed output from MPP  ==========
  3.  *
  4.  * input file  : terminal.dpp
  5.  * time stamp  : 1996 Aug 29 12:28:44
  6.  *
  7.  * output file : terminal.def
  8.  * created at  : 1996 Oct 10 16:21:31
  9.  *
  10.  * options ... :  -Dos2
  11.  *
  12.  * =======================================================
  13.  *)
  14.  
  15. (****************************************************************)
  16. (*                                                              *)
  17. (*         Gardens Point Modula-2 Library Definition            *)
  18. (*                                                              *)
  19. (*                                                              *)
  20. (*     (c) Copyright 1996 Faculty of Information Technology     *)
  21. (*              Queensland University of Technology             *)
  22. (*                                                              *)
  23. (*     Permission is granted to use, copy and change this       *)
  24. (*     program as long as the copyright message is left intact  *)
  25. (*                                                              *)
  26. (****************************************************************)
  27.  
  28. FOREIGN DEFINITION MODULE Terminal;
  29.   IMPORT IMPLEMENTATION FROM "terminal.o";
  30.  
  31. (* output always goes to the UNIX std output  *)
  32. (* input always comes from the UNIX std input *)
  33.  
  34.   PROCEDURE WriteString(str : ARRAY OF CHAR);
  35.  
  36.   PROCEDURE WriteLn;
  37.  
  38.   PROCEDURE WriteCard(card  : CARDINAL;
  39.                       width : CARDINAL);
  40.  
  41.   PROCEDURE Write(ch : CHAR);
  42.  
  43.   PROCEDURE Read(VAR ch : CHAR);
  44.  
  45.   PROCEDURE EofIn() : BOOLEAN; (* returns "input ended" *)
  46.   PROCEDURE EofOut();          (* closes stdout stream  *)
  47.  
  48.   PROCEDURE GetKeyStroke(VAR ch : CHAR);
  49.   (* gets keystroke without waiting for <EOL> *)
  50.   (* does not echo the character, there is no *)
  51.   (* erase and kill processing. Restores tty  *)
  52.   (* mode after reading each character in     *)
  53.  
  54.   PROCEDURE WasKeyPressed(VAR ok:BOOLEAN;VAR c:CHAR); 
  55.   (* returns ok=TRUE if a key was pressed and  *)
  56.   (* c is the character pressed.  If no key    *)
  57.   (* has been pressed then ok=FALSE is returned*)
  58.   (* and c has no valid or meaningful value.   *)
  59.  
  60.  
  61. END Terminal.
  62.