mirror of
https://github.com/uffejakobsen/acme.git
synced 2025-01-17 23:30:30 +00:00
small fix concerning pass numbers
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@365 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
f8f9a64d86
commit
538db084b5
14
src/acme.c
14
src/acme.c
@ -328,13 +328,12 @@ static void save_output_file(void)
|
||||
}
|
||||
|
||||
|
||||
// increment pass number and perform a single pass
|
||||
// perform a single pass
|
||||
static void perform_pass(void)
|
||||
{
|
||||
FILE *fd;
|
||||
int ii;
|
||||
|
||||
++pass.number;
|
||||
if (config.process_verbosity >= 2)
|
||||
printf("Pass %d:\n", pass.number);
|
||||
cputype_passinit(); // set default cpu type
|
||||
@ -366,6 +365,12 @@ static void perform_pass(void)
|
||||
printf("Undefined expressions: %d. Symbol updates: %d.\n", pass.undefined_count, pass.changed_count);
|
||||
if (pass.error_count)
|
||||
exit(ACME_finalize(EXIT_FAILURE));
|
||||
// now increment pass number
|
||||
// this must be done _after_ the pass because assignments done via
|
||||
// "-DSYMBOL=VALUE" cli args must be handled as if they were done at the
|
||||
// start of pass 1, so we cannot change that variable at the start of
|
||||
// the pass.
|
||||
++pass.number;
|
||||
}
|
||||
|
||||
|
||||
@ -746,8 +751,9 @@ int main(int argc, const char *argv[])
|
||||
if (argc == 1)
|
||||
show_help_and_exit();
|
||||
cliargs_init(argc, argv);
|
||||
// init var that may be needed for -DSYMBOL=VALUE
|
||||
pass.number = PASS_NUMBER_EARLY;
|
||||
// init pass number because any assignments done via "-DSYMBOL=VALUE"
|
||||
// cli args must be handled as if they happened at the start of pass 1:
|
||||
pass.number = 1;
|
||||
// init platform-specific stuff.
|
||||
// this may read the library path from an environment variable.
|
||||
PLATFORM_INIT;
|
||||
|
@ -109,7 +109,7 @@ struct config {
|
||||
extern struct config config;
|
||||
|
||||
struct pass {
|
||||
int number; // counts up from zero
|
||||
int number; // counts up from one
|
||||
int undefined_count; // counts undefined expression results (if this stops decreasing, next pass must list them as errors)
|
||||
//int needvalue_count; // counts undefined expression results actually needed for output (when this hits zero, we're done) FIXME - use
|
||||
int changed_count; // count symbol changes (if nonzero, another pass is needed)
|
||||
@ -121,7 +121,6 @@ struct pass {
|
||||
} flags;
|
||||
};
|
||||
extern struct pass pass;
|
||||
#define PASS_NUMBER_EARLY 0 // for symbol definitions on command line (real passes start with number 1)
|
||||
|
||||
struct sanity {
|
||||
int macro_recursions_left; // for macro calls
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#define RELEASE "0.97" // update before release FIXME
|
||||
#define CODENAME "Zem" // update before release
|
||||
#define CHANGE_DATE "7 Mar" // update before release FIXME
|
||||
#define CHANGE_DATE "8 Mar" // 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user