Do not use '#endif/#else xxx'; it is not allowed for ANSI C
This commit is contained in:
@@ -68,8 +68,8 @@
|
||||
#ifndef ASLD
|
||||
#ifndef RELOCATION
|
||||
separate linker only possible if relocation info produced
|
||||
#endif RELOCATION
|
||||
#endif ASLD
|
||||
#endif /* RELOCATION */
|
||||
#endif /* ASLD */
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 1
|
||||
@@ -124,7 +124,7 @@ _include <signal.h>
|
||||
#else
|
||||
#define PASS_SYMB 1
|
||||
#define PASS_RELO 1
|
||||
#endif THREE_PASS
|
||||
#endif /* THREE_PASS */
|
||||
|
||||
#ifdef ASLD
|
||||
#define RELOMOVE(a,b) /* empty */
|
||||
|
||||
@@ -42,11 +42,11 @@ extern short dflag; /* -d option (list mode) */
|
||||
#ifdef ASLD
|
||||
#ifdef RELOCATION
|
||||
extern short rflag; /* -r option (relocation info) */
|
||||
#endif RELOCATION
|
||||
#endif /* RELOCATION */
|
||||
#else
|
||||
#define rflag 1
|
||||
extern valu_t relonami;
|
||||
#endif ASLD
|
||||
#endif /* ASLD */
|
||||
|
||||
#ifdef THREE_PASS
|
||||
extern short bflag; /* -b option (no optimizations) */
|
||||
|
||||
@@ -96,7 +96,7 @@ static item_t *last_it, *o_it;
|
||||
else if (listtemp) { listflag = listtemp; listeoln = 1; }
|
||||
#else
|
||||
#define LISTLINE(n) /* empty */
|
||||
#endif LISTING
|
||||
#endif /* LISTING */
|
||||
|
||||
#ifdef ASLD
|
||||
#define RELODONE /* empty */
|
||||
|
||||
@@ -93,8 +93,8 @@ char **argv;
|
||||
#ifdef RELOCATION
|
||||
#ifdef ASLD
|
||||
rflag = 1;
|
||||
#endif ASLD
|
||||
#endif RELOCATION
|
||||
#endif /* ASLD */
|
||||
#endif /* RELOCATION */
|
||||
break;
|
||||
case 'b':
|
||||
#ifdef THREE_PASS
|
||||
@@ -115,7 +115,7 @@ char **argv;
|
||||
#ifdef RELOCATION
|
||||
if (rflag)
|
||||
sflag |= SYM_SCT;
|
||||
#endif RELOCATION
|
||||
#endif /* RELOCATION */
|
||||
pass_1(argc, argv);
|
||||
#ifdef THREE_PASS
|
||||
pass_23(PASS_2);
|
||||
@@ -304,7 +304,7 @@ needed()
|
||||
#endif
|
||||
return(need);
|
||||
}
|
||||
#endif ASLD
|
||||
#endif /* ASLD */
|
||||
|
||||
parse(s)
|
||||
char *s;
|
||||
@@ -423,7 +423,7 @@ pass_23(n)
|
||||
machstart(n);
|
||||
#ifndef ASLD
|
||||
newmodule(modulename);
|
||||
#endif ASLD
|
||||
#endif /* ASLD */
|
||||
ffreopen(temppath, tempfile);
|
||||
yyparse();
|
||||
commfinish();
|
||||
@@ -534,12 +534,12 @@ commfinish()
|
||||
0,
|
||||
load(ip)
|
||||
);
|
||||
#else not ASLD
|
||||
#else /* not ASLD */
|
||||
#ifdef THREE_PASS
|
||||
if (pass == PASS_2) {
|
||||
cp->c_size -= sp->s_gain;
|
||||
}
|
||||
#endif THREE_PASS
|
||||
#endif /* THREE_PASS */
|
||||
}
|
||||
if (pass == PASS_1) cp->c_size = ip->i_valu;
|
||||
if (PASS_SYMB) {
|
||||
@@ -553,7 +553,7 @@ commfinish()
|
||||
cp->c_size
|
||||
);
|
||||
}
|
||||
#endif not ASLD
|
||||
#endif /* not ASLD */
|
||||
}
|
||||
if (PASS_SYMB == 0)
|
||||
return;
|
||||
@@ -578,7 +578,7 @@ commfinish()
|
||||
(valu_t)0
|
||||
);
|
||||
}
|
||||
#endif not ASLD
|
||||
#endif /* not ASLD */
|
||||
/*
|
||||
* produce symbol table entries for sections
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ register int typ;
|
||||
typ = S_VAR;
|
||||
else if (pass == PASS_2 && (ip->i_type & S_TYP) == S_UND)
|
||||
ip->i_type |= typ;
|
||||
#endif THREE_PASS
|
||||
#endif /* THREE_PASS */
|
||||
if (typ == S_UND)
|
||||
serror("illegal equate");
|
||||
if (pass == PASS_3)
|
||||
@@ -40,7 +40,7 @@ register item_t *ip;
|
||||
register flag;
|
||||
#ifdef GENLAB
|
||||
static char genlab[] = GENLAB;
|
||||
#endif GENLAB
|
||||
#endif /* GENLAB */
|
||||
|
||||
if (pass == PASS_1) {
|
||||
/* printf("declare %s: %o\n", ip->i_name, typ); */
|
||||
@@ -59,12 +59,12 @@ register item_t *ip;
|
||||
flag = SYM_LOC;
|
||||
#else
|
||||
flag = SYM_EXT|SYM_LOC; /* S_EXT not stable in PASS_1 */
|
||||
#endif THREE_PASS
|
||||
#endif /* THREE_PASS */
|
||||
#ifdef GENLAB
|
||||
if (!(flag & SYM_EXT) &&
|
||||
strncmp(ip->i_name, genlab, sizeof(genlab)-1) == 0)
|
||||
flag = SYM_LAB;
|
||||
#endif GENLAB
|
||||
#endif /* GENLAB */
|
||||
if (sflag & flag)
|
||||
newsymb(
|
||||
ip->i_name,
|
||||
|
||||
@@ -167,7 +167,7 @@ listline(textline)
|
||||
listcolm = 0;
|
||||
listflag = listtemp;
|
||||
}
|
||||
#endif LISTING
|
||||
#endif /* LISTING */
|
||||
|
||||
/* ---------- code optimization ---------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user