diff options
Diffstat (limited to 'libexec/getty')
-rw-r--r-- | libexec/getty/main.c | 33 | ||||
-rw-r--r-- | libexec/getty/subr.c | 33 |
2 files changed, 26 insertions, 40 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 405312788ee..67b4f039d7c 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.23 2002/05/22 06:35:43 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/ -static char rcsid[] = "$OpenBSD: main.c,v 1.23 2002/05/22 06:35:43 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.24 2002/07/03 23:39:03 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -128,7 +128,7 @@ char partab[] = { #define EOT tmode.c_cc[VEOF] static void -dingdong() +dingdong(int signo) { tmode.c_ispeed = tmode.c_ospeed = 0; (void)tcsetattr(0, TCSANOW, &tmode); @@ -138,7 +138,7 @@ dingdong() volatile sig_atomic_t interrupt_flag; static void -interrupt() +interrupt(int signo) { int save_errno = errno; @@ -151,8 +151,7 @@ interrupt() * Action to take when getty is running too long. */ void -timeoverrun(signo) - int signo; +timeoverrun(int signo) { struct syslog_data sdata = SYSLOG_DATA_INIT; @@ -170,9 +169,7 @@ static void putpad(char *); static void xputs(char *); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { extern char **environ; char *tname; @@ -349,7 +346,7 @@ main(argc, argv) } static int -getname() +getname(void) { int ppp_state = 0, ppp_connection = 0; unsigned char cs; @@ -466,8 +463,7 @@ getname() } static void -putpad(s) - char *s; +putpad(char *s) { int pad = 0; speed_t ospeed = cfgetospeed(&tmode); @@ -504,8 +500,7 @@ putpad(s) } static void -xputs(s) - char *s; +xputs(char *s) { while (*s) putchr(*s++); @@ -515,8 +510,7 @@ char outbuf[OBUFSIZ]; int obufcnt = 0; static void -putchr(cc) - int cc; +putchr(int cc) { char c; @@ -535,7 +529,7 @@ putchr(cc) } static void -oflush() +oflush(void) { if (obufcnt) write(STDOUT_FILENO, outbuf, obufcnt); @@ -543,7 +537,7 @@ oflush() } static void -prompt() +prompt(void) { putf(LM); @@ -552,8 +546,7 @@ prompt() } static void -putf(cp) - char *cp; +putf(char *cp) { extern char editedhost[]; char *slash, db[100]; diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 1ac1b2f459f..e2e12de162f 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr.c,v 1.16 2002/05/27 06:36:40 deraadt Exp $ */ +/* $OpenBSD: subr.c,v 1.17 2002/07/03 23:39:03 deraadt Exp $ */ /* * Copyright (c) 1983, 1993 @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$OpenBSD: subr.c,v 1.16 2002/05/27 06:36:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: subr.c,v 1.17 2002/07/03 23:39:03 deraadt Exp $"; #endif /* not lint */ /* @@ -60,8 +60,7 @@ static void compatflags(long); * Get a table entry. */ void -gettable(name, buf) - char *name, *buf; +gettable(char *name, char *buf) { struct gettystrs *sp; struct gettynums *np; @@ -106,7 +105,7 @@ gettable(name, buf) } void -gendefaults() +gendefaults(void) { struct gettystrs *sp; struct gettynums *np; @@ -126,7 +125,7 @@ gendefaults() } void -setdefaults() +setdefaults(void) { struct gettystrs *sp; struct gettynums *np; @@ -159,7 +158,7 @@ charvars[] = { }; void -setchars() +setchars(void) { int i; char *p; @@ -179,8 +178,7 @@ setchars() #define ISSET(t, f) ((t) & (f)) void -setflags(n) - int n; +setflags(int n) { tcflag_t iflag, oflag, cflag, lflag; @@ -362,8 +360,7 @@ out: * Old TTY => termios, snatched from <sys/kern/tty_compat.c> */ void -compatflags(flags) -long flags; +compatflags(long flags) { tcflag_t iflag, oflag, cflag, lflag; @@ -555,9 +552,7 @@ delaybits() } int -adelay(ms, dp) - ms; - struct delayval *dp; +adelay(int ms, struct delayval *dp) { if (ms == 0) return (0); @@ -570,8 +565,7 @@ adelay(ms, dp) char editedhost[48]; void -edithost(pat) - char *pat; +edithost(char *pat) { char *host = HN; char *res = editedhost; @@ -609,8 +603,7 @@ edithost(pat) } void -makeenv(env) - char *env[]; +makeenv(char *env[]) { static char termbuf[128] = "TERM="; char *p, *q; @@ -658,7 +651,7 @@ struct portselect { }; char * -portselector() +portselector(void) { char c, baud[20], *type = "default"; struct portselect *ps; @@ -693,7 +686,7 @@ portselector() #include <sys/time.h> char * -autobaud() +autobaud(void) { fd_set rfds; struct timeval timeout; |