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-Language: ENGLISH,ASCII X-Google-Thread: 103376,2626cb3fdc993d16 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-13 10:27:48 PST Message-ID: <3E70CD19.2040502@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Need a gotoXY consol IO procedure for Rational Apex on Sun References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 13 Mar 2003 13:25:29 -0500 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1047579932 198.96.47.195 (Thu, 13 Mar 2003 13:25:32 EST) NNTP-Posting-Date: Thu, 13 Mar 2003 13:25:32 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:35296 Date: 2003-03-13T13:25:29-05:00 List-Id: Jeffrey Creem wrote: > "�rjan Leringe" wrote in message > news:VeNba.75$Du.631@newsc.telia.net... > >>I need a procedure to do a little more than text_IO on Rational Apex for >>Sun. Actually the only procedure need is >> >> procedure Goto_XY (X, Y: Integer); >> >>which positions the cursor to pos X and row Y (Y can be backwards current >>position). > > You probably want to use something like ncurses > > http://www.familiepfeifer.de/juergen/ncurses.html If you are absolutely sure that you only need cursor positioning, and perhaps one or two other simple functions (like clear screen), you could get by with curs_termcap(3X) routines, of which you can build a binding to. A "man curs_termcap" turns up: NAME tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs ? direct curses interface to the terminfo capability database SYNOPSIS #include #include extern char PC; extern char * UP; extern char * BC; extern unsigned int ospeed; int tgetent(char *bp, const char *name); int tgetflag(char *id); int tgetnum(char *id); char *tgetstr(char *id, char **area); char *tgoto(const char *cap, int col, int row); int tputs(const char *str, int affcnt, int (*putc)(int)); The tricky part about some terminal escape sequences is however, that you need to supply parameters (move cursor is an example). If you also need to interpret function keys etc., you will get into even more work, which is probably more than you want. Without just using a few routines above to control the terminal directly, you pretty much have to go "whole hog" into [n]curses, and call initscr() and endwin() and everything else in between. You can't just use move() from the ncurses library, for example. If you are doing this for Windows, then PDCurses is available, or ncurses works (I believe) in a CYGWIN environment. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg