@echo off
if [%1] == [] goto usage
if not [%2] == [] if not [%2] == [-p] goto usage
if not exist %1\binb\wlib.exe goto usage
set opath=%path%
rem =====================================================
echo Patching %1\wf77.res
if exist %1\wf77.res if exist wfr.b copy wfr.b %1\wf77.res
rem =====================================================
echo Patching %1\.\wcc386.prf
set path=%1\.;%1\binb
if exist %1\.\wcc386.prf if exist wcc32prf.b bpatch %2 %3 wcc32prf.b
rem =====================================================
echo Patching %1\.\wf77386.prf
set path=%1\.;%1\binb
if exist %1\.\wf77386.prf if exist wf7732pr.b bpatch %2 %3 wf7732pr.b
rem =====================================================
echo Patching %1\.\wpp386.prf
set path=%1\.;%1\binb
if exist %1\.\wpp386.prf if exist wpp32prf.b bpatch %2 %3 wpp32prf.b
rem =====================================================
echo Creating %1\bin\dos4gw.doc
if exist %1\bin\NUL if exist dos4gt.b copy dos4gt.b %1\bin\dos4gw.doc
rem =====================================================
echo Patching %1\bin\ads.trp
set path=%1\bin;%1\binb
if exist %1\bin\ads.trp if exist adsd.b bpatch %2 %3 adsd.b
rem =====================================================
echo Patching %1\bin\pls.trp
set path=%1\bin;%1\binb
if exist %1\bin\pls.trp if exist plsd.b bpatch %2 %3 plsd.b
rem =====================================================
echo Patching %1\bin\rsi.trp
set path=%1\bin;%1\binb
if exist %1\bin\rsi.trp if exist rsid.b bpatch %2 %3 rsid.b
rem =====================================================
echo Patching %1\bin\plshelp.exp
set path=%1\bin;%1\binb
if exist %1\bin\plshelp.exp if exist plshelpd.b bpatch %2 %3 plshelpd.b
rem =====================================================
echo Patching %1\bin\rsihelp.exp
set path=%1\bin;%1\binb
if exist %1\bin\rsihelp.exp if exist rsihelpd.b bpatch %2 %3 rsihelpd.b
rem =====================================================
echo Patching %1\bin\dos4gw.exe
set path=%1\bin;%1\binb
if exist %1\bin\dos4gw.exe if exist dos4gw.b bpatch %2 %3 dos4gw.b
rem =====================================================
echo Patching %1\bin\wcc.exe
set path=%1\bin;%1\binb
if exist %1\bin\wcc.exe if exist wccd.b bpatch %2 %3 wccd.b
rem =====================================================
echo Patching %1\bin\wcc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wcc386.exe if exist wcc386d.b bpatch %2 %3 wcc386d.b
rem =====================================================
echo Patching %1\bin\wfc.exe
set path=%1\bin;%1\binb
if exist %1\bin\wfc.exe if exist wfcd.b bpatch %2 %3 wfcd.b
rem =====================================================
echo Patching %1\bin\wfc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wfc386.exe if exist wfc386d.b bpatch %2 %3 wfc386d.b
rem =====================================================
echo Patching %1\bin\wlink.exe
set path=%1\bin;%1\binb
if exist %1\bin\wlink.exe if exist wlinkd.b bpatch %2 %3 wlinkd.b
rem =====================================================
echo Patching %1\bin\wmakel.exe
set path=%1\bin;%1\binb
if exist %1\bin\wmakel.exe if exist wmakel.b bpatch %2 %3 wmakel.b
rem =====================================================
echo Patching %1\bin\wpp.exe
set path=%1\bin;%1\binb
if exist %1\bin\wpp.exe if exist wppd.b bpatch %2 %3 wppd.b
rem =====================================================
echo Patching %1\bin\wpp386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wpp386.exe if exist wpp386d.b bpatch %2 %3 wpp386d.b
rem =====================================================
echo Patching %1\bin\wprof.exe
set path=%1\bin;%1\binb
if exist %1\bin\wprof.exe if exist wprofd.b bpatch %2 %3 wprofd.b
rem =====================================================
echo Patching %1\bin\wsamprsi.exe
set path=%1\bin;%1\binb
if exist %1\bin\wsamprsi.exe if exist wsamprsi.b bpatch %2 %3 wsamprsi.b
rem =====================================================
echo Patching %1\bin\wvideo.exe
set path=%1\bin;%1\binb
if exist %1\bin\wvideo.exe if exist wvideod.b bpatch %2 %3 wvideod.b
rem =====================================================
echo Patching %1\bin\pls.trp
set path=%1\bin;%1\binb
if exist %1\bin\pls.trp if exist plsfm.b bpatch %2 %3 plsfm.b
rem =====================================================
echo Patching %1\bin\wvideo.exe
set path=%1\bin;%1\binb
if exist %1\bin\wvideo.exe if exist wvfm.b bpatch %2 %3 wvfm.b
rem =====================================================
echo Patching %1\bin\ads.trp
set path=%1\bin;%1\binb
if exist %1\bin\ads.trp if exist adsne.b bpatch %2 %3 adsne.b
rem =====================================================
echo Patching %1\bin\rsi.trp
set path=%1\bin;%1\binb
if exist %1\bin\rsi.trp if exist rsine.b bpatch %2 %3 rsine.b
rem =====================================================
echo Patching %1\bin\pls.trp
set path=%1\bin;%1\binb
if exist %1\bin\pls.trp if exist plsne.b bpatch %2 %3 plsne.b
rem =====================================================
echo Patching %1\bin\rsihelp.exp
set path=%1\bin;%1\binb
if exist %1\bin\rsihelp.exp if exist rsihne.b bpatch %2 %3 rsihne.b
rem =====================================================
echo Patching %1\bin\wvideo.exe
set path=%1\bin;%1\binb
if exist %1\bin\wvideo.exe if exist wvne.b bpatch %2 %3 wvne.b
rem =====================================================
echo Patching %1\bin\wlink.exe
set path=%1\bin;%1\binb
if exist %1\bin\wlink.exe if exist wldj.b bpatch %2 %3 wldj.b
rem =====================================================
echo Patching %1\bin\wmakel.exe
set path=%1\bin;%1\binb
if exist %1\bin\wmakel.exe if exist wmldj.b bpatch %2 %3 wmldj.b
rem =====================================================
echo Patching %1\bin\wcc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wcc386.exe if exist wc3dj.b bpatch %2 %3 wc3dj.b
rem =====================================================
echo Patching %1\bin\wfc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wfc386.exe if exist wf3dj.b bpatch %2 %3 wf3dj.b
rem =====================================================
echo Patching %1\bin\wprof.exe
set path=%1\bin;%1\binb
if exist %1\bin\wprof.exe if exist wpned.b bpatch %2 %3 wpned.b
rem =====================================================
echo Patching %1\bin\wsamprsi.exe
set path=%1\bin;%1\binb
if exist %1\bin\wsamprsi.exe if exist wsrned.b bpatch %2 %3 wsrned.b
rem =====================================================
echo Creating %1\binb\cmdedit.txt
if exist %1\binb\NUL if exist cedt.b copy cedt.b %1\binb\cmdedit.txt
rem =====================================================
echo Patching %1\binb\colours.dbg
set path=%1\binb;%1\binb
if exist %1\binb\colours.dbg if exist colourst.b bpatch %2 %3 colourst.b
rem =====================================================
echo Patching %1\binb\profile.dbg
set path=%1\binb;%1\binb
if exist %1\binb\profile.dbg if exist profilet.b bpatch %2 %3 profilet.b
rem =====================================================
echo Patching %1\binb\wdisasm.exe
set path=%1\binb;%1\binb
if exist %1\binb\wdisasm.exe if exist wdisasmb.b bpatch %2 %3 wdisasmb.b
rem =====================================================
echo Patching %1\binb\wfl.exe
set path=%1\binb;%1\binb
if exist %1\binb\wfl.exe if exist wflb.b bpatch %2 %3 wflb.b
rem =====================================================
echo Patching %1\binb\wfl386.exe
set path=%1\binb;%1\binb
if exist %1\binb\wfl386.exe if exist wfl386.b bpatch %2 %3 wfl386.b
rem =====================================================
echo Patching %1\binb\wlib.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlib.exe if exist wlibb.b bpatch %2 %3 wlibb.b
rem =====================================================
echo Patching %1\binb\wlink.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlink.exe if exist wlinkb.b bpatch %2 %3 wlinkb.b
rem =====================================================
echo Patching %1\binb\wlsystem.lnk
set path=%1\binb;%1\binb
if exist %1\binb\wlsystem.lnk if exist wlsyst.b bpatch %2 %3 wlsyst.b
rem =====================================================
echo Patching %1\binb\wmake.exe
set path=%1\binb;%1\binb
if exist %1\binb\wmake.exe if exist wmakeb.b bpatch %2 %3 wmakeb.b
rem =====================================================
echo Patching %1\binb\womp.exe
set path=%1\binb;%1\binb
if exist %1\binb\womp.exe if exist wompb.b bpatch %2 %3 wompb.b
rem =====================================================
echo Patching %1\binb\wprof.exe
set path=%1\binb;%1\binb
if exist %1\binb\wprof.exe if exist wprofb.b bpatch %2 %3 wprofb.b
rem =====================================================
echo Patching %1\binb\wrc.exe
set path=%1\binb;%1\binb
if exist %1\binb\wrc.exe if exist wrcb.b bpatch %2 %3 wrcb.b
rem =====================================================
echo Patching %1\binb\wtouch.exe
set path=%1\binb;%1\binb
if exist %1\binb\wtouch.exe if exist wtouchb.b bpatch %2 %3 wtouchb.b
rem =====================================================
echo Creating %1\binb\kanji.uni
if exist %1\binb\NUL if exist k2ut.b copy k2ut.b %1\binb\kanji.uni
rem =====================================================
echo Patching %1\binb\wdisasm.exe
set path=%1\binb;%1\binb
if exist %1\binb\wdisasm.exe if exist wdisbj.b bpatch %2 %3 wdisbj.b
rem =====================================================
echo Patching %1\binb\wlib.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlib.exe if exist wlibbj.b bpatch %2 %3 wlibbj.b
rem =====================================================
echo Patching %1\binb\wlink.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlink.exe if exist wlnkbj.b bpatch %2 %3 wlnkbj.b
rem =====================================================
echo Patching %1\binb\wmake.exe
set path=%1\binb;%1\binb
if exist %1\binb\wmake.exe if exist wmbj.b bpatch %2 %3 wmbj.b
rem =====================================================
echo Patching %1\binb\womp.exe
set path=%1\binb;%1\binb
if exist %1\binb\womp.exe if exist wobj.b bpatch %2 %3 wobj.b
rem =====================================================
echo Patching %1\binb\wtouch.exe
set path=%1\binb;%1\binb
if exist %1\binb\wtouch.exe if exist wtbj.b bpatch %2 %3 wtbj.b
rem =====================================================
echo Patching %1\binb\wvideo.hlp
set path=%1\binb;%1\binb
if exist %1\binb\wvideo.hlp if exist wvhj.b bpatch %2 %3 wvhj.b
rem =====================================================
echo Patching %1\binnt\wcc386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wcc386.exe if exist wcc386nt.b bpatch %2 %3 wcc386nt.b
rem =====================================================
echo Patching %1\binnt\wdisasm.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wdisasm.exe if exist wdisant.b bpatch %2 %3 wdisant.b
rem =====================================================
echo Patching %1\binnt\wfc386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wfc386.exe if exist wfc386nt.b bpatch %2 %3 wfc386nt.b
rem =====================================================
echo Patching %1\binnt\wfl386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wfl386.exe if exist wfl386nt.b bpatch %2 %3 wfl386nt.b
rem =====================================================
echo Patching %1\binnt\wlib.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlib.exe if exist wlibnt.b bpatch %2 %3 wlibnt.b
rem =====================================================
echo Patching %1\binnt\wlink.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlink.exe if exist wlinknt.b bpatch %2 %3 wlinknt.b
rem =====================================================
echo Patching %1\binnt\wmake.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wmake.exe if exist wmakent.b bpatch %2 %3 wmakent.b
rem =====================================================
echo Patching %1\binnt\wpp386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wpp386.exe if exist wpp386nt.b bpatch %2 %3 wpp386nt.b
rem =====================================================
echo Patching %1\binnt\wrc.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wrc.exe if exist wrcnt.b bpatch %2 %3 wrcnt.b
rem =====================================================
echo Patching %1\binnt\wtouch.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wtouch.exe if exist wtchnt.b bpatch %2 %3 wtchnt.b
rem =====================================================
echo Patching %1\binnt\wvideo.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wvideo.exe if exist wvidnt.b bpatch %2 %3 wvidnt.b
rem =====================================================
echo Patching %1\binnt\wdisasm.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wdisasm.exe if exist wdisntj.b bpatch %2 %3 wdisntj.b
rem =====================================================
echo Patching %1\binnt\wlib.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlib.exe if exist wlibntj.b bpatch %2 %3 wlibntj.b
rem =====================================================
echo Patching %1\binnt\wlink.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlink.exe if exist wlnkntj.b bpatch %2 %3 wlnkntj.b
rem =====================================================
echo Patching %1\binnt\wmake.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wmake.exe if exist wmntj.b bpatch %2 %3 wmntj.b
rem =====================================================
echo Patching %1\binnt\wtouch.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wtouch.exe if exist wtntj.b bpatch %2 %3 wtntj.b
rem =====================================================
echo Patching %1\binp\wcc.exe
set path=%1\binp;%1\binb
if exist %1\binp\wcc.exe if exist wcc2.b bpatch %2 %3 wcc2.b
rem =====================================================
echo Patching %1\binp\wcc386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wcc386.exe if exist wcc3862.b bpatch %2 %3 wcc3862.b
rem =====================================================
echo Patching %1\binp\wfc.exe
set path=%1\binp;%1\binb
if exist %1\binp\wfc.exe if exist wfc2.b bpatch %2 %3 wfc2.b
rem =====================================================
echo Patching %1\binp\wfc386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wfc386.exe if exist wfc3862.b bpatch %2 %3 wfc3862.b
rem =====================================================
echo Patching %1\binp\wvideo.exe
set path=%1\binp;%1\binb
if exist %1\binp\wvideo.exe if exist wvideo2.b bpatch %2 %3 wvideo2.b
rem =====================================================
echo Patching %1\binp\wlink.exe
set path=%1\binp;%1\binb
if exist %1\binp\wlink.exe if exist wlink2.b bpatch %2 %3 wlink2.b
rem =====================================================
echo Patching %1\binp\wpp.exe
set path=%1\binp;%1\binb
if exist %1\binp\wpp.exe if exist wpp2.b bpatch %2 %3 wpp2.b
rem =====================================================
echo Patching %1\binp\wpp386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wpp386.exe if exist wpp3862.b bpatch %2 %3 wpp3862.b
rem =====================================================
echo Patching %1\binp\wvpmhelp.exe
set path=%1\binp;%1\binb
if exist %1\binp\wvpmhelp.exe if exist wvpmhelp.b bpatch %2 %3 wvpmhelp.b
rem =====================================================
echo Patching %1\binp\wlink.exe
set path=%1\binp;%1\binb
if exist %1\binp\wlink.exe if exist wlnkpj.b bpatch %2 %3 wlnkpj.b
rem =====================================================
echo Creating %1\binp\wsampos2.exe
if exist %1\binp\NUL if exist wsmos2j.b copy wsmos2j.b %1\binp\wsampos2.exe
rem =====================================================
echo Creating %1\binp\wsmpos22.exe
if exist %1\binp\NUL if exist wsmos22j.b copy wsmos22j.b %1\binp\wsmpos22.exe
rem =====================================================
echo Patching %1\binp\dll\std16.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\std16.dll if exist std162.b bpatch %2 %3 std162.b
rem =====================================================
echo Patching %1\binp\dll\std32.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\std32.dll if exist std322.b bpatch %2 %3 std322.b
rem =====================================================
echo Patching %1\binp\dll\wccopts.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\wccopts.dll if exist wccopts2.b bpatch %2 %3 wccopts2.b
rem =====================================================
echo Patching %1\binp\dll\wppopts.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\wppopts.dll if exist wppopts2.b bpatch %2 %3 wppopts2.b
rem =====================================================
echo Patching %1\binp\dll\wfcopts.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\wfcopts.dll if exist wfcopts2.b bpatch %2 %3 wfcopts2.b
rem =====================================================
echo Patching %1\binp\dll\wlopts.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\wlopts.dll if exist wlopts2.b bpatch %2 %3 wlopts2.b
rem =====================================================
echo Patching %1\binp\help\wpperrs.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wpperrs.hlp if exist wpphlp2.b bpatch %2 %3 wpphlp2.b
rem =====================================================
echo Patching %1\binp\help\wfcerrs.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wfcerrs.hlp if exist wfcerrst.b bpatch %2 %3 wfcerrst.b
rem =====================================================
echo Patching %1\binw\netservw.exe
set path=%1\binw;%1\binb
if exist %1\binw\netservw.exe if exist netservw.b bpatch %2 %3 netservw.b
rem =====================================================
echo Patching %1\binw\parservw.exe
set path=%1\binw;%1\binb
if exist %1\binw\parservw.exe if exist parservw.b bpatch %2 %3 parservw.b
rem =====================================================
echo Patching %1\binw\vdmservw.exe
set path=%1\binw;%1\binb
if exist %1\binw\vdmservw.exe if exist vdmservw.b bpatch %2 %3 vdmservw.b
rem =====================================================
echo Patching %1\binw\win386.ext
set path=%1\binw;%1\binb
if exist %1\binw\win386.ext if exist win386.b bpatch %2 %3 win386.b
rem =====================================================
echo Patching %1\binw\w386dll.ext
set path=%1\binw;%1\binb
if exist %1\binw\w386dll.ext if exist w386dll.b bpatch %2 %3 w386dll.b
rem =====================================================
echo Patching %1\binw\wsamplew.exe
set path=%1\binw;%1\binb
if exist %1\binw\wsamplew.exe if exist wsamplew.b bpatch %2 %3 wsamplew.b
rem =====================================================
echo Patching %1\binw\wvideo.exe
set path=%1\binw;%1\binb
if exist %1\binw\wvideo.exe if exist wvideow.b bpatch %2 %3 wvideow.b
rem =====================================================
echo Patching %1\binw\wpp.hlp
set path=%1\binw;%1\binb
if exist %1\binw\wpp.hlp if exist wppwh.b bpatch %2 %3 wppwh.b
rem =====================================================
echo Patching %1\binw\wsamplew.exe
set path=%1\binw;%1\binb
if exist %1\binw\wsamplew.exe if exist wswj.b bpatch %2 %3 wswj.b
rem =====================================================
echo Patching %1\binw\wvideo.exe
set path=%1\binw;%1\binb
if exist %1\binw\wvideo.exe if exist wvwne.b bpatch %2 %3 wvwne.b
rem =====================================================
echo Patching %1\h\complex.h
set path=%1\h;%1\binb
if exist %1\h\complex.h if exist complexh.b bpatch %2 %3 complexh.b
rem =====================================================
echo Patching %1\h\errno.h
set path=%1\h;%1\binb
if exist %1\h\errno.h if exist errnoh.b bpatch %2 %3 errnoh.b
rem =====================================================
echo Patching %1\h\fstream.h
set path=%1\h;%1\binb
if exist %1\h\fstream.h if exist fstreamh.b bpatch %2 %3 fstreamh.b
rem =====================================================
echo Patching %1\h\iostream.h
set path=%1\h;%1\binb
if exist %1\h\iostream.h if exist iostrmh.b bpatch %2 %3 iostrmh.b
rem =====================================================
echo Patching %1\h\stdio.h
set path=%1\h;%1\binb
if exist %1\h\stdio.h if exist stdioh.b bpatch %2 %3 stdioh.b
rem =====================================================
echo Patching %1\h\string.hpp
set path=%1\h;%1\binb
if exist %1\h\string.hpp if exist strhpp.b bpatch %2 %3 strhpp.b
rem =====================================================
echo Patching %1\h\wcdefs.h
set path=%1\h;%1\binb
if exist %1\h\wcdefs.h if exist wcdefsh.b bpatch %2 %3 wcdefsh.b
rem =====================================================
echo Patching %1\h\wclbase.h
set path=%1\h;%1\binb
if exist %1\h\wclbase.h if exist wclbaseh.b bpatch %2 %3 wclbaseh.b
rem =====================================================
echo Patching %1\h\wclcom.h
set path=%1\h;%1\binb
if exist %1\h\wclcom.h if exist wclcomh.b bpatch %2 %3 wclcomh.b
rem =====================================================
echo Patching %1\h\wclibase.h
set path=%1\h;%1\binb
if exist %1\h\wclibase.h if exist wclibash.b bpatch %2 %3 wclibash.b
rem =====================================================
echo Patching %1\h\wclist.h
set path=%1\h;%1\binb
if exist %1\h\wclist.h if exist wclisth.b bpatch %2 %3 wclisth.b
rem =====================================================
echo Patching %1\h\wclistit.h
set path=%1\h;%1\binb
if exist %1\h\wclistit.h if exist wcliith.b bpatch %2 %3 wcliith.b
rem =====================================================
echo Patching %1\h\bios98.h
set path=%1\h;%1\binb
if exist %1\h\bios98.h if exist b98h.b bpatch %2 %3 b98h.b
rem =====================================================
echo Patching %1\h\win\_win386.h
set path=%1\h\win;%1\binb
if exist %1\h\win\_win386.h if exist _w386h.b bpatch %2 %3 _w386h.b
rem =====================================================
echo Patching %1\lib286\math87c.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87c.lib if exist 2m87cl.b wlib %1\lib286\math87c.lib -grabfpe.obj -+2m87cl.b
rem =====================================================
echo Patching %1\lib286\math87h.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87h.lib if exist 2m87hl.b wlib %1\lib286\math87h.lib -grabfpe.obj -+2m87hl.b
rem =====================================================
echo Patching %1\lib286\math87l.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87l.lib if exist 2m87ll.b wlib %1\lib286\math87l.lib -grabfpe.obj -+2m87ll.b
rem =====================================================
echo Patching %1\lib286\math87m.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87m.lib if exist 2m87ml.b wlib %1\lib286\math87m.lib -grabfpe.obj -+2m87ml.b
rem =====================================================
echo Patching %1\lib286\math87s.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87s.lib if exist 2m87sl.b wlib %1\lib286\math87s.lib -grabfpe.obj -+2m87sl.b
rem =====================================================
echo Patching %1\lib286\mathc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathc.lib if exist 2mcl.b wlib %1\lib286\mathc.lib -fpestub.obj -+2mcl.b
rem =====================================================
echo Patching %1\lib286\mathh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathh.lib if exist 2mhl.b wlib %1\lib286\mathh.lib -fpestub.obj -+2mhl.b
rem =====================================================
echo Patching %1\lib286\mathl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathl.lib if exist 2mll.b wlib %1\lib286\mathl.lib -fpestub.obj -+2mll.b
rem =====================================================
echo Patching %1\lib286\mathm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathm.lib if exist 2mml.b wlib %1\lib286\mathm.lib -fpestub.obj -+2mml.b
rem =====================================================
echo Patching %1\lib286\maths.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\maths.lib if exist 2msl.b wlib %1\lib286\maths.lib -fpestub.obj -+2msl.b
rem =====================================================
echo Patching %1\lib286\plbxc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxc.lib if exist 2pxcl.b bpatch %2 %3 2pxcl.b
rem =====================================================
echo Patching %1\lib286\plbxh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxh.lib if exist 2pxhl.b bpatch %2 %3 2pxhl.b
rem =====================================================
echo Patching %1\lib286\plbxl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxl.lib if exist 2pxll.b bpatch %2 %3 2pxll.b
rem =====================================================
echo Patching %1\lib286\plbxm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxm.lib if exist 2pxml.b bpatch %2 %3 2pxml.b
rem =====================================================
echo Patching %1\lib286\plbxs.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxs.lib if exist 2pxsl.b bpatch %2 %3 2pxsl.b
rem =====================================================
echo Patching %1\lib286\plibc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibc.lib if exist 2pcl.b bpatch %2 %3 2pcl.b
rem =====================================================
echo Patching %1\lib286\plibh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibh.lib if exist 2phl.b bpatch %2 %3 2phl.b
rem =====================================================
echo Patching %1\lib286\plibl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibl.lib if exist 2pll.b bpatch %2 %3 2pll.b
rem =====================================================
echo Patching %1\lib286\plibm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibm.lib if exist 2pml.b bpatch %2 %3 2pml.b
rem =====================================================
echo Patching %1\lib286\plibs.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibs.lib if exist 2psl.b bpatch %2 %3 2psl.b
rem =====================================================
echo Creating %1\lib286\wresm.lib
if exist %1\lib286\NUL if exist 2resml.b copy 2resml.b %1\lib286\wresm.lib
rem =====================================================
echo Creating %1\lib286\wresl.lib
if exist %1\lib286\NUL if exist 2resll.b copy 2resll.b %1\lib286\wresl.lib
rem =====================================================
echo Patching %1\lib286\dos\clibc.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibc.lib if exist 2ccdl.b wlib %1\lib286\dos\clibc.lib -+2ccdl.b
rem =====================================================
echo Patching %1\lib286\dos\clibh.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibh.lib if exist 2chdl.b wlib %1\lib286\dos\clibh.lib -+2chdl.b
rem =====================================================
echo Patching %1\lib286\dos\clibl.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibl.lib if exist 2cldl.b wlib %1\lib286\dos\clibl.lib -+2cldl.b
rem =====================================================
echo Patching %1\lib286\dos\clibm.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibm.lib if exist 2cmdl.b wlib %1\lib286\dos\clibm.lib -+2cmdl.b
rem =====================================================
echo Patching %1\lib286\dos\clibs.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibs.lib if exist 2csdl.b wlib %1\lib286\dos\clibs.lib -+2csdl.b
rem =====================================================
echo Patching %1\lib286\dos\emu87.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\emu87.lib if exist 2emu87dl.b wlib %1\lib286\dos\emu87.lib -+2emu87dl.b
rem =====================================================
echo Patching %1\lib286\dos\flib7l.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\flib7l.lib if exist 2f7ldl.b wlib %1\lib286\dos\flib7l.lib -+2f7ldl.b
rem =====================================================
echo Patching %1\lib286\dos\flib7m.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\flib7m.lib if exist 2f7mdl.b wlib %1\lib286\dos\flib7m.lib -+2f7mdl.b
rem =====================================================
echo Patching %1\lib286\dos\flibl.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\flibl.lib if exist 2fldl.b wlib %1\lib286\dos\flibl.lib -+2fldl.b
rem =====================================================
echo Patching %1\lib286\dos\flibm.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\flibm.lib if exist 2fmdl.b wlib %1\lib286\dos\flibm.lib -+2fmdl.b
rem =====================================================
echo Patching %1\lib286\dos\graph.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\graph.lib if exist 2grdl.b wlib %1\lib286\dos\graph.lib -+2grdl.b
rem =====================================================
echo Patching %1\lib286\dos\graph98.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\graph98.lib if exist 2g98dl.b wlib %1\lib286\dos\graph98.lib -+2g98dl.b
rem =====================================================
echo Patching %1\lib286\dos\clibl.lib
set path=%1\lib286\dos;%1\binb
if exist %1\lib286\dos\clibl.lib if exist 2clnl.b wlib %1\lib286\dos\clibl.lib -+2clnl.b
rem =====================================================
echo Patching %1\lib286\os2\clibc.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibc.lib if exist 2cc2l.b wlib %1\lib286\os2\clibc.lib -+2cc2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibdll.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibdll.lib if exist 2cdll2l.b wlib %1\lib286\os2\clibdll.lib -+2cdll2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibh.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibh.lib if exist 2ch2l.b wlib %1\lib286\os2\clibh.lib -+2ch2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibl.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibl.lib if exist 2cl2l.b wlib %1\lib286\os2\clibl.lib -+2cl2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibm.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibm.lib if exist 2cm2l.b wlib %1\lib286\os2\clibm.lib -+2cm2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibmtl.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibmtl.lib if exist 2cmt2l.b wlib %1\lib286\os2\clibmtl.lib -+2cmt2l.b
rem =====================================================
echo Patching %1\lib286\os2\clibs.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\clibs.lib if exist 2cs2l.b wlib %1\lib286\os2\clibs.lib -+2cs2l.b
rem =====================================================
echo Patching %1\lib286\os2\emu87.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\emu87.lib if exist 2emu872l.b wlib %1\lib286\os2\emu87.lib -+2emu872l.b
rem =====================================================
echo Patching %1\lib286\os2\flib7l.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\flib7l.lib if exist 2f7l2l.b wlib %1\lib286\os2\flib7l.lib -+2f7l2l.b
rem =====================================================
echo Patching %1\lib286\os2\flib7m.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\flib7m.lib if exist 2f6m2l.b wlib %1\lib286\os2\flib7m.lib -+2f6m2l.b
rem =====================================================
echo Patching %1\lib286\os2\flibl.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\flibl.lib if exist 2fl2l.b wlib %1\lib286\os2\flibl.lib -+2fl2l.b
rem =====================================================
echo Patching %1\lib286\os2\flibm.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\flibm.lib if exist 2fm2l.b wlib %1\lib286\os2\flibm.lib -+2fm2l.b
rem =====================================================
echo Patching %1\lib286\os2\graphp.obj
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\graphp.obj if exist 2grp2l.b bpatch %2 %3 2grp2l.b
rem =====================================================
echo Patching %1\lib286\os2\plbxmtl.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\plbxmtl.lib if exist 2pxmt2l.b bpatch %2 %3 2pxmt2l.b
rem =====================================================
echo Patching %1\lib286\os2\plibmtl.lib
set path=%1\lib286\os2;%1\binb
if exist %1\lib286\os2\plibmtl.lib if exist 2pmt2l.b bpatch %2 %3 2pmt2l.b
rem =====================================================
echo Patching %1\lib286\win\clibc.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\clibc.lib if exist 2ccwl.b wlib %1\lib286\win\clibc.lib -+2ccwl.b
rem =====================================================
echo Patching %1\lib286\win\clibl.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\clibl.lib if exist 2clwl.b wlib %1\lib286\win\clibl.lib -+2clwl.b
rem =====================================================
echo Patching %1\lib286\win\clibm.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\clibm.lib if exist 2cmwl.b wlib %1\lib286\win\clibm.lib -+2cmwl.b
rem =====================================================
echo Patching %1\lib286\win\clibs.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\clibs.lib if exist 2cswl.b wlib %1\lib286\win\clibs.lib -+2cswl.b
rem =====================================================
echo Patching %1\lib286\win\emu87.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\emu87.lib if exist 2emu87wl.b wlib %1\lib286\win\emu87.lib -+2emu87wl.b
rem =====================================================
echo Patching %1\lib286\win\flib7l.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\flib7l.lib if exist 2f7lwl.b wlib %1\lib286\win\flib7l.lib -+2f7lwl.b
rem =====================================================
echo Patching %1\lib286\win\flib7m.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\flib7m.lib if exist 2f7mwl.b wlib %1\lib286\win\flib7m.lib -+2f7mwl.b
rem =====================================================
echo Patching %1\lib286\win\flibl.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\flibl.lib if exist 2flwl.b wlib %1\lib286\win\flibl.lib -+2flwl.b
rem =====================================================
echo Patching %1\lib286\win\flibm.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\flibm.lib if exist 2fmwl.b wlib %1\lib286\win\flibm.lib -+2fmwl.b
rem =====================================================
echo Patching %1\lib286\win\plbxc.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plbxc.lib if exist 2pxcwl.b bpatch %2 %3 2pxcwl.b
rem =====================================================
echo Patching %1\lib286\win\plbxl.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plbxl.lib if exist 2pxlwl.b bpatch %2 %3 2pxlwl.b
rem =====================================================
echo Patching %1\lib286\win\plbxm.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plbxm.lib if exist 2pxmwl.b bpatch %2 %3 2pxmwl.b
rem =====================================================
echo Patching %1\lib286\win\plbxs.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plbxs.lib if exist 2pxswl.b bpatch %2 %3 2pxswl.b
rem =====================================================
echo Patching %1\lib286\win\plibc.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plibc.lib if exist 2pcwl.b bpatch %2 %3 2pcwl.b
rem =====================================================
echo Patching %1\lib286\win\plibl.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plibl.lib if exist 2plwl.b bpatch %2 %3 2plwl.b
rem =====================================================
echo Patching %1\lib286\win\plibm.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plibm.lib if exist 2pmwl.b bpatch %2 %3 2pmwl.b
rem =====================================================
echo Patching %1\lib286\win\plibs.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\plibs.lib if exist 2pswl.b bpatch %2 %3 2pswl.b
rem =====================================================
echo Patching %1\lib286\win\math87c.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\math87c.lib if exist 2m7cwl.b wlib %1\lib286\win\math87c.lib -grabfpe.obj -+2m7cwl.b
rem =====================================================
echo Patching %1\lib286\win\math87l.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\math87l.lib if exist 2m7lwl.b wlib %1\lib286\win\math87l.lib -grabfpe.obj -+2m7lwl.b
rem =====================================================
echo Patching %1\lib286\win\mathc.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\mathc.lib if exist 2mcwl.b wlib %1\lib286\win\mathc.lib -fpestub.obj -+2mcwl.b
rem =====================================================
echo Patching %1\lib286\win\mathl.lib
set path=%1\lib286\win;%1\binb
if exist %1\lib286\win\mathl.lib if exist 2mlwl.b wlib %1\lib286\win\mathl.lib -fpestub.obj -+2mlwl.b
rem =====================================================
echo Patching %1\lib386\math387r.lib
set path=%1\lib386;%1\binb
set __DELS=-fpe387.obj -fpedos4g.obj -fpeergo.obj -fpeint.obj -fpeintel.obj -fpeinth.obj -fpephar.obj -grabfpe.obj
if exist %1\lib386\math387r.lib if exist 3m87rl.b wlib %1\lib386\math387r.lib @__DELS -+3m87rl.b
rem =====================================================
echo Patching %1\lib386\math387s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math387s.lib if exist 3m87sl.b wlib %1\lib386\math387s.lib @__DELS -+3m87sl.b
set __DELS=
rem =====================================================
echo Patching %1\lib386\math3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math3r.lib if exist 3mrl.b wlib %1\lib386\math3r.lib -fpestub.obj -+3mrl.b
rem =====================================================
echo Patching %1\lib386\math3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math3s.lib if exist 3msl.b wlib %1\lib386\math3s.lib -fpestub.obj -+3msl.b
rem =====================================================
echo Patching %1\lib386\plbx3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbx3r.lib if exist 3pxrl.b bpatch %2 %3 3pxrl.b
rem =====================================================
echo Patching %1\lib386\plbx3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbx3s.lib if exist 3pxsl.b bpatch %2 %3 3pxsl.b
rem =====================================================
echo Patching %1\lib386\plbxmt3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbxmt3r.lib if exist 3pxmtrl.b bpatch %2 %3 3pxmtrl.b
rem =====================================================
echo Patching %1\lib386\plbxmt3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbxmt3s.lib if exist 3pxmtsl.b bpatch %2 %3 3pxmtsl.b
rem =====================================================
echo Patching %1\lib386\plib3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plib3r.lib if exist 3prl.b bpatch %2 %3 3prl.b
rem =====================================================
echo Patching %1\lib386\plib3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plib3s.lib if exist 3psl.b bpatch %2 %3 3psl.b
rem =====================================================
echo Patching %1\lib386\plibmt3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plibmt3r.lib if exist 3pmtrl.b bpatch %2 %3 3pmtrl.b
rem =====================================================
echo Patching %1\lib386\plibmt3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plibmt3s.lib if exist 3pmtsl.b bpatch %2 %3 3pmtsl.b
rem =====================================================
echo Creating %1\lib386\wresf.lib
if exist %1\lib386\NUL if exist 3resrl.b copy 3resrl.b %1\lib386\wresf.lib
rem =====================================================
echo Creating %1\lib386\wresfs.lib
if exist %1\lib386\NUL if exist 3ressl.b copy 3ressl.b %1\lib386\wresfs.lib
rem =====================================================
echo Patching %1\lib386\dos\adiestrt.obj
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\adiestrt.obj if exist 3adiesdo.b bpatch %2 %3 3adiesdo.b
rem =====================================================
echo Patching %1\lib386\dos\adifstrt.obj
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\adifstrt.obj if exist 3adifsdo.b bpatch %2 %3 3adifsdo.b
rem =====================================================
echo Patching %1\lib386\dos\adsstart.obj
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\adsstart.obj if exist 3adssdo.b bpatch %2 %3 3adssdo.b
rem =====================================================
echo Patching %1\lib386\dos\clib3r.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\clib3r.lib if exist 3crdl.b wlib %1\lib386\dos\clib3r.lib -+3crdl.b
rem =====================================================
echo Patching %1\lib386\dos\clib3s.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\clib3s.lib if exist 3csdl.b wlib %1\lib386\dos\clib3s.lib -+3csdl.b
rem =====================================================
echo Patching %1\lib386\dos\emu387.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\emu387.lib if exist 3emudl.b wlib %1\lib386\dos\emu387.lib -+3emudl.b
rem =====================================================
echo Patching %1\lib386\dos\flib.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\flib.lib if exist 3frdl.b wlib %1\lib386\dos\flib.lib -+3frdl.b
rem =====================================================
echo Patching %1\lib386\dos\flib7.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\flib7.lib if exist 3fr7dl.b wlib %1\lib386\dos\flib7.lib -+3fr7dl.b
rem =====================================================
echo Patching %1\lib386\dos\flib7s.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\flib7s.lib if exist 3fs7dl.b wlib %1\lib386\dos\flib7s.lib -+3fs7dl.b
rem =====================================================
echo Patching %1\lib386\dos\flibs.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\flibs.lib if exist 3fsdl.b wlib %1\lib386\dos\flibs.lib -+3fsdl.b
rem =====================================================
echo Patching %1\lib386\dos\graph.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\graph.lib if exist 3grdl.b wlib %1\lib386\dos\graph.lib -+3grdl.b
rem =====================================================
echo Patching %1\lib386\dos\graph98.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\graph98.lib if exist 3g98dl.b wlib %1\lib386\dos\graph98.lib -+3g98dl.b
rem =====================================================
echo Patching %1\lib386\dos\clib3r.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\clib3r.lib if exist 3crnel.b wlib %1\lib386\dos\clib3r.lib -+3crnel.b
rem =====================================================
echo Patching %1\lib386\dos\clib3s.lib
set path=%1\lib386\dos;%1\binb
if exist %1\lib386\dos\clib3s.lib if exist 3csnel.b wlib %1\lib386\dos\clib3s.lib -+3csnel.b
rem =====================================================
echo Patching %1\lib386\os2\clib3r.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\clib3r.lib if exist 3cr2l.b wlib %1\lib386\os2\clib3r.lib -+3cr2l.b
rem =====================================================
echo Patching %1\lib386\os2\clib3s.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\clib3s.lib if exist 3cs2l.b wlib %1\lib386\os2\clib3s.lib -+3cs2l.b
rem =====================================================
echo Patching %1\lib386\os2\flib.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\flib.lib if exist 3fr2l.b wlib %1\lib386\os2\flib.lib -+3fr2l.b
rem =====================================================
echo Patching %1\lib386\os2\flib7.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\flib7.lib if exist 3fr72l.b wlib %1\lib386\os2\flib7.lib -+3fr72l.b
rem =====================================================
echo Patching %1\lib386\os2\flib7s.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\flib7s.lib if exist 3fs72l.b wlib %1\lib386\os2\flib7s.lib -+3fs72l.b
rem =====================================================
echo Patching %1\lib386\os2\flibs.lib
set path=%1\lib386\os2;%1\binb
if exist %1\lib386\os2\flibs.lib if exist 3fs2l.b wlib %1\lib386\os2\flibs.lib -+3fs2l.b
rem =====================================================
echo Patching %1\lib386\win\clib3r.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\clib3r.lib if exist 3crwl.b wlib %1\lib386\win\clib3r.lib -+3crwl.b
rem =====================================================
echo Patching %1\lib386\win\clib3s.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\clib3s.lib if exist 3cswl.b wlib %1\lib386\win\clib3s.lib -+3cswl.b
rem =====================================================
echo Patching %1\lib386\win\flib.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\flib.lib if exist 3frwl.b wlib %1\lib386\win\flib.lib -+3frwl.b
rem =====================================================
echo Patching %1\lib386\win\flib7.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\flib7.lib if exist 3fr7wl.b wlib %1\lib386\win\flib7.lib -+3fr7wl.b
rem =====================================================
echo Patching %1\lib386\win\flib7s.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\flib7s.lib if exist 3fs7wl.b wlib %1\lib386\win\flib7s.lib -+3fs7wl.b
rem =====================================================
echo Patching %1\lib386\win\flibs.lib
set path=%1\lib386\win;%1\binb
if exist %1\lib386\win\flibs.lib if exist 3fswl.b wlib %1\lib386\win\flibs.lib -+3fswl.b
rem =====================================================
echo Patching %1\lib386\netware\clib3s.lib
set path=%1\lib386\netware;%1\binb
if exist %1\lib386\netware\clib3s.lib if exist 3csnwl.b wlib %1\lib386\netware\clib3s.lib -+3csnwl.b
rem =====================================================
echo Patching %1\lib386\netware\flib7s.lib
set path=%1\lib386\netware;%1\binb
if exist %1\lib386\netware\flib7s.lib if exist 3fs7nwl.b wlib %1\lib386\netware\flib7s.lib -+3fs7nwl.b
rem =====================================================
echo Patching %1\lib386\netware\flibs.lib
set path=%1\lib386\netware;%1\binb
if exist %1\lib386\netware\flibs.lib if exist 3fsnwl.b wlib %1\lib386\netware\flibs.lib -+3fsnwl.b
rem =====================================================
echo Patching %1\lib386\nt\clib3r.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\clib3r.lib if exist 3crntl.b wlib %1\lib386\nt\clib3r.lib -+3crntl.b
rem =====================================================
echo Patching %1\lib386\nt\clib3s.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\clib3s.lib if exist 3csntl.b wlib %1\lib386\nt\clib3s.lib -+3csntl.b
rem =====================================================
echo Patching %1\lib386\nt\flib.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\flib.lib if exist 3frntl.b wlib %1\lib386\nt\flib.lib -+3frntl.b
rem =====================================================
echo Patching %1\lib386\nt\flib7.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\flib7.lib if exist 3fr7ntl.b wlib %1\lib386\nt\flib7.lib -+3fr7ntl.b
rem =====================================================
echo Patching %1\lib386\nt\flibs.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\flibs.lib if exist 3fsntl.b wlib %1\lib386\nt\flibs.lib -+3fsntl.b
rem =====================================================
echo Patching %1\lib386\nt\flib7s.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\flib7s.lib if exist 3fs7ntl.b wlib %1\lib386\nt\flib7s.lib -+3fs7ntl.b
rem =====================================================
echo Patching %1\nlm\novserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\novserv3.nlm if exist novsrvn3.b bpatch %2 %3 novsrvn3.b
rem =====================================================
echo Patching %1\nlm\parserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\parserv3.nlm if exist parsrvn3.b bpatch %2 %3 parsrvn3.b
rem =====================================================
echo Patching %1\nlm\serserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\serserv3.nlm if exist sersrvn3.b bpatch %2 %3 sersrvn3.b
rem =====================================================
echo Patching %1\nlm\novserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\novserv4.nlm if exist novsrvn4.b bpatch %2 %3 novsrvn4.b
rem =====================================================
echo Patching %1\nlm\parserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\parserv4.nlm if exist parsrvn4.b bpatch %2 %3 parsrvn4.b
rem =====================================================
echo Patching %1\nlm\serserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\serserv4.nlm if exist sersrvn4.b bpatch %2 %3 sersrvn4.b
rem =====================================================
echo Patching %1\pen\install.bat
set path=%1\pen;%1\binb
if exist %1\pen\install.bat if exist instp.b bpatch %2 %3 instp.b
rem =====================================================
echo Patching %1\pen\wparserv.dll
set path=%1\pen;%1\binb
if exist %1\pen\wparserv.dll if exist parservp.b bpatch %2 %3 parservp.b
rem =====================================================
echo Patching %1\pen\wparsrv2.dll
set path=%1\pen;%1\binb
if exist %1\pen\wparsrv2.dll if exist parsrv2p.b bpatch %2 %3 parsrv2p.b
rem =====================================================
echo Patching %1\src\calendar.c
set path=%1\src;%1\binb
if exist %1\src\calendar.c if exist calc.b bpatch %2 %3 calc.b
rem =====================================================
echo Patching %1\src\calendar.cpp
set path=%1\src;%1\binb
if exist %1\src\calendar.cpp if exist calcpp.b bpatch %2 %3 calcpp.b
rem =====================================================
echo Patching %1\src\calendar.c
set path=%1\src;%1\binb
if exist %1\src\calendar.c if exist jcalc.b bpatch %2 %3 jcalc.b
rem =====================================================
echo Creating %1\src\pmhello.c
if exist %1\src\NUL if exist pmhc.b copy pmhc.b %1\src\pmhello.c
rem =====================================================
echo Creating %1\src\winhello.c
if exist %1\src\NUL if exist winhc.b copy winhc.b %1\src\winhello.c
rem =====================================================
echo Patching %1\src\dll\gen16.c
set path=%1\src\dll;%1\binb
if exist %1\src\dll\gen16.c if exist g16c.b bpatch %2 %3 g16c.b
rem =====================================================
echo Creating %1\src\fortran\blackjac.jpn
if exist %1\src\fortran\NUL if exist bjfj.b copy bjfj.b %1\src\fortran\blackjac.jpn
rem =====================================================
echo Creating %1\src\fortran\knight.jpn
if exist %1\src\fortran\NUL if exist knfj.b copy knfj.b %1\src\fortran\knight.jpn
rem =====================================================
echo Patching %1\src\fortran\fsublib.fi
set path=%1\src\fortran;%1\binb
if exist %1\src\fortran\fsublib.fi if exist fslfi.b bpatch %2 %3 fslfi.b
rem =====================================================
echo Creating %1\src\fortran\mathcode.fi
if exist %1\src\fortran\NUL if exist mcfi.b copy mcfi.b %1\src\fortran\mathcode.fi
rem =====================================================
echo Creating %1\src\fortran\dos\calendar.for
if exist %1\src\fortran\dos\NUL if exist calf.b copy calf.b %1\src\fortran\dos\calendar.for
rem =====================================================
echo Patching %1\src\fortran\win\win386.fi
set path=%1\src\fortran\win;%1\binb
if exist %1\src\fortran\win\win386.fi if exist win386f.b bpatch %2 %3 win386f.b
rem =====================================================
echo Patching %1\src\fortran\win\win3api.fi
set path=%1\src\fortran\win;%1\binb
if exist %1\src\fortran\win\win3api.fi if exist win3apif.b bpatch %2 %3 win3apif.b
rem =====================================================
echo Creating %1\src\fortran\win\winapi.fi
if exist %1\src\fortran\win\NUL if exist winapif.b copy winapif.b %1\src\fortran\win\winapi.fi
rem =====================================================
echo Patching %1\src\startup\wildargv.c
set path=%1\src\startup;%1\binb
if exist %1\src\startup\wildargv.c if exist wldargc.b bpatch %2 %3 wldargc.b
rem =====================================================
echo Patching %1\src\startup\386\cstart3r.asm
set path=%1\src\startup\386;%1\binb
if exist %1\src\startup\386\cstart3r.asm if exist cst3ra.b bpatch %2 %3 cst3ra.b
rem =====================================================
echo Patching %1\src\startup\386\cstart3s.asm
set path=%1\src\startup\386;%1\binb
if exist %1\src\startup\386\cstart3s.asm if exist cst3sa.b bpatch %2 %3 cst3sa.b
rem =====================================================
echo Patching %1\src\startup\386\wstart3r.asm
set path=%1\src\startup\386;%1\binb
if exist %1\src\startup\386\wstart3r.asm if exist wst3ra.b bpatch %2 %3 wst3ra.b
rem =====================================================
echo Patching %1\src\startup\386\wstart3s.asm
set path=%1\src\startup\386;%1\binb
if exist %1\src\startup\386\wstart3s.asm if exist wst3sa.b bpatch %2 %3 wst3sa.b
rem =====================================================
echo Patching %1\src\startup\ads\adsstart.asm
set path=%1\src\startup\ads;%1\binb
if exist %1\src\startup\ads\adsstart.asm if exist adssa.b bpatch %2 %3 adssa.b
rem =====================================================
echo Deleting %1\src\clibexam\clock.c
if exist %1\src\clibexam\clock.c del %1\src\clibexam\clock.c
rem =====================================================
echo Patching %1\src\goodies\bimo.asm
set path=%1\src\goodies;%1\binb
if exist %1\src\goodies\bimo.asm if exist gd02.b bpatch %2 %3 gd02.b
rem =====================================================
echo Patching %1\src\goodies\bimodal.c
set path=%1\src\goodies;%1\binb
if exist %1\src\goodies\bimodal.c if exist gd03.b bpatch %2 %3 gd03.b
rem =====================================================
echo Patching %1\src\goodies\mouse.c
set path=%1\src\goodies;%1\binb
if exist %1\src\goodies\mouse.c if exist gd16.b bpatch %2 %3 gd16.b
rem =====================================================
echo Creating %1\src\goodies\mathcode.fi
if exist %1\src\goodies\NUL if exist gd26.b copy gd26.b %1\src\goodies\mathcode.fi
rem =====================================================
echo Patching %1\src\goodies\cw87.for
set path=%1\src\goodies;%1\binb
if exist %1\src\goodies\cw87.for if exist gd29.b bpatch %2 %3 gd29.b
rem =====================================================
echo Creating %1\src\goodies\mathdemo.for
if exist %1\src\goodies\NUL if exist gd35.b copy gd35.b %1\src\goodies\mathdemo.for
rem =====================================================
echo Deleting %1\src\goodies\memory.for
if exist %1\src\goodies\memory.for del %1\src\goodies\memory.for
rem =====================================================
echo Creating %1\src\goodies\_matherr.for
if exist %1\src\goodies\NUL if exist gd44.b copy gd44.b %1\src\goodies\_matherr.for
rem =====================================================
echo Patching %1\novh\stdlib.h
set path=%1\novh;%1\binb
if exist %1\novh\stdlib.h if exist nh089.b bpatch %2 %3 nh089.b
set path=%opath%
set opath=
goto end
:usage
cls
echo.
echo.
echo.
echo.
echo.
echo Use %0 DIRECTORY [-p], where DIRECTORY is the drive and path where
echo the software was originally installed.  You must be in the directory
echo where the patch files are.  For example:
echo.
echo     a:
echo     %0 C:\WATCOM
echo.
echo would apply patches from the a: diskette drive to the installation
echo in the C:\WATCOM subdirectory
echo.
echo The -p option supresses prompting when each file is patched.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
:end
