comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Cursor control question - ncurses and alternatives
Date: Fri, 13 Oct 2006 20:16:12 +0200
Date: 2006-10-13T20:15:39+02:00	[thread overview]
Message-ID: <1colo6xslobpi$.16zqp7euwfmjp.dlg@40tude.net> (raw)
In-Reply-To: pan.2006.10.13.16.30.06.922066@linuxchip.demon.co.uk.uk.uk

On Fri, 13 Oct 2006 16:32:30 GMT, Dr. Adrian Wrigley wrote:

> At the most basic level, I want to move the cursor to the start
> of the line, update the prompt, and move the cursor back to
> where it was.  How can I do this?
> 
> I have some test code, shown below, to illustrate the problem.
> Currently, the cursor moves to the end of the prompt
> spontaneously, when it should be at the end of the user's command.
> I don't want to take over the xterm with a "full-screen" application,
> I just want to enter a series of commands in a scrolling terminal.
> 
> Is this a job for ncurses?  What function is needed?
> Or is there a better way?

You could try the ANSI escape sequences instead of ncurses:

http://en.wikipedia.org/wiki/ANSI_escape_code

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2006-10-13 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 16:32 Cursor control question - ncurses and alternatives Dr. Adrian Wrigley
2006-10-13 18:16 ` Dmitry A. Kazakov [this message]
2006-10-13 21:13 ` Jeffrey R. Carter
2006-10-13 22:41 ` Björn Persson
2006-10-14  2:38   ` Dr. Adrian Wrigley
2006-10-14 12:53     ` Dr. Adrian Wrigley
replies disabled

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