Skip to content

Commit

Permalink
Removed preprocessor_clearerror().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 10, 2009
1 parent ddf375e commit 7c8ac35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion mojoshader_internal.h
Expand Up @@ -342,7 +342,6 @@ Preprocessor *preprocessor_start(const char *fname, const char *source,

void preprocessor_end(Preprocessor *pp);
const char *preprocessor_error(Preprocessor *pp);
void preprocessor_clearerror(Preprocessor *pp);
int preprocessor_outofmemory(Preprocessor *pp);
const char *preprocessor_nexttoken(Preprocessor *_ctx,
unsigned int *_len, Token *_token);
Expand Down
16 changes: 7 additions & 9 deletions mojoshader_preprocessor.c
Expand Up @@ -304,17 +304,16 @@ void preprocessor_end(Preprocessor *_ctx)
} // preprocessor_end


void preprocessor_clearerror(Preprocessor *_ctx)
{
Context *ctx = (Context *) _ctx;
ctx->isfail = 0;
} // preprocessor_clearerror


const char *preprocessor_error(Preprocessor *_ctx)
{
Context *ctx = (Context *) _ctx;
return ctx->isfail ? ctx->failstr : NULL;
if (ctx->isfail)
{
ctx->isfail = 0;
return ctx->failstr;
} // if

return NULL;
} // preprocessor_error


Expand Down Expand Up @@ -670,7 +669,6 @@ include_close = (MOJOSHADER_includeClose) 0x1;
error_count++;
} // else

preprocessor_clearerror(pp);
continue;
} // if

Expand Down

0 comments on commit 7c8ac35

Please sign in to comment.