



echo on
IF %ERRORLEVEL% NEQ 0 exit 1
echo cd %CD%
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_CONV_DEBUG_LEVEL=0
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_WRAP_DEBUG_LEVEL=0
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_WRAP_SAVE_TEMPS=1
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_WRAP_NO_LINE_DIRECTIVES=1
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl /nologo -DDLL_EXPORT -DHAVE_CONFIG_H -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -Dlzma_EXPORTS -I%CD%\tests /DWIN32 /D_WINDOWS /Fo%TEMP%\check.c.obj -c %CD%\tests\check.c
IF %ERRORLEVEL% NEQ 0 exit 1
echo /nologo -DDLL_EXPORT -DHAVE_CONFIG_H -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -Dlzma_EXPORTS -I%CD%\tests /DWIN32 /D_WINDOWS /Fo%TEMP%\check.c.obj -c %CD%\tests\check.c > response-file
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl @response-file
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_CONV_DEBUG_LEVEL=2
IF %ERRORLEVEL% NEQ 0 exit 1
set C99_TO_C89_WRAP_DEBUG_LEVEL=2
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl /Folzma_encoder_optimal_normal.c.obj -c %CD%\tests\lzma_encoder_optimal_normal.c
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl /Focheck-2.c.obj -c %CD%\tests\check-2.c
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl /Fotest-macro-line-continuation.o -c %CD%\tests\test-macro-line-continuation.c
IF %ERRORLEVEL% NEQ 0 exit 1
c99wrap cl /Fotest-pragma-comment.o -c %CD%\tests\test-pragma-comment.c
IF %ERRORLEVEL% NEQ 0 exit 1
c99conv -ms %CD%\tests\stream_encoder.c.obj_preprocessed.c stream_encoder.c.converted.c
IF %ERRORLEVEL% NEQ 0 exit 1
findstr elseif stream_encoder.c.converted.c && (exit /b 1) || (exit /b 0)
IF %ERRORLEVEL% NEQ 0 exit 1
exit 0
