[BusyBox] Re: getty->ash: sticky caps lock

Giulio Orsero giulioo at pobox.com
Mon Jan 14 13:47:03 UTC 2002


On Mon, 14 Jan 2002 12:11:47 -0800, Larry Doolittle
<ldoolitt at recycle.lbl.gov> wrote:

>Bwa-ha-ha!  You have been bitten by a 30-year-old backwards-compatibility
>"feature".  Unix is supposed to work as correctly as possible when faced
>with a terminal so old that IT HAS NO LOWERCASE CAPABILITY.
>
Ah .... thanks!

I see this in pwd_grp/getty.c
==
/* Account for upper case without lower case. */
 
    if (cp->capslock) {
        tp->c_iflag |= IUCLC;
        tp->c_lflag |= XCASE;
        tp->c_oflag |= OLCUC;
    }
==

And thanks to this, now, after some years, I've finally understood the
meaning of this snippet
==
stty > $file1
grep iuclc $file1 1>/dev/null
if [ $? = 0 ] ; then
    stty -lcase
==
that I see in the init scripts we use in our systems (scripts dating back to
Interactive Unix times...).

Thanks

-- 
giulioo at pobox.com



More information about the busybox mailing list