diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-16 22:24:19 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-16 22:24:19 +0000 |
commit | a4286895fdc0d664c9c85ef56873b237481332b8 (patch) | |
tree | 486cff1fb790bb007b8e311e666fbabcc8a1d85c /usr.bin/rusers | |
parent | 313456613c8d9b0abdbc97757bd1548a37b34e09 (diff) |
indent
Diffstat (limited to 'usr.bin/rusers')
-rw-r--r-- | usr.bin/rusers/rusers.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index 5815a1cadde..dd34d13ce94 100644 --- a/usr.bin/rusers/rusers.c +++ b/usr.bin/rusers/rusers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rusers.c,v 1.3 1996/06/26 05:38:56 deraadt Exp $ */ +/* $OpenBSD: rusers.c,v 1.4 1996/08/16 22:24:18 deraadt Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: rusers.c,v 1.3 1996/06/26 05:38:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rusers.c,v 1.4 1996/08/16 22:24:18 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -99,7 +99,7 @@ rusers_reply(char *replyp, struct sockaddr_in *raddrp) int x, idle; char date[32], idle_time[64], remote[64], local[64]; struct hostent *hp; - struct utmpidlearr *up = (struct utmpidlearr *)replyp; + utmpidlearr *up = (utmpidlearr *)replyp; char *host; int days, hours, minutes, seconds; @@ -121,8 +121,8 @@ rusers_reply(char *replyp, struct sockaddr_in *raddrp) for (x = 0; x < up->uia_cnt; x++) { strncpy(date, - &(ctime((time_t *)&(up->uia_arr[x]->ui_utmp.ut_time))[4]), - sizeof(date)-1); + &(ctime((time_t *)&(up->uia_arr[x]->ui_utmp.ut_time))[4]), + sizeof(date)-1); idle = up->uia_arr[x]->ui_idle; sprintf(idle_time, " :%02d", idle); @@ -140,13 +140,13 @@ rusers_reply(char *replyp, struct sockaddr_in *raddrp) seconds %= 60; if (idle > 60) sprintf(idle_time, "%2d:%02d", - minutes, seconds); + minutes, seconds); if (idle >= (60*60)) sprintf(idle_time, "%2d:%02d:%02d", - hours, minutes, seconds); + hours, minutes, seconds); if (idle >= (24*60*60)) sprintf(idle_time, "%d days, %d:%02d:%02d", - days, hours, minutes, seconds); + days, hours, minutes, seconds); } strncpy(remote, up->uia_arr[x]->ui_utmp.ut_host, @@ -164,10 +164,8 @@ rusers_reply(char *replyp, struct sockaddr_in *raddrp) printf("%-8.8s %-*.*s %-12.12s %8s %.18s\n", up->uia_arr[x]->ui_utmp.ut_name, - HOST_WIDTH+LINE_WIDTH+1, HOST_WIDTH+LINE_WIDTH+1, local, - date, - idle_time, - remote); + HOST_WIDTH+LINE_WIDTH+1, HOST_WIDTH+LINE_WIDTH+1, + local, date, idle_time, remote); } else printf("%0.8s ", up->uia_arr[x]->ui_utmp.ut_name); @@ -182,7 +180,7 @@ rusers_reply(char *replyp, struct sockaddr_in *raddrp) void onehost(char *host) { - struct utmpidlearr up; + utmpidlearr up; CLIENT *rusers_clnt; struct sockaddr_in addr; struct hostent *hp; @@ -213,7 +211,7 @@ onehost(char *host) void allhosts(void) { - struct utmpidlearr up; + utmpidlearr up; enum clnt_stat clnt_stat; bzero((char *)&up, sizeof(up)); @@ -244,7 +242,6 @@ main(int argc, char *argv[]) else argv0++; - while ((ch = getopt(argc, argv, "al")) != -1) switch (ch) { case 'a': |