Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2001 00:20:48 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Hans Zaunere <zaunere@yahoo.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: ncurses
Message-ID:  <3B7B7450.166AC2ED@mindspring.com>
References:  <20010816004554.96396.qmail@web12807.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hans Zaunere wrote:
> 
> I'm sorry that this is offtopic, but I've looked/asked
> everywhere and no one has a clue.
> 
> Once a program does initscr(), is it possible to
> printf()?  I can printf() stuff without a problem, but
> it doesn't get to the screen until the program exits?
> 
> I've done every ncurses function I can think of,
> endwin(), etc.  However if there is a printf()
> anywhere after ncurses stuff has happened, nothing is
> printed to the screen until the program exits.  What
> am I missing?  Is there a trick to this, as it must be
> possible, right?

Printf goes to a buffer, which is not necessarily flushed
until you do input using a stdio function, or explicitly
call fflush(stdout).

Generally speaking, if you have started curses, all your
output should be done using curses routines, so that the
curses library knows about it, and does the right thing
for refresh, maintaining the current cursor location so
the next printf() goes to the right place, etc..

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B7B7450.166AC2ED>