From 1d8c5b2261388e34637a41f82104718fdd06044b Mon Sep 17 00:00:00 2001 From: ggn Date: Tue, 17 Nov 2015 19:05:00 +0200 Subject: [PATCH] Moved some messages from -v to -x --- direct.c | 2 +- procln.c | 2 +- rmac.c | 1 + token.c | 20 ++++++++++---------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/direct.c b/direct.c index 750d587..e96aacb 100644 --- a/direct.c +++ b/direct.c @@ -772,7 +772,7 @@ int d_bss(void) // int d_ds(WORD siz) { -if (verb_flag) +if (debug) printf("Directive: .ds.[size] = %u, sloc = $%X\n", siz, sloc); VALUE eval; diff --git a/procln.c b/procln.c index 5860734..04b8ddd 100644 --- a/procln.c +++ b/procln.c @@ -137,7 +137,7 @@ loop: // Line processing loop label // Get another line of tokens if (TokenizeLine() == TKEOF) { -if (verb_flag) printf("Assemble: Found TKEOF flag...\n"); +if (debug) printf("Assemble: Found TKEOF flag...\n"); if (list_flag && listflag) // Flush last line of source listeol(); diff --git a/rmac.c b/rmac.c index 910cb88..ee8d9ee 100644 --- a/rmac.c +++ b/rmac.c @@ -146,6 +146,7 @@ void DisplayHelp(void) " -u Force referenced and undefined symbols global\n" " -w Turn off optimisations done automatically\n" " -v Set verbose mode\n" + " -x Turn on debugging mode\n" " -y[pagelen] Set page line length (default: 61)\n" "\n", cmdlnexec); } diff --git a/token.c b/token.c index 3031895..66399d6 100644 --- a/token.c +++ b/token.c @@ -679,8 +679,8 @@ int include(int handle, char * fname) INOBJ * inobj; FILEREC * fr; - // Verbose mode - if (verb_flag) + // Debug mode + if (debug) printf("[include: %s, cfileno=%u]\n", fname, cfileno); // Alloc and initialize include-descriptors @@ -742,21 +742,21 @@ int fpop(void) switch (inobj->in_type) { case SRC_IFILE: // Pop and release an IFILE - if (verb_flag) + if (debug) printf("[Leaving: %s]\n", curfname); ifile = inobj->inobj.ifile; ifile->if_link = f_ifile; f_ifile = ifile; close(ifile->ifhandle); // Close source file -if (verb_flag) printf("[fpop (pre): curfname=%s]\n", curfname); +if (debug) printf("[fpop (pre): curfname=%s]\n", curfname); curfname = ifile->ifoldfname; // Set current filename -if (verb_flag) printf("[fpop (post): curfname=%s]\n", curfname); -if (verb_flag) printf("[fpop: (pre) cfileno=%d ifile->ifno=%d]\n", (int)cfileno, (int)ifile->ifno); +if (debug) printf("[fpop (post): curfname=%s]\n", curfname); +if (debug) printf("[fpop: (pre) cfileno=%d ifile->ifno=%d]\n", (int)cfileno, (int)ifile->ifno); curlineno = ifile->ifoldlineno; // Set current line# DEBUG printf("cfileno=%d ifile->ifno=%d\n", (int)cfileno, (int)ifile->ifno); cfileno = ifile->ifno; // Restore current file number -if (verb_flag) printf("[fpop: (post) cfileno=%d ifile->ifno=%d]\n", (int)cfileno, (int)ifile->ifno); +if (debug) printf("[fpop: (post) cfileno=%d ifile->ifno=%d]\n", (int)cfileno, (int)ifile->ifno); break; case SRC_IMACRO: // Pop and release an IMACRO imacro = inobj->inobj.imacro; @@ -911,8 +911,8 @@ retry: case SRC_IFILE: if ((ln = GetNextLine()) == NULL) { -if (verb_flag) printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); - if (fpop() == 0) // Pop input level +if (debug) printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); + if (fpop()==0) // Pop input level goto retry; // Try for more lines else { @@ -965,7 +965,7 @@ if (verb_flag) printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); case SRC_IREPT: if ((ln = GetNextRepeatLine()) == NULL) { -if (verb_flag) printf("TokenizeLine: Calling fpop() from SRC_IREPT...\n"); +if (debug) printf("TokenizeLine: Calling fpop() from SRC_IREPT...\n"); fpop(); goto retry; } -- 2.37.2