(*
 * =========== macro processed output from MPP  ==========
 *
 * input file  : terminal.dpp
 * time stamp  : 1996 Aug 29 12:28:44
 *
 * output file : terminal.def
 * created at  : 1996 Oct 10 16:21:31
 *
 * options ... :  -Dos2
 *
 * =======================================================
 *)

(****************************************************************)
(*                                                              *)
(*         Gardens Point Modula-2 Library Definition            *)
(*                                                              *)
(*                                                              *)
(*     (c) Copyright 1996 Faculty of Information Technology     *)
(*              Queensland University of Technology             *)
(*                                                              *)
(*     Permission is granted to use, copy and change this       *)
(*     program as long as the copyright message is left intact  *)
(*                                                              *)
(****************************************************************)

FOREIGN DEFINITION MODULE Terminal;
  IMPORT IMPLEMENTATION FROM "terminal.o";

(* output always goes to the UNIX std output  *)
(* input always comes from the UNIX std input *)

  PROCEDURE WriteString(str : ARRAY OF CHAR);

  PROCEDURE WriteLn;

  PROCEDURE WriteCard(card  : CARDINAL;
                      width : CARDINAL);

  PROCEDURE Write(ch : CHAR);

  PROCEDURE Read(VAR ch : CHAR);

  PROCEDURE EofIn() : BOOLEAN; (* returns "input ended" *)
  PROCEDURE EofOut();          (* closes stdout stream  *)

  PROCEDURE GetKeyStroke(VAR ch : CHAR);
  (* gets keystroke without waiting for <EOL> *)
  (* does not echo the character, there is no *)
  (* erase and kill processing. Restores tty  *)
  (* mode after reading each character in     *)

  PROCEDURE WasKeyPressed(VAR ok:BOOLEAN;VAR c:CHAR); 
  (* returns ok=TRUE if a key was pressed and  *)
  (* c is the character pressed.  If no key    *)
  (* has been pressed then ok=FALSE is returned*)
  (* and c has no valid or meaningful value.   *)


END Terminal.
