From 0861fc6fc6614084bad79db36eeae4eefd75ff9e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 28 Nov 2025 04:00:09 -0500 Subject: alf: store seconds in timestamp. unalf: display seconds with -v. --- src/listalf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/listalf.c') diff --git a/src/listalf.c b/src/listalf.c index 8082d11..21aef79 100644 --- a/src/listalf.c +++ b/src/listalf.c @@ -19,12 +19,12 @@ unsigned int getquad(int offs) { /* see Arcinfo for details */ void format_msdos_time(char *buf) { - u16 t, hour, min; + u16 t, hour, min, sec; char ampm; t = getword(alf_hdr_time0); - /* don't bother with seconds (arc doesn't print them either) */ + sec = (t & 0x1f) << 1; hour = t >> 11; min = (t >> 5) & 0x3f; @@ -37,7 +37,7 @@ void format_msdos_time(char *buf) { /* midnight and noon print as 12, not 0 */ if(hour == 0) hour = 12; - snprintf(buf, 7, "%2d:%02d%c", hour, min, ampm); + snprintf(buf, 10, "%2d:%02d:%02d%c", hour, min, sec, ampm); } /* see Arcinfo for details */ @@ -76,8 +76,8 @@ void list_alf(void) { extern char *out_filename; if(opts.verbose_list) { - puts("Name Length Size now Comp Date Time CkSum"); - puts("============ ======== ======== ==== ========= ====== ====="); + puts("Name Length Size now Comp Date Time CkSum"); + puts("============ ======== ======== ==== ========= ========= ====="); } while(read_alf_header()) { -- cgit v1.2.3