From e286ed23ae3cabfb75327d8512dc937b2ecf9be1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 14 Nov 2025 04:22:39 -0500 Subject: Add command-line options. --- src/unalf.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/unalf.h') diff --git a/src/unalf.h b/src/unalf.h index 855ca80..030f6f2 100644 --- a/src/unalf.h +++ b/src/unalf.h @@ -1,3 +1,8 @@ +#ifndef u8 +#define u8 unsigned char +#define u16 unsigned short +#endif + /* converted from asm */ void uncrunch_file(void); void setup_io_bufs(void); @@ -16,6 +21,10 @@ void L79E7(void); void writeblock(void); void L7A5D(void); +/* glob.c */ +int globmatch(const char *pat, const char *arg); +int file_wanted(const char *filename); + /* io.c - asm rewritten in C */ int read_alf_header(void); void readblock(void); @@ -27,14 +36,40 @@ void open_output(void); /* listalf.c */ void list_alf(void); +unsigned int getquad(int offs); /* extract.c */ void extract_alf(void); void dpoke(int addr, u16 value); u16 dpeek(int addr); +void fix_filename(void); + +/* opts.c */ +void parse_opts(int argc, char * const *argv); /* unalf.c */ extern char *self; extern FILE *out_file; extern FILE *in_file; extern char *in_filename; + +typedef struct { + int txtconv; + int testonly; + int keepdot; + int listonly; + int lowercase; + const char *outdir; + int overwrite; + int extract_to_stdout; + int quiet; + char *exclude_glob; + int verbose_list; +} opts_t; + +extern opts_t opts; +extern const char *exclude_globs[256]; +extern char * const *include_globs; +extern int exclude_count; + +#define MAX_EXCLUDES 256 -- cgit v1.2.3