Complying with the cpp API update

This commit is contained in:
Pierre Pronchery 2008-05-13 13:22:00 +00:00
parent a180bb1c93
commit ac2b97c6eb
2 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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",