include aculib in cleanup
[unix-history] / usr / src / usr.bin / ruptime / ruptime.c
index ba6e196..a465932 100644 (file)
@@ -1,12 +1,11 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)ruptime.c  4.8 83/04/21";
+static char sccsid[] = "@(#)ruptime.c  4.12 (Berkeley) 83/05/25";
 #endif
 
 #include <sys/param.h>
 #include <stdio.h>
 #include <dir.h>
 #endif
 
 #include <sys/param.h>
 #include <stdio.h>
 #include <dir.h>
-#include <utmp.h>
-#include "rwhod.h"
+#include <rwhod.h>
 
 DIR    *etc;
 
 
 DIR    *etc;
 
@@ -20,6 +19,7 @@ struct        whod awhod;
 int    hscmp(), ucmp(), lcmp(), tcmp();
 
 #define        WHDRSIZE        (sizeof (awhod) - sizeof (awhod.wd_we))
 int    hscmp(), ucmp(), lcmp(), tcmp();
 
 #define        WHDRSIZE        (sizeof (awhod) - sizeof (awhod.wd_we))
+#define        RWHODIR         "/usr/spool/rwho"
 
 char   *interval();
 int    now;
 
 char   *interval();
 int    now;
@@ -111,11 +111,11 @@ again:
        for (i = 0; i < nhosts; i++) {
                hsp = &hs[i];
                if (down(hsp)) {
        for (i = 0; i < nhosts; i++) {
                hsp = &hs[i];
                if (down(hsp)) {
-                       printf("%-8.8s%s\n", hsp->hs_wd->wd_hostname,
+                       printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname,
                            interval(now - hsp->hs_wd->wd_recvtime, "down"));
                        continue;
                }
                            interval(now - hsp->hs_wd->wd_recvtime, "down"));
                        continue;
                }
-               printf("%-8.8s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",
+               printf("%-12.12s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",
                    hsp->hs_wd->wd_hostname,
                    interval(hsp->hs_wd->wd_sendtime -
                        hsp->hs_wd->wd_boottime, "  up"),
                    hsp->hs_wd->wd_hostname,
                    interval(hsp->hs_wd->wd_sendtime -
                        hsp->hs_wd->wd_boottime, "  up"),