@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\binb\bpatch.exe
set path=%1\binb;%1\binb
if exist %1\binb\bpatch.exe if exist bpatchb.a bpatch %2 %3 bpatchb.a
rem =====================================================
echo Patching %1\bin\ads.trp
set path=%1\bin;%1\binb
if exist %1\bin\ads.trp if exist adsd.a bpatch %2 %3 adsd.a
rem =====================================================
echo Patching %1\bin\par.trp
set path=%1\bin;%1\binb
if exist %1\bin\par.trp if exist pard.a bpatch %2 %3 pard.a
rem =====================================================
echo Patching %1\bin\pls.trp
set path=%1\bin;%1\binb
if exist %1\bin\pls.trp if exist plsd.a bpatch %2 %3 plsd.a
rem =====================================================
echo Patching %1\bin\rsi.trp
set path=%1\bin;%1\binb
if exist %1\bin\rsi.trp if exist rsid.a bpatch %2 %3 rsid.a
rem =====================================================
echo Patching %1\bin\ser.trp
set path=%1\bin;%1\binb
if exist %1\bin\ser.trp if exist serd.a bpatch %2 %3 serd.a
rem =====================================================
echo Patching %1\bin\rsihelp.exp
set path=%1\bin;%1\binb
if exist %1\bin\rsihelp.exp if exist rsihelpd.a bpatch %2 %3 rsihelpd.a
rem =====================================================
echo Patching %1\bin\cmdedit.exe
set path=%1\bin;%1\binb
if exist %1\bin\cmdedit.exe if exist cmdeditd.a bpatch %2 %3 cmdeditd.a
rem =====================================================
echo Patching %1\bin\dos4gw.exe
set path=%1\bin;%1\binb
if exist %1\bin\dos4gw.exe if exist dos4gw.a bpatch %2 %3 dos4gw.a
rem =====================================================
echo Patching %1\bin\dqvserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\dqvserv.exe if exist dqvservd.a bpatch %2 %3 dqvservd.a
rem =====================================================
echo Patching %1\bin\netserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\netserv.exe if exist netservd.a bpatch %2 %3 netservd.a
rem =====================================================
echo Patching %1\bin\novserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\novserv.exe if exist novservd.a bpatch %2 %3 novservd.a
rem =====================================================
echo Patching %1\bin\parserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\parserv.exe if exist parservd.a bpatch %2 %3 parservd.a
rem =====================================================
echo Patching %1\bin\serserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\serserv.exe if exist serservd.a bpatch %2 %3 serservd.a
rem =====================================================
echo Patching %1\bin\winserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\winserv.exe if exist winservd.a bpatch %2 %3 winservd.a
rem =====================================================
echo Patching %1\bin\vdmserv.exe
set path=%1\bin;%1\binb
if exist %1\bin\vdmserv.exe if exist vdmservd.a bpatch %2 %3 vdmservd.a
rem =====================================================
echo Patching %1\bin\pminfo.exe
set path=%1\bin;%1\binb
if exist %1\bin\pminfo.exe if exist pminfo.a bpatch %2 %3 pminfo.a
rem =====================================================
echo Patching %1\bin\rminfo.exe
set path=%1\bin;%1\binb
if exist %1\bin\rminfo.exe if exist rminfo.a bpatch %2 %3 rminfo.a
rem =====================================================
echo Patching %1\bin\wcc.exe
set path=%1\bin;%1\binb
if exist %1\bin\wcc.exe if exist wccd.a bpatch %2 %3 wccd.a
rem =====================================================
echo Patching %1\bin\wcc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wcc386.exe if exist wcc386d.a bpatch %2 %3 wcc386d.a
rem =====================================================
echo Patching %1\bin\wfc.exe
set path=%1\bin;%1\binb
if exist %1\bin\wfc.exe if exist wfcd.a bpatch %2 %3 wfcd.a
rem =====================================================
echo Patching %1\bin\wfc386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wfc386.exe if exist wfc386d.a bpatch %2 %3 wfc386d.a
rem =====================================================
echo Patching %1\bin\wlink.exe
set path=%1\bin;%1\binb
if exist %1\bin\wlink.exe if exist wlinkd.a bpatch %2 %3 wlinkd.a
rem =====================================================
echo Patching %1\bin\wmakel.exe
set path=%1\bin;%1\binb
if exist %1\bin\wmakel.exe if exist wmakel.a bpatch %2 %3 wmakel.a
rem =====================================================
echo Patching %1\bin\wpp.exe
set path=%1\bin;%1\binb
if exist %1\bin\wpp.exe if exist wppd.a bpatch %2 %3 wppd.a
rem =====================================================
echo Patching %1\bin\wpp386.exe
set path=%1\bin;%1\binb
if exist %1\bin\wpp386.exe if exist wpp386d.a bpatch %2 %3 wpp386d.a
rem =====================================================
echo Patching %1\bin\wprof.exe
set path=%1\bin;%1\binb
if exist %1\bin\wprof.exe if exist wprofd.a bpatch %2 %3 wprofd.a
rem =====================================================
echo Patching %1\bin\wsampecs.exe
set path=%1\bin;%1\binb
if exist %1\bin\wsampecs.exe if exist wsampecs.a bpatch %2 %3 wsampecs.a
rem =====================================================
echo Patching %1\bin\wsample.exe
set path=%1\bin;%1\binb
if exist %1\bin\wsample.exe if exist wsampled.a bpatch %2 %3 wsampled.a
rem =====================================================
echo Patching %1\bin\wsamppls.exp
set path=%1\bin;%1\binb
if exist %1\bin\wsamppls.exp if exist wsamppls.a bpatch %2 %3 wsamppls.a
rem =====================================================
echo Patching %1\bin\wsamprsi.exe
set path=%1\bin;%1\binb
if exist %1\bin\wsamprsi.exe if exist wsamprsi.a bpatch %2 %3 wsamprsi.a
rem =====================================================
echo Patching %1\bin\wvideo.exe
set path=%1\bin;%1\binb
if exist %1\bin\wvideo.exe if exist wvideod.a bpatch %2 %3 wvideod.a
rem =====================================================
echo Patching %1\binb\colours.dbg
set path=%1\binb;%1\binb
if exist %1\binb\colours.dbg if exist colourst.a bpatch %2 %3 colourst.a
rem =====================================================
echo Patching %1\binb\profile.dbg
set path=%1\binb;%1\binb
if exist %1\binb\profile.dbg if exist profilet.a bpatch %2 %3 profilet.a
rem =====================================================
echo Patching %1\binb\towv.exe
set path=%1\binb;%1\binb
if exist %1\binb\towv.exe if exist towvb.a bpatch %2 %3 towvb.a
rem =====================================================
echo Patching %1\binb\wbind.exe
set path=%1\binb;%1\binb
if exist %1\binb\wbind.exe if exist wbindb.a bpatch %2 %3 wbindb.a
rem =====================================================
echo Patching %1\binb\wdisasm.exe
set path=%1\binb;%1\binb
if exist %1\binb\wdisasm.exe if exist wdisasmb.a bpatch %2 %3 wdisasmb.a
rem =====================================================
echo Patching %1\binb\wfl.exe
set path=%1\binb;%1\binb
if exist %1\binb\wfl.exe if exist wflb.a bpatch %2 %3 wflb.a
rem =====================================================
echo Patching %1\binb\wfl386.exe
set path=%1\binb;%1\binb
if exist %1\binb\wfl386.exe if exist wfl386.a bpatch %2 %3 wfl386.a
rem =====================================================
echo Patching %1\binb\wlib.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlib.exe if exist wlibb.a bpatch %2 %3 wlibb.a
rem =====================================================
echo Patching %1\binb\wlink.exe
set path=%1\binb;%1\binb
if exist %1\binb\wlink.exe if exist wlinkb.a bpatch %2 %3 wlinkb.a
rem =====================================================
echo Patching %1\binb\wlsystem.lnk
set path=%1\binb;%1\binb
if exist %1\binb\wlsystem.lnk if exist wlsyst.a bpatch %2 %3 wlsyst.a
rem =====================================================
echo Patching %1\binb\wmake.exe
set path=%1\binb;%1\binb
if exist %1\binb\wmake.exe if exist wmakeb.a bpatch %2 %3 wmakeb.a
rem =====================================================
echo Patching %1\binb\womp.exe
set path=%1\binb;%1\binb
if exist %1\binb\womp.exe if exist wompb.a bpatch %2 %3 wompb.a
rem =====================================================
echo Patching %1\binb\wprof.exe
set path=%1\binb;%1\binb
if exist %1\binb\wprof.exe if exist wprofb.a bpatch %2 %3 wprofb.a
rem =====================================================
echo Patching %1\binb\wrc.exe
set path=%1\binb;%1\binb
if exist %1\binb\wrc.exe if exist wrcb.a bpatch %2 %3 wrcb.a
rem =====================================================
echo Patching %1\binb\wstrip.exe
set path=%1\binb;%1\binb
if exist %1\binb\wstrip.exe if exist wstripb.a bpatch %2 %3 wstripb.a
rem =====================================================
echo Patching %1\binb\wtouch.exe
set path=%1\binb;%1\binb
if exist %1\binb\wtouch.exe if exist wtouchb.a bpatch %2 %3 wtouchb.a
rem =====================================================
echo Patching %1\binnt\std.dll
set path=%1\binnt;%1\binb
if exist %1\binnt\std.dll if exist stdnt.a bpatch %2 %3 stdnt.a
rem =====================================================
echo Patching %1\binnt\towv.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\towv.exe if exist towvnt.a bpatch %2 %3 towvnt.a
rem =====================================================
echo Patching %1\binnt\wcc386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wcc386.exe if exist wcc386nt.a bpatch %2 %3 wcc386nt.a
rem =====================================================
echo Patching %1\binnt\wdisasm.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wdisasm.exe if exist wdisant.a bpatch %2 %3 wdisant.a
rem =====================================================
echo Patching %1\binnt\wfc386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wfc386.exe if exist wfc386nt.a bpatch %2 %3 wfc386nt.a
rem =====================================================
echo Patching %1\binnt\wfl386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wfl386.exe if exist wfl386nt.a bpatch %2 %3 wfl386nt.a
rem =====================================================
echo Patching %1\binnt\wlib.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlib.exe if exist wlibnt.a bpatch %2 %3 wlibnt.a
rem =====================================================
echo Patching %1\binnt\wlink.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wlink.exe if exist wlinknt.a bpatch %2 %3 wlinknt.a
rem =====================================================
echo Patching %1\binnt\wmake.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wmake.exe if exist wmakent.a bpatch %2 %3 wmakent.a
rem =====================================================
echo Patching %1\binnt\wpp386.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wpp386.exe if exist wpp386nt.a bpatch %2 %3 wpp386nt.a
rem =====================================================
echo Patching %1\binnt\wrc.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wrc.exe if exist wrcnt.a bpatch %2 %3 wrcnt.a
rem =====================================================
echo Patching %1\binnt\wsample.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wsample.exe if exist wsampnt.a bpatch %2 %3 wsampnt.a
rem =====================================================
echo Patching %1\binnt\wstrip.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wstrip.exe if exist wstrnt.a bpatch %2 %3 wstrnt.a
rem =====================================================
echo Patching %1\binnt\wtouch.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wtouch.exe if exist wtchnt.a bpatch %2 %3 wtchnt.a
rem =====================================================
echo Patching %1\binnt\wvideo.exe
set path=%1\binnt;%1\binb
if exist %1\binnt\wvideo.exe if exist wvidnt.a bpatch %2 %3 wvidnt.a
rem =====================================================
echo Patching %1\binp\netserv.exe
set path=%1\binp;%1\binb
if exist %1\binp\netserv.exe if exist netserv2.a bpatch %2 %3 netserv2.a
rem =====================================================
echo Patching %1\binp\novserv.exe
set path=%1\binp;%1\binb
if exist %1\binp\novserv.exe if exist novserv2.a bpatch %2 %3 novserv2.a
rem =====================================================
echo Patching %1\binp\parserv.exe
set path=%1\binp;%1\binb
if exist %1\binp\parserv.exe if exist parserv2.a bpatch %2 %3 parserv2.a
rem =====================================================
echo Patching %1\binp\serserv.exe
set path=%1\binp;%1\binb
if exist %1\binp\serserv.exe if exist serserv2.a bpatch %2 %3 serserv2.a
rem =====================================================
echo Patching %1\binp\wcc.exe
set path=%1\binp;%1\binb
if exist %1\binp\wcc.exe if exist wcc2.a bpatch %2 %3 wcc2.a
rem =====================================================
echo Patching %1\binp\wcc386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wcc386.exe if exist wcc3862.a bpatch %2 %3 wcc3862.a
rem =====================================================
echo Patching %1\binp\wfc.exe
set path=%1\binp;%1\binb
if exist %1\binp\wfc.exe if exist wfc2.a bpatch %2 %3 wfc2.a
rem =====================================================
echo Patching %1\binp\wfc386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wfc386.exe if exist wfc3862.a bpatch %2 %3 wfc3862.a
rem =====================================================
echo Patching %1\binp\wsampos2.exe
set path=%1\binp;%1\binb
if exist %1\binp\wsampos2.exe if exist wsampos2.a bpatch %2 %3 wsampos2.a
rem =====================================================
echo Patching %1\binp\wsmpos22.exe
set path=%1\binp;%1\binb
if exist %1\binp\wsmpos22.exe if exist wsmpos22.a bpatch %2 %3 wsmpos22.a
rem =====================================================
echo Patching %1\binp\wvideo.exe
set path=%1\binp;%1\binb
if exist %1\binp\wvideo.exe if exist wvideo2.a bpatch %2 %3 wvideo2.a
rem =====================================================
echo Patching %1\binp\wlink.exe
set path=%1\binp;%1\binb
if exist %1\binp\wlink.exe if exist wlink2.a bpatch %2 %3 wlink2.a
rem =====================================================
echo Patching %1\binp\wpp.exe
set path=%1\binp;%1\binb
if exist %1\binp\wpp.exe if exist wpp2.a bpatch %2 %3 wpp2.a
rem =====================================================
echo Patching %1\binp\wpp386.exe
set path=%1\binp;%1\binb
if exist %1\binp\wpp386.exe if exist wpp3862.a bpatch %2 %3 wpp3862.a
rem =====================================================
echo Creating %1\binp\wvpmhelp.exe
if exist %1\binp\NUL if exist wvpmhelp.a copy wvpmhelp.a %1\binp\wvpmhelp.exe
rem =====================================================
echo Patching %1\binp\dll\os2edit.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\os2edit.dll if exist os2edit2.a bpatch %2 %3 os2edit2.a
rem =====================================================
echo Patching %1\binp\dll\par.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\par.dll if exist par2.a bpatch %2 %3 par2.a
rem =====================================================
echo Patching %1\binp\dll\ser.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\ser.dll if exist ser2.a bpatch %2 %3 ser2.a
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.a bpatch %2 %3 std322.a
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.a bpatch %2 %3 wccopts2.a
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.a bpatch %2 %3 wppopts2.a
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.a bpatch %2 %3 wlopts2.a
rem =====================================================
echo Patching %1\binp\dll\wmakopts.dll
set path=%1\binp\dll;%1\binb
if exist %1\binp\dll\wmakopts.dll if exist wmopts2.a bpatch %2 %3 wmopts2.a
rem =====================================================
echo Patching %1\binp\help\wmakopts.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wmakopts.hlp if exist wmhlp2.a bpatch %2 %3 wmhlp2.a
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.a bpatch %2 %3 wpphlp2.a
rem =====================================================
echo Patching %1\binp\help\wvidopts.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wvidopts.hlp if exist wvhlp2.a bpatch %2 %3 wvhlp2.a
rem =====================================================
echo Patching %1\binp\help\wccopts.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wccopts.hlp if exist wccoptst.a bpatch %2 %3 wccoptst.a
rem =====================================================
echo Patching %1\binp\help\wfcopts.hlp
set path=%1\binp\help;%1\binb
if exist %1\binp\help\wfcopts.hlp if exist wfcoptst.a bpatch %2 %3 wfcoptst.a
rem =====================================================
echo Patching %1\binw\netservw.exe
set path=%1\binw;%1\binb
if exist %1\binw\netservw.exe if exist netservw.a bpatch %2 %3 netservw.a
rem =====================================================
echo Patching %1\binw\parservw.exe
set path=%1\binw;%1\binb
if exist %1\binw\parservw.exe if exist parservw.a bpatch %2 %3 parservw.a
rem =====================================================
echo Creating %1\binw\vdmservw.exe
if exist %1\binw\NUL if exist vdmservw.a copy vdmservw.a %1\binw\vdmservw.exe
rem =====================================================
echo Patching %1\binw\drwatcom.exe
set path=%1\binw;%1\binb
if exist %1\binw\drwatcom.exe if exist drwatw.a bpatch %2 %3 drwatw.a
rem =====================================================
echo Patching %1\binw\wheapwlk.exe
set path=%1\binw;%1\binb
if exist %1\binw\wheapwlk.exe if exist whw.a bpatch %2 %3 whw.a
rem =====================================================
echo Patching %1\binw\std.dll
set path=%1\binw;%1\binb
if exist %1\binw\std.dll if exist stdw.a bpatch %2 %3 stdw.a
rem =====================================================
echo Patching %1\binw\win386.ext
set path=%1\binw;%1\binb
if exist %1\binw\win386.ext if exist win386.a bpatch %2 %3 win386.a
rem =====================================================
echo Patching %1\binw\w386dll.ext
set path=%1\binw;%1\binb
if exist %1\binw\w386dll.ext if exist w386dll.a bpatch %2 %3 w386dll.a
rem =====================================================
echo Patching %1\binw\wvideo.exe
set path=%1\binw;%1\binb
if exist %1\binw\wvideo.exe if exist wvideow.a bpatch %2 %3 wvideow.a
rem =====================================================
echo Patching %1\binw\wspy.exe
set path=%1\binw;%1\binb
if exist %1\binw\wspy.exe if exist wspyw.a bpatch %2 %3 wspyw.a
rem =====================================================
echo Patching %1\h\assert.h
set path=%1\h;%1\binb
if exist %1\h\assert.h if exist asserth.a bpatch %2 %3 asserth.a
rem =====================================================
echo Patching %1\h\bios.h
set path=%1\h;%1\binb
if exist %1\h\bios.h if exist biosh.a bpatch %2 %3 biosh.a
rem =====================================================
echo Patching %1\h\direct.h
set path=%1\h;%1\binb
if exist %1\h\direct.h if exist directh.a bpatch %2 %3 directh.a
rem =====================================================
echo Patching %1\h\dos.h
set path=%1\h;%1\binb
if exist %1\h\dos.h if exist dosh.a bpatch %2 %3 dosh.a
rem =====================================================
echo Patching %1\h\env.h
set path=%1\h;%1\binb
if exist %1\h\env.h if exist envh.a bpatch %2 %3 envh.a
rem =====================================================
echo Patching %1\h\errno.h
set path=%1\h;%1\binb
if exist %1\h\errno.h if exist errnoh.a bpatch %2 %3 errnoh.a
rem =====================================================
echo Patching %1\h\fcntl.h
set path=%1\h;%1\binb
if exist %1\h\fcntl.h if exist fcntlh.a bpatch %2 %3 fcntlh.a
rem =====================================================
echo Patching %1\h\float.h
set path=%1\h;%1\binb
if exist %1\h\float.h if exist floath.a bpatch %2 %3 floath.a
rem =====================================================
echo Patching %1\h\i86.h
set path=%1\h;%1\binb
if exist %1\h\i86.h if exist i86h.a bpatch %2 %3 i86h.a
rem =====================================================
echo Patching %1\h\io.h
set path=%1\h;%1\binb
if exist %1\h\io.h if exist ioh.a bpatch %2 %3 ioh.a
rem =====================================================
echo Patching %1\h\iomanip.h
set path=%1\h;%1\binb
if exist %1\h\iomanip.h if exist iomaniph.a bpatch %2 %3 iomaniph.a
rem =====================================================
echo Patching %1\h\iostream.h
set path=%1\h;%1\binb
if exist %1\h\iostream.h if exist iostrmh.a bpatch %2 %3 iostrmh.a
rem =====================================================
echo Patching %1\h\limits.h
set path=%1\h;%1\binb
if exist %1\h\limits.h if exist limitsh.a bpatch %2 %3 limitsh.a
rem =====================================================
echo Patching %1\h\malloc.h
set path=%1\h;%1\binb
if exist %1\h\malloc.h if exist malloch.a bpatch %2 %3 malloch.a
rem =====================================================
echo Patching %1\h\math.h
set path=%1\h;%1\binb
if exist %1\h\math.h if exist mathh.a bpatch %2 %3 mathh.a
rem =====================================================
echo Creating %1\h\mem.h
if exist %1\h\NUL if exist memh.a copy memh.a %1\h\mem.h
rem =====================================================
echo Patching %1\h\process.h
set path=%1\h;%1\binb
if exist %1\h\process.h if exist processh.a bpatch %2 %3 processh.a
rem =====================================================
echo Patching %1\h\search.h
set path=%1\h;%1\binb
if exist %1\h\search.h if exist searchh.a bpatch %2 %3 searchh.a
rem =====================================================
echo Patching %1\h\setjmp.h
set path=%1\h;%1\binb
if exist %1\h\setjmp.h if exist setjmph.a bpatch %2 %3 setjmph.a
rem =====================================================
echo Patching %1\h\signal.h
set path=%1\h;%1\binb
if exist %1\h\signal.h if exist signalh.a bpatch %2 %3 signalh.a
rem =====================================================
echo Patching %1\h\stddef.h
set path=%1\h;%1\binb
if exist %1\h\stddef.h if exist stddefh.a bpatch %2 %3 stddefh.a
rem =====================================================
echo Patching %1\h\stdio.h
set path=%1\h;%1\binb
if exist %1\h\stdio.h if exist stdioh.a bpatch %2 %3 stdioh.a
rem =====================================================
echo Patching %1\h\streambu.h
set path=%1\h;%1\binb
if exist %1\h\streambu.h if exist strbh.a bpatch %2 %3 strbh.a
rem =====================================================
echo Patching %1\h\stdlib.h
set path=%1\h;%1\binb
if exist %1\h\stdlib.h if exist stdlibh.a bpatch %2 %3 stdlibh.a
rem =====================================================
echo Patching %1\h\string.h
set path=%1\h;%1\binb
if exist %1\h\string.h if exist stringh.a bpatch %2 %3 stringh.a
rem =====================================================
echo Patching %1\h\jstring.h
set path=%1\h;%1\binb
if exist %1\h\jstring.h if exist jstringh.a bpatch %2 %3 jstringh.a
rem =====================================================
echo Patching %1\h\time.h
set path=%1\h;%1\binb
if exist %1\h\time.h if exist timeh.a bpatch %2 %3 timeh.a
rem =====================================================
echo Patching %1\h\jtime.h
set path=%1\h;%1\binb
if exist %1\h\jtime.h if exist jtimeh.a bpatch %2 %3 jtimeh.a
rem =====================================================
echo Patching %1\h\wclibase.h
set path=%1\h;%1\binb
if exist %1\h\wclibase.h if exist wclibash.a bpatch %2 %3 wclibash.a
rem =====================================================
echo Patching %1\h\nt\windows.h
set path=%1\h\nt;%1\binb
if exist %1\h\nt\windows.h if exist winnth.a bpatch %2 %3 winnth.a
rem =====================================================
echo Patching %1\h\sys\locking.h
set path=%1\h\sys;%1\binb
if exist %1\h\sys\locking.h if exist lockingh.a bpatch %2 %3 lockingh.a
rem =====================================================
echo Patching %1\h\sys\stat.h
set path=%1\h\sys;%1\binb
if exist %1\h\sys\stat.h if exist stath.a bpatch %2 %3 stath.a
rem =====================================================
echo Patching %1\h\sys\timeb.h
set path=%1\h\sys;%1\binb
if exist %1\h\sys\timeb.h if exist timebh.a bpatch %2 %3 timebh.a
rem =====================================================
echo Patching %1\h\sys\utime.h
set path=%1\h\sys;%1\binb
if exist %1\h\sys\utime.h if exist utimeh.a bpatch %2 %3 utimeh.a
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.a bpatch %2 %3 _w386h.a
rem =====================================================
echo Patching %1\lib286\math87c.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87c.lib if exist 2m87cl.a wlib %1\lib286\math87c.lib -+2m87cl.a
rem =====================================================
echo Patching %1\lib286\math87h.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87h.lib if exist 2m87hl.a wlib %1\lib286\math87h.lib -+2m87hl.a
rem =====================================================
echo Patching %1\lib286\math87l.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87l.lib if exist 2m87ll.a wlib %1\lib286\math87l.lib -+2m87ll.a
rem =====================================================
echo Patching %1\lib286\math87m.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87m.lib if exist 2m87ml.a wlib %1\lib286\math87m.lib -+2m87ml.a
rem =====================================================
echo Patching %1\lib286\math87s.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\math87s.lib if exist 2m87sl.a wlib %1\lib286\math87s.lib -+2m87sl.a
rem =====================================================
echo Patching %1\lib286\mathc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathc.lib if exist 2mcl.a wlib %1\lib286\mathc.lib -+2mcl.a
rem =====================================================
echo Patching %1\lib286\mathh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathh.lib if exist 2mhl.a wlib %1\lib286\mathh.lib -+2mhl.a
rem =====================================================
echo Patching %1\lib286\mathl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathl.lib if exist 2mll.a wlib %1\lib286\mathl.lib -+2mll.a
rem =====================================================
echo Patching %1\lib286\mathm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\mathm.lib if exist 2mml.a wlib %1\lib286\mathm.lib -+2mml.a
rem =====================================================
echo Patching %1\lib286\maths.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\maths.lib if exist 2msl.a wlib %1\lib286\maths.lib -+2msl.a
rem =====================================================
echo Patching %1\lib286\plbxc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxc.lib if exist 2pxcl.a bpatch %2 %3 2pxcl.a
rem =====================================================
echo Patching %1\lib286\plbxh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxh.lib if exist 2pxhl.a bpatch %2 %3 2pxhl.a
rem =====================================================
echo Patching %1\lib286\plbxl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxl.lib if exist 2pxll.a bpatch %2 %3 2pxll.a
rem =====================================================
echo Patching %1\lib286\plbxm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxm.lib if exist 2pxml.a bpatch %2 %3 2pxml.a
rem =====================================================
echo Patching %1\lib286\plbxs.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plbxs.lib if exist 2pxsl.a bpatch %2 %3 2pxsl.a
rem =====================================================
echo Patching %1\lib286\plibc.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibc.lib if exist 2pcl.a bpatch %2 %3 2pcl.a
rem =====================================================
echo Patching %1\lib286\plibh.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibh.lib if exist 2phl.a bpatch %2 %3 2phl.a
rem =====================================================
echo Patching %1\lib286\plibl.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibl.lib if exist 2pll.a bpatch %2 %3 2pll.a
rem =====================================================
echo Patching %1\lib286\plibm.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibm.lib if exist 2pml.a bpatch %2 %3 2pml.a
rem =====================================================
echo Patching %1\lib286\plibs.lib
set path=%1\lib286;%1\binb
if exist %1\lib286\plibs.lib if exist 2psl.a bpatch %2 %3 2psl.a
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.a wlib %1\lib286\dos\clibc.lib -+2ccdl.a
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.a wlib %1\lib286\dos\clibh.lib -+2chdl.a
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.a wlib %1\lib286\dos\clibl.lib -+2cldl.a
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.a wlib %1\lib286\dos\clibm.lib -+2cmdl.a
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.a wlib %1\lib286\dos\clibs.lib -+2csdl.a
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.a wlib %1\lib286\dos\flib7l.lib -+2f7ldl.a
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.a wlib %1\lib286\dos\flib7m.lib -+2f7mdl.a
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.a wlib %1\lib286\dos\flibl.lib -+2fldl.a
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.a wlib %1\lib286\dos\flibm.lib -+2fmdl.a
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.a bpatch %2 %3 2grdl.a
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.a wlib %1\lib286\os2\clibc.lib -+2cc2l.a
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.a wlib %1\lib286\os2\clibdll.lib -+2cdll2l.a
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.a wlib %1\lib286\os2\clibh.lib -+2ch2l.a
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.a wlib %1\lib286\os2\clibl.lib -+2cl2l.a
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.a wlib %1\lib286\os2\clibm.lib -+2cm2l.a
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.a wlib %1\lib286\os2\clibmtl.lib -+2cmt2l.a
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.a wlib %1\lib286\os2\clibs.lib -+2cs2l.a
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.a wlib %1\lib286\os2\flib7l.lib -+2f7l2l.a
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.a wlib %1\lib286\os2\flib7m.lib -+2f6m2l.a
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.a wlib %1\lib286\os2\flibl.lib -+2fl2l.a
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.a wlib %1\lib286\os2\flibm.lib -+2fm2l.a
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.a bpatch %2 %3 2pxmt2l.a
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.a bpatch %2 %3 2pmt2l.a
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.a wlib %1\lib286\win\clibc.lib -+2ccwl.a
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.a wlib %1\lib286\win\clibl.lib -+2clwl.a
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.a wlib %1\lib286\win\clibm.lib -+2cmwl.a
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.a wlib %1\lib286\win\clibs.lib -+2cswl.a
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.a wlib %1\lib286\win\flib7l.lib -+2f7lwl.a
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.a wlib %1\lib286\win\flib7m.lib -+2f7mwl.a
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.a wlib %1\lib286\win\flibl.lib -+2flwl.a
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.a wlib %1\lib286\win\flibm.lib -+2fmwl.a
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.a bpatch %2 %3 2pxcwl.a
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.a bpatch %2 %3 2pxlwl.a
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.a bpatch %2 %3 2pxmwl.a
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.a bpatch %2 %3 2pxswl.a
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.a bpatch %2 %3 2pcwl.a
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.a bpatch %2 %3 2plwl.a
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.a bpatch %2 %3 2pmwl.a
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.a bpatch %2 %3 2pswl.a
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.a wlib %1\lib286\win\math87c.lib -+2m7cwl.a
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.a wlib %1\lib286\win\math87l.lib -+2m7lwl.a
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.a wlib %1\lib286\win\mathc.lib -+2mcwl.a
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.a wlib %1\lib286\win\mathl.lib -+2mlwl.a
rem =====================================================
echo Patching %1\lib386\math387r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math387r.lib if exist 3m87rl.a wlib %1\lib386\math387r.lib -+3m87rl.a
rem =====================================================
echo Patching %1\lib386\math387s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math387s.lib if exist 3m87sl.a wlib %1\lib386\math387s.lib -+3m87sl.a
rem =====================================================
echo Patching %1\lib386\math3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math3r.lib if exist 3mrl.a wlib %1\lib386\math3r.lib -+3mrl.a
rem =====================================================
echo Patching %1\lib386\math3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\math3s.lib if exist 3msl.a wlib %1\lib386\math3s.lib -+3msl.a
rem =====================================================
echo Patching %1\lib386\plbx3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbx3r.lib if exist 3pxrl.a bpatch %2 %3 3pxrl.a
rem =====================================================
echo Patching %1\lib386\plbx3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbx3s.lib if exist 3pxsl.a bpatch %2 %3 3pxsl.a
rem =====================================================
echo Patching %1\lib386\plbxmt3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbxmt3r.lib if exist 3pxmtrl.a bpatch %2 %3 3pxmtrl.a
rem =====================================================
echo Patching %1\lib386\plbxmt3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plbxmt3s.lib if exist 3pxmtsl.a bpatch %2 %3 3pxmtsl.a
rem =====================================================
echo Patching %1\lib386\plib3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plib3r.lib if exist 3prl.a bpatch %2 %3 3prl.a
rem =====================================================
echo Patching %1\lib386\plib3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plib3s.lib if exist 3psl.a bpatch %2 %3 3psl.a
rem =====================================================
echo Patching %1\lib386\plibmt3r.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plibmt3r.lib if exist 3pmtrl.a bpatch %2 %3 3pmtrl.a
rem =====================================================
echo Patching %1\lib386\plibmt3s.lib
set path=%1\lib386;%1\binb
if exist %1\lib386\plibmt3s.lib if exist 3pmtsl.a bpatch %2 %3 3pmtsl.a
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.a wlib %1\lib386\dos\clib3r.lib -+3crdl.a
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.a wlib %1\lib386\dos\clib3s.lib -+3csdl.a
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.a wlib %1\lib386\dos\flib.lib -+3frdl.a
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.a wlib %1\lib386\dos\flib7.lib -+3fr7dl.a
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.a wlib %1\lib386\dos\flib7s.lib -+3fs7dl.a
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.a wlib %1\lib386\dos\flibs.lib -+3fsdl.a
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.a bpatch %2 %3 3grdl.a
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.a wlib %1\lib386\os2\clib3r.lib -+3cr2l.a
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.a wlib %1\lib386\os2\clib3s.lib -+3cs2l.a
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.a wlib %1\lib386\os2\flib.lib -+3fr2l.a
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.a wlib %1\lib386\os2\flib7.lib -+3fr72l.a
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.a wlib %1\lib386\os2\flib7s.lib -+3fs72l.a
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.a wlib %1\lib386\os2\flibs.lib -+3fs2l.a
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.a wlib %1\lib386\win\clib3r.lib -+3crwl.a
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.a wlib %1\lib386\win\clib3s.lib -+3cswl.a
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.a wlib %1\lib386\win\flib.lib -+3frwl.a
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.a wlib %1\lib386\win\flib7.lib -+3fr7wl.a
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.a wlib %1\lib386\win\flib7s.lib -+3fs7wl.a
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.a wlib %1\lib386\win\flibs.lib -+3fswl.a
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.a wlib %1\lib386\netware\clib3s.lib -clearenv.obj 
if exist %1\lib386\netware\clib3s.lib if exist 3csnwl.a wlib -b %1\lib386\netware\clib3s.lib -getenv.obj 
if exist %1\lib386\netware\clib3s.lib if exist 3csnwl.a wlib -b %1\lib386\netware\clib3s.lib -putenv.obj
if exist %1\lib386\netware\clib3s.lib if exist 3csnwl.a wlib -b %1\lib386\netware\clib3s.lib -setenv.obj
if exist %1\lib386\netware\clib3s.lib if exist 3csnwl.a wlib -b %1\lib386\netware\clib3s.lib -+3csnwl.a
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.a wlib %1\lib386\netware\flib7s.lib -+3fs7nwl.a
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.a wlib %1\lib386\netware\flibs.lib -+3fsnwl.a
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.a wlib %1\lib386\nt\clib3r.lib -+3crntl.a
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.a wlib %1\lib386\nt\clib3s.lib -+3csntl.a
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.a wlib %1\lib386\nt\flib.lib -+3frntl.a
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.a wlib %1\lib386\nt\flib7.lib -+3fr7ntl.a
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.a wlib %1\lib386\nt\flibs.lib -+3fsntl.a
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.a wlib %1\lib386\nt\flib7s.lib -+3fs7ntl.a
rem =====================================================
echo Patching %1\lib386\nt\nt.lib
set path=%1\lib386\nt;%1\binb
if exist %1\lib386\nt\nt.lib if exist 3ntl.a bpatch %2 %3 3ntl.a
rem =====================================================
echo Patching %1\nlm\novserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\novserv3.nlm if exist novsrvn3.a bpatch %2 %3 novsrvn3.a
rem =====================================================
echo Patching %1\nlm\parserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\parserv3.nlm if exist parsrvn3.a bpatch %2 %3 parsrvn3.a
rem =====================================================
echo Patching %1\nlm\serserv3.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\serserv3.nlm if exist sersrvn3.a bpatch %2 %3 sersrvn3.a
rem =====================================================
echo Patching %1\nlm\novserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\novserv4.nlm if exist novsrvn4.a bpatch %2 %3 novsrvn4.a
rem =====================================================
echo Patching %1\nlm\parserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\parserv4.nlm if exist parsrvn4.a bpatch %2 %3 parsrvn4.a
rem =====================================================
echo Patching %1\nlm\serserv4.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\serserv4.nlm if exist sersrvn4.a bpatch %2 %3 sersrvn4.a
rem =====================================================
echo Patching %1\nlm\wsample.nlm
set path=%1\nlm;%1\binb
if exist %1\nlm\wsample.nlm if exist wsamplen.a bpatch %2 %3 wsamplen.a
rem =====================================================
echo Patching %1\pen\install.bat
set path=%1\pen;%1\binb
if exist %1\pen\install.bat if exist instp.a bpatch %2 %3 instp.a
rem =====================================================
echo Patching %1\pen\wparserv.dll
set path=%1\pen;%1\binb
if exist %1\pen\wparserv.dll if exist parservp.a bpatch %2 %3 parservp.a
rem =====================================================
echo Creating %1\pen\wparsrv2.dll
if exist %1\pen\NUL if exist parsrv2p.a copy parsrv2p.a %1\pen\wparsrv2.dll
rem =====================================================
echo Patching %1\src\hello.cpp
set path=%1\src;%1\binb
if exist %1\src\hello.cpp if exist hellocpp.a bpatch %2 %3 hellocpp.a
rem =====================================================
echo Patching %1\src\pgdemo.c
set path=%1\src;%1\binb
if exist %1\src\pgdemo.c if exist pgdemoc.a bpatch %2 %3 pgdemoc.a
rem =====================================================
echo Patching %1\src\dll\dll16.c
set path=%1\src\dll;%1\binb
if exist %1\src\dll\dll16.c if exist dll16c.a bpatch %2 %3 dll16c.a
rem =====================================================
echo Patching %1\src\dll\dll16.lnk
set path=%1\src\dll;%1\binb
if exist %1\src\dll\dll16.lnk if exist dll16l.a bpatch %2 %3 dll16l.a
rem =====================================================
echo Patching %1\src\dll\dll32.c
set path=%1\src\dll;%1\binb
if exist %1\src\dll\dll32.c if exist dll32c.a bpatch %2 %3 dll32c.a
rem =====================================================
echo Creating %1\src\dll\makefile
if exist %1\src\dll\NUL if exist dllmk.a copy dllmk.a %1\src\dll\makefile
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.a bpatch %2 %3 g16c.a
rem =====================================================
echo Patching %1\src\dll\gen32.c
set path=%1\src\dll;%1\binb
if exist %1\src\dll\gen32.c if exist g32c.a bpatch %2 %3 g32c.a
rem =====================================================
echo Patching %1\src\fortran\blackjac.for
set path=%1\src\fortran;%1\binb
if exist %1\src\fortran\blackjac.for if exist bjf.a bpatch %2 %3 bjf.a
rem =====================================================
echo Patching %1\src\fortran\knight.for
set path=%1\src\fortran;%1\binb
if exist %1\src\fortran\knight.for if exist knf.a bpatch %2 %3 knf.a
rem =====================================================
echo Patching %1\src\fortran\dos\pgdemo.for
set path=%1\src\fortran\dos;%1\binb
if exist %1\src\fortran\dos\pgdemo.for if exist pgdemf.a bpatch %2 %3 pgdemf.a
rem =====================================================
echo Patching %1\src\fortran\win\win3api.fi
if exist %1\src\fortran\win\win3api.fi if exist win3apif.a copy win3apif.a %1\src\fortran\win\win3api.fi
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.a bpatch %2 %3 wst3ra.a
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.a bpatch %2 %3 wst3sa.a
rem =====================================================
echo Patching %1\src\startup\dos\cmain.c
set path=%1\src\startup\dos;%1\binb
if exist %1\src\startup\dos\cmain.c if exist cmainc.a bpatch %2 %3 cmainc.a
rem =====================================================
echo Patching %1\src\startup\os2\cstart.asm
set path=%1\src\startup\os2;%1\binb
if exist %1\src\startup\os2\cstart.asm if exist cst2a.a bpatch %2 %3 cst2a.a
rem =====================================================
echo Creating %1\src\clibexam\clock_.c
if exist %1\src\clibexam\NUL if exist cl040.a copy cl040.a %1\src\clibexam\clock_.c
rem =====================================================
echo Patching %1\src\goodies\fscreen.for
set path=%1\src\goodies;%1\binb
if exist %1\src\goodies\fscreen.for if exist gd33.a bpatch %2 %3 gd33.a
rem =====================================================
echo Patching %1\novh\advanced.h
set path=%1\novh;%1\binb
if exist %1\novh\advanced.h if exist nh004.a bpatch %2 %3 nh004.a
rem =====================================================
echo Patching %1\novh\debugapi.h
set path=%1\novh;%1\binb
if exist %1\novh\debugapi.h if exist nh011.a bpatch %2 %3 nh011.a
rem =====================================================
echo Patching %1\novh\fshooks.h
set path=%1\novh;%1\binb
if exist %1\novh\fshooks.h if exist nh021.a bpatch %2 %3 nh021.a
rem =====================================================
echo Patching %1\novh\math.h
set path=%1\novh;%1\binb
if exist %1\novh\math.h if exist nh027.a bpatch %2 %3 nh027.a
rem =====================================================
echo Patching %1\novh\nwdstype.h
set path=%1\novh;%1\binb
if exist %1\novh\nwdstype.h if exist nh059.a bpatch %2 %3 nh059.a
rem =====================================================
echo Patching %1\novh\nwsnut.h
set path=%1\novh;%1\binb
if exist %1\novh\nwsnut.h if exist nh071.a bpatch %2 %3 nh071.a
rem =====================================================
echo Patching %1\novh\ositli.h
set path=%1\novh;%1\binb
if exist %1\novh\ositli.h if exist nh076.a bpatch %2 %3 nh076.a
rem =====================================================
echo Patching %1\novh\setjmp.h
set path=%1\novh;%1\binb
if exist %1\novh\setjmp.h if exist nh083.a bpatch %2 %3 nh083.a
rem =====================================================
echo Patching %1\novh\stdio.h
set path=%1\novh;%1\binb
if exist %1\novh\stdio.h if exist nh088.a bpatch %2 %3 nh088.a
rem =====================================================
echo Patching %1\novh\stream.h
set path=%1\novh;%1\binb
if exist %1\novh\stream.h if exist nh090.a bpatch %2 %3 nh090.a
rem =====================================================
echo Patching %1\novh\user.h
set path=%1\novh;%1\binb
if exist %1\novh\user.h if exist nh101.a bpatch %2 %3 nh101.a
rem =====================================================
echo Creating %1\novh\zip.h
if exist %1\novh\NUL if exist nh102.a copy nh102.a %1\novh\zip.h
rem =====================================================
echo Creating %1\novh\pap.h
if exist %1\novh\NUL if exist nh103.a copy nh103.a %1\novh\pap.h
rem =====================================================
echo Creating %1\novh\nbp.h
if exist %1\novh\NUL if exist nh104.a copy nh104.a %1\novh\nbp.h
rem =====================================================
echo Creating %1\novh\ddp.h
if exist %1\novh\NUL if exist nh105.a copy nh105.a %1\novh\ddp.h
rem =====================================================
echo Creating %1\novh\atp.h
if exist %1\novh\NUL if exist nh106.a copy nh106.a %1\novh\atp.h
rem =====================================================
echo Creating %1\novh\asp.h
if exist %1\novh\NUL if exist nh107.a copy nh107.a %1\novh\asp.h
rem =====================================================
echo Creating %1\novh\appletlk.h
if exist %1\novh\NUL if exist nh108.a copy nh108.a %1\novh\appletlk.h
rem =====================================================
echo Creating %1\novh\adsp.h
if exist %1\novh\NUL if exist nh109.a copy nh109.a %1\novh\adsp.h
rem =====================================================
echo Patching %1\novh\netinet\in.h
set path=%1\novh\netinet;%1\binb
if exist %1\novh\netinet\in.h if exist nh111.a bpatch %2 %3 nh111.a
rem =====================================================
echo Patching %1\novh\sys\bsdskt.h
set path=%1\novh\sys;%1\binb
if exist %1\novh\sys\bsdskt.h if exist nh112.a bpatch %2 %3 nh112.a
rem =====================================================
echo Patching %1\novh\sys\lihdr.h
set path=%1\novh\sys;%1\binb
if exist %1\novh\sys\lihdr.h if exist nh118.a bpatch %2 %3 nh118.a
rem =====================================================
echo Patching %1\novh\sys\socket.h
set path=%1\novh\sys;%1\binb
if exist %1\novh\sys\socket.h if exist nh125.a bpatch %2 %3 nh125.a
rem =====================================================
echo Creating %1\novi\appletlk.imp
if exist %1\novi\NUL if exist ni01.a copy ni01.a %1\novi\appletlk.imp
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
