From b04af19d5c69cbfeab9de7c522620af78e7a2a53 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Wed, 28 Feb 2024 17:53:13 +0000 Subject: [PATCH] another tiny bit of cleanup git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@350 4df02467-bbd4-4a76-a152-e7ce94205b78 --- src/Makefile | 6 +++--- src/Makefile.dos | 6 +++--- src/Makefile.mingw | 6 +++--- src/Makefile.riscos | 6 +++--- src/_riscos.c | 1 - src/acme.c | 28 ++++++++++++++++------------ src/dynabuf.c | 1 - src/flow.c | 1 - src/symbol.c | 1 - src/version.h | 2 +- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Makefile b/src/Makefile index 1d7809a..2a14b46 100644 --- a/src/Makefile +++ b/src/Makefile @@ -26,11 +26,11 @@ cliargs.o: cliargs.h cliargs.c cpu.o: config.h dynabuf.h global.h mnemo.h tree.h cpu.h cpu.c -dynabuf.o: config.h acme.h global.h input.h dynabuf.h dynabuf.c +dynabuf.o: config.h global.h input.h dynabuf.h dynabuf.c encoding.o: encoding.h encoding.c -flow.o: config.h acme.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c +flow.o: config.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c global.o: config.h platform.h acme.h cpu.h dynabuf.h encoding.h input.h macro.h pseudoopcodes.h section.h symbol.h global.h global.c @@ -48,7 +48,7 @@ pseudoopcodes.o: alu.h flow.h global.h input.h macro.h output.h symbol.h pseudoo section.o: config.h dynabuf.h global.h symbol.h tree.h section.h section.c -symbol.o: config.h acme.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c +symbol.o: config.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c tree.o: config.h dynabuf.h global.h symbol.h tree.h tree.c diff --git a/src/Makefile.dos b/src/Makefile.dos index f9683c5..9f5f51e 100644 --- a/src/Makefile.dos +++ b/src/Makefile.dos @@ -26,11 +26,11 @@ cliargs.o: cliargs.h cliargs.c cpu.o: config.h dynabuf.h global.h mnemo.h tree.h cpu.h cpu.c -dynabuf.o: config.h acme.h global.h input.h dynabuf.h dynabuf.c +dynabuf.o: config.h global.h input.h dynabuf.h dynabuf.c encoding.o: encoding.h encoding.c -flow.o: config.h acme.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c +flow.o: config.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c global.o: config.h platform.h acme.h cpu.h dynabuf.h encoding.h input.h macro.h pseudoopcodes.h section.h symbol.h global.h global.c @@ -48,7 +48,7 @@ pseudoopcodes.o: alu.h flow.h global.h input.h macro.h output.h symbol.h pseudoo section.o: config.h dynabuf.h global.h symbol.h tree.h section.h section.c -symbol.o: config.h acme.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c +symbol.o: config.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c tree.o: config.h dynabuf.h global.h symbol.h tree.h tree.c diff --git a/src/Makefile.mingw b/src/Makefile.mingw index f352f8d..8ff8cb0 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -29,11 +29,11 @@ cliargs.o: cliargs.h cliargs.c cpu.o: config.h dynabuf.h global.h mnemo.h tree.h cpu.h cpu.c -dynabuf.o: config.h acme.h global.h input.h dynabuf.h dynabuf.c +dynabuf.o: config.h global.h input.h dynabuf.h dynabuf.c encoding.o: encoding.h encoding.c -flow.o: config.h acme.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c +flow.o: config.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c global.o: config.h platform.h acme.h cpu.h dynabuf.h encoding.h input.h macro.h pseudoopcodes.h section.h symbol.h global.h global.c @@ -51,7 +51,7 @@ pseudoopcodes.o: alu.h flow.h global.h input.h macro.h output.h symbol.h pseudoo section.o: config.h dynabuf.h global.h symbol.h tree.h section.h section.c -symbol.o: config.h acme.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c +symbol.o: config.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c tree.o: config.h dynabuf.h global.h symbol.h tree.h tree.c diff --git a/src/Makefile.riscos b/src/Makefile.riscos index 17cca58..1fa6ad8 100644 --- a/src/Makefile.riscos +++ b/src/Makefile.riscos @@ -25,11 +25,11 @@ cliargs.o: cliargs.h cliargs.c cpu.o: config.h dynabuf.h global.h mnemo.h tree.h cpu.h cpu.c -dynabuf.o: config.h acme.h global.h input.h dynabuf.h dynabuf.c +dynabuf.o: config.h global.h input.h dynabuf.h dynabuf.c encoding.o: encoding.h encoding.c -flow.o: config.h acme.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c +flow.o: config.h alu.h dynabuf.h global.h input.h mnemo.h symbol.h tree.h flow.h flow.c global.o: config.h platform.h acme.h cpu.h dynabuf.h encoding.h input.h macro.h pseudoopcodes.h section.h symbol.h global.h global.c @@ -47,7 +47,7 @@ pseudoopcodes.o: alu.h flow.h global.h input.h macro.h output.h symbol.h pseudoo section.o: config.h dynabuf.h global.h symbol.h tree.h section.h section.c -symbol.o: config.h acme.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c +symbol.o: config.h alu.h cpu.h dynabuf.h global.h input.h section.h tree.h symbol.h symbol.c tree.o: config.h dynabuf.h global.h symbol.h tree.h tree.c diff --git a/src/_riscos.c b/src/_riscos.c index 315e645..c460c6f 100644 --- a/src/_riscos.c +++ b/src/_riscos.c @@ -9,7 +9,6 @@ #include #include -#include "acme.h" #include "input.h" diff --git a/src/acme.c b/src/acme.c index a4ea217..b5d1783 100644 --- a/src/acme.c +++ b/src/acme.c @@ -336,14 +336,16 @@ static void perform_pass(void) // TODO: atm "--from-to" reads two numbers. if that is changed in the // future to two general expressions, this is the point where they would // need to be evaluated. + if (config.process_verbosity > 8) + printf("Found %d undefined expressions.\n", pass.undefined_count); if (pass.error_count) exit(ACME_finalize(EXIT_FAILURE)); } static struct report global_report; -// do passes until done (or errors occurred). Return whether output is ready. -static boolean do_actual_work(void) +// do passes until done (or errors occurred). +static void do_actual_work(void) { int undefs_before; // number of undefined results in previous pass @@ -375,16 +377,19 @@ static boolean do_actual_work(void) perform_pass(); report_close(report); } + // FIXME - add some code here to do "if there were errors, call BUG()" } - return TRUE; + save_output_file(); + } else { + // There are still errors (unsolvable by doing further passes), + // so perform additional pass to find and show them. + if (config.process_verbosity > 1) + puts("Extra pass to display errors."); + pass.complain_about_undefined = TRUE; // activate error output + perform_pass(); // perform pass, but now show "value undefined" + // FIXME - perform_pass() calls exit() when there were errors, + // so if controls returns here, call BUG()! } - // There are still errors (unsolvable by doing further passes), - // so perform additional pass to find and show them. - if (config.process_verbosity > 1) - puts("Extra pass to display errors."); - pass.complain_about_undefined = TRUE; // activate error output - perform_pass(); // perform pass, but now show "value undefined" - return FALSE; } @@ -744,7 +749,6 @@ int main(int argc, const char *argv[]) // init output buffer output_createbuffer(); // do the actual work - if (do_actual_work()) - save_output_file(); + do_actual_work(); return ACME_finalize(EXIT_SUCCESS); // dump labels, if wanted } diff --git a/src/dynabuf.c b/src/dynabuf.c index 5eaef6b..bfd8fa2 100644 --- a/src/dynabuf.c +++ b/src/dynabuf.c @@ -7,7 +7,6 @@ #include #include #include -#include "acme.h" #include "global.h" #include "input.h" diff --git a/src/flow.c b/src/flow.c index 2da2931..218fc98 100644 --- a/src/flow.c +++ b/src/flow.c @@ -13,7 +13,6 @@ // 24 Nov 2007 Added "!ifndef" #include "flow.h" #include -#include "acme.h" #include "alu.h" #include "config.h" #include "dynabuf.h" diff --git a/src/symbol.c b/src/symbol.c index 6e29522..060374a 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -9,7 +9,6 @@ // 23 Nov 2014 Added label output in VICE format #include "symbol.h" #include -#include "acme.h" #include "alu.h" #include "dynabuf.h" #include "global.h" diff --git a/src/version.h b/src/version.h index 8623b9f..be967e7 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ #define RELEASE "0.97" // update before release FIXME #define CODENAME "Zem" // update before release -#define CHANGE_DATE "22 Feb" // update before release FIXME +#define CHANGE_DATE "23 Feb" // update before release FIXME #define CHANGE_YEAR "2024" // update before release //#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" #define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME