ncurses, initscr(), and ripoffline()

As I read the docs, if I use ripoffline() before I use initscr(), the
size of stdscr will be reduced by the number of times ripoffline() is
invoked (up to 5). This, indeed, does happen. BUT initscr() still
clears the entire screen, including the lines that have been ripped
off.\

Is there anyway to start ncurses and have it not affect (in my specific
case) the bottom four lines on the screen? These lines are used by a
background task that monitors in-coming serial data from radio signals.

The remaining lines (the ones I want to use with ncurses) are for
foreground user applications.


Bob Harris In short, you may buy a servant or slave,
Bath, NH but you cannot buy a friend.
bob@microprograms.com (Thoreau: Wild Fruits)

Robert L. Harris <bob@microprograms.com> wrote:

As I read the docs, if I use ripoffline() before I use initscr(), the
size of stdscr will be reduced by the number of times ripoffline() is
invoked (up to 5). This, indeed, does happen. BUT initscr() still
clears the entire screen, including the lines that have been ripped
off.\

Is there anyway to start ncurses and have it not affect (in my specific
case) the bottom four lines on the screen? These lines are used by a
background task that monitors in-coming serial data from radio signals.

not easily. you could (in principle) make a modified terminfo that
doesn’t have the ‘clear’ capability, set the scrolling margins to
be 4 lines less than the actual screen in the initialization sequence,
and change the screen size accordingly. But qnx doesn’t support
csr (scrolling regions), so that doesn’t appear doable.

I’d do it the other way around: start the background process after
the ncurses one, and make the ncurses application leave that section
of the screen alone. (I do essentially that in my directory editor).


Thomas E. Dickey <dickey@radix.net> <dickey@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com

Say, aren’t you one of the XFree86 guru’s?
(The xterm guy :slight_smile:

anyway, welcome to the qnx group…

rick

Thomas Dickey wrote:
[…]


Thomas E. Dickey <> dickey@radix.net> > <> dickey@herndon4.his.com
http://dickey.his.com
ftp://dickey.his.com

Rick Lake <rwlake@mapsonanp.nl> wrote:

Say, aren’t you one of the XFree86 guru’s?
(The xterm guy > :slight_smile:
ncurses, xterm, …

(I do followups in newsgroups when deja-news shows me something interesting)


Thomas E. Dickey <dickey@radix.net> <dickey@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com