curses problems

Marty Leisner.Henr at xerox.com
Sun Feb 18 08:56:05 AEST 1990


I'm using BSD curses on a sun386i and I have some unexplained weirdness.
(Maybe it was a mistake to use curses?)

I'm driving out menus with code that looks something like this:

	for(i = 10, 	pitem = &items; pitem->option_name; pitem++, i++) {
		move(i, 20);
		printw("%s", pitem->option_name);
	}

	move(LINES - 3, 0);
	printw("Enter option-->>");
	clrtobot();
	refresh();
	getstr(input);


The last option in the loop always prints right the first time.  However,
after the  program executes certain sequences of printw, clear, move and
refresh, the last option printed in the loop isn't in the right place (this
is bizarre).

Spacing over 20 spaces, curses outputs 2 tabs and 4 spaces.

When things break, the last line printed in the loop isn't prefaced by 2
tab/4 spaces, instead it's prefaced by 4 backspaces (I found this using
script).

I'm stumped -- what types of things should I look for?  Do other people
have good experience with curses for doing interactive applications?  Are
there any complicated curses programs I can look at out there?

(Please email me replies since my info-unix connection is flakey).

marty
ARPA:	leisner.henr at xerox.com
GV:  leisner.henr
NS:  leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner
 



More information about the Comp.unix.questions mailing list