* Ada equiv to ncurses?
@ 1996-04-25 0:00 David Morton
1996-04-29 0:00 ` Michael Feldman
1996-04-29 0:00 ` Michael Feldman
0 siblings, 2 replies; 3+ messages in thread
From: David Morton @ 1996-04-25 0:00 UTC (permalink / raw)
The subject says it all... Is there any Ada
packages similar to ncurses? I don't need that
*big* of a package, but something to tell the
cursor to goto(X,Y) that is portable would be nice.
--
David Morton
mailto:dmorton@jinx.sckans.edu // If you use Netscape 2.0,
205 College, Winfield, KS 67156 // you can click on the mailto: part to reply!
(HINT, HINT) :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ada equiv to ncurses?
1996-04-25 0:00 Ada equiv to ncurses? David Morton
@ 1996-04-29 0:00 ` Michael Feldman
1996-04-29 0:00 ` Michael Feldman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Feldman @ 1996-04-29 0:00 UTC (permalink / raw)
In article <317FF9F5.2CB287FE@jinx.sckans.edu>,
David Morton <dmorton@jinx.sckans.edu> wrote:
>The subject says it all... Is there any Ada
>packages similar to ncurses? I don't need that
>*big* of a package, but something to tell the
>cursor to goto(X,Y) that is portable would be nice.
Here is a little package to get you started.
PACKAGE Screen IS
------------------------------------------------------------------
--| Procedures for drawing pictures on ANSI Terminal Screen
--| Author: Michael B. Feldman, The George Washington University
--| Last Modified: October 1995
------------------------------------------------------------------
ScreenHeight : CONSTANT Integer := 24;
ScreenWidth : CONSTANT Integer := 80;
SUBTYPE Height IS Integer RANGE 1..ScreenHeight;
SUBTYPE Width IS Integer RANGE 1..ScreenWidth;
TYPE Position IS RECORD
Row : Height := 1;
Column: Width := 1;
END RECORD;
PROCEDURE Beep;
-- Pre: none
-- Post: the terminal beeps once
PROCEDURE ClearScreen;
-- Pre: none
-- Post: the terminal screen is cleared
PROCEDURE MoveCursor (To: IN Position);
-- Pre: To is defined
-- Post: the terminal cursor is moved to the given position
END Screen;
WITH Ada.Text_IO;
WITH Ada.Integer_Text_IO;
PACKAGE BODY Screen IS
------------------------------------------------------------------
--| Procedures for drawing pictures on ANSI Terminal Screen
--| These procedures will work correctly only if the actual
--| terminal is ANSI compatible. ANSI.SYS on a DOS machine
--| will suffice.
--| Author: Michael B. Feldman, The George Washington University
--| Last Modified: September 1995
------------------------------------------------------------------
PROCEDURE Beep IS
BEGIN
Ada.Text_IO.Put (Item => ASCII.BEL);
Ada.Text_IO.Flush;
END Beep;
PROCEDURE ClearScreen IS
BEGIN
Ada.Text_IO.Put (Item => ASCII.ESC);
Ada.Text_IO.Put (Item => "[2J");
Ada.Text_IO.Flush;
END ClearScreen;
PROCEDURE MoveCursor (To: IN Position) IS
BEGIN
Ada.Text_IO.Flush;
Ada.Text_IO.Put (Item => ASCII.ESC);
Ada.Text_IO.Put ("[");
Ada.Integer_Text_IO.Put (Item => To.Row, Width => 1);
Ada.Text_IO.Put (Item => ';');
Ada.Integer_Text_IO.Put (Item => To.Column, Width => 1);
Ada.Text_IO.Put (Item => 'f');
END MoveCursor;
END Screen;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ada equiv to ncurses?
1996-04-25 0:00 Ada equiv to ncurses? David Morton
1996-04-29 0:00 ` Michael Feldman
@ 1996-04-29 0:00 ` Michael Feldman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Feldman @ 1996-04-29 0:00 UTC (permalink / raw)
In article <317FF9F5.2CB287FE@jinx.sckans.edu>,
David Morton <dmorton@jinx.sckans.edu> wrote:
>The subject says it all... Is there any Ada
>packages similar to ncurses? I don't need that
>*big* of a package, but something to tell the
>cursor to goto(X,Y) that is portable would be nice.
If you are using GNAT for DOS, you'll find the following useful:
ftp://ftp.gwu.edu/pub/ada/ez2load/adatui.zip
which contains:
- a copy of the DJGPP-compatible port of pdcurses;
- a GNAT-compilable binding to pdcurses;
- a textual user interface (TUI) and demo program thereof.
This is currently being distributed as part of the overall ez2load
distribution containing GNAT for DOS and other goodies.
Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman - chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University - Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax)
http://www.seas.gwu.edu/faculty/mfeldman
------------------------------------------------------------------------
Pork is all that money the government gives the other guys.
------------------------------------------------------------------------
Ada on the WWW: http://lglwww.epfl.ch/Ada/ or http://info.acm.org/sigada/
------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-04-29 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-25 0:00 Ada equiv to ncurses? David Morton
1996-04-29 0:00 ` Michael Feldman
1996-04-29 0:00 ` Michael Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox