From ac2b97c6eb3c0e20337bb381545879aae16e4e04 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 13 May 2008 13:22:00 +0000 Subject: [PATCH] Complying with the cpp API update --- src/c99.c | 5 +++-- src/scanner.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/c99.c b/src/c99.c index 9e3a487..4438176 100644 --- a/src/c99.c +++ b/src/c99.c @@ -79,12 +79,13 @@ C99 * c99_new(C99Prefs const * prefs, char const * pathname) static Cpp * _new_cpp(C99Prefs const * prefs, char const * pathname) { Cpp * cpp; + int filters = CPP_FILTER_TRIGRAPH | CPP_FILTER_WHITESPACE + | CPP_FILTER_COMMENT; size_t i; size_t j; size_t k; - if((cpp = cpp_new(pathname, CPP_FILTER_TRIGRAPH - | CPP_FILTER_WHITESPACE)) == NULL) + if((cpp = cpp_new(pathname, filters)) == NULL) return NULL; for(i = 0; i < prefs->paths_cnt; i++) if(cpp_path_add(cpp, prefs->paths[i]) != 0) diff --git a/src/scanner.c b/src/scanner.c index 3c62e56..147d23d 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -37,7 +37,8 @@ static char * _tokens[C99_CODE_COUNT] = "[", "<=", "<", "(", "-=", "->", "-", "%=", "%", "!=", "!", "+=", "+", "?", "}", "]", ")", ";", "*=", "~", "*", "^=", "^", /* more codes */ - "'", "whitespace", "newline", "word", "constant", "identifier", + "'", "whitespace", "newline", "comment", "word", "constant", + "identifier", /* keywords */ "auto", "break", "case", "char", "const", "continue", "default", "do", "double", "else", "enum", "extern", "float", "for", "goto", "if",