Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rup If printing of a host's time is requested via th...



details:   https://anonhg.NetBSD.org/src/rev/6509a92f3b94
branches:  trunk
changeset: 475034:6509a92f3b94
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Fri Jul 30 01:29:30 1999 +0000

description:
If printing of a host's time is requested via the -d switch, condense
output so it doesn't exceed 80 columns.

Patch submitted in PR 5933 by Tim Rightnour <root%garbled.net@localhost>

diffstat:

 usr.bin/rup/rup.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 5b687225199a -r 6509a92f3b94 usr.bin/rup/rup.c
--- a/usr.bin/rup/rup.c Fri Jul 30 01:19:58 1999 +0000
+++ b/usr.bin/rup/rup.c Fri Jul 30 01:29:30 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rup.c,v 1.17 1999/01/10 08:19:23 abs Exp $     */
+/*     $NetBSD: rup.c,v 1.18 1999/07/30 01:29:30 hubertf Exp $ */
 
 /*-
  * Copyright (c) 1993, John Brezak
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rup.c,v 1.17 1999/01/10 08:19:23 abs Exp $");
+__RCSID("$NetBSD: rup.c,v 1.18 1999/07/30 01:29:30 hubertf Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -210,7 +210,10 @@
        char days_buf[16];
        char hours_buf[16];
 
-       printf("%-*.*s", HOST_WIDTH, HOST_WIDTH, host);
+       if (printtime)
+               printf("%-*.*s", HOST_WIDTH-4, HOST_WIDTH-4, host);
+       else
+               printf("%-*.*s", HOST_WIDTH, HOST_WIDTH, host);
 
        tmp_time = localtime((time_t *)&host_stat->curtime.tv_sec);
        host_time = *tmp_time;



Home | Main Index | Thread Index | Old Index