From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c68f22d9326eb7be X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Thu, 30 Nov 2006 06:58:10 -0600 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: NT_Console in linux? References: <1164889444.595086.184440@j44g2000cwa.googlegroups.com> Date: Thu, 30 Nov 2006 13:58:50 +0100 Message-ID: <87r6vlnl9x.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:PMMoipHAAVVOMXWLEu8MEDcMuvw= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 62.235.210.74 X-Trace: sv3-Tbg5Fl/OJvkvD1i+JZ9zujnIICERrkRoXz5/PfL4YF0l30tRj/tQ8oqhJc/B4vGPeE7am/gElPkddgw!sDhffeCf2AVW3U+yBzyO1jxwTkbAXinEQkmAsr6/nvFndeAFlBSQcRtLJAPam8m/EzxjjKTl8g== X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7758 Date: 2006-11-30T13:58:50+01:00 List-Id: 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.