Skip to content
Permalink
Browse files
Removed preprocessor_clearerror().
  • Loading branch information
icculus committed Feb 10, 2009
1 parent ddf375e commit 7c8ac352aa4dd7026de51164d98e24f386537580
Showing with 7 additions and 10 deletions.
  1. +0 −1 mojoshader_internal.h
  2. +7 −9 mojoshader_preprocessor.c
@@ -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);
@@ -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


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

preprocessor_clearerror(pp);
continue;
} // if

0 comments on commit 7c8ac35

Please sign in to comment.