From 929a0025caaa66852abf7a0c83e9a057937d75db Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 17 Dec 1991 14:11:15 +0000 Subject: [PATCH] Do not use '#endif/#else xxx'; it is not allowed for ANSI C --- lang/cem/cemcom/.distr | 2 - lang/cem/cemcom/BigPars | 4 +- lang/cem/cemcom/LLlex.c | 24 ++++++------ lang/cem/cemcom/LLlex.h | 6 +-- lang/cem/cemcom/LLmessage.c | 2 +- lang/cem/cemcom/Makefile | 2 +- lang/cem/cemcom/SmallPars | 4 +- lang/cem/cemcom/align.h | 8 ++-- lang/cem/cemcom/arith.c | 24 ++++++------ lang/cem/cemcom/arith.h | 4 +- lang/cem/cemcom/assert.h | 2 +- lang/cem/cemcom/blocks.c | 14 +++---- lang/cem/cemcom/ch7.c | 34 ++++++++--------- lang/cem/cemcom/ch7bin.c | 10 ++--- lang/cem/cemcom/ch7mon.c | 6 +-- lang/cem/cemcom/code.c | 46 +++++++++++----------- lang/cem/cemcom/conversion.c | 14 +++---- lang/cem/cemcom/dataflow.c | 2 +- lang/cem/cemcom/declar.g | 14 +++---- lang/cem/cemcom/decspecs.c | 2 +- lang/cem/cemcom/def.str | 2 +- lang/cem/cemcom/domacro.c | 4 +- lang/cem/cemcom/dumpidf.c | 14 +++---- lang/cem/cemcom/error.c | 18 ++++----- lang/cem/cemcom/eval.c | 26 ++++++------- lang/cem/cemcom/expr.c | 20 +++++----- lang/cem/cemcom/expr.str | 8 ++-- lang/cem/cemcom/field.c | 4 +- lang/cem/cemcom/idf.c | 20 +++++----- lang/cem/cemcom/idf.str | 2 +- lang/cem/cemcom/init.c | 2 +- lang/cem/cemcom/input.c | 6 +-- lang/cem/cemcom/ival.g | 20 +++++----- lang/cem/cemcom/l_comment.c | 2 +- lang/cem/cemcom/l_ev_ord.c | 4 +- lang/cem/cemcom/l_lint.c | 6 +-- lang/cem/cemcom/l_misc.c | 4 +- lang/cem/cemcom/l_outdef.c | 8 ++-- lang/cem/cemcom/l_states.c | 10 ++--- lang/cem/cemcom/macro.str | 2 +- lang/cem/cemcom/main.c | 60 ++++++++++++++--------------- lang/cem/cemcom/options.c | 72 +++++++++++++++++------------------ lang/cem/cemcom/program.g | 20 +++++----- lang/cem/cemcom/replace.c | 2 +- lang/cem/cemcom/scan.c | 6 +-- lang/cem/cemcom/sizes.h | 8 ++-- lang/cem/cemcom/skip.c | 2 +- lang/cem/cemcom/stack.c | 14 +++---- lang/cem/cemcom/statement.g | 56 +++++++++++++-------------- lang/cem/cemcom/struct.c | 10 ++--- lang/cem/cemcom/switch.c | 4 +- lang/cem/cemcom/tokenname.c | 6 +-- lang/cem/cemcom/type.c | 8 ++-- lang/cem/cemcom/type.str | 4 +- lang/cem/cemcom/util.c | 8 ++-- lang/cem/cpp.ansi/tokenname.c | 2 +- 56 files changed, 343 insertions(+), 345 deletions(-) diff --git a/lang/cem/cemcom/.distr b/lang/cem/cemcom/.distr index ad3a0a9f4..ef83b4cae 100644 --- a/lang/cem/cemcom/.distr +++ b/lang/cem/cemcom/.distr @@ -13,8 +13,6 @@ asm.c assert.h atw.h blocks.c -cem.1 -cem.c cemcom.1 ch7.c ch7bin.c diff --git a/lang/cem/cemcom/BigPars b/lang/cem/cemcom/BigPars index eeacd0564..8a3cb27b1 100644 --- a/lang/cem/cemcom/BigPars +++ b/lang/cem/cemcom/BigPars @@ -56,7 +56,7 @@ #ifndef NOFLOAT #define SZ_FLOAT (arith)4 #define SZ_DOUBLE (arith)8 -#endif NOFLOAT +#endif /* NOFLOAT */ #define SZ_POINTER (arith)4 /* target machine alignment requirements */ @@ -68,7 +68,7 @@ #ifndef NOFLOAT #define AL_FLOAT SZ_WORD #define AL_DOUBLE SZ_WORD -#endif NOFLOAT +#endif /* NOFLOAT */ #define AL_POINTER SZ_WORD #define AL_STRUCT 1 #define AL_UNION 1 diff --git a/lang/cem/cemcom/LLlex.c b/lang/cem/cemcom/LLlex.c index aa71ca5f2..c9c111150 100644 --- a/lang/cem/cemcom/LLlex.c +++ b/lang/cem/cemcom/LLlex.c @@ -78,7 +78,7 @@ LLlex() else { /* read ahead and return the old one */ #ifdef LINT lint_comment_ahead(); -#endif LINT +#endif /* LINT */ dot = ahead; /* the following test is performed due to the dual task of LLlex(): it is also called for parsing the @@ -164,7 +164,7 @@ firstline: PushBack(); ch = '\\'; } -#endif NOPP +#endif /* NOPP */ if (040 < ch && ch < 0177) lexerror("garbage char %c", ch); else @@ -274,7 +274,7 @@ firstline: ptok->tk_fund = INT; return ptok->tk_symb = INTEGER; } -#endif NOPP +#endif /* NOPP */ ptok->tk_symb = ( idef->id_reserved ? idef->id_reserved : idef->id_def && idef->id_def->df_sc == TYPEDEF ? @@ -339,9 +339,9 @@ firstline: /* in the rest of the compiler, all floats have to start with a digit. */ -#else NOFLOAT +#else /* NOFLOAT */ return ptok->tk_symb = ch; -#endif NOFLOAT +#endif /* NOFLOAT */ } if (ch == '0') { *np++ = ch; @@ -366,7 +366,7 @@ firstline: } #ifndef NOFLOAT if (base == 16 || !(ch == '.' || ch == 'e' || ch == 'E')) -#endif NOFLOAT +#endif /* NOFLOAT */ { PushBack(); ptok->tk_ival = val; @@ -424,7 +424,7 @@ firstline: else ptok->tk_fval = Salloc(buf,(unsigned) (np - buf)) + 1; return ptok->tk_symb = FLOATING; -#endif NOFLOAT +#endif /* NOFLOAT */ } case STEOI: /* end of text on source file */ return ptok->tk_symb = EOI; @@ -453,7 +453,7 @@ skipcomment() #ifdef LINT lint_start_comment(); lint_comment_char(c); -#endif LINT +#endif /* LINT */ do { while (c != '*') { if (class(c) == STNL) @@ -463,22 +463,22 @@ skipcomment() NoUnstack--; #ifdef LINT lint_end_comment(); -#endif LINT +#endif /* LINT */ return; } LoadChar(c); #ifdef LINT lint_comment_char(c); -#endif LINT +#endif /* LINT */ } /* last Character seen was '*' */ LoadChar(c); #ifdef LINT lint_comment_char(c); -#endif LINT +#endif /* LINT */ } while (c != '/'); #ifdef LINT lint_end_comment(); -#endif LINT +#endif /* LINT */ NoUnstack--; } diff --git a/lang/cem/cemcom/LLlex.h b/lang/cem/cemcom/LLlex.h index 8a3317a4e..0005ca5ce 100644 --- a/lang/cem/cemcom/LLlex.h +++ b/lang/cem/cemcom/LLlex.h @@ -31,7 +31,7 @@ struct token { } tok_integer; #ifndef NOFLOAT char *tok_fval; -#endif NOFLOAT +#endif /* NOFLOAT */ } tok_data; }; @@ -45,7 +45,7 @@ struct token { #define tk_ival tok_data.tok_integer.tok_ival #ifndef NOFLOAT #define tk_fval tok_data.tok_fval -#endif NOFLOAT +#endif /* NOFLOAT */ extern struct token dot, ahead, aside; extern int token_nmb; /* number of the ahead token */ @@ -56,7 +56,7 @@ extern int ReplaceMacros; /* "LLlex.c" */ extern int AccDefined; /* "LLlex.c" */ extern int Unstacked; /* "LLlex.c" */ extern int UnknownIdIsZero; /* "LLlex.c" */ -#endif NOPP +#endif /* NOPP */ extern int EoiForNewline; /* "LLlex.c" */ extern int AccFileSpecifier; /* "LLlex.c" */ extern int SkipEscNewline; /* "LLlex.c" */ diff --git a/lang/cem/cemcom/LLmessage.c b/lang/cem/cemcom/LLmessage.c index 85cb4fc49..f5117b4c1 100644 --- a/lang/cem/cemcom/LLmessage.c +++ b/lang/cem/cemcom/LLmessage.c @@ -56,6 +56,6 @@ insert_token(tk) case FLOATING: dot.tk_fval = Salloc("0.0", 4); break; -#endif NOFLOAT +#endif /* NOFLOAT */ } } diff --git a/lang/cem/cemcom/Makefile b/lang/cem/cemcom/Makefile index f08fdd212..e44a9bf95 100644 --- a/lang/cem/cemcom/Makefile +++ b/lang/cem/cemcom/Makefile @@ -2,4 +2,4 @@ distr: echo '#ifndef lint' > Version.c echo 'char Version[] = "ACK C compiler Version XXX";' | \ sed "s/XXX/`RC -i`/" >> Version.c - echo '#endif lint' >> Version.c + echo '#endif' >> Version.c diff --git a/lang/cem/cemcom/SmallPars b/lang/cem/cemcom/SmallPars index ec0df8e77..097136879 100644 --- a/lang/cem/cemcom/SmallPars +++ b/lang/cem/cemcom/SmallPars @@ -56,7 +56,7 @@ #ifndef NOFLOAT #define SZ_FLOAT (arith)4 #define SZ_DOUBLE (arith)8 -#endif NOFLOAT +#endif /* NOFLOAT */ #define SZ_POINTER (arith)4 /* target machine alignment requirements */ @@ -68,7 +68,7 @@ #ifndef NOFLOAT #define AL_FLOAT SZ_WORD #define AL_DOUBLE SZ_WORD -#endif NOFLOAT +#endif /* NOFLOAT */ #define AL_POINTER SZ_WORD #define AL_STRUCT 1 #define AL_UNION 1 diff --git a/lang/cem/cemcom/align.h b/lang/cem/cemcom/align.h index 901f9c20c..9c6bba99a 100644 --- a/lang/cem/cemcom/align.h +++ b/lang/cem/cemcom/align.h @@ -14,10 +14,10 @@ extern int short_align, word_align, int_align, long_align, #ifndef NOFLOAT float_align, double_align, -#endif NOFLOAT +#endif /* NOFLOAT */ pointer_align, struct_align, union_align; -#else NOCROSS +#else /* NOCROSS */ #define short_align ((int)AL_SHORT) #define word_align ((int)AL_WORD) #define int_align ((int)AL_INT) @@ -25,10 +25,10 @@ extern int #ifndef NOFLOAT #define float_align ((int)AL_FLOAT) #define double_align ((int)AL_DOUBLE) -#endif NOFLOAT +#endif /* NOFLOAT */ #define pointer_align ((int)AL_POINTER) #define struct_align ((int)AL_STRUCT) #define union_align ((int)AL_UNION) -#endif NOCROSS +#endif /* NOCROSS */ extern arith align(); diff --git a/lang/cem/cemcom/arith.c b/lang/cem/cemcom/arith.c index 0a169c5cc..2d8d1c625 100644 --- a/lang/cem/cemcom/arith.c +++ b/lang/cem/cemcom/arith.c @@ -52,7 +52,7 @@ arithbalance(e1p, oper, e2p) /* RM 6.6 */ int2float(e1p, double_type); return; } -#endif NOFLOAT +#endif /* NOFLOAT */ /* Now they are INT or LONG */ u1 = (*e1p)->ex_type->tp_unsigned; @@ -165,10 +165,10 @@ any2arith(expp, oper) } else expr_warning(*expp, "%s on enum", symbol2str(oper)); -#endif NOROPTION +#endif /* NOROPTION */ #ifndef LINT int2int(expp, int_type); -#endif LINT +#endif /* LINT */ break; #ifndef NOFLOAT case FLOAT: @@ -176,12 +176,12 @@ any2arith(expp, oper) break; case DOUBLE: break; -#endif NOFLOAT +#endif /* NOFLOAT */ #ifndef NOBITFIELD case FIELD: field2arith(expp); break; -#endif NOBITFIELD +#endif /* NOBITFIELD */ default: expr_error(*expp, "operator %s on non-numerical operand (%s)", symbol2str(oper), symbol2str(fund)); @@ -318,7 +318,7 @@ float2float(expp, tp) else *expp = arith2arith(tp, FLOAT2FLOAT, *expp); } -#endif NOFLOAT +#endif /* NOFLOAT */ array2pointer(exp) register struct expr *exp; @@ -386,7 +386,7 @@ opnd2logical(expp, oper) else if (fund == FIELD) field2arith(expp); -#endif NOBITFIELD +#endif /* NOBITFIELD */ switch (fund = (*expp)->ex_type->tp_fund) { case CHAR: case SHORT: @@ -397,7 +397,7 @@ opnd2logical(expp, oper) #ifndef NOFLOAT case FLOAT: case DOUBLE: -#endif NOFLOAT +#endif /* NOFLOAT */ break; default: expr_error(*expp, "%s operand to %s", @@ -456,7 +456,7 @@ any2opnd(expp, oper) case ENUM: #ifndef NOFLOAT case FLOAT: -#endif NOFLOAT +#endif /* NOFLOAT */ any2arith(expp, oper); break; case ARRAY: @@ -470,7 +470,7 @@ any2opnd(expp, oper) case FIELD: field2arith(expp); break; -#endif NOBITFIELD +#endif /* NOBITFIELD */ } } @@ -502,7 +502,7 @@ field2arith(expp) } ch7cast(expp, CAST, tp); /* restore its original type */ } -#endif NOBITFIELD +#endif /* NOBITFIELD */ #ifndef NOFLOAT /* switch_sign_fp() negates the given floating constant expression @@ -519,4 +519,4 @@ switch_sign_fp(expr) else --(expr->FL_VALUE); } -#endif NOFLOAT +#endif /* NOFLOAT */ diff --git a/lang/cem/cemcom/arith.h b/lang/cem/cemcom/arith.h index 483da5b98..6a258d089 100644 --- a/lang/cem/cemcom/arith.h +++ b/lang/cem/cemcom/arith.h @@ -19,9 +19,9 @@ #include /* obtain definition of "arith" */ -#else SPECIAL_ARITHMETICS +#else /* SPECIAL_ARITHMETICS */ /* not implemented yet */ #define arith int /* dummy */ -#endif SPECIAL_ARITHMETICS +#endif /* SPECIAL_ARITHMETICS */ diff --git a/lang/cem/cemcom/assert.h b/lang/cem/cemcom/assert.h index 8e3bc2e7d..56ff98436 100644 --- a/lang/cem/cemcom/assert.h +++ b/lang/cem/cemcom/assert.h @@ -21,4 +21,4 @@ #else #define ASSERT(exp) #define NOTREACHED() -#endif DEBUG +#endif /* DEBUG */ diff --git a/lang/cem/cemcom/blocks.c b/lang/cem/cemcom/blocks.c index 1684995d4..1b692c052 100644 --- a/lang/cem/cemcom/blocks.c +++ b/lang/cem/cemcom/blocks.c @@ -20,7 +20,7 @@ #include "Lpars.h" extern arith NewLocal(); #define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER) -#endif STB +#endif /* STB */ /* Because EM does not support the loading and storing of objects having other sizes than word fragment and multiple, @@ -78,7 +78,7 @@ store_block(sz, al) C_asp(ATW(sz)); FreeLocal(dst); FreeLocal(src); -#else STB +#else /* STB *? /* address of destination lies on the stack */ /* push address of first byte of block on stack onto @@ -90,7 +90,7 @@ store_block(sz, al) C_loc(sz); /* number of bytes to transfer */ C_cal("__stb"); /* call transfer routine */ C_asp(pointer_size + pointer_size + int_size + ATW(sz)); -#endif STB +#endif /* STB */ } } @@ -123,7 +123,7 @@ load_block(sz, al) copy_loop(sz, src, dst); FreeLocal(dst); FreeLocal(src); -#else STB +#else /* STB */ C_asp(-(esz - pointer_size)); /* allocate stack block */ C_lor((arith)1); /* push & of stack block as dst */ C_dup(pointer_size); /* fetch source address */ @@ -132,7 +132,7 @@ load_block(sz, al) C_loc(sz); /* # bytes to copy */ C_cal("__stb"); /* library copy routine */ C_asp(int_size + pointer_size + pointer_size); -#endif STB +#endif /* STB */ } } @@ -162,7 +162,7 @@ copy_loop(sz, src, dst) C_df_ilb(l_stop); C_asp(word_size); } -#endif STB +#endif /* STB */ -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/ch7.c b/lang/cem/cemcom/ch7.c index f2c71945f..74545ba27 100644 --- a/lang/cem/cemcom/ch7.c +++ b/lang/cem/cemcom/ch7.c @@ -174,7 +174,7 @@ ch7cast(expp, oper, tp) ch7cast(expp, oper, tp->tp_up); } else -#endif NOBITFIELD +#endif /* NOBITFIELD */ if (oldtp == tp) { /* life is easy */ } @@ -203,9 +203,9 @@ ch7cast(expp, oper, tp) (*expp)->ex_type = tp; else int2int(expp, tp); -#else LINT +#else /* LINT */ int2int(expp, tp); -#endif LINT +#endif /* LINT */ } #ifndef NOFLOAT else @@ -219,9 +219,9 @@ ch7cast(expp, oper, tp) (*expp)->ex_type = tp; else int2float(expp, tp); -#else LINT +#else /* LINT */ int2float(expp, tp); -#endif LINT +#endif /* LINT */ } else if (!oldi && i) { @@ -230,9 +230,9 @@ ch7cast(expp, oper, tp) (*expp)->ex_type = tp; else float2int(expp, tp); -#else LINT +#else /* LINT */ float2int(expp, tp); -#endif LINT +#endif /* LINT */ } else { /* !oldi && !i */ @@ -241,16 +241,16 @@ ch7cast(expp, oper, tp) (*expp)->ex_type = tp; else float2float(expp, tp); -#else LINT +#else /* LINT */ float2float(expp, tp); -#endif LINT +#endif /* LINT */ } -#else NOFLOAT +#else /* NOFLOAT */ else { crash("(ch7cast) floats not implemented\n"); /*NOTREACHED*/ } -#endif NOFLOAT +#endif /* NOFLOAT */ } else if (oldtp->tp_fund == POINTER && tp->tp_fund == POINTER) { @@ -260,7 +260,7 @@ ch7cast(expp, oper, tp) #ifdef LINT if (oper != CAST) lint_ptr_conv(oldtp->tp_up->tp_fund, tp->tp_up->tp_fund); -#endif LINT +#endif /* LINT */ (*expp)->ex_type = tp; /* free conversion */ } else @@ -387,9 +387,9 @@ ch7asgn(expp, oper, expr) exp = new_oper(exp->ex_type->tp_up, exp, oper, expr); else exp = new_oper(exp->ex_type, exp, oper, expr); -#else NOBITFIELD +#else /* NOBITFIELD */ exp = new_oper(exp->ex_type, exp, oper, expr); -#endif NOBITFIELD +#endif /* NOBITFIELD */ exp->OP_TYPE = tp; /* for EVAL() */ exp->ex_flags |= EX_SIDEEFFECTS; *expp = exp; @@ -411,7 +411,7 @@ is_integral_type(tp) #ifndef NOBITFIELD case FIELD: return is_integral_type(tp->tp_up); -#endif NOBITFIELD +#endif /* NOBITFIELD */ default: return 0; } @@ -430,12 +430,12 @@ is_arith_type(tp) #ifndef NOFLOAT case FLOAT: case DOUBLE: -#endif NOFLOAT +#endif /* NOFLOAT */ return 1; #ifndef NOBITFIELD case FIELD: return is_arith_type(tp->tp_up); -#endif NOBITFIELD +#endif /* NOBITFIELD */ default: return 0; } diff --git a/lang/cem/cemcom/ch7bin.c b/lang/cem/cemcom/ch7bin.c index 2d81e2d5b..0915480d4 100644 --- a/lang/cem/cemcom/ch7bin.c +++ b/lang/cem/cemcom/ch7bin.c @@ -74,7 +74,7 @@ ch7bin(expp, oper, expr) #ifndef NOROPTION if (options['R']) warning("function pointer called"); -#endif NOROPTION +#endif /* NOROPTION */ ch7mon('*', expp); } switch ((*expp)->ex_type->tp_fund) { @@ -265,7 +265,7 @@ ch7bin(expp, oper, expr) ) { hwarning("operands of : are constant and equal"); } -#endif LINT +#endif /* LINT */ *expp = new_oper((*expp)->ex_type, *expp, oper, expr); break; @@ -274,7 +274,7 @@ ch7bin(expp, oper, expr) if (is_cp_cst(*expp)) { #ifdef LINT hwarning("condition in ?: expression is constant"); -#endif LINT +#endif /* LINT */ *expp = (*expp)->VL_VALUE ? expr->OP_LEFT : expr->OP_RIGHT; } @@ -287,7 +287,7 @@ ch7bin(expp, oper, expr) if (is_cp_cst(*expp)) { #ifdef LINT hwarning("constant expression ignored"); -#endif LINT +#endif /* LINT */ *expp = expr; } else { @@ -356,7 +356,7 @@ pointer_arithmetic(expp1, oper, expp2) "illegal combination of float and pointer"); erroneous2int(expp2); } -#endif NOFLOAT +#endif /* NOFLOAT */ ch7bin( expp2, '*', intexpr(size_of_type((*expp1)->ex_type->tp_up, "object"), pa_type->tp_fund) diff --git a/lang/cem/cemcom/ch7mon.c b/lang/cem/cemcom/ch7mon.c index 96d758d9f..321078e00 100644 --- a/lang/cem/cemcom/ch7mon.c +++ b/lang/cem/cemcom/ch7mon.c @@ -66,7 +66,7 @@ ch7mon(oper, expp) if ((*expp)->ex_type->tp_fund == FIELD) expr_error(*expp, "& applied to field variable"); else -#endif NOBITFIELD +#endif /* NOBITFIELD */ if (!(*expp)->ex_lvalue) expr_error(*expp, "& applied to non-lvalue"); else { @@ -105,7 +105,7 @@ ch7mon(oper, expp) } /* FALLTHROUGH */ } -#endif NOFLOAT +#endif /* NOFLOAT */ case '-': any2arith(expp, oper); if (is_cp_cst(*expp)) { @@ -123,7 +123,7 @@ ch7mon(oper, expp) if (is_fp_cst(*expp)) switch_sign_fp(*expp); else -#endif NOFLOAT +#endif /* NOFLOAT */ *expp = new_oper((*expp)->ex_type, NILEXPR, oper, *expp); break; diff --git a/lang/cem/cemcom/code.c b/lang/cem/cemcom/code.c index 5805bf3c9..bc808f00f 100644 --- a/lang/cem/cemcom/code.c +++ b/lang/cem/cemcom/code.c @@ -12,7 +12,7 @@ #else #include "l_em.h" #include "l_lint.h" -#endif LINT +#endif /* LINT */ #include "botch_free.h" #include #include "dataflow.h" @@ -45,7 +45,7 @@ label datlab_count = 1; #ifndef NOFLOAT int fp_used; -#endif NOFLOAT +#endif /* NOFLOAT */ /* global function info */ char *func_name; @@ -55,7 +55,7 @@ int func_notypegiven; #ifdef USE_TMP static int tmp_id; static int pro_id; -#endif USE_TMP +#endif /* USE_TMP */ extern char options[]; extern char *symbol2str(); @@ -93,10 +93,10 @@ init_code(dst_file) #ifdef USE_TMP #ifdef PREPEND_SCOPES C_insertpart(tmp_id = C_getid()); -#endif USE_TMP -#endif PREPEND_SCOPES +#endif /* USE_TMP */ +#endif /* PREPEND_SCOPES */ } -#endif LINT +#endif /* LINT */ struct string_cst *str_list = 0; @@ -139,13 +139,13 @@ end_code() /* floating point used */ C_ms_flt(); } -#endif NOFLOAT +#endif /* NOFLOAT */ def_strings(str_list); str_list = 0; C_ms_src((int)(LineNumber - 2), FileName); C_close(); } -#endif LINT +#endif /* LINT */ #ifdef PREPEND_SCOPES prepend_scopes() @@ -158,7 +158,7 @@ prepend_scopes() #ifdef USE_TMP C_beginpart(tmp_id); -#endif USE_TMP +#endif /* USE_TMP */ while (se != 0) { register struct idf *id = se->se_idf; register struct def *df = id->id_def; @@ -169,9 +169,9 @@ prepend_scopes() } #ifdef USE_TMP C_endpart(tmp_id); -#endif USE_TMP +#endif /* USE_TMP */ } -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ code_scope(text, def) char *text; @@ -229,11 +229,11 @@ begin_proc(ds, idf) /* to be called when entering a procedure */ */ #ifndef PREPEND_SCOPES code_scope(name, def); -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ #ifdef DATAFLOW if (options['d']) DfaStartFunction(name); -#endif DATAFLOW +#endif /* DATAFLOW */ /* set global function info */ func_name = name; @@ -310,7 +310,7 @@ end_proc(fbytes) #ifdef DATAFLOW if (options['d']) DfaEndFunction(); -#endif DATAFLOW +#endif /* DATAFLOW */ C_df_ilb(return2_label); if (return_expr_occurred) C_asp(-func_size); C_df_ilb(return_label); @@ -327,7 +327,7 @@ end_proc(fbytes) C_ret(func_size); } else C_ret((arith) 0); -#endif LINT +#endif /* LINT */ /* getting the number of "local" bytes is posponed until here, because copying the function result in "func_res_label" may @@ -440,7 +440,7 @@ code_declaration(idf, expr, lvl, sc) if (expr) { /* code only if initialized */ #ifndef PREPEND_SCOPES code_scope(idf->id_text, def); -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ def->df_alloc = ALLOC_DONE; C_df_dnam(idf->id_text); } @@ -525,7 +525,7 @@ loc_init(expr, id) if (e->OP_RIGHT != 0) /* int i = {1 , 2} */ expr_error(e, "too many initializers"); } -#endif NOROPTION +#endif /* NOROPTION */ while (e) { loc_init(e->OP_LEFT, id); e = e->OP_RIGHT; @@ -543,9 +543,9 @@ loc_init(expr, id) vl.vl_value = (arith)0; store_val(&vl, tp); } -#else LINT +#else /* LINT */ id->id_def->df_set = 1; -#endif LINT +#endif /* LINT */ free_expression(expr); } } @@ -559,7 +559,7 @@ bss(idf) #ifndef PREPEND_SCOPES code_scope(idf->id_text, idf->id_def); -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ #ifdef DBSYMTAB if (options['g']) { stb_string(idf->id_def, idf->id_def->df_sc, idf->id_text); @@ -600,7 +600,7 @@ formal_cvt(df) #ifdef LINT /*ARGSUSED*/ -#endif LINT +#endif /* LINT */ code_expr(expr, val, code, tlbl, flbl) struct expr *expr; label tlbl, flbl; @@ -616,9 +616,9 @@ code_expr(expr, val, code, tlbl, flbl) if (options['g']) db_line(expr->ex_file, (unsigned int)expr->ex_line); #endif EVAL(expr, val, code, tlbl, flbl); -#else LINT +#else /* LINT */ lint_expr(expr, code ? USED : IGNORED); -#endif LINT +#endif /* LINT */ } /* The FOR/WHILE/DO/SWITCH stacking mechanism: diff --git a/lang/cem/cemcom/conversion.c b/lang/cem/cemcom/conversion.c index 3cad0a394..bf9d0a269 100644 --- a/lang/cem/cemcom/conversion.c +++ b/lang/cem/cemcom/conversion.c @@ -19,7 +19,7 @@ #define T_UNSIGNED 2 #ifndef NOFLOAT #define T_FLOATING 3 -#endif NOFLOAT +#endif /* NOFLOAT */ /* conversion() generates the EM code for a conversion between the types char, short, int, long, float, double and pointer. @@ -54,7 +54,7 @@ conversion(from_type, to_type) case T_UNSIGNED: #ifndef NOFLOAT case T_FLOATING: -#endif NOFLOAT +#endif /* NOFLOAT */ if ((int)from_size < (int)word_size) { C_loc(from_size); C_loc(word_size); @@ -83,7 +83,7 @@ conversion(from_type, to_type) case T_FLOATING: C_cuf(); break; -#endif NOFLOAT +#endif /* NOFLOAT */ } break; #ifndef NOFLOAT @@ -102,7 +102,7 @@ conversion(from_type, to_type) break; } break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("(conversion) illegal type conversion"); /*NOTREACHED*/ @@ -110,7 +110,7 @@ conversion(from_type, to_type) if ((int)(to_type->tp_size) < (int)word_size #ifndef NOFLOAT && to_cnvtype != T_FLOATING -#endif NOFLOAT +#endif /* NOFLOAT */ ) { extern long full_mask[]; @@ -145,12 +145,12 @@ convtype(tp) case FLOAT: case DOUBLE: return T_FLOATING; -#endif NOFLOAT +#endif /* NOFLOAT */ case POINTER: return T_UNSIGNED; } return 0; } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/dataflow.c b/lang/cem/cemcom/dataflow.c index 0056121de..3eef8d6fa 100644 --- a/lang/cem/cemcom/dataflow.c +++ b/lang/cem/cemcom/dataflow.c @@ -34,4 +34,4 @@ DfaCallFunction(s) print("DFA: %s: %s\n", CurrentFunction, s); ++NumberOfCalls; } -#endif DATAFLOW +#endif /* DATAFLOW */ diff --git a/lang/cem/cemcom/declar.g b/lang/cem/cemcom/declar.g index d168bf874..a18dfd6d9 100644 --- a/lang/cem/cemcom/declar.g +++ b/lang/cem/cemcom/declar.g @@ -28,7 +28,7 @@ #include "level.h" #ifdef LINT #include "l_lint.h" -#endif LINT +#endif /* LINT */ extern char options[]; } @@ -170,7 +170,7 @@ init_declarator(register struct decspecs *ds;) declare_idf(ds, &Dc, level); #ifdef LINT lint_declare_idf(Dc.dc_idf, ds->ds_sc); -#endif LINT +#endif /* LINT */ } [ initializer(Dc.dc_idf, ds->ds_sc) @@ -181,7 +181,7 @@ init_declarator(register struct decspecs *ds;) { #ifdef LINT add_auto(Dc.dc_idf); -#endif LINT +#endif /* LINT */ remove_declarator(&Dc); } ; @@ -205,7 +205,7 @@ initializer(struct idf *idf; int sc;) { #ifdef LINT lint_statement(); -#endif LINT +#endif /* LINT */ if (globalflag) { struct expr ex; code_declaration(idf, &ex, level, sc); @@ -220,10 +220,10 @@ initializer(struct idf *idf; int sc;) } #ifdef DEBUG print_expr("initializer-expression", expr); -#endif DEBUG +#endif /* DEBUG */ #ifdef LINT change_state(idf, SET); -#endif LINT +#endif /* LINT */ #ifdef DBSYMTAB if (options['g'] && level >= L_LOCAL && expr) { db_line(expr->ex_file, (unsigned) expr->ex_line) @@ -487,7 +487,7 @@ bit_expression(struct field **fd;) free_expression(expr); #ifdef NOBITFIELD error("bitfields are not implemented"); -#endif NOBITFIELD +#endif /* NOBITFIELD */ } ; diff --git a/lang/cem/cemcom/decspecs.c b/lang/cem/cemcom/decspecs.c index 4ce4f927d..020799689 100644 --- a/lang/cem/cemcom/decspecs.c +++ b/lang/cem/cemcom/decspecs.c @@ -72,7 +72,7 @@ do_decspecs(ds) if (tp == float_type) tp = double_type; else -#endif NOFLOAT +#endif /* NOFLOAT */ error("long with illegal type"); break; } diff --git a/lang/cem/cemcom/def.str b/lang/cem/cemcom/def.str index 8d719f2c8..f10878592 100644 --- a/lang/cem/cemcom/def.str +++ b/lang/cem/cemcom/def.str @@ -26,7 +26,7 @@ struct def { /* for ordinary tags */ char df_set; int df_firstbrace; /* brace number of its first occurrence */ int df_minlevel; /* the lowest level needed for this def */ -#endif LINT +#endif /* LINT */ char df_formal_array; /* to warn if sizeof is taken */ arith df_address; }; diff --git a/lang/cem/cemcom/domacro.c b/lang/cem/cemcom/domacro.c index a687f2139..46d01d847 100644 --- a/lang/cem/cemcom/domacro.c +++ b/lang/cem/cemcom/domacro.c @@ -665,7 +665,7 @@ macroeq(s, t) return (*s == '\0') && (*t == '\0'); } } -#else NOPP +#else /* NOPP */ EXPORT domacro() { @@ -691,7 +691,7 @@ domacro() EoiForNewline = 0; SkipEscNewline = 0; } -#endif NOPP +#endif /* NOPP */ PRIVATE SkipRestOfLine() diff --git a/lang/cem/cemcom/dumpidf.c b/lang/cem/cemcom/dumpidf.c index 57043d227..a298bbb1d 100644 --- a/lang/cem/cemcom/dumpidf.c +++ b/lang/cem/cemcom/dumpidf.c @@ -118,7 +118,7 @@ dumpidf(idf, opt) } print(" macro"); } -#endif NOPP +#endif /* NOPP */ if ((opt&2) && idf->id_reserved) { if (!started++) { newline(); @@ -223,7 +223,7 @@ dumpsdefs(sdef, sdk) print("L%d: ", sdef->sd_level); #ifndef NOBITFIELD if (sdk == selector) -#endif NOBITFIELD +#endif /* NOBITFIELD */ print("selector %s at offset %lu in %s;", type2str(sdef->sd_type), sdef->sd_offset, type2str(sdef->sd_stype) @@ -232,7 +232,7 @@ dumpsdefs(sdef, sdk) else print("field %s at offset %lu;", type2str(sdef->sd_type), sdef->sd_offset ); -#endif NOBITFIELD +#endif /* NOBITFIELD */ sdef = (sdk == selector ? sdef->next : sdef->sd_sdef); } dumplevel--; @@ -281,7 +281,7 @@ type2str(tp) fd->fd_shift, fd->fd_width); } else -#endif NOBITFIELD +#endif /* NOBITFIELD */ ops = 0; break; } @@ -334,7 +334,7 @@ p1_expr(lvl, expr) expr->ex_class == String ? "String" : #ifndef NOFLOAT expr->ex_class == Float ? "Float" : -#endif NOFLOAT +#endif /* NOFLOAT */ expr->ex_class == Oper ? "Oper" : expr->ex_class == Type ? "Type" : "UNKNOWN CLASS" ); @@ -373,7 +373,7 @@ p1_expr(lvl, expr) case Float: print("%s\n", expr->FL_VALUE); break; -#endif NOFLOAT +#endif /* NOFLOAT */ case Oper: o = &expr->ex_object.ex_oper; print("\n"); @@ -399,4 +399,4 @@ p1_indent(lvl) while (lvl--) print(" "); } -#endif DEBUG +#endif /* DEBUG */ diff --git a/lang/cem/cemcom/error.c b/lang/cem/cemcom/error.c index 756fc2144..f846c60de 100644 --- a/lang/cem/cemcom/error.c +++ b/lang/cem/cemcom/error.c @@ -12,7 +12,7 @@ #include #else #include "l_em.h" -#endif LINT +#endif /* LINT */ #include "nopp.h" #include "errout.h" @@ -41,7 +41,7 @@ int err_occurred = 0; extern char options[]; #ifdef LINT extern char loptions[]; -#endif LINT +#endif /* LINT */ /* There are three general error-message functions: lexerror() lexical and pre-processor error messages @@ -165,7 +165,7 @@ awarning(va_alist) /* fmt, args */ va_end(ap); } -#endif LINT +#endif /* LINT */ /*VARARGS*/ lexerror(va_alist) /* fmt, args */ @@ -193,7 +193,7 @@ lexwarning(va_alist) /* fmt, args */ } va_end(ap); } -#endif NOPP +#endif /* NOPP */ /*VARARGS*/ crash(va_alist) /* fmt, args */ @@ -210,9 +210,9 @@ crash(va_alist) /* fmt, args */ C_close(); #ifdef DEBUG sys_stop(S_ABORT); -#else DEBUG +#else /* DEBUG */ sys_stop(S_EXIT); -#endif DEBUG +#endif /* DEBUG */ /* NOTREACHED */ } @@ -278,9 +278,9 @@ _error(class, fn, ln, ap) case WARNING: #ifndef LINT remark = "(warning)"; -#else LINT +#else /* LINT */ remark = 0; -#endif LINT +#endif /* LINT */ break; case ERROR: @@ -309,7 +309,7 @@ _error(class, fn, ln, ap) /* we skip this message */ return; } -#endif LINT +#endif /* LINT */ if (fn) fprint(ERROUT, "\"%s\", line %u: ", fn, ln); diff --git a/lang/cem/cemcom/eval.c b/lang/cem/cemcom/eval.c index cf8761669..486d1d122 100644 --- a/lang/cem/cemcom/eval.c +++ b/lang/cem/cemcom/eval.c @@ -101,7 +101,7 @@ EVAL(expr, val, code, true_label, false_label) C_loi(expr->ex_type->tp_size); } break; -#endif NOFLOAT +#endif /* NOFLOAT */ case Oper: /* compound expression */ { int oper = expr->OP_OPER; @@ -142,7 +142,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_adf(tp->tp_size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("bad type +"); } @@ -162,7 +162,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_ngf(tp->tp_size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: CRASH(); } @@ -200,7 +200,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_sbf(tp->tp_size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("bad type -"); } @@ -229,7 +229,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_mlf(double_size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("bad type *"); } @@ -252,7 +252,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_dvf(double_size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("bad type /"); } @@ -310,7 +310,7 @@ EVAL(expr, val, code, true_label, false_label) case DOUBLE: C_cmf(size); break; -#endif NOFLOAT +#endif /* NOFLOAT */ case POINTER: C_cmp(); break; @@ -360,7 +360,7 @@ EVAL(expr, val, code, true_label, false_label) eval_field(expr, gencode); break; } -#endif NOBITFIELD +#endif /* NOBITFIELD */ EVAL(right, RVAL, newcode, NO_LABEL, NO_LABEL); if (gencode) C_dup(ATW(tp->tp_size)); @@ -397,7 +397,7 @@ EVAL(expr, val, code, true_label, false_label) eval_field(expr, gencode); break; } -#endif NOBITFIELD +#endif /* NOBITFIELD */ if (newcode && left->ex_class == Value) { compl = 0; /* Value */ } @@ -520,7 +520,7 @@ EVAL(expr, val, code, true_label, false_label) DfaCallFunction( left->VL_IDF->id_text); } -#endif DATAFLOW +#endif /* DATAFLOW */ } else { EVAL(left, LVAL, TRUE, NO_LABEL, NO_LABEL); @@ -624,7 +624,7 @@ EVAL(expr, val, code, true_label, false_label) case INT2FLOAT: case FLOAT2INT: case FLOAT2FLOAT: -#endif NOFLOAT +#endif /* NOFLOAT */ EVAL(right, RVAL, gencode, NO_LABEL, NO_LABEL); if (gencode) conversion(right->ex_type, left->ex_type); @@ -800,7 +800,7 @@ assop(type, oper) break; } break; -#endif NOFLOAT +#endif /* NOFLOAT */ case POINTER: if (oper == MINAB || oper == MINMIN || oper == POSTDECR) C_ngi(size); @@ -1004,5 +1004,5 @@ load_cst(val, siz) } } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/expr.c b/lang/cem/cemcom/expr.c index ea4d7ac62..34b698c15 100644 --- a/lang/cem/cemcom/expr.c +++ b/lang/cem/cemcom/expr.c @@ -148,7 +148,7 @@ dot2expr(expp) case FLOATING: float2expr(ex); break; -#endif NOFLOAT +#endif /* NOFLOAT */ default: crash("bad conversion to expression"); /*NOTREACHED*/ @@ -188,9 +188,9 @@ idf2expr(expr) def->df_used = 1; #ifndef PREPEND_SCOPES code_scope(idf->id_text, def); -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ } -#endif LINT +#endif /* LINT */ expr->ex_type = def->df_type; if (expr->ex_type == error_type) expr->ex_flags |= EX_ERROR; @@ -212,7 +212,7 @@ idf2expr(expr) expr->VL_LBL = def->df_address; expr->VL_VALUE = (arith)0; } -#endif LINT +#endif /* LINT */ else { expr->VL_CLASS = Name; expr->VL_IDF = idf; @@ -254,7 +254,7 @@ float2expr(expr) expr->FL_VALUE = dot.tk_fval; expr->FL_DATLAB = 0; } -#endif NOFLOAT +#endif /* NOFLOAT */ struct expr* intexpr(ivalue, fund) @@ -377,7 +377,7 @@ new_oper(tp, e1, oper, e2) op->op_right = e2; #ifdef LINT lint_new_oper(expr); -#endif LINT +#endif /* LINT */ return expr; } @@ -418,7 +418,7 @@ chk_cst_expr(expp) #ifdef DEBUG print_expr("constant_expression", expr); -#endif DEBUG +#endif /* DEBUG */ if ( fund != CHAR && fund != SHORT && fund != INT && fund != ENUM && fund != LONG ) @@ -437,7 +437,7 @@ chk_cst_expr(expp) expr_warning(expr, "expression comma in constant expression"); } -#endif NOROPTION +#endif /* NOROPTION */ if (err) erroneous2int(expp); } @@ -471,7 +471,7 @@ is_ld_cst(expr) #ifdef LINT if (expr->ex_class == String) return 1; -#endif LINT +#endif /* LINT */ return expr->ex_lvalue == 0 && expr->ex_class == Value; } @@ -495,7 +495,7 @@ is_fp_cst(expr) */ return expr->ex_class == Float; } -#endif NOFLOAT +#endif /* NOFLOAT */ free_expression(expr) register struct expr *expr; diff --git a/lang/cem/cemcom/expr.str b/lang/cem/cemcom/expr.str index 3cc232707..af38d0b62 100644 --- a/lang/cem/cemcom/expr.str +++ b/lang/cem/cemcom/expr.str @@ -36,7 +36,7 @@ struct floating { char *fl_value; /* pointer to string repr. the fp const. */ label fl_datlab; /* global data_label */ }; -#endif NOFLOAT +#endif /* NOFLOAT */ struct oper { struct type *op_type; /* resulting type of the operation */ @@ -50,7 +50,7 @@ struct oper { #define String 1 /* it is a string constant */ #ifndef NOFLOAT #define Float 2 /* it is a floating point constant */ -#endif NOFLOAT +#endif /* NOFLOAT */ #define Oper 3 /* it is a run-time expression */ #define Type 4 /* only its type is relevant */ @@ -68,7 +68,7 @@ struct expr { struct string ex_string; #ifndef NOFLOAT struct floating ex_float; -#endif NOFLOAT +#endif /* NOFLOAT */ struct oper ex_oper; } ex_object; }; @@ -85,7 +85,7 @@ struct expr { #ifndef NOFLOAT #define FL_VALUE ex_object.ex_float.fl_value #define FL_DATLAB ex_object.ex_float.fl_datlab -#endif NOFLOAT +#endif /* NOFLOAT */ #define OP_TYPE ex_object.ex_oper.op_type #define OP_LEFT ex_object.ex_oper.op_left #define OP_OPER ex_object.ex_oper.op_oper diff --git a/lang/cem/cemcom/field.c b/lang/cem/cemcom/field.c index 1970ef265..0d293e914 100644 --- a/lang/cem/cemcom/field.c +++ b/lang/cem/cemcom/field.c @@ -176,7 +176,7 @@ eval_field(expr, code) conversion(atype, expr->ex_type); } } -#endif NOBITFIELD +#endif /* NOBITFIELD */ -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/idf.c b/lang/cem/cemcom/idf.c index 36e8d3e3f..90c8fb1ec 100644 --- a/lang/cem/cemcom/idf.c +++ b/lang/cem/cemcom/idf.c @@ -91,7 +91,7 @@ idf_hashed(tg, size, hc) notch->id_text = Salloc(tg, (unsigned) size); #ifndef NOPP notch->id_resmac = 0; -#endif NOPP +#endif /* NOPP */ return notch; } @@ -115,7 +115,7 @@ hash_stat() print("End hash table tally\n"); } } -#endif DEBUG +#endif /* DEBUG */ struct idf * str2idf(tg) @@ -231,7 +231,7 @@ declare_idf(ds, dc, lvl) case FLOAT: /* RM 10.1 */ type = double_type; break; -#endif NOFLOAT +#endif /* NOFLOAT */ case CHAR: case SHORT: /* The RM is not clear about this: we must @@ -274,7 +274,7 @@ declare_idf(ds, dc, lvl) #ifdef LINT check_hiding(idf, lvl, sc); /* of some idf by this idf */ -#endif LINT +#endif /* LINT */ if (def && ( def->df_level == lvl || @@ -339,7 +339,7 @@ declare_idf(ds, dc, lvl) #ifdef LINT newdef->df_set = 0; newdef->df_firstbrace = 0; -#endif LINT +#endif /* LINT */ /* link it into the name list in the proper place */ idf->id_def = newdef; @@ -478,14 +478,14 @@ global_redecl(idf, new_sc, tp) /* warn unconditionally */ warning("%s redeclared to static", idf->id_text); -#else LINT +#else /* LINT */ #ifndef NOROPTION /* warn conditionally */ if (options['R']) warning("%s redeclared to static", idf->id_text); -#endif NOROPTION -#endif LINT +#endif /* NOROPTION */ +#endif /* LINT */ def->df_sc = STATIC; } break; @@ -627,7 +627,7 @@ declare_formals(fp) #ifdef DEBUG if (options['t']) dumpidftab("start declare_formals", 0); -#endif DEBUG +#endif /* DEBUG */ while (se) { register struct def *def = se->se_idf->id_def; @@ -664,7 +664,7 @@ regtype(tp) case FLOAT: case DOUBLE: return reg_float; -#endif NOFLOAT +#endif /* NOFLOAT */ case POINTER: return reg_pointer; } diff --git a/lang/cem/cemcom/idf.str b/lang/cem/cemcom/idf.str index 3fe7c2444..3ba6c248f 100644 --- a/lang/cem/cemcom/idf.str +++ b/lang/cem/cemcom/idf.str @@ -32,7 +32,7 @@ struct idf { #ifndef NOPP struct macro *id_macro; int id_resmac; /* if nonzero: keyword of macroproc. */ -#endif NOPP +#endif /* NOPP */ int id_reserved; /* non-zero for reserved words */ char *id_file; /* file containing the occurrence */ unsigned int id_line; /* line number of the occurrence */ diff --git a/lang/cem/cemcom/init.c b/lang/cem/cemcom/init.c index a330ffecb..519bca0fc 100644 --- a/lang/cem/cemcom/init.c +++ b/lang/cem/cemcom/init.c @@ -79,4 +79,4 @@ init_pp() /* defined(??) */ macro_def(str2idf("defined"), "", 1, 1, FUNC); } -#endif NOPP +#endif /* NOPP */ diff --git a/lang/cem/cemcom/input.c b/lang/cem/cemcom/input.c index b28ffb863..cc66bc203 100644 --- a/lang/cem/cemcom/input.c +++ b/lang/cem/cemcom/input.c @@ -46,7 +46,7 @@ getwdir(fn) } int InputLevel; -#endif NOPP +#endif /* NOPP */ int NoUnstack; @@ -56,7 +56,7 @@ AtEoIT() /* if (NoUnstack) lexwarning("unexpected EOF"); ??? */ DoUnstack(); InputLevel--; -#endif NOPP +#endif /* NOPP */ return 0; } @@ -66,7 +66,7 @@ AtEoIF() if (nestlevel != nestlow) lexwarning("missing #endif"); else -#endif NOPP +#endif /* NOPP */ if (NoUnstack) lexerror("unexpected EOF"); #ifndef NOPP nestlevel = nestlow; diff --git a/lang/cem/cemcom/ival.g b/lang/cem/cemcom/ival.g index e1964f5a1..f9b3d1bd6 100644 --- a/lang/cem/cemcom/ival.g +++ b/lang/cem/cemcom/ival.g @@ -13,7 +13,7 @@ #else #include "l_em.h" #include "l_lint.h" -#endif LINT +#endif /* LINT */ #include "debug.h" #include #include "nobitfield.h" @@ -58,7 +58,7 @@ initial_value(register struct type **tpp; register struct expr **expp;) : { #ifdef LINT lint_expr(*expp, USED); -#endif LINT +#endif /* LINT */ if ((*expp)->ex_type->tp_fund == ARRAY) array2pointer(*expp); if (tpp) { @@ -440,7 +440,7 @@ pad(tpx) case FIELD: put_bf(tp, (arith)0); return; -#endif NOBITFIELD +#endif /* NOBITFIELD */ default: break; } @@ -483,7 +483,7 @@ check_ival(expp, tp) expr = *expp; #ifdef DEBUG print_expr("init-expr after cast", expr); -#endif DEBUG +#endif /* DEBUG */ if (!is_ld_cst(expr)) illegal_init_cst(expr); else @@ -513,7 +513,7 @@ check_ival(expp, tp) expr = *expp; #ifdef DEBUG print_expr("init-expr after cast", expr); -#endif DEBUG +#endif /* DEBUG */ if (expr->ex_class == Float) C_con_fcon(expr->FL_VALUE, expr->ex_type->tp_size); #ifdef NOTDEF @@ -533,11 +533,11 @@ and also to prevent runtime coercions for compile-time constants. else illegal_init_cst(expr); } -#endif NOTDEF +#endif /* NOTDEF */ else illegal_init_cst(expr); break; -#endif NOFLOAT +#endif /* NOFLOAT */ #ifndef NOBITFIELD case FIELD: @@ -545,13 +545,13 @@ and also to prevent runtime coercions for compile-time constants. expr = *expp; #ifdef DEBUG print_expr("init-expr after cast", expr); -#endif DEBUG +#endif /* DEBUG */ if (is_cp_cst(expr)) put_bf(tp, expr->VL_VALUE); else illegal_init_cst(expr); break; -#endif NOBITFIELD +#endif /* NOBITFIELD */ case ERRONEOUS: if (! gen_error) gen_error = pack_level; @@ -653,7 +653,7 @@ put_bf(tp, val) offset = (arith)-1; } } -#endif NOBITFIELD +#endif /* NOBITFIELD */ int zero_bytes(sd) diff --git a/lang/cem/cemcom/l_comment.c b/lang/cem/cemcom/l_comment.c index a2a74afc4..d5de417a4 100644 --- a/lang/cem/cemcom/l_comment.c +++ b/lang/cem/cemcom/l_comment.c @@ -208,4 +208,4 @@ make_format(argn, oldf) *newf++ = '\0'; } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/l_ev_ord.c b/lang/cem/cemcom/l_ev_ord.c index be44675c8..4eee840af 100644 --- a/lang/cem/cemcom/l_ev_ord.c +++ b/lang/cem/cemcom/l_ev_ord.c @@ -14,7 +14,7 @@ #include "assert.h" #ifdef ANSI #include -#endif ANSI +#endif /* ANSI */ #include "arith.h" /* definition arith */ #include "label.h" /* definition label */ #include "expr.h" @@ -106,4 +106,4 @@ check_ev_order(esp1, esp2, expr) } } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/l_lint.c b/lang/cem/cemcom/l_lint.c index 73adf197f..48fe06d97 100644 --- a/lang/cem/cemcom/l_lint.c +++ b/lang/cem/cemcom/l_lint.c @@ -15,7 +15,7 @@ #include "assert.h" #ifdef ANSI #include -#endif ANSI +#endif /* ANSI */ #include "arith.h" /* definition arith */ #include "label.h" /* definition label */ #include "expr.h" @@ -450,6 +450,6 @@ print_esp(msg, esp) } print(">\n"); } -#endif DEBUG +#endif /* DEBUG */ -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/l_misc.c b/lang/cem/cemcom/l_misc.c index 51e52c292..474c82f20 100644 --- a/lang/cem/cemcom/l_misc.c +++ b/lang/cem/cemcom/l_misc.c @@ -13,7 +13,7 @@ #include "interface.h" #ifdef ANSI #include -#endif ANSI +#endif /* ANSI */ #include "arith.h" /* definition arith */ #include "label.h" /* definition label */ #include "expr.h" @@ -424,4 +424,4 @@ lint_relop(left, right, oper) } } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/l_outdef.c b/lang/cem/cemcom/l_outdef.c index 576ef9978..fe6fa5886 100644 --- a/lang/cem/cemcom/l_outdef.c +++ b/lang/cem/cemcom/l_outdef.c @@ -13,7 +13,7 @@ #include "interface.h" #ifdef ANSI #include -#endif ANSI +#endif /* ANSI */ #include "arith.h" #include "assert.h" #include "type.h" @@ -501,7 +501,7 @@ implicit_func_decl(idf, file, line) output_def(&od); /* The other fields are not used for this class. */ } -#endif IMPLICIT +#endif /* IMPLICIT */ fill_outcall(ex, used) struct expr *ex; @@ -515,7 +515,7 @@ fill_outcall(ex, used) /* IFDC, first time */ implicit_func_decl(idf, ex->ex_file, ex->ex_line); } -#endif IMPLICIT +#endif /* IMPLICIT */ OutCall.od_type = def->df_type->tp_up; OutCall.od_statnr = (def->df_sc == STATIC ? stat_number : 0); @@ -580,4 +580,4 @@ add_expr_arg(e) OutCall.od_nrargs++; } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/l_states.c b/lang/cem/cemcom/l_states.c index bd4795571..38d1850b2 100644 --- a/lang/cem/cemcom/l_states.c +++ b/lang/cem/cemcom/l_states.c @@ -15,7 +15,7 @@ #include "debug.h" #ifdef ANSI #include -#endif ANSI +#endif /* ANSI */ #include "arith.h" #include "label.h" #include "expr.h" @@ -37,7 +37,7 @@ #define dbg_lint_stack(m) /*print_lint_stack(m) /* or not */ #else #define dbg_lint_stack(m) -#endif DEBUG +#endif /* DEBUG */ extern char *symbol2str(); extern char *func_name; @@ -205,7 +205,7 @@ lint_1_global(idf, def) case GLOBAL: #ifdef IMPLICIT case IMPLICIT: -#endif IMPLICIT +#endif /* IMPLICIT */ if (fund == ERRONEOUS) break; @@ -1303,6 +1303,6 @@ print_lint_stack(msg) print(" |--------------\n\n"); } -#endif DEBUG +#endif /* DEBUG */ -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cemcom/macro.str b/lang/cem/cemcom/macro.str index b1c94f07a..1c3f3a7bf 100644 --- a/lang/cem/cemcom/macro.str +++ b/lang/cem/cemcom/macro.str @@ -57,4 +57,4 @@ struct mlist { #define K_UNDEF 10 #define K_PRAGMA 11 #define K_FILE 100 /* for dependency generator */ -#endif NOPP +#endif /* NOPP */ diff --git a/lang/cem/cemcom/main.c b/lang/cem/cemcom/main.c index 92711b921..20a0b4d30 100644 --- a/lang/cem/cemcom/main.c +++ b/lang/cem/cemcom/main.c @@ -47,7 +47,7 @@ extern char *dep_file; static File *dep_fd = STDOUT; extern char *getwdir(); -#endif NOPP +#endif /* NOPP */ struct sp_id special_ids[] = { {"setjmp", SP_SETJMP}, /* non-local goto's are registered */ @@ -64,7 +64,7 @@ arith #ifndef NOFLOAT float_size = SZ_FLOAT, double_size = SZ_DOUBLE, -#endif NOFLOAT +#endif /* NOFLOAT */ pointer_size = SZ_POINTER; int @@ -75,15 +75,15 @@ int #ifndef NOFLOAT float_align = AL_FLOAT, double_align = AL_DOUBLE, -#endif NOFLOAT +#endif /* NOFLOAT */ pointer_align = AL_POINTER, struct_align = AL_STRUCT, union_align = AL_UNION; -#endif NOCROSS +#endif /* NOCROSS */ #ifndef NOPP arith ifval; /* ifval will contain the result of the #if expression */ -#endif NOPP +#endif /* NOPP */ char *prog_name; @@ -103,7 +103,7 @@ main(argc, argv) inc_max = 10; init_pp(); /* initialise the preprocessor macros */ -#endif NOPP +#endif /* NOPP */ /* Note: source file "-" indicates that the source is supplied as standard input. This is only allowed if INP_READ_IN_ONE is @@ -111,9 +111,9 @@ main(argc, argv) */ #ifdef INP_READ_IN_ONE while (argc > 1 && *argv[1] == '-') -#else INP_READ_IN_ONE +#else /* INP_READ_IN_ONE */ while (argc > 1 && *argv[1] == '-' && argv[1][1] != '\0') -#endif INP_READ_IN_ONE +#endif /* INP_READ_IN_ONE */ { char *par = &argv[1][1]; @@ -122,12 +122,12 @@ main(argc, argv) } #ifdef LINT lint_init(); -#endif LINT +#endif /* LINT */ compile(argc - 1, &argv[1]); #ifdef DEBUG hash_stat(); -#endif DEBUG +#endif /* DEBUG */ #ifndef NOPP if (do_dependencies) { @@ -201,7 +201,7 @@ char *s, *source; else fprint(dep_fd, "%s\n", s); } -#endif NOPP +#endif /* NOPP */ char *source = 0; @@ -213,12 +213,12 @@ compile(argc, argv) char *result; #ifndef LINT register char *destination = 0; -#endif LINT +#endif /* LINT */ #ifdef DEBUG #ifndef NOPP int pp_only = options['E'] || options['P'] || options['C']; -#endif NOPP +#endif /* NOPP */ #endif switch (argc) { @@ -227,10 +227,10 @@ compile(argc, argv) #ifdef DEBUG #ifndef NOPP if (!pp_only) -#endif NOPP +#endif /* NOPP */ #endif fatal("%s: destination file not specified", prog_name); -#endif LINT +#endif /* LINT */ break; #ifndef LINT @@ -241,14 +241,14 @@ compile(argc, argv) nmlist = argv[2]; destination = argv[1]; break; -#endif LINT +#endif /* LINT */ default: #ifndef LINT fatal("use: %s source destination [namelist]", prog_name); -#else LINT +#else /* LINT */ fatal("use: %s source", prog_name); -#endif LINT +#endif /* LINT */ break; } @@ -271,7 +271,7 @@ compile(argc, argv) #endif #ifndef NOPP WorkingDir = getwdir(source); -#endif NOPP +#endif /* NOPP */ PushLex(); /* initialize lex machine */ #ifdef DEBUG @@ -279,20 +279,20 @@ compile(argc, argv) if (pp_only) /* run the preprocessor as if it is stand-alone */ preprocess(); else -#endif NOPP -#endif DEBUG +#endif /* NOPP */ +#endif /* DEBUG */ { #ifndef LINT /* compile the source text */ C_program(); #ifdef PREPEND_SCOPES prepend_scopes(); -#endif PREPEND_SCOPES +#endif /* PREPEND_SCOPES */ end_code(); -#else LINT +#else /* LINT */ /* lint the source text */ C_program(); -#endif LINT +#endif /* LINT */ #ifdef DEBUG if (options['u']) { @@ -300,7 +300,7 @@ compile(argc, argv) } if (options['f'] || options['t']) dumpidftab("end of main", options['f'] ? 0 : 0); -#endif DEBUG +#endif /* DEBUG */ } PopLex(); } @@ -338,7 +338,7 @@ init() #ifndef NOFLOAT float_type = standard_type(FLOAT, 0, float_align, float_size); double_type = standard_type(DOUBLE, 0, double_align, double_size); -#endif NOFLOAT +#endif /* NOFLOAT */ void_type = standard_type(VOID, 0, 1, (arith)0); label_type = standard_type(LABEL, 0, 0, (arith)0); error_type = standard_type(ERRONEOUS, 0, 1, (arith)1); @@ -377,7 +377,7 @@ init() #ifndef NOFLOAT add_def(str2idf("float"), TYPEDEF, float_type, L_UNIVERSAL); add_def(str2idf("double"), TYPEDEF, double_type, L_UNIVERSAL); -#endif NOFLOAT +#endif /* NOFLOAT */ add_def(str2idf("void"), TYPEDEF, void_type, L_UNIVERSAL); stack_level(); } @@ -457,7 +457,7 @@ preprocess() case FLOATING: print("%s ", dot.tk_fval); break; -#endif NOFLOAT +#endif /* NOFLOAT */ case EOI: case EOF: return; @@ -466,8 +466,8 @@ preprocess() } } } -#endif NOPP -#endif DEBUG +#endif /* NOPP */ +#endif /* DEBUG */ No_Mem() /* called by alloc package */ { diff --git a/lang/cem/cemcom/options.c b/lang/cem/cemcom/options.c index 9bdd6e5d5..73c1e832e 100644 --- a/lang/cem/cemcom/options.c +++ b/lang/cem/cemcom/options.c @@ -31,12 +31,12 @@ extern int inc_total; int do_dependencies = 0; char *dep_file = 0; -#endif NOPP +#endif /* NOPP */ char options[128]; /* one for every char */ #ifdef LINT char loptions[128]; /* one for every char */ -#endif LINT +#endif /* LINT */ extern int idfsize; extern int density; @@ -57,9 +57,9 @@ next_option: /* to allow combined one-char options */ default: #ifndef LINT fatal("illegal option: %c", opt); -#else LINT +#else /* LINT */ warning("illegal option: %c", opt); -#endif LINT +#endif /* LINT */ break; case '-': @@ -69,14 +69,14 @@ next_option: /* to allow combined one-char options */ #ifndef LINT #ifdef DATAFLOW case 'd': -#endif DATAFLOW +#endif /* DATAFLOW */ case 'p': /* procentry/procexit */ case 'L' : /* no fil/lin */ case 'n': /* use no registers */ case 'w': /* no warnings will be given */ options[opt] = 1; goto next_option; -#endif LINT +#endif /* LINT */ #ifdef LINT case 'h': /* heuristic tests */ @@ -88,7 +88,7 @@ next_option: /* to allow combined one-char options */ case 'L': /* lintlibrary */ loptions[opt] = 1; goto next_option; -#endif LINT +#endif /* LINT */ #ifndef LINT #ifndef NOPP @@ -102,8 +102,8 @@ next_option: /* to allow combined one-char options */ case 'm': options[opt] = 1; break; -#endif NOPP -#endif LINT +#endif /* NOPP */ +#endif /* LINT */ #ifdef DBSYMTAB case 'g': /* symbol table for debugger */ options['g'] = 1; @@ -114,9 +114,9 @@ next_option: /* to allow combined one-char options */ case 'R': /* strict version */ #ifndef NOROPTION options[opt] = 1; -#else NOROPTION +#else /* NOROPTION */ warning("-R option not implemented"); -#endif NOROPTION +#endif /* NOROPTION */ goto next_option; #ifdef ___XXX___ @@ -125,11 +125,11 @@ deleted, is now a debug-flag #ifndef NOPP options['E'] = 1; warning("-C: comment is not output"); -#else NOPP +#else /* NOPP */ warning("-C option ignored"); -#endif NOPP +#endif /* NOPP */ break; -#endif ___XXX___ +#endif /* ___XXX___ */ case 'D' : { /* -Dname : predefine name */ #ifndef NOPP @@ -161,9 +161,9 @@ deleted, is now a debug-flag macro_def(str2idf(name), mactext, -1, strlen(mactext), NOFLAG); -#else NOPP +#else /* NOPP */ warning("-D option ignored"); -#endif NOPP +#endif /* NOPP */ break; } @@ -172,11 +172,11 @@ deleted, is now a debug-flag case 'E' : /* run preprocessor only, with # */ #ifndef NOPP options['E'] = 1; -#else NOPP +#else /* NOPP */ warning("-E option ignored"); -#endif NOPP +#endif /* NOPP */ break; -#endif ___XXX___ +#endif /* ___XXX___ */ case 'I' : /* -Ipath : insert "path" into include list */ #ifndef NOPP @@ -197,9 +197,9 @@ deleted, is now a debug-flag } } else inctable[inc_pos] = 0; -#else NOPP +#else /* NOPP */ warning("-I option ignored"); -#endif NOPP +#endif /* NOPP */ break; case 'M': /* maximum identifier length */ @@ -216,11 +216,11 @@ deleted, is now a debug-flag #ifndef NOPP options['E'] = 1; options['P'] = 1; -#else NOPP +#else /* NOPP */ warning("-P option ignored"); -#endif NOPP +#endif /* NOPP */ break; -#endif ___XXX___ +#endif /* ___XXX___ */ #ifdef LINT case 'S' : { /* -Sint : static scope number for lint */ @@ -228,7 +228,7 @@ deleted, is now a debug-flag stat_number = txt2int(&text); break; } -#endif LINT +#endif /* LINT */ case 'T' : { #ifdef USE_TMP @@ -237,9 +237,9 @@ deleted, is now a debug-flag C_tmpdir = text; else C_tmpdir = "."; -#else USE_TMP +#else /* USE_TMP */ warning("-T option ignored"); -#endif USE_TMP +#endif /* USE_TMP */ break; } @@ -253,9 +253,9 @@ deleted, is now a debug-flag idef->id_macro = (struct macro *) 0; } } -#else NOPP +#else /* NOPP */ warning("-U option ignored"); -#endif NOPP +#endif /* NOPP */ break; } @@ -264,7 +264,7 @@ deleted, is now a debug-flag #ifdef NOCROSS warning("-V option ignored"); break; -#else NOCROSS +#else /* NOCROSS */ { register arith sz, algn; char c; @@ -307,7 +307,7 @@ deleted, is now a debug-flag float_size = sz; if (algn != 0) float_align = algn; -#endif NOFLOAT +#endif /* NOFLOAT */ break; case 'd': /* double */ #ifndef NOFLOAT @@ -315,7 +315,7 @@ deleted, is now a debug-flag double_size = sz; if (algn != 0) double_align = algn; -#endif NOFLOAT +#endif /* NOFLOAT */ break; case 'p': /* pointer */ if (sz != (arith)0) @@ -326,9 +326,9 @@ deleted, is now a debug-flag case 'r': /* adjust bitfields right */ #ifndef NOBITFIELD options['r'] = 1; -#else NOBITFIELD +#else /* NOBITFIELD */ warning("bitfields are not implemented"); -#endif NOBITFIELD +#endif /* NOBITFIELD */ break; case 'S': /* initial struct alignment */ if (sz != (arith)0) @@ -344,11 +344,11 @@ deleted, is now a debug-flag } break; } -#endif NOCROSS +#endif /* NOCROSS */ case 'S': density = txt2int(&text); break; -#endif LINT +#endif /* LINT */ } } diff --git a/lang/cem/cemcom/program.g b/lang/cem/cemcom/program.g index 66c2cade6..174c85e61 100644 --- a/lang/cem/cemcom/program.g +++ b/lang/cem/cemcom/program.g @@ -59,11 +59,11 @@ #include "def.h" #ifdef LINT #include "l_lint.h" -#endif LINT +#endif /* LINT */ #ifndef NOPP extern arith ifval; -#endif NOPP +#endif /* NOPP */ extern error(); } @@ -82,7 +82,7 @@ control_if_expression "sizeof not allowed in preprocessor"); ifval = expr->VL_VALUE; free_expression(expr); -#endif NOPP +#endif /* NOPP */ } ; @@ -128,7 +128,7 @@ external_definition declare_idf(&Ds, &Dc, level); #ifdef LINT lint_ext_def(Dc.dc_idf, Ds.ds_sc); -#endif LINT +#endif /* LINT */ } [ function(&Ds, &Dc) @@ -162,7 +162,7 @@ non_function(register struct decspecs *ds; register struct declarator *dc;) { #ifdef LINT lint_non_function_decl(ds, dc); -#endif LINT +#endif /* LINT */ } [ ',' @@ -180,7 +180,7 @@ function(struct decspecs *ds; struct declarator *dc;) { register struct idf *idf = dc->dc_idf; #ifdef LINT lint_start_function(); -#endif LINT +#endif /* LINT */ init_idf(idf); stack_level(); /* L_FORMAL1 declarations */ declare_params(dc); @@ -192,21 +192,21 @@ function(struct decspecs *ds; struct declarator *dc;) declare_formals(&fbytes); #ifdef LINT lint_formals(); -#endif LINT +#endif /* LINT */ } compound_statement { end_proc(fbytes); #ifdef LINT lint_implicit_return(); -#endif LINT +#endif /* LINT */ unstack_level(); /* L_FORMAL2 declarations */ #ifdef LINT lint_end_formals(); -#endif LINT +#endif /* LINT */ unstack_level(); /* L_FORMAL1 declarations */ #ifdef LINT lint_end_function(); -#endif LINT +#endif /* LINT */ } ; diff --git a/lang/cem/cemcom/replace.c b/lang/cem/cemcom/replace.c index d1d577fe1..35f1d9179 100644 --- a/lang/cem/cemcom/replace.c +++ b/lang/cem/cemcom/replace.c @@ -235,4 +235,4 @@ EnableMacros() } Unstacked = 0; } -#endif NOPP +#endif /* NOPP */ diff --git a/lang/cem/cemcom/scan.c b/lang/cem/cemcom/scan.c index 6e89228ee..2a9ccbf8c 100644 --- a/lang/cem/cemcom/scan.c +++ b/lang/cem/cemcom/scan.c @@ -121,7 +121,7 @@ copyact(ch1, ch2, lvl) case ']': lexerror("unbalanced parenthesis"); break; -#endif __MATCHING_PAR__ +#endif /* __MATCHING_PAR__ */ case '(': copyact('(', ')', lvl+1); @@ -139,7 +139,7 @@ copyact(ch1, ch2, lvl) case '[': copyact('[', ']', lvl+1); break; -#endif __MATCHING_PAR__ +#endif /* __MATCHING_PAR__ */ case '\n': LineNumber++; @@ -234,4 +234,4 @@ copyact(ch1, ch2, lvl) } } } -#endif NOPP +#endif /* NOPP */ diff --git a/lang/cem/cemcom/sizes.h b/lang/cem/cemcom/sizes.h index e77d4291d..98dc832fe 100644 --- a/lang/cem/cemcom/sizes.h +++ b/lang/cem/cemcom/sizes.h @@ -14,9 +14,9 @@ extern arith short_size, word_size, dword_size, int_size, long_size, #ifndef NOFLOAT float_size, double_size, -#endif NOFLOAT +#endif /* NOFLOAT */ pointer_size; -#else NOCROSS +#else /* NOCROSS */ #define short_size (SZ_SHORT) #define word_size (SZ_WORD) #define dword_size (2*SZ_WORD) @@ -25,8 +25,8 @@ extern arith #ifndef NOFLOAT #define float_size (SZ_FLOAT) #define double_size (SZ_DOUBLE) -#endif NOFLOAT +#endif /* NOFLOAT */ #define pointer_size (SZ_POINTER) -#endif NOCROSS +#endif /* NOCROSS */ extern arith max_int, max_unsigned; /* cstoper.c */ diff --git a/lang/cem/cemcom/skip.c b/lang/cem/cemcom/skip.c index 3fb1808ad..f06f24acd 100644 --- a/lang/cem/cemcom/skip.c +++ b/lang/cem/cemcom/skip.c @@ -56,7 +56,7 @@ skipspaces(ch, skipnl) return ch; } } -#endif NOPP +#endif /* NOPP */ PRIVATE skipline() diff --git a/lang/cem/cemcom/stack.c b/lang/cem/cemcom/stack.c index c09a670aa..d182855b0 100644 --- a/lang/cem/cemcom/stack.c +++ b/lang/cem/cemcom/stack.c @@ -12,7 +12,7 @@ #include #else #include "l_em.h" -#endif LINT +#endif /* LINT */ #include "debug.h" #include "botch_free.h" #include @@ -56,7 +56,7 @@ stack_level() { local_level = stl; #ifdef LINT lint_start_local(); -#endif LINT +#endif /* LINT */ } stack_idf(idf, stl) @@ -100,11 +100,11 @@ unstack_level() #ifdef DEBUG if (options['t']) dumpidftab("before unstackidfs", 0); -#endif DEBUG +#endif /* DEBUG */ #ifdef LINT lint_end_local(local_level); -#endif LINT +#endif /* LINT */ /* The implementation below is more careful than strictly necessary. Optimists may optimize it afterwards. @@ -164,7 +164,7 @@ unstack_level() #ifdef DEBUG if (options['t']) dumpidftab("after unstackidfs", 0); -#endif DEBUG +#endif /* DEBUG */ } unstack_world() @@ -180,7 +180,7 @@ unstack_world() #ifdef LINT lint_end_global(local_level); -#endif LINT +#endif /* LINT */ open_name_list(); @@ -208,7 +208,7 @@ unstack_world() def->df_initialized ? "init" : "no init", def->df_used ? "used" : "not used"); } -#endif DEBUG +#endif /* DEBUG */ /* /_* find final storage class *_/ if (def->df_sc == GLOBAL || def->df_sc == IMPLICIT) diff --git a/lang/cem/cemcom/statement.g b/lang/cem/cemcom/statement.g index cee729b39..ede1301e4 100644 --- a/lang/cem/cemcom/statement.g +++ b/lang/cem/cemcom/statement.g @@ -12,7 +12,7 @@ #else #include "l_em.h" #include "l_lint.h" -#endif LINT +#endif /* LINT */ #include "debug.h" #include "botch_free.h" @@ -45,7 +45,7 @@ statement { #ifdef LINT lint_statement(); -#endif LINT +#endif /* LINT */ } : %if (AHEAD != ':') @@ -74,7 +74,7 @@ statement code_break(); #ifdef LINT lint_break_stmt(); -#endif LINT +#endif /* LINT */ } ';' | @@ -83,7 +83,7 @@ statement code_continue(); #ifdef LINT lint_continue_stmt(); -#endif LINT +#endif /* LINT */ } ';' | @@ -106,7 +106,7 @@ expression_statement { #ifdef DEBUG print_expr("expression_statement", expr); -#endif DEBUG +#endif /* DEBUG */ code_expr(expr, RVAL, FALSE, NO_LABEL, NO_LABEL); free_expression(expr); } @@ -127,7 +127,7 @@ label */ #ifdef LINT lint_label(); -#endif LINT +#endif /* LINT */ define_label(idf); C_df_ilb((label)idf->id_def->df_address); } @@ -156,14 +156,14 @@ if_statement /* else fall through */ #ifdef LINT start_if_part(1); -#endif LINT +#endif /* LINT */ } else { code_expr(expr, RVAL, TRUE, l_true, l_false); C_df_ilb(l_true); #ifdef LINT start_if_part(0); -#endif LINT +#endif /* LINT */ } free_expression(expr); } @@ -174,7 +174,7 @@ if_statement { #ifdef LINT start_else_part(); -#endif LINT +#endif /* LINT */ C_bra(l_end); C_df_ilb(l_false); } @@ -182,14 +182,14 @@ if_statement { C_df_ilb(l_end); #ifdef LINT end_if_else_stmt(); -#endif LINT +#endif /* LINT */ } | empty { C_df_ilb(l_false); #ifdef LINT end_if_stmt(); -#endif LINT +#endif /* LINT */ } ] ; @@ -223,7 +223,7 @@ while_statement #ifdef LINT start_while_stmt(expr); -#endif LINT +#endif /* LINT */ } ')' @@ -236,7 +236,7 @@ while_statement #ifdef LINT end_loop_body(); end_loop_stmt(); -#endif LINT +#endif /* LINT */ } ; @@ -252,7 +252,7 @@ do_statement stack_stmt(l_break, l_continue); #ifdef LINT start_do_stmt(); -#endif LINT +#endif /* LINT */ } statement WHILE @@ -260,7 +260,7 @@ do_statement { #ifdef LINT end_loop_body(); -#endif LINT +#endif /* LINT */ C_df_ilb(l_continue); } expression(&expr) @@ -272,13 +272,13 @@ do_statement } #ifdef LINT end_do_stmt(1, expr->VL_VALUE != (arith)0); -#endif LINT +#endif /* LINT */ } else { code_expr(expr, RVAL, TRUE, l_body, l_break); #ifdef LINT end_do_stmt(0, 0); -#endif LINT +#endif /* LINT */ } C_df_ilb(l_break); } @@ -331,13 +331,13 @@ for_statement { #ifdef LINT start_for_stmt(e_test); -#endif LINT +#endif /* LINT */ } statement { #ifdef LINT end_loop_body(); -#endif LINT +#endif /* LINT */ C_df_ilb(l_continue); if (e_incr) code_expr(e_incr, RVAL, FALSE, @@ -350,7 +350,7 @@ for_statement free_expression(e_incr); #ifdef LINT end_loop_stmt(); -#endif LINT +#endif /* LINT */ } ; @@ -366,14 +366,14 @@ switch_statement code_startswitch(&expr); #ifdef LINT start_switch_part(is_cp_cst(expr)); -#endif LINT +#endif /* LINT */ } ')' statement { #ifdef LINT end_switch_stmt(); -#endif LINT +#endif /* LINT */ code_endswitch(); free_expression(expr); } @@ -389,7 +389,7 @@ case_statement { #ifdef LINT lint_case_stmt(0); -#endif LINT +#endif /* LINT */ code_case(expr); free_expression(expr); } @@ -403,7 +403,7 @@ default_statement { #ifdef LINT lint_case_stmt(1); -#endif LINT +#endif /* LINT */ code_default(); } ':' @@ -420,13 +420,13 @@ return_statement { #ifdef LINT lint_ret_conv(expr); -#endif LINT +#endif /* LINT */ do_return_expr(expr); free_expression(expr); #ifdef LINT lint_return_stmt(VALRETURNED); -#endif LINT +#endif /* LINT */ } | empty @@ -434,7 +434,7 @@ return_statement do_return(); #ifdef LINT lint_return_stmt(NOVALRETURNED); -#endif LINT +#endif /* LINT */ } ] ';' @@ -452,7 +452,7 @@ jump C_bra((label)idf->id_def->df_address); #ifdef LINT lint_jump_stmt(idf); -#endif LINT +#endif /* LINT */ } ; diff --git a/lang/cem/cemcom/struct.c b/lang/cem/cemcom/struct.c index de7f6af4b..2182ccfc2 100644 --- a/lang/cem/cemcom/struct.c +++ b/lang/cem/cemcom/struct.c @@ -70,7 +70,7 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */ arith offset; #ifndef NOBITFIELD extern arith add_field(); -#endif NOBITFIELD +#endif /* NOBITFIELD */ struct tag *tg = stp->tp_idf->id_struct; /* or union */ struct sdef *sdef = idf->id_sdef; @@ -98,10 +98,10 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */ */ offset = add_field(szp, fd, &tp, idf, stp); } -#else NOBITFIELD +#else /* NOBITFIELD */ offset = align(*szp, tp->tp_align); field_busy = 0; -#endif NOBITFIELD +#endif /* NOBITFIELD */ } else { /* (stp->tp_fund == UNION) */ if (fd) { @@ -139,7 +139,7 @@ add_sel(stp, tp, idf, sdefpp, szp, fd) /* this is horrible */ #ifndef NOBITFIELD if (tp->tp_fund == FIELD) tp->tp_field->fd_sdef = newsdef; -#endif NOBITFIELD +#endif /* NOBITFIELD */ stack_idf(idf, stack_level_of(lvl)); @@ -466,7 +466,7 @@ add_field(szp, fd, fdtpp, idf, stp) return field_offset; } -#endif NOBITFIELD +#endif /* NOBITFIELD */ /* some utilities */ int diff --git a/lang/cem/cemcom/switch.c b/lang/cem/cemcom/switch.c index 7f2579c3e..f5fce4a38 100644 --- a/lang/cem/cemcom/switch.c +++ b/lang/cem/cemcom/switch.c @@ -11,7 +11,7 @@ #include #else #include "l_em.h" -#endif LINT +#endif /* LINT */ #include "debug.h" #include "botch_free.h" #include @@ -75,7 +75,7 @@ code_startswitch(expp) error("float/double in switch"); erroneous2int(expp); break; -#endif NOFLOAT +#endif /* NOFLOAT */ } stack_stmt(l_break, NO_LABEL); sh->sh_break = l_break; diff --git a/lang/cem/cemcom/tokenname.c b/lang/cem/cemcom/tokenname.c index f2699ae51..9248b0db4 100644 --- a/lang/cem/cemcom/tokenname.c +++ b/lang/cem/cemcom/tokenname.c @@ -32,7 +32,7 @@ struct tokenname tkspec[] = { /* the names of the special tokens */ {FLOATING, "floating"}, {0, ""} }; -#endif ____ +#endif /* ____ */ #ifdef ____ struct tokenname tkcomp[] = { /* names of the composite tokens */ @@ -49,7 +49,7 @@ struct tokenname tkcomp[] = { /* names of the composite tokens */ {OR, "||"}, {0, ""} }; -#endif ____ +#endif /* ____ */ struct tokenname tkidf[] = { /* names of the identifier tokens */ {ASM, "asm"}, @@ -128,7 +128,7 @@ struct tokenname tkfunny[] = { /* internal keywords */ {FLOAT2FLOAT, "float2float"}, {0, ""} }; -#endif ____ +#endif /* ____ */ reserve(resv) register struct tokenname resv[]; diff --git a/lang/cem/cemcom/type.c b/lang/cem/cemcom/type.c index dc8e81312..0c44a83f9 100644 --- a/lang/cem/cemcom/type.c +++ b/lang/cem/cemcom/type.c @@ -20,7 +20,7 @@ struct type *function_of(), *array_of(); #ifndef NOBITFIELD struct type *field_of(); -#endif NOBITFIELD +#endif /* NOBITFIELD */ /* To be created dynamically in main() from defaults or from command line parameters. @@ -33,7 +33,7 @@ struct type *long_type, *ulong_type, #ifndef NOFLOAT *float_type, *double_type, -#endif NOFLOAT +#endif /* NOFLOAT */ *void_type, *label_type, *string_type, *funint_type, *error_type; @@ -69,7 +69,7 @@ construct_type(fund, tp, count) case FIELD: dtp = field_of(tp); break; -#endif NOBITFIELD +#endif /* NOBITFIELD */ case FUNCTION: if (tp->tp_fund == FUNCTION) { @@ -169,7 +169,7 @@ field_of(tp) dtp->tp_size = tp->tp_size; return dtp; } -#endif NOBITFIELD +#endif /* NOBITFIELD */ arith size_of_type(tp, nm) diff --git a/lang/cem/cemcom/type.str b/lang/cem/cemcom/type.str index 587fc8d30..a85561591 100644 --- a/lang/cem/cemcom/type.str +++ b/lang/cem/cemcom/type.str @@ -34,7 +34,7 @@ extern struct type #ifndef NOBITFIELD extern struct type *field_of(); -#endif NOBITFIELD +#endif /* NOBITFIELD */ extern struct type *char_type, *uchar_type, @@ -44,7 +44,7 @@ extern struct type *long_type, *ulong_type, #ifndef NOFLOAT *float_type, *double_type, -#endif NOFLOAT +#endif /* NOFLOAT */ *void_type, *label_type, *string_type, *funint_type, *error_type; diff --git a/lang/cem/cemcom/util.c b/lang/cem/cemcom/util.c index 5e859a457..6cc63975a 100644 --- a/lang/cem/cemcom/util.c +++ b/lang/cem/cemcom/util.c @@ -16,7 +16,7 @@ #include #else #include "l_em.h" -#endif LINT +#endif /* LINT */ #include #include #include @@ -34,7 +34,7 @@ static struct localvar *FreeTmps; #ifdef USE_TMP static int loc_id; -#endif USE_TMP +#endif /* USE_TMP */ #ifdef PEEPHOLE #undef REGCOUNT @@ -47,7 +47,7 @@ LocalInit() { #ifdef USE_TMP C_insertpart(loc_id = C_getid()); -#endif USE_TMP +#endif /* USE_TMP */ } arith @@ -239,4 +239,4 @@ AddrLocal(off) if (p) p->t_regtype = -1; C_lal(off); } -#endif LINT +#endif /* LINT */ diff --git a/lang/cem/cpp.ansi/tokenname.c b/lang/cem/cpp.ansi/tokenname.c index 2e81b05ce..56372791d 100644 --- a/lang/cem/cpp.ansi/tokenname.c +++ b/lang/cem/cpp.ansi/tokenname.c @@ -69,4 +69,4 @@ struct tokenname tkfunny[] = { /* internal keywords */ {ERRONEOUS, "erroneous"}, {0, ""} }; -#endif ____ +#endif /* ____ */ -- 2.34.1