Convert K&R-style routine definitions to C89 style, partially to reduce

diffs with OpenBSD.  This causes no changes to the object produced.
This commit is contained in:
gad 2004-03-03 02:41:21 +00:00
parent 7387d6633f
commit 6d84b73d23

View File

@ -99,8 +99,7 @@ void usage(void);
* open wtmp or die
*/
FILE *
file(name)
const char *name;
file(const char *name)
{
FILE *fp;
@ -113,8 +112,7 @@ file(name)
}
struct tty_list *
add_tty(name)
char *name;
add_tty(char *name)
{
struct tty_list *tp;
register char *rcp;
@ -143,8 +141,7 @@ add_tty(name)
* should we process the named tty?
*/
int
do_tty(name)
char *name;
do_tty(char *name)
{
struct tty_list *tp;
int def_ret = 0;
@ -168,8 +165,7 @@ do_tty(name)
* is someone logged in on Console?
*/
int
on_console(head)
struct utmp_list *head;
on_console(struct utmp_list *head)
{
struct utmp_list *up;
@ -186,10 +182,7 @@ on_console(head)
* update user's login time
*/
struct user_list *
update_user(head, name, secs)
struct user_list *head;
char *name;
time_t secs;
update_user(struct user_list *head, char *name, time_t secs)
{
struct user_list *up;
@ -216,9 +209,7 @@ update_user(head, name, secs)
}
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
FILE *fp;
int c;
@ -287,17 +278,14 @@ main(argc, argv)
* print login time in decimal hours
*/
void
show(name, secs)
const char *name;
time_t secs;
show(const char *name, time_t secs)
{
(void)printf("\t%-*s %8.2f\n", UT_NAMESIZE, name,
((double)secs / 3600));
}
void
show_users(list)
struct user_list *list;
show_users(struct user_list *list)
{
struct user_list *lp;
@ -309,10 +297,7 @@ show_users(list)
* print total login time for 24hr period in decimal hours
*/
void
show_today(users, logins, secs)
struct user_list *users;
struct utmp_list *logins;
time_t secs;
show_today(struct user_list *users, struct utmp_list *logins, time_t secs)
{
struct user_list *up;
struct utmp_list *lp;
@ -349,9 +334,7 @@ show_today(users, logins, secs)
* been shut down.
*/
struct utmp_list *
log_out(head, up)
struct utmp_list *head;
struct utmp *up;
log_out(struct utmp_list *head, struct utmp *up)
{
struct utmp_list *lp, *lp2, *tlp;
time_t secs;
@ -391,9 +374,7 @@ log_out(head, up)
* if do_tty says ok, login a user
*/
struct utmp_list *
log_in(head, up)
struct utmp_list *head;
struct utmp *up;
log_in(struct utmp_list *head, struct utmp *up)
{
struct utmp_list *lp;
@ -457,8 +438,7 @@ log_in(head, up)
}
int
ac(fp)
FILE *fp;
ac(FILE *fp)
{
struct utmp_list *lp, *head = NULL;
struct utmp usr;
@ -551,7 +531,7 @@ ac(fp)
}
void
usage()
usage(void)
{
(void)fprintf(stderr,
#ifdef CONSOLE_TTY