comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: NT_Console in linux?
Date: Thu, 30 Nov 2006 13:58:50 +0100
Date: 2006-11-30T13:58:50+01:00	[thread overview]
Message-ID: <87r6vlnl9x.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1164889444.595086.184440@j44g2000cwa.googlegroups.com

xaerxess@gmail.com writes:
> Hi, I'm beginner in Ada and I have to do a computer game in Ada, but
> at home I've got only computer with Linux, so could anybody tell me
> if there is any equivalent for NT_console in Linux? In fact I need
> commands like gotoxy and text-colouring.
>
> And If I had any problems, I'll write here and ask you :)

There is no NT_Console in Linux, there are several Linux consoles: the
native console which you see before X starts, xterm, rxvt, eterm,
kdeterm, gnome-terminal, etc. etc.  Fortunately, all are
ANSI-compliant and you can use ncurses, which is normally part of your
distribution, to do what you want.  There exists an Ada binding to
ncurses somewhere; I think it is part of the ncurses source tarball
itself, but I'm not aware of any GNU/Linux distribution that carries
it as a precompiled package (they only carry the C interface).

You can write your program with ncurses on GNU/Linux, then port it to
Windows using PDCurses[1].  You will also have to port the Ada
binding, but that seems easy.

There is also texttools[2], which you can install thus:

# apt-get install libtexttools-dev
# less /usr/share/ada/adainclude/texttools.gpr

if you run Debian or a derivative thereof.  Texttools provides a
higher-level interface, with buttons, menus etc. which will be easier
to program than ncurses, and will even allow you to support the mouse.
Because texttools runs on top of ncurses, you can also port your
program to Windows using PDCurses.

[1] http://sourceforge.net/projects/pdcurses/
[2] http://www.pegasoft.ca/tt.html

HTH

-- 
Ludovic Brenta.



  reply	other threads:[~2006-11-30 12:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30 12:24 NT_Console in linux? xaerxess
2006-11-30 12:58 ` Ludovic Brenta [this message]
2006-12-08 14:36   ` Thomas Dickey
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox