Re-indent.

This commit is contained in:
nekral-guest 2009-04-22 20:48:42 +00:00
parent c55311aa6d
commit e35a7fbd89

View File

@ -170,48 +170,48 @@ static void setup_tty (void)
if (GTTY (0, &termio) == 0) { /* get terminal characteristics */ if (GTTY (0, &termio) == 0) { /* get terminal characteristics */
/* /*
* Add your favorite terminal modes here ... * Add your favorite terminal modes here ...
*/ */
termio.c_lflag |= ISIG | ICANON | ECHO | ECHOE; termio.c_lflag |= ISIG | ICANON | ECHO | ECHOE;
termio.c_iflag |= ICRNL; termio.c_iflag |= ICRNL;
#if defined(ECHOKE) && defined(ECHOCTL) #if defined(ECHOKE) && defined(ECHOCTL)
termio.c_lflag |= ECHOKE | ECHOCTL; termio.c_lflag |= ECHOKE | ECHOCTL;
#endif #endif
#if defined(ECHOPRT) && defined(NOFLSH) && defined(TOSTOP) #if defined(ECHOPRT) && defined(NOFLSH) && defined(TOSTOP)
termio.c_lflag &= ~(ECHOPRT | NOFLSH | TOSTOP); termio.c_lflag &= ~(ECHOPRT | NOFLSH | TOSTOP);
#endif #endif
#ifdef ONLCR #ifdef ONLCR
termio.c_oflag |= ONLCR; termio.c_oflag |= ONLCR;
#endif #endif
/* leave these values unchanged if not specified in login.defs */ /* leave these values unchanged if not specified in login.defs */
erasechar = getdef_num ("ERASECHAR", (int) termio.c_cc[VERASE]); erasechar = getdef_num ("ERASECHAR", (int) termio.c_cc[VERASE]);
killchar = getdef_num ("KILLCHAR", (int) termio.c_cc[VKILL]); killchar = getdef_num ("KILLCHAR", (int) termio.c_cc[VKILL]);
termio.c_cc[VERASE] = (cc_t) erasechar; termio.c_cc[VERASE] = (cc_t) erasechar;
termio.c_cc[VKILL] = (cc_t) killchar; termio.c_cc[VKILL] = (cc_t) killchar;
/* Make sure the values were valid. /* Make sure the values were valid.
* getdef_num cannot validate this. * getdef_num cannot validate this.
*/ */
if (erasechar != termio.c_cc[VERASE]) { if (erasechar != termio.c_cc[VERASE]) {
fprintf (stderr, fprintf (stderr,
_("configuration error - cannot parse %s value: '%d'"), _("configuration error - cannot parse %s value: '%d'"),
"ERASECHAR", erasechar); "ERASECHAR", erasechar);
exit (1); exit (1);
} }
if (killchar != termio.c_cc[VKILL]) { if (killchar != termio.c_cc[VKILL]) {
fprintf (stderr, fprintf (stderr,
_("configuration error - cannot parse %s value: '%d'"), _("configuration error - cannot parse %s value: '%d'"),
"KILLCHAR", killchar); "KILLCHAR", killchar);
exit (1); exit (1);
} }
/* /*
* ttymon invocation prefers this, but these settings won't come into * ttymon invocation prefers this, but these settings
* effect after the first username login * won't come into effect after the first username login
*/ */
(void) STTY (0, &termio); (void) STTY (0, &termio);
} }
} }