rem ... The "subroutine batch" called from TEXBAT.BAT
if errorlevel 46 goto clearOP
if errorlevel 45 goto editOP
if not exist %MAIN%.opt set OPT=//
if     exist %MAIN%.opt set OPT=@%MAIN%.opt
if errorlevel 43 goto laser
if errorlevel 42 goto dot
if errorlevel 41 goto preview
goto end
:preview
 if not exist %TEXDIR%\fonts\lib%DPI%.fli goto sorry
 if not exist %MAIN%.opt type %TEXDIRCFG%\messprn.txt
 dvidrv dviscr @scr%DPI%.cnf /fl300 %OPT% %MAIN%
 goto end
:dot
 if not exist %TEXDIR%\dot%DPI%.dot goto bsorry
 if not exist %TEXDIR%\fonts\lib%DPI%.fli goto sorry
 if %OPT%==// type %TEXDIRCFG%\messprn.txt
 dvidrv dvidot dot%DPI%.dot @prn%DPI%.cnf %OPT% %MAIN% %MARK%
 goto end
:laser
 if not exist %TEXDIR%\dvihplj.exe goto bsorry
 if not exist %TEXDIR%\fonts\lib300.fli goto sorry
 if %OPT%==// type %TEXDIRCFG%\messprn.txt
 dvidrv dvihplj @hplj.cnf %OPT% %MAIN% %MARK%
 goto end
:editOP
 type %TEXDIRCFG%\messprn.txt
 echo press any key to enter to editor ...
 %COMSPEC% /c pause > nul
 %EDIT% %MAIN%.opt
 set MNU=41
 goto end
:clearOP
 del %MAIN%.opt
 set MNU=41
 goto end
:bsorry
 set MNU=49
:sorry
 %RAM%\mnu %TEXDIRCFG%\sorry.mnu
 set MNU=41
:end