From 272c07d0a63c40597372467a13556e3b197e0b03 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 15 Nov 2025 14:20:06 -0500 Subject: Special case underscores in filenames, in sanity check. --- src/extract.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/extract.c') diff --git a/src/extract.c b/src/extract.c index af3efeb..f945ca6 100644 --- a/src/extract.c +++ b/src/extract.c @@ -43,7 +43,7 @@ static void bad_atari_filename(const char *msg) { versions. */ static void sanity_check_filename(void) { u8 c; - unsigned int i, bad = 0, dots = 0; + unsigned int i, bad = 0, dots = 0, uscore = 0; c = out_filename[0]; if(!c) { @@ -58,6 +58,10 @@ static void sanity_check_filename(void) { continue; if(c >= '0' && c <= '9') continue; + if(c == '_') { + uscore++; + continue; + } if(c == '.') { dots++; continue; @@ -73,6 +77,8 @@ static void sanity_check_filename(void) { if(bad) bad_atari_filename("invalid characters. corrupt ALF file?"); + else if(uscore) + fprintf(stderr, "%s: filename has underscore, OK on Sparta/MyDOS, not Atari DOS 2.x\n", self); } void fix_filename(void) { -- cgit v1.2.3