*BSD News Article 3343


Return to BSD News archive

Xref: sserve comp.bugs.4bsd:1882 comp.unix.bsd:3387
Newsgroups: comp.bugs.4bsd,comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!sunic!ugle.unit.no!lise.unit.no!arnej
From: arnej@Lise.Unit.NO (Arne Henrik Juul)
Subject: typo in reset in net-2
Message-ID: <1992Aug12.023559.20371@ugle.unit.no>
Followup-To: comp.bugs.4bsd
Keywords: reset,tset
Sender: news@ugle.unit.no (NetNews Administrator)
Reply-To: arnej@lise.unit.no
Organization: Norwegian Institute of Technology
Date: Wed, 12 Aug 92 02:35:59 GMT
Lines: 21

I found a small bug in the code for the tset / reset programs in the
networking-II distribution when compiling it for 386bsd. The problem
is in the reset code, more specifically set.c, function set_control_chars:

	if (erasechar == 0 && !tgetflag("os") && mode.c_cc[VERASE] == CERASE) {
		if (tgetflag("bs") || bs_char != 0)
			erasechar = -1;
	}

The mode.c_cc check is inversed - it now only uses the backspace code
for erase if erase is already set to the default, while it should only
do this if erase is NOT set to the default.

(Sorry, no context diff - I'm writing this while in X on a 386bsd
machine that works only slightly, but it *works* :-)


For the 386bsd people: tset/reset will soon appear under /pub/unix/386bsd
on ugle.unit.no, source & binaries. Note followup!

Arne H. Juul  --  arnej@lise.unit.no  --  University of Trondheim, Norway