From 80e1e6f67316d925c489a37ccd361ff49e929a37 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 30 Jul 2000 21:09:52 +0000 Subject: [PATCH] Added --dump-all git-svn-id: svn://svn.cc65.org/cc65/trunk@241 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/od65/global.c | 2 +- src/od65/global.h | 17 +++++++++-------- src/od65/main.c | 16 +++++++++++++--- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/od65/global.c b/src/od65/global.c index e55e071d6..64e14c272 100644 --- a/src/od65/global.c +++ b/src/od65/global.c @@ -43,7 +43,7 @@ -unsigned long What = 0; /* What should get dumped? */ +unsigned What = 0; /* What should get dumped? */ diff --git a/src/od65/global.h b/src/od65/global.h index de70990e3..3f36342fe 100644 --- a/src/od65/global.h +++ b/src/od65/global.h @@ -44,17 +44,18 @@ -#define D_HEADER 0x00000001UL /* Dump the header */ -#define D_OPTIONS 0x00000002UL /* Dump the options */ -#define D_FILES 0x00000004UL /* Dump source file info */ -#define D_SEGMENTS 0x00000008UL /* Dump segment info */ -#define D_IMPORTS 0x00000010UL /* Dump imported symbols */ -#define D_EXPORTS 0x00000020UL /* Dump exported symbols */ -#define D_DBGSYMS 0x00000040UL /* Dump debug symbols */ +#define D_HEADER 0x0001U /* Dump the header */ +#define D_OPTIONS 0x0002U /* Dump the options */ +#define D_FILES 0x0004U /* Dump source file info */ +#define D_SEGMENTS 0x0008U /* Dump segment info */ +#define D_IMPORTS 0x0010U /* Dump imported symbols */ +#define D_EXPORTS 0x0020U /* Dump exported symbols */ +#define D_DBGSYMS 0x0040U /* Dump debug symbols */ +#define D_ALL 0xFFFFU /* Dump anything */ -extern unsigned long What; /* What should get dumped? */ +extern unsigned What; /* What should get dumped? */ diff --git a/src/od65/main.c b/src/od65/main.c index 4faadd004..eaf029c2a 100644 --- a/src/od65/main.c +++ b/src/od65/main.c @@ -71,13 +71,14 @@ static void Usage (void) /* Print usage information and exit */ { fprintf (stderr, - "Usage: %s [options] file\n" + "Usage: %s [options] file [options] [file]\n" "Short options:\n" " -h\t\t\tHelp (this text)\n" " -V\t\t\tPrint the version number and exit\n" "\n" "Long options:\n" - " --dump-exports\tDump exported symbols\n" + " --dump-all\t\tDump all object file information\n" + " --dump-exports\tDump exported symbols\n" " --dump-files\t\tDump the source files\n" " --dump-header\t\tDump the object file header\n" " --dump-imports\tDump imported symbols\n" @@ -90,6 +91,14 @@ static void Usage (void) +static void OptDumpAll (const char* Opt, const char* Arg) +/* Dump all object file information */ +{ + What |= D_ALL; +} + + + static void OptDumpExports (const char* Opt, const char* Arg) /* Dump the exported symbols */ { @@ -206,7 +215,7 @@ static void DumpFile (const char* Name) if (What & D_EXPORTS) { DumpObjExports (F, 0); } - } + } /* Close the file */ fclose (F); @@ -219,6 +228,7 @@ int main (int argc, char* argv []) { /* Program long options */ static const LongOpt OptTab[] = { + { "--dump-all", 0, OptDumpAll }, { "--dump-exports", 0, OptDumpExports }, { "--dump-files", 0, OptDumpFiles }, { "--dump-header", 0, OptDumpHeader }, -- 2.39.5