From 53255dcf48d14f6a25f94b13df8486b3b7fecf71 Mon Sep 17 00:00:00 2001 From: erikb Date: Thu, 17 Apr 1986 14:42:54 +0000 Subject: [PATCH] various small corrections --- lang/cem/cemcom/domacro.c | 14 +++++++------- lang/cem/cemcom/dumpidf.c | 2 +- lang/cem/cemcom/stack.c | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lang/cem/cemcom/domacro.c b/lang/cem/cemcom/domacro.c index b0afb18da..ff742d833 100644 --- a/lang/cem/cemcom/domacro.c +++ b/lang/cem/cemcom/domacro.c @@ -352,11 +352,12 @@ do_ifdef(how) */ push_if(); if (id = GetIdentifier()) { - if ((how && !(id && id->id_macro)) || - (!how && id && id->id_macro)) - { /* this id is not defined */ + if ( + (how && !(id && id->id_macro)) + || + (!how && id && id->id_macro) + ) /* this id is not defined */ skip_block(); - } else SkipRestOfLine(); } @@ -390,9 +391,8 @@ do_line(l) { struct token tk; - LineNumber = l; - /* is there a filespecifier? */ - if (GetToken(&tk) == STRING) + LineNumber = l - 1; /* the number of the next input line */ + if (GetToken(&tk) == STRING) /* is there a filespecifier? */ FileName = tk.tk_bts; SkipRestOfLine(); } diff --git a/lang/cem/cemcom/dumpidf.c b/lang/cem/cemcom/dumpidf.c index 77c8f5ea4..af6f30938 100644 --- a/lang/cem/cemcom/dumpidf.c +++ b/lang/cem/cemcom/dumpidf.c @@ -352,7 +352,7 @@ p1_expr(lvl, expr) break; case String: { - char bts2str(); + char *bts2str(); print( "%s\n", diff --git a/lang/cem/cemcom/stack.c b/lang/cem/cemcom/stack.c index 00b79081e..26a849e2f 100644 --- a/lang/cem/cemcom/stack.c +++ b/lang/cem/cemcom/stack.c @@ -210,12 +210,15 @@ unstack_world() #ifdef DEBUG if (options['a']) { - print("\"%s\", %s, %s, %s\n", + char *symbol2str(); + + print("\"%s\", %s, %s, %s, %s\n", idf->id_text, (def->df_alloc == 0) ? "no alloc" : (def->df_alloc == ALLOC_SEEN) ? "alloc seen" : (def->df_alloc == ALLOC_DONE) ? "alloc done" : "illegal alloc info", + symbol2str(def->df_sc), def->df_initialized ? "init" : "no init", def->df_used ? "used" : "not used"); } -- 2.34.1