bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: major problem with trivial piece of code


From: Thomas Dickey
Subject: RE: major problem with trivial piece of code
Date: Fri, 30 Jan 2004 07:54:17 -0500 (EST)

On Fri, 30 Jan 2004, Heusden van, FJJ (Folkert) wrote:

> > > You forgot to add your own text :-)
> > I added a "refresh();" call, but forgot that your message was much longer
> > than that...
>
> ah, ok. But that's not the problem: the original code has this refresh-
> statement.
>
> > > Anyway, I might have found it: it seems to be a problem with the \n in
> > > the text. It seems that if you wprintw() a string with a \n in it, only
> > > spaces are printed.
> > yes - it clears the remainder of the current line, and moves to the next
> > line.  This is confusing if you're printing into a single-line window.
>
> Yes, not only that, it also doesn't print the rest of the string!
> For example:
> char *test = { 'H', 'e', 'l', 'l', 'o', '\n', 0x00 };
> wprintw(stdscr, "%s", test);
> won't display anything at all, not even the "Hello".

I'll check & see if something is broken (thanks).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]