#define FLG_DOTSEEN 0x02 /* certainly a floating point number */
extern arith full_mask[];
+#ifdef LINT
+extern int lint_skip_comment;
+#endif
+
#ifndef NOPP
static struct token LexStack[MAX_LL_DEPTH];
static LexSP = 0;
NoUnstack++;
c = GetChar();
#ifdef LINT
- lint_start_comment();
- lint_comment_char(c);
+ if (! lint_skip_comment) {
+ lint_start_comment();
+ lint_comment_char(c);
+ }
#endif /* LINT */
do {
while (c != '*') {
} else if (c == EOI) {
NoUnstack--;
#ifdef LINT
- lint_end_comment();
+ if (! lint_skip_comment) lint_end_comment();
#endif /* LINT */
return;
}
oldc = c;
c = GetChar();
#ifdef LINT
- lint_comment_char(c);
+ if (! lint_skip_comment) lint_comment_char(c);
#endif /* LINT */
} /* last Character seen was '*' */
c = GetChar();
lexwarning("comment inside comment ?");
oldc = '*';
#ifdef LINT
- lint_comment_char(c);
+ if (! lint_skip_comment) lint_comment_char(c);
#endif /* LINT */
} while (c != '/');
#ifdef LINT
- lint_end_comment();
+ if (! lint_skip_comment) lint_end_comment();
#endif /* LINT */
NoUnstack--;
}
#include "idf.h"
#include "input.h"
#include "nopp.h"
+#include "lint.h"
#ifndef NOPP
#include "ifdepth.h"
EoiForNewline = 0;
}
+#ifdef LINT
+int lint_skip_comment;
+#endif
+
skip_block(to_endif)
int to_endif;
{
struct token tk;
int toknum;
+#ifdef LINT
+ lint_skip_comment++;
+#endif
NoUnstack++;
for (;;) {
ch = GetChar(); /* read first character after newline */
if (ch != '#') {
if (ch == EOI) {
NoUnstack--;
+#ifdef LINT
+ lint_skip_comment--;
+#endif
return;
}
/* A possible '/' is not pushed back */
push_if();
if (ifexpr()) {
NoUnstack--;
+#ifdef LINT
+ lint_skip_comment--;
+#endif
return;
}
}
lexstrict("garbage following #else");
}
NoUnstack--;
+#ifdef LINT
+ lint_skip_comment--;
+#endif
return;
}
else SkipToNewLine();
}
nestlevel--;
NoUnstack--;
+#ifdef LINT
+ lint_skip_comment--;
+#endif
return;
}
else SkipToNewLine();