Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Basic C programming question

Author: Robert Hyatt

Date: 07:59:18 12/04/03

Go up one level in this thread


On December 04, 2003 at 10:38:46, Tord Romstad wrote:

>I would like my engine to display the current line in the search every
>second when running in console mode, but I don't want the display to scroll
>down every time a new line is displayed.  Is there a simple way to tell the
>computer to delete all text back to the beginning of the current line on the
>console, and start writing from there at the next call to printf()?
>
>If possible, I would prefer to avoid using ncurses or similar libraries.
>
>Tord

use \r to end a line rather than \n.  Cursor will back up to the beginning
of the line rather than backing to the beginning then stepping down to the
next line.  I do this in Crafty every 15 seconds to show things are still
running, as well as to display each root move as it is searched, without
scrolling like mad.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.