rup.c (29468) | rup.c (34993) |
---|---|
1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35static const char rcsid[] = | 1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35static const char rcsid[] = |
36 "$Id: rup.c,v 1.8 1997/08/07 06:50:02 charnier Exp $"; | 36 "$Id: rup.c,v 1.9 1997/09/15 09:46:42 jkh Exp $"; |
37#endif /* not lint */ 38 39#include <err.h> 40#include <stdio.h> 41#include <stdlib.h> 42#include <string.h> 43#include <time.h> 44#include <unistd.h> --- 87 unchanged lines hidden (view full) --- 132 host_uptime.tm_hour, host_uptime.tm_min); 133 else 134 if (host_uptime.tm_min != 0) 135 sprintf(hours_buf, "%2d mins, ", host_uptime.tm_min); 136 else 137 hours_buf[0] = '\0'; 138 139 printf(" %2d:%02d%cm up %9.9s%9.9s load average: %.2f %.2f %.2f\n", | 37#endif /* not lint */ 38 39#include <err.h> 40#include <stdio.h> 41#include <stdlib.h> 42#include <string.h> 43#include <time.h> 44#include <unistd.h> --- 87 unchanged lines hidden (view full) --- 132 host_uptime.tm_hour, host_uptime.tm_min); 133 else 134 if (host_uptime.tm_min != 0) 135 sprintf(hours_buf, "%2d mins, ", host_uptime.tm_min); 136 else 137 hours_buf[0] = '\0'; 138 139 printf(" %2d:%02d%cm up %9.9s%9.9s load average: %.2f %.2f %.2f\n", |
140 host_time.tm_hour % 12, | 140 (host_time.tm_hour % 12) ? host_time.tm_hour % 12 : 12, |
141 host_time.tm_min, 142 (host_time.tm_hour >= 12) ? 'p' : 'a', 143 days_buf, 144 hours_buf, 145 (double)host_stat->avenrun[0]/FSCALE, 146 (double)host_stat->avenrun[1]/FSCALE, 147 (double)host_stat->avenrun[2]/FSCALE); 148 --- 80 unchanged lines hidden --- | 141 host_time.tm_min, 142 (host_time.tm_hour >= 12) ? 'p' : 'a', 143 days_buf, 144 hours_buf, 145 (double)host_stat->avenrun[0]/FSCALE, 146 (double)host_stat->avenrun[1]/FSCALE, 147 (double)host_stat->avenrun[2]/FSCALE); 148 --- 80 unchanged lines hidden --- |