aboutsummaryrefslogtreecommitdiff
path: root/src/listalf.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-28 04:00:09 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-28 04:00:09 -0500
commit0861fc6fc6614084bad79db36eeae4eefd75ff9e (patch)
tree5a0da9bdecd73ccc0863766e0f5a0235f20d9bd9 /src/listalf.c
parent557f14c7abf3f72fc3b2f70c1402acde5a4d524f (diff)
downloadalftools-0861fc6fc6614084bad79db36eeae4eefd75ff9e.tar.gz
alf: store seconds in timestamp. unalf: display seconds with -v.
Diffstat (limited to 'src/listalf.c')
-rw-r--r--src/listalf.c10
1 files changed, 5 insertions, 5 deletions
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()) {