echo off
echo fmt.bat for 2 and 3 languages
del lafrusde.fmt
del lafrus.fmt
del *.bak
del *.log
del *.tex
del *.sty
del *.ch
del *.min
del *.doc
del *.dat
del *.zip

copy \emtex\texinput\lfonts.tex
copy \emtex\texinput\latex.tex
copy \emtex\texinput\lplain.tex
copy \emtex\texinput\acmacros.sty
copy \emtex\texinput\lhyphen.tex
copy \emtex\texinput\hyconfig.tex hyphen.tex
copy \emtex\texinput\dcacceur.tex hyacceur.tex
copy \emtex\texinput\enhyph.tex
copy \emtex\texinput\enhyphex.tex
copy \emtex\texinput\f8hyph.tex
copy \emtex\texinput\ghyphen.min
copy \emtex\texinput\dc-latex.tex
copy \emtex\texinput\dc-latex.doc 00_readme.doc

copy \emtex\texinput\dc-latex.tex lafrus.tex
copy \emtex\texinput\language.efr language.dat
   tex386 -i -8 -mt20000 -c850DCTEX.TCP lafrus \dump
if errorlevel 1 goto error

copy \emtex\texinput\dc-latex.tex lafrusde.tex
copy \emtex\texinput\language.efg language.dat
   tex386 -i -8 -mt20000 -c850DCTEX.TCP lafrusde\dump
if errorlevel 1 goto error


mkdir \emtex\dc-lafmt
del \emtex\dc-lafmt\*.t*
del \emtex\dc-lafmt\*.s*
del \emtex\dc-lafmt\*.d*
del \emtex\dc-lafmt\*.z*
del \emtex\dc-lafmt\*.m*
del \emtex\dc-lafmt\*.l*
del \emtex\dc-lafmt\*.b*

copy *.tex \emtex\dc-lafmt\*.*
copy *.sty \emtex\dc-lafmt\*.*
copy *.min \emtex\dc-lafmt\*.*
copy *.dat \emtex\dc-lafmt\*.*
copy *.dc \emtex\dc-lafmt\*.*
copy *.log \emtex\dc-lafmt\*.*
copy *.doc \emtex\dc-lafmt\*.*


call dc-laput *.tex
call dc-laput *.sty
call dc-laput *.min
call dc-laput language.dat
call dc-laput *.dc
call dc-laput *.doc
call dc-laput *.log
call dc-laput dc-lafmt.bat

call zip_p dc-lafmt emtex\dc-lafmt\*.*
call \taupin\tex\rsoput dc-lafmt.zip /b

goto done

:ex
echo delete hyphen.tex and restart dc-lafmt
goto end

:error
echo Error

:done
if exist hyphen.tex del hyphen.tex
:end