🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #897

Re: initscr mungs tty mode in pcomm

#897
From: hood
Date: Fri, 04 Nov 1988 00:49
42 lines
1681 bytes
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
Technical Details
Message-ID: <21900001@osiris.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!mailrus!ncar!tank!uxc!uxc.cso.uiuc.edu!osiris.cso.uiuc.edu!hood
References: <847@ncrcce.StPaul.NCR.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!mailrus!ncar!tank!uxc!uxc.cso.uiuc.edu!osiris.cso.uiuc.edu!hood
From: hood@osiris.cso.uiuc.edu
Newsgroups: comp.bugs.sys5
Subject: Re: initscr mungs tty mode in pcomm
Message-ID: <21900001@osiris.cso.uiuc.edu>
Date: 4 Nov 88 00:49:00 GMT
References: <847@ncrcce.StPaul.NCR.COM>
Lines: 42
Nf-ID: #R:ncrcce.StPaul.NCR.COM:847:osiris.cso.uiuc.edu:21900001:000:1169
Nf-From: osiris.cso.uiuc.edu!hood    Nov  3 18:49:00 1988