Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: On locks and the like (for Dr. Hyatt)

Author: Robert Hyatt

Date: 22:01:34 05/23/03

Go up one level in this thread


On May 24, 2003 at 00:54:00, Zach Wegner wrote:

>When displaying root moves, the previous root move output is overwritten. The
>only function I could find that is called each time is Lock(lock_io), which only
>does something when SMP is defined. I would like to know how output is
>overwritten, because I don't think that Lock() has anything to do with it.
>Thanks,
>Zach

If you output a string like this:

"this goes on a line\r"

"this goes over the previous line because it didn't have a newline in it."

Normal printf strings end with \n to cause a CR/LF to be output which moves the
cursor to the next line (LF) and the curser back to the beginning of the line
(CR).

If you want a line to be overwritten later, end it with \r and the next
line will overwrite it when it is displayed.  If you later change your mind,
output a \n by itself and that will step you to the next line leaving the
previous line unchanged...





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.