initscr mungs tty mode in pcomm
hood at osiris.cso.uiuc.edu
hood at osiris.cso.uiuc.edu
Fri Nov 4 10:49:00 AEST 1988
Reference the problem with curses' initscr() clobbering tabs... this is
in every version of curses I've seen. The only real solution is to
make sure that your .profile (or /etc/profile) has the "tput" command
to set the tab stops.
Excerpts from the Pcomm Readme.7300 file:
For example, curses(3) looks at the terminfo database to see if
your terminal has "hardware tabs", if so, it expects the tab
stops to be set. Ignoring tabs by using "stty -tabs" (to
convert tabs to spaces) won't work, in fact, curses(3) RESETS
things as if you had typed "stty tabs"!
I understand that newer versions of Unix have a "init" option to
the "tput" command to perform all the initialization with only
one argument. For example:
tputs init
tabs
Otherwise, a somewhat longer solution is:
eval `tput iprog`
tput is1
tput is2
if [ -n "`tput hts`" ] ;then
stty tabs
else
stty -tabs
fi
tabs
cat -s "`tput if`"
tput is3
echo "\r\c"
Emmet P. Gray US Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egray Attn: AFZF-DE-ENV
Directorate of Engineering & Housing
Environmental Management Office
Fort Hood, TX 76544-5057
More information about the Comp.bugs.sys5
mailing list