CURSES, cant find current screen position

Andy Knight x445 aknight at milky-way.uucp
Tue Jun 25 06:29:53 AEST 1991



I have a curses program which I want to open up a one line 
window at the current cursor position on the screen
without clearing the screen. I do clearok(curscr, FALSE)
after initscr()  so the screen will not clear on refreshes.

The problem is that when I create a new window it needs the
current line (or row) number to start the window at and I
cant seem to get this information by looking at the curscr
or stdscr structures.  ie. getyx(curscr,y,x) returns 0 for y,
which tells me that the cursor is at the top of the screen 
instead of where it really is.

So, in short, does anyone know how to determine where you are on
the screen at startup with a curses routine or system call???
(Note: I am using SunOS 4.1.1 and the standard curses library)


Thanks,
Andy Knight                        aknight at milky-way.prime.com
-Andy Knight       aknight at milky-way.prime.com   (617)275-1800 X6403



More information about the Comp.unix.programmer mailing list