TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ncurses question



I've got a simple question, i hope.

I've started messing with a little ncurses programming, and am having
pretty good success, but there are a couple of points that elude me and I
don't have any source to steal from real handy.

I can get things initialized OK, but when I exit the program, the terminal
is all messed up, as far as cr/lf and possibly other things go.

I thought that calling
	initscr();
	noecho();

on startup and then
	echo();
	endwin();

on exit would take care of it, but I guess not.  Only a reset at the bash
prompt gets me back to sanity.  Any advice?

Drawing bkgd colors isn't working real well -- I think I don't understand
the model of color pairs too well, and the arguments in the man pages are
clear as a baby's bottom.  Can someone clarify, or maybe post a little
ncurses source for me to peek at?

Thanks a bunch!

Phil M

 -- Lottery:    a tax on people who are
bad at math