Backed out bad commit and added cleaner logging to mIFF.

This commit is contained in:
Cekis
2022-02-07 15:53:11 -05:00
parent 552af24d0a
commit 487ddeee31
3 changed files with 6 additions and 4 deletions
@@ -275,7 +275,7 @@ static void callbackFunction(void)
{
if (!outfileHandler->writeBuffer())
{
fprintf(stderr, "MIFF: failed to write output file \"%s\"\n", local_outFileName);
fprintf(stderr, "FAILURE: failed to write output file \"%s\"\n", local_outFileName);
local_errorFlag = ERR_WRITEERROR;
}
}
@@ -326,8 +326,10 @@ EXP (e|E)(\+|-)?
/* do a count on bracket matching... */
if (0 == count_brace())
{
if (!initialCompile && !globalErrorFlag)
MIFFMessage("mIFF successfully compiled!\n", 0);
if (!initialCompile && !globalErrorFlag) {
sprintf(myString, "mIFF (SUCCESS): compiled \"%s\"\n", inFileName);
MIFFMessage(myString, 0);
}
}
yyterminate(); /* tell yyparse() it's time to quit! DO NOT comment or delete this line! */
@@ -230,7 +230,7 @@ inline void *memmove(void *destination, const void *source, int length)
{
DEBUG_FATAL(!destination, ("nullptr destination arg"));
DEBUG_FATAL(!source, ("nullptr source arg"));
return memmove(destination, source, length);
return memmove(destination, source, static_cast<size_t>(length));
}
// ----------------------------------------------------------------------