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

copy \emtex\texinput\dplain.tex dplainfg.tex
copy \emtex\texinput\dplain.tex dplainfr.tex

copy \emtex\texinput\acmacros.sty
copy \emtex\texinput\hyconfig.tex hyphen.tex
copy \emtex\texinput\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\plain.tex

copy \emtex\texinput\dm-plain.doc 00_readme.doc


echo french-english plain
copy \emtex\texinput\language.efr language.dat
   tex386 -i -8 -mt20000 -c850DCTEX.TCP dplainfr \dump
if errorlevel 1 goto error

echo french-english-german plain
copy \emtex\texinput\language.efg language.dat
   tex386 -i -8 -mt20000 -c850DCTEX.TCP dplainfg \dump
if errorlevel 1 goto error

mkdir \emtex\dm-plfmt
del \emtex\dm-plfmt\*.t*
del \emtex\dm-plfmt\*.s*
del \emtex\dm-plfmt\*.d*
del \emtex\dm-plfmt\*.z*
del \emtex\dm-plfmt\*.m*
del \emtex\dm-plfmt\*.l*
del \emtex\dm-plfmt\*.b*

copy *.tex \emtex\dm-plfmt\*.*
copy *.sty \emtex\dm-plfmt\*.*
copy *.min \emtex\dm-plfmt\*.*
copy *.dat \emtex\dm-plfmt\*.*
copy *.log \emtex\dm-plfmt\*.*
copy *.doc \emtex\dm-plfmt\*.*
copy dm-plfmt.bat \emtex\dm-plfmt\*.*

call dm-plput *.tex
call dm-plput *.sty
call dm-plput *.min
call dm-plput language.dat
call dm-plput *.doc
call dm-plput *.log
call dm-plput dm-plfmt.bat

call zip_p dm-plfmt emtex\dm-plfmt\*.*
call \taupin\tex\rsoput dm-plfmt.zip /b

goto done

:error
echo Error

:done
:end