mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 23:36:03 +00:00
Add debug flag to command line interpretation.
This commit is contained in:
parent
a6ee20cdc1
commit
2bc55f39f3
7
extree.c
7
extree.c
@ -18,13 +18,18 @@
|
||||
to go away. Hopefully the compiler will realize when it's dead, and
|
||||
eliminate it. */
|
||||
|
||||
static void print_tree(
|
||||
void print_tree(
|
||||
FILE *printfile,
|
||||
EX_TREE *tp,
|
||||
int depth)
|
||||
{
|
||||
SYMBOL *sym;
|
||||
|
||||
if (tp == NULL) {
|
||||
fprintf(printfile, "(null)");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (tp->type) {
|
||||
case EX_LIT:
|
||||
fprintf(printfile, "%o", tp->data.lit & 0177777);
|
||||
|
||||
@ -279,6 +279,8 @@ int main(
|
||||
} else if (!stricmp(cp, "yl1")) {
|
||||
/* list the first pass, in addition to the second */
|
||||
list_pass_0++;
|
||||
} else if (!stricmp(cp, "yd")) {
|
||||
enabl_debug++;
|
||||
} else {
|
||||
fprintf(stderr, "Unknown option %s\n", argv[arg]);
|
||||
print_help();
|
||||
@ -332,7 +334,7 @@ int main(
|
||||
list_symbol_table();
|
||||
}
|
||||
#if 0
|
||||
if (enabl_debug)
|
||||
if (enabl_debug > 1)
|
||||
dump_all_macros();
|
||||
#endif
|
||||
|
||||
|
||||
4
macros.c
4
macros.c
@ -506,7 +506,7 @@ STREAM *expandmacro(
|
||||
/* dump_all_macros is a diagnostic function that's currently not
|
||||
used. I used it while debugging, and I haven't removed it. */
|
||||
|
||||
static void dump_all_macros(
|
||||
void dump_all_macros(
|
||||
void)
|
||||
{
|
||||
MACRO *mac;
|
||||
@ -515,7 +515,7 @@ static void dump_all_macros(
|
||||
for (mac = (MACRO *) first_sym(¯o_st, &iter); mac != NULL; mac = (MACRO *) next_sym(¯o_st, &iter)) {
|
||||
dumpmacro(mac, lstfile);
|
||||
|
||||
printf("\n\n");
|
||||
fprintf(lstfile, "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user