Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!apollo!gallen
From: gallen@apollo.uucp (Gary Allen)
Newsgroups: comp.unix.questions
Subject: Re: Undefined erase/kill characters?
Message-ID: <3d1cf0a2.d8e9@apollo.uucp>
Date: 7 Jul 88 20:34:00 GMT
References: <2652@zyx.SE>
Reply-To: gallen@diskless.UUCP (Gary Allen)
Organization: Apollo Computer, Chelmsford, MA
Lines: 33

In article <2652@zyx.SE> arndt@zyx.SE (Arndt Jonasson) writes:
>
>The characters to use for erasing a single character and erasing an
>entire line, commonly called 'erase' and 'kill' and readble/settable
>by the 'stty' command, are stored in a character array pertaining to
>the terminal driver, which is updated and read by the 'ioctl' requests
>TCGETA/TCSETA/TCSETAF (in SysV) or TIOCGETP/TIOCSETN/TIOCSETP (in
>BSD). My question is: can any character (from 0 to 255) be made to,
>say, 'erase', or is there some value which indicates "undefined"?

The BSD manual defines -1 to be "undefined".

>What do Unix systems normally do? Is there a standard for this
>(meaning common usage, rather than prescription)? Do the SVID/SVVS
>bother to specify this?

The only time that I've seen this done is when the port is being used
to talk to something other than a terminal, but line buffering is
still desired.

>A related question: what is supposed to happen when more than one
>characters in this array are set to the same value? Which function
>is used when the terminal driver sees the character?

The BSD manual says that this is "probably unwise".
>-- 
>Arndt Jonasson, ZYX Sweden AB, Styrmansgatan 6, 114 54 Stockholm, Sweden
>email address:	 arndt@zyx.SE	or	!mcvax!enea!zyx!arndt

Gary Allen
Apollo Computer
Chelmsford, MA
{decvax,yale,umix}!apollo!gallen