                    :: BINK.BAT        BRS Feb 1994

REM this expects a fossil to have been invoked
REM in your config.sys (X00) or autoexec.bat (X00 or BNU)

@echo off
c:
cd\bt
vfos_ibm

:RESTART
BT unattended
if errorlevel 254 goto error
if errorlevel  96 goto BBS
if errorlevel  90 goto squishout
if errorlevel  60 goto readmail
if errorlevel  50 goto maintain
if errorlevel  48 goto BBS
if errorlevel  40 goto restart
if errorlevel  30 goto squishin
if errorlevel  24 goto BBS
if errorlevel  20 goto squishsquash
if errorlevel  12 goto BBS
if errorlevel  10 goto finish
if errorlevel   3 goto BBS
if errorlevel   1 goto finish

:BBS
vfos_del
rem gives control to BBS via batch file
BBSBatch

:SQUISHOUT
squish out squash link -fc:\bt\echotoss.log
del c:\bt\echotoss.log
cd\bt\out
rem change mail for 440/11 from hold to crash so it will go
if exist 01B8000B.H?? rename 01B8000B.H?? 01B8000B.C??
rem if no mail make poll file
if not exist 01B8000B.C?? rem >> 01B8000B.CLO
cd\bt
goto restart

:SQUISHIN
squish in out squash link -fc:\bt\echotoss.log
del c:\bt\echotoss.log
goto restart

:SQUISHSQUASH
squish squash
goto restart

:MAINTAIN
rem add utilities here for squish, log trimming etc.
goto start

:READMAIL
TIMED
if errorlevel 6 goto squishout
if errorlevel 5 goto squishsquash
if errorlevel 2 goto squishout
if errorlevel 1 goto squishsquash
echo no messages to send
pause
goto restart

:FINISH
vfos_del
cls
echo Back in DOS, BINKLEY not running.
goto end

:ERROR
vfos_del
cls
echo Fatal ERROR, Binkley terminated.

:END









