ANSI'ify.
This commit is contained in:
parent
db122da6a9
commit
5648feb374
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: extern.h,v 1.4 1996/07/31 20:40:26 thorpej Exp $ */
|
/* $NetBSD: extern.h,v 1.5 2001/11/10 17:35:54 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1993
|
* Copyright (c) 1993
|
||||||
|
@ -37,20 +37,20 @@
|
||||||
|
|
||||||
struct delayval;
|
struct delayval;
|
||||||
|
|
||||||
int adelay __P((int, struct delayval *));
|
int adelay(int, struct delayval *);
|
||||||
char *autobaud __P((void));
|
char *autobaud(void);
|
||||||
int delaybits __P((void));
|
int delaybits(void);
|
||||||
void edithost __P((char *));
|
void edithost(char *);
|
||||||
void gendefaults __P((void));
|
void gendefaults(void);
|
||||||
int getent __P((char *, char *));
|
int getent(char *, char *);
|
||||||
int getflag __P((char *));
|
int getflag(char *);
|
||||||
long getnum __P((char *));
|
long getnum(char *);
|
||||||
char *getstr __P((char *, char **));
|
char *getstr(char *, char **);
|
||||||
void gettable __P((char *, char *));
|
void gettable(char *, char *);
|
||||||
void makeenv __P((char *[]));
|
void makeenv(char *[]);
|
||||||
char *portselector __P((void));
|
char *portselector(void);
|
||||||
void set_ttydefaults __P((int));
|
void set_ttydefaults(int);
|
||||||
void setchars __P((void));
|
void setchars(void);
|
||||||
void setdefaults __P((void));
|
void setdefaults(void);
|
||||||
void setflags __P((int));
|
void setflags(int);
|
||||||
int speed __P((int));
|
int speed(int);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: main.c,v 1.40 2001/11/10 17:20:52 thorpej Exp $ */
|
/* $NetBSD: main.c,v 1.41 2001/11/10 17:35:54 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1980, 1993
|
* Copyright (c) 1980, 1993
|
||||||
|
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";
|
static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: main.c,v 1.40 2001/11/10 17:20:52 thorpej Exp $");
|
__RCSID("$NetBSD: main.c,v 1.41 2001/11/10 17:35:54 thorpej Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -140,16 +140,12 @@ const char partab[] = {
|
||||||
#define KILL tmode.c_cc[VKILL]
|
#define KILL tmode.c_cc[VKILL]
|
||||||
#define EOT tmode.c_cc[VEOF]
|
#define EOT tmode.c_cc[VEOF]
|
||||||
|
|
||||||
static void dingdong __P((int));
|
static void clearscreen(void);
|
||||||
static void interrupt __P((int));
|
|
||||||
static void clearscreen __P((void));
|
|
||||||
void timeoverrun __P((int));
|
|
||||||
|
|
||||||
jmp_buf timeout;
|
jmp_buf timeout;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dingdong(signo)
|
dingdong(int signo)
|
||||||
int signo;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
alarm(0);
|
alarm(0);
|
||||||
|
@ -160,8 +156,7 @@ dingdong(signo)
|
||||||
jmp_buf intrupt;
|
jmp_buf intrupt;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
interrupt(signo)
|
interrupt(int signo)
|
||||||
int signo;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
signal(SIGINT, interrupt);
|
signal(SIGINT, interrupt);
|
||||||
|
@ -171,28 +166,25 @@ interrupt(signo)
|
||||||
/*
|
/*
|
||||||
* Action to take when getty is running too long.
|
* Action to take when getty is running too long.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
timeoverrun(signo)
|
timeoverrun(int signo)
|
||||||
int signo;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
syslog(LOG_ERR, "getty exiting due to excessive running time");
|
syslog(LOG_ERR, "getty exiting due to excessive running time");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main __P((int, char **));
|
int main(int, char *[]);
|
||||||
static int getname __P((void));
|
static int getname(void);
|
||||||
static void oflush __P((void));
|
static void oflush(void);
|
||||||
static void prompt __P((void));
|
static void prompt(void);
|
||||||
static void putchr __P((int));
|
static void putchr(int);
|
||||||
static void putf __P((const char *));
|
static void putf(const char *);
|
||||||
static void putpad __P((const char *));
|
static void putpad(const char *);
|
||||||
static void xputs __P((const char *));
|
static void xputs(const char *);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(int argc, char *argv[])
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
{
|
||||||
const char *progname;
|
const char *progname;
|
||||||
char *tname;
|
char *tname;
|
||||||
|
@ -442,7 +434,7 @@ main(argc, argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
getname()
|
getname(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
char *np;
|
char *np;
|
||||||
|
@ -557,8 +549,7 @@ getname()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
putpad(s)
|
putpad(const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
int pad = 0;
|
int pad = 0;
|
||||||
speed_t ospeed = cfgetospeed(&tmode);
|
speed_t ospeed = cfgetospeed(&tmode);
|
||||||
|
@ -595,8 +586,7 @@ putpad(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xputs(s)
|
xputs(const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
while (*s)
|
while (*s)
|
||||||
putchr(*s++);
|
putchr(*s++);
|
||||||
|
@ -606,8 +596,7 @@ char outbuf[OBUFSIZ];
|
||||||
int obufcnt = 0;
|
int obufcnt = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
putchr(cc)
|
putchr(int cc)
|
||||||
int cc;
|
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
|
@ -626,7 +615,7 @@ putchr(cc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
oflush()
|
oflush(void)
|
||||||
{
|
{
|
||||||
if (obufcnt)
|
if (obufcnt)
|
||||||
write(STDOUT_FILENO, outbuf, obufcnt);
|
write(STDOUT_FILENO, outbuf, obufcnt);
|
||||||
|
@ -634,7 +623,7 @@ oflush()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prompt()
|
prompt(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
putf(LM);
|
putf(LM);
|
||||||
|
@ -643,8 +632,7 @@ prompt()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
putf(cp)
|
putf(const char *cp)
|
||||||
const char *cp;
|
|
||||||
{
|
{
|
||||||
time_t t;
|
time_t t;
|
||||||
char *slash, db[100];
|
char *slash, db[100];
|
||||||
|
@ -702,7 +690,7 @@ putf(cp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clearscreen()
|
clearscreen(void)
|
||||||
{
|
{
|
||||||
struct ttyent *typ;
|
struct ttyent *typ;
|
||||||
struct tinfo *tinfo;
|
struct tinfo *tinfo;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: subr.c,v 1.24 2000/09/19 16:17:48 mjl Exp $ */
|
/* $NetBSD: subr.c,v 1.25 2001/11/10 17:35:54 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1983, 1993
|
* Copyright (c) 1983, 1993
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: subr.c,v 1.24 2000/09/19 16:17:48 mjl Exp $");
|
__RCSID("$NetBSD: subr.c,v 1.25 2001/11/10 17:35:54 thorpej Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -60,14 +60,13 @@ __RCSID("$NetBSD: subr.c,v 1.24 2000/09/19 16:17:48 mjl Exp $");
|
||||||
|
|
||||||
extern struct termios tmode, omode;
|
extern struct termios tmode, omode;
|
||||||
|
|
||||||
static void compatflags __P((long));
|
static void compatflags(long);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get a table entry.
|
* Get a table entry.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gettable(name, buf)
|
gettable(char *name, char *buf)
|
||||||
char *name, *buf;
|
|
||||||
{
|
{
|
||||||
struct gettystrs *sp;
|
struct gettystrs *sp;
|
||||||
struct gettynums *np;
|
struct gettynums *np;
|
||||||
|
@ -112,7 +111,7 @@ gettable(name, buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gendefaults()
|
gendefaults(void)
|
||||||
{
|
{
|
||||||
struct gettystrs *sp;
|
struct gettystrs *sp;
|
||||||
struct gettynums *np;
|
struct gettynums *np;
|
||||||
|
@ -132,7 +131,7 @@ gendefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setdefaults()
|
setdefaults(void)
|
||||||
{
|
{
|
||||||
struct gettystrs *sp;
|
struct gettystrs *sp;
|
||||||
struct gettynums *np;
|
struct gettynums *np;
|
||||||
|
@ -165,7 +164,7 @@ charvars[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
setchars()
|
setchars(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -185,8 +184,7 @@ setchars()
|
||||||
#define ISSET(t, f) ((t) & (f))
|
#define ISSET(t, f) ((t) & (f))
|
||||||
|
|
||||||
void
|
void
|
||||||
setflags(n)
|
setflags(int n)
|
||||||
int n;
|
|
||||||
{
|
{
|
||||||
tcflag_t iflag, oflag, cflag, lflag;
|
tcflag_t iflag, oflag, cflag, lflag;
|
||||||
|
|
||||||
|
@ -367,8 +365,7 @@ out:
|
||||||
* Old TTY => termios, snatched from <sys/kern/tty_compat.c>
|
* Old TTY => termios, snatched from <sys/kern/tty_compat.c>
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
compatflags(flags)
|
compatflags(long flags)
|
||||||
long flags;
|
|
||||||
{
|
{
|
||||||
tcflag_t iflag, oflag, cflag, lflag;
|
tcflag_t iflag, oflag, cflag, lflag;
|
||||||
|
|
||||||
|
@ -535,7 +532,7 @@ struct delayval tbdelay[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
delaybits()
|
delaybits(void)
|
||||||
{
|
{
|
||||||
int f;
|
int f;
|
||||||
|
|
||||||
|
@ -548,9 +545,7 @@ delaybits()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
adelay(ms, dp)
|
adelay(int ms, struct delayval *dp)
|
||||||
ms;
|
|
||||||
struct delayval *dp;
|
|
||||||
{
|
{
|
||||||
if (ms == 0)
|
if (ms == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -563,8 +558,7 @@ adelay(ms, dp)
|
||||||
char editedhost[MAXHOSTNAMELEN];
|
char editedhost[MAXHOSTNAMELEN];
|
||||||
|
|
||||||
void
|
void
|
||||||
edithost(pat)
|
edithost(char *pat)
|
||||||
char *pat;
|
|
||||||
{
|
{
|
||||||
char *host = HN;
|
char *host = HN;
|
||||||
char *res = editedhost;
|
char *res = editedhost;
|
||||||
|
@ -603,8 +597,7 @@ edithost(pat)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
makeenv(env)
|
makeenv(char *env[])
|
||||||
char *env[];
|
|
||||||
{
|
{
|
||||||
static char termbuf[128] = "TERM=";
|
static char termbuf[128] = "TERM=";
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
|
@ -652,7 +645,7 @@ struct portselect {
|
||||||
};
|
};
|
||||||
|
|
||||||
char *
|
char *
|
||||||
portselector()
|
portselector(void)
|
||||||
{
|
{
|
||||||
char c, baud[20], *type = "default";
|
char c, baud[20], *type = "default";
|
||||||
struct portselect *ps;
|
struct portselect *ps;
|
||||||
|
@ -687,7 +680,7 @@ portselector()
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
char *
|
char *
|
||||||
autobaud()
|
autobaud(void)
|
||||||
{
|
{
|
||||||
int rfds;
|
int rfds;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
|
|
Loading…
Reference in New Issue