]> gcc.gnu.org Git - gcc.git/blame - gcc/m2/gm2-libs-log/Termbase.def
Modula-2 rename logitech libraries to log
[gcc.git] / gcc / m2 / gm2-libs-log / Termbase.def
CommitLineData
1eee94d3
GM
1(* Termbase.def provides GNU Modula-2 with a PIM 234 compatible Termbase.
2
83ffe9cd 3Copyright (C) 2004-2023 Free Software Foundation, Inc.
1eee94d3
GM
4Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6This file is part of GNU Modula-2.
7
8GNU Modula-2 is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GNU Modula-2 is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18Under Section 7 of GPL version 3, you are granted additional
19permissions described in the GCC Runtime Library Exception, version
203.1, as published by the Free Software Foundation.
21
22You should have received a copy of the GNU General Public License and
23a copy of the GCC Runtime Library Exception along with this program;
24see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25<http://www.gnu.org/licenses/>. *)
26
27DEFINITION MODULE Termbase ;
28
29(*
30 Initially the read routines from Keyboard and the
31 write routine from Display is assigned to the Read,
32 KeyPressed and Write procedures.
33*)
34
35EXPORT QUALIFIED ReadProcedure, StatusProcedure, WriteProcedure,
36 AssignRead, AssignWrite, UnAssignRead, UnAssignWrite,
37 Read, KeyPressed, Write ;
38
39TYPE
40 ReadProcedure = PROCEDURE (VAR CHAR) ;
41 WriteProcedure = PROCEDURE (CHAR) ;
42 StatusProcedure = PROCEDURE () : BOOLEAN ;
43
44
45(*
46 AssignRead - assigns a read procedure and status procedure for terminal
47 input. Done is set to TRUE if successful. Subsequent
48 Read and KeyPressed calls are mapped onto the user supplied
49 procedures. The previous read and status procedures are
50 uncovered and reused after UnAssignRead is called.
51*)
52
53PROCEDURE AssignRead (rp: ReadProcedure; sp: StatusProcedure;
54 VAR Done: BOOLEAN) ;
55
56
57(*
58 UnAssignRead - undo the last call to AssignRead and set Done to TRUE
59 on success.
60*)
61
62PROCEDURE UnAssignRead (VAR Done: BOOLEAN) ;
63
64
65(*
66 Read - reads a single character using the currently active read
67 procedure.
68*)
69
70PROCEDURE Read (VAR ch: CHAR) ;
71
72
73(*
74 KeyPressed - returns TRUE if a character is available to be read.
75*)
76
77PROCEDURE KeyPressed () : BOOLEAN ;
78
79
80(*
81 AssignWrite - assigns a write procedure for terminal output.
82 Done is set to TRUE if successful. Subsequent
83 Write calls are mapped onto the user supplied
84 procedure. The previous write procedure is
85 uncovered and reused after UnAssignWrite is called.
86*)
87
88PROCEDURE AssignWrite (wp: WriteProcedure; VAR Done: BOOLEAN) ;
89
90
91(*
92 UnAssignWrite - undo the last call to AssignWrite and set Done to TRUE
93 on success.
94*)
95
96PROCEDURE UnAssignWrite (VAR Done: BOOLEAN) ;
97
98
99(*
100 Write - writes a single character using the currently active write
101 procedure.
102*)
103
104PROCEDURE Write (VAR ch: CHAR) ;
105
106
107END Termbase.
This page took 0.116279 seconds and 5 git commands to generate.