#include "macro.h"
#include "bits.h"
+extern char options[];
extern char **inctable; /* list of include directories */
extern char *getwdir();
char ifstack[IFDEPTH]; /* if-stack: the content of an entry is */
error("#else after #else");
++(ifstack[nestlevel]);
if (!to_endif && nestlevel == skiplevel) {
- if (SkipToNewLine(1))
- strict("garbage following #else");
+ if (SkipToNewLine(1)) {
+ if (!options['o'])
+ strict("garbage following #else");
+ }
NoUnstack--;
return;
}
case K_ENDIF:
assert(nestlevel > svnestlevel[nestcount]);
if (nestlevel == skiplevel) {
- if (SkipToNewLine(1))
- strict("garbage following #endif");
+ if (SkipToNewLine(1)) {
+ if (!options['o'])
+ strict("garbage following #endif");
+ }
nestlevel--;
NoUnstack--;
return;
do_else()
{
- if (SkipToNewLine(1))
- strict("garbage following #else");
+ if (SkipToNewLine(1)) {
+ if (!options['o'])
+ strict("garbage following #else");
+ }
if (nestlevel <= svnestlevel[nestcount])
error("#else without corresponding #if");
else { /* mark this level as else-d */
do_endif()
{
- if (SkipToNewLine(1))
- strict("garbage following #endif");
+ if (SkipToNewLine(1)) {
+ if (!options['o'])
+ strict("garbage following #endif");
+ }
if (nestlevel <= svnestlevel[nestcount]) {
error("#endif without corresponding #if");
}
replacement list.
*/
if (repl->r_ptr == repl->r_text
- && is_wsp(*repl->r_text)) {
+ && is_wsp(*repl->r_ptr)) {
err = 1;
break;
}
assert(n > 0);
/* This is VERY dirty, we look ahead for the
- ## operater. If it's found we use the raw
+ ## operator. If it's found we use the raw
argument buffer instead of the expanded
one.
*/