diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-17 19:33:56 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-17 19:33:56 +0000 |
commit | 2c3b215724f01fd9421173a8aff38c4ebad61df0 (patch) | |
tree | 4895cfbfc2c417aecd8318aa9c24d6a6331c23e4 /libexec | |
parent | 04c9aff5680eafa3b2249b01b56a24169e56715a (diff) |
Add traditional handling of all upper-case input
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/getty/main.c | 18 | ||||
-rw-r--r-- | libexec/getty/subr.c | 13 |
2 files changed, 18 insertions, 13 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 44b2b942c1e..67904bda83a 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/ -static char rcsid[] = "$Id: main.c,v 1.5 1996/12/10 07:58:34 deraadt Exp $"; +static char rcsid[] = "$Id: main.c,v 1.6 1996/12/17 19:33:53 tholo Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -316,12 +316,16 @@ main(argc, argv) tmode.c_iflag |= ICRNL; tmode.c_oflag |= ONLCR; } -#if XXX - if (upper || UC) - tmode.sg_flags |= LCASE; - if (lower || LC) - tmode.sg_flags &= ~LCASE; -#endif + if (upper || UC) { + tmode.c_iflag |= IUCLC; + tmode.c_oflag |= OLCUC; + tmode.c_lflag |= XCASE; + } + if (lower || LC) { + tmode.c_iflag &= ~IUCLC; + tmode.c_oflag &= ~OLCUC; + tmode.c_lflag &= ~XCASE; + } if (tcsetattr(0, TCSANOW, &tmode) < 0) { syslog(LOG_ERR, "%s: %m", ttyn); exit(1); diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 14ed2aa2079..4c7c36499a0 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -33,7 +33,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$Id: subr.c,v 1.6 1996/12/16 20:04:45 tholo Exp $"; +static char rcsid[] = "$Id: subr.c,v 1.7 1996/12/17 19:33:55 tholo Exp $"; #endif /* not lint */ /* @@ -264,10 +264,11 @@ setflags(n) } } /* else, leave as is */ -#if 0 - if (UC) - f |= LCASE; -#endif + if (UC) { + SET(iflag, IUCLC); + SET(oflag, OLCUC); + SET(lflag, XCASE); + } if (HC) SET(cflag, HUPCL); @@ -388,7 +389,7 @@ register long flags; SET(oflag, OXTABS); else CLR(oflag, OXTABS); - if (ISSET(flags, LCASE)) + if (ISSET(flags, LCASE)) { SET(iflag, IUCLC); SET(oflag, OLCUC); SET(lflag, XCASE); |