[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: major problem with trivial piece of code
From: |
Heusden van, FJJ (Folkert) |
Subject: |
RE: major problem with trivial piece of code |
Date: |
Fri, 30 Jan 2004 13:27:53 +0100 |
> > 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".
Folkert.
================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht
onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en
de afzender direct te informeren door het bericht te retourneren.
================================================
The information contained in this message may be confidential
and is intended to be exclusively for the addressee. Should you
receive this message unintentionally, please do not use the contents
herein and notify the sender immediately by return e-mail.