Skip to content

Commit f9a7335

Browse files
committed
Prettier verbose file listing.
1 parent 4314680 commit f9a7335

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

itstar.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,18 @@ static void listfiles(int argc,char **argv)
366366
/* list a single file (called back by scantape()) */
367367
static void listfile()
368368
{
369-
printf("%s;%s %s",ufd,fn1,fn2); /* print ITS filename */
369+
static const char spaces[] = " ";
370+
int n;
371+
n=printf("%s;%s %s",ufd,fn1,fn2); /* print ITS filename */
370372
if (verify) {
371373
if(islink) {
372374
insix(lfn1);
373375
insix(lfn2);
374376
insix(lufd);
375377
printf (" %s;%s %s", lufd, lfn1, lfn2);
376378
} else if (cdate.tm_year!=0) {
377-
printf (" %d-%d-%d", cdate.tm_year + 1900, cdate.tm_mon,
379+
fputs (spaces + n, stdout);
380+
printf (" %4d-%02d-%02d", cdate.tm_year + 1900, cdate.tm_mon,
378381
cdate.tm_mday);
379382
}
380383
}

0 commit comments

Comments
 (0)