summaryrefslogtreecommitdiffstats
path: root/usr.bin/lastcomm
diff options
context:
space:
mode:
authormikeh <mikeh@FreeBSD.org>2001-06-16 07:08:37 +0000
committermikeh <mikeh@FreeBSD.org>2001-06-16 07:08:37 +0000
commit99efa6b196d6054b9e66ecbca2ce6523e8df5f54 (patch)
tree2c8cb683f7751e509b71f15943cc86c6b1185360 /usr.bin/lastcomm
parentd115ce425be4b51773230358322f2e6d2a3e92a3 (diff)
downloadFreeBSD-src-99efa6b196d6054b9e66ecbca2ce6523e8df5f54.zip
FreeBSD-src-99efa6b196d6054b9e66ecbca2ce6523e8df5f54.tar.gz
Print spaces on the leading edge rather than the trailing edge of each
field to avoid trailing spaces. PR: bin/16649 MFC after: 2 weeks
Diffstat (limited to 'usr.bin/lastcomm')
-rw-r--r--usr.bin/lastcomm/lastcomm.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c
index 595e80e..5ae67a3 100644
--- a/usr.bin/lastcomm/lastcomm.c
+++ b/usr.bin/lastcomm/lastcomm.c
@@ -176,7 +176,7 @@ main(argc, argv)
if (*argv && !requested(argv, &ab))
continue;
- (void)printf("%-*.*s %-7s %-*s %-*s ",
+ (void)printf("%-*.*s %-7s %-*s %-*s",
AC_COMM_LEN, AC_COMM_LEN, ab.ac_comm,
flagbits(ab.ac_flag),
UT_NAMESIZE, user_from_uid(ab.ac_uid, 0),
@@ -185,37 +185,36 @@ main(argc, argv)
/* user + system time */
if (time & AC_CTIME) {
- (void)printf("%6.2f secs ",
+ (void)printf(" %6.2f secs",
(expand(ab.ac_utime) +
expand(ab.ac_stime))/AC_HZ);
}
/* usr time */
if (time & AC_UTIME) {
- (void)printf("%6.2f us ", expand(ab.ac_utime)/AC_HZ);
+ (void)printf(" %6.2f us", expand(ab.ac_utime)/AC_HZ);
}
/* system time */
if (time & AC_STIME) {
- (void)printf("%6.2f sy ", expand(ab.ac_stime)/AC_HZ);
+ (void)printf(" %6.2f sy", expand(ab.ac_stime)/AC_HZ);
}
/* elapsed time */
if (time & AC_ETIME) {
- (void)printf("%8.2f es ", expand(ab.ac_etime)/AC_HZ);
+ (void)printf(" %8.2f es", expand(ab.ac_etime)/AC_HZ);
}
/* starting time */
if (time & AC_BTIME) {
- (void)printf("%.16s ", ctime(&ab.ac_btime));
+ (void)printf(" %.16s", ctime(&ab.ac_btime));
}
/* exit time (starting time + elapsed time )*/
if (time & AC_FTIME) {
t = ab.ac_btime;
t += (time_t)(expand(ab.ac_etime)/AC_HZ);
- (void)printf("%.16s ",
- ctime(&t));
+ (void)printf(" %.16s", ctime(&t));
}
printf("\n");
}
OpenPOWER on IntegriCloud