[PATCH] eliminate elif_ignore, fix handling of unterminated #if
No need to bother with stack; we can just keep # tokens from #if... and
use _those_ as a stack instead. struct stream gets a pointer to the
current #if..., checks for #elif/#else/#endif out of place become simple
if (!stream->top_if) and stream->ifndef becomes a pointer to token
instead of an integer (pointer to token in that stack instead of nesting
depth).
We lose elif_ignore[] array, if_nesting and stream->nesting (nothing
cares of those anymore) and get sane handling of unterminated #if for
free - instead of reporting the location of the last #if on depth 0
(very likely - in another file and having an #endif) we can give
location of the #if that really lacks #endif.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>