@echo off
@echo .
@echo AFS SOURCE COMPILER
@echo .
if %1a == a goto usage
if exist %1.sr0 goto file_dw0
if exist %1.sr1 goto file_dw1
if exist %1.sr2 goto file_dw2
if exist %1.sr3 goto file_dw3
:file_err
@echo FILE %1.SRn not found
goto end
:file_dw0
cpp10 -P- -o%1.dw0 %1.sr0
:file_dw1
if not exist %1.sr1 goto file_dw2
cpp10 -P- -o%1.dw1 %1.sr1
:file_dw2
if not exist %1.sr2 goto file_dw3
cpp10 -P- -o%1.dw2 %1.sr2
:file_dw3
if not exist %1.sr3 goto end
cpp10 -P- -o%1.dw3 %1.sr3
goto end
:usage
@echo use CP inputfile
:end

