diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-12-02 21:22:32 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-12-02 21:22:32 -0500 |
| commit | d2085ad7f2db7310f99726c5c3b1c9019f3947cc (patch) | |
| tree | 3f0cfff609723d101ff113cc757d6ecaeab610b8 /src | |
| parent | 65145d492797a8c5f5e95098b49ea4b00f49be4c (diff) | |
| download | alftools-d2085ad7f2db7310f99726c5c3b1c9019f3947cc.tar.gz | |
unalf: warn about all-zero ALF header dates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alf.1 | 5 | ||||
| -rw-r--r-- | src/alf.rst | 3 | ||||
| -rw-r--r-- | src/crunch.c | 1 | ||||
| -rw-r--r-- | src/extract.c | 5 | ||||
| -rw-r--r-- | src/unalf.1 | 8 | ||||
| -rw-r--r-- | src/unalf.rst | 6 |
6 files changed, 23 insertions, 5 deletions
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "ALF" 1 "2025-12-01" "0.3.0" "Urchlay's Atari 8-bit Tools" +.TH "ALF" 1 "2025-12-02" "0.3.0" "Urchlay's Atari 8-bit Tools" .SH NAME alf \- create Atari 8-bit ALF archives .\" RST source for alf(1) man page. Convert with: @@ -108,7 +108,8 @@ Use UTC for timestamps (default is local timezone). .INDENT 0.0 .TP .B \fB\-tz\fP -Use zero for timestamps (0 ??? 80 12:00a). +Use zero for timestamps. \fBunalf\fP will display \fI<none>\fP for the +date and midnight for the time. .UNINDENT .\" use zero timestamps. . diff --git a/src/alf.rst b/src/alf.rst index 75869ca..267f993 100644 --- a/src/alf.rst +++ b/src/alf.rst @@ -84,7 +84,8 @@ OPTIONS .. use UTC timestamps. **-tz** - Use zero for timestamps (0 ??? 80 12:00a). + Use zero for timestamps. **unalf** will display *<none>* for the + date and midnight for the time. .. use zero timestamps. diff --git a/src/crunch.c b/src/crunch.c index ada46e8..5f21223 100644 --- a/src/crunch.c +++ b/src/crunch.c @@ -121,6 +121,7 @@ void inc_output_len(void) { fprintf(stderr, "%s: fatal: compressed file would be >16MB.\n", self); exit(1); } + output_buf[output_len] = 0; } void append_bit(int bit) { diff --git a/src/extract.c b/src/extract.c index b14b321..98523db 100644 --- a/src/extract.c +++ b/src/extract.c @@ -51,7 +51,10 @@ void set_datetime() { t = dpeek(alf_hdr_time0); /* don't set the date/time at all, if it's zero */ - if(!t) return; + if(!t) { + fprintf(stderr, "%s: warning: date/time for %s is null, using current date/time\n", self, out_filename); + return; + } d = dpeek(alf_hdr_date0); diff --git a/src/unalf.1 b/src/unalf.1 index c1683a4..f7d4ff3 100644 --- a/src/unalf.1 +++ b/src/unalf.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "UNALF" 1 "2025-12-01" "0.3.0" "Urchlay's Atari 8-bit Tools" +.TH "UNALF" 1 "2025-12-02" "0.3.0" "Urchlay's Atari 8-bit Tools" .SH NAME unalf \- extract Atari 8-bit ALF archives .\" RST source for unalf(1) man page. Convert with: @@ -345,6 +345,12 @@ your \fIALF\fP file actually contains another \fIALF\fP file, but that would be a pathological case. Most likely, you\(aqre trying to extract multiple \fIALF\fP files with one command, which doesn\(aqt work. Use one \fBunalf\fP command per file. +.TP +.B \fBdate/time for <file> is null, using current date/time\fP +The date stored in the \fIALF\fP header for this file is all zeroes, which +is an invalid date. \fBunalf \-v\fP shows this as \fI<none>\fP\&. The +date on the extracted file can\(aqt be set, so it\(aqll have the current +date and time instead. .UNINDENT .SH NOTES .sp diff --git a/src/unalf.rst b/src/unalf.rst index 3550a3b..146e056 100644 --- a/src/unalf.rst +++ b/src/unalf.rst @@ -300,6 +300,12 @@ Warnings *ALF* files with one command, which doesn't work. Use one **unalf** command per file. +**date/time for <file> is null, using current date/time** + The date stored in the *ALF* header for this file is all zeroes, which + is an invalid date. **unalf -v** shows this as *<none>*. The + date on the extracted file can't be set, so it'll have the current + date and time instead. + NOTES ===== |
