diff options
author | Javier <dev.git@javispedro.com> | 2022-04-13 02:47:39 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-13 02:47:39 +0200 |
commit | a77ce98811ba6040dafec8f75b5387ae5b2813aa (patch) | |
tree | 035b7046d3543cc14c6be2dc67ba136ac09ea572 | |
parent | 8424f752f8f679cd5f5f9a2715d54a41f8885b0a (diff) | |
download | vbados-a77ce98811ba6040dafec8f75b5387ae5b2813aa.tar.gz vbados-a77ce98811ba6040dafec8f75b5387ae5b2813aa.zip |
fix sft leak
-rw-r--r-- | int21dos.h | 7 | ||||
-rw-r--r-- | makefile | 18 | ||||
-rw-r--r-- | sftsr.c | 2 |
3 files changed, 18 insertions, 9 deletions
@@ -298,6 +298,13 @@ static inline DOSLOL __far * dos_get_list_of_lists(void); __value [es bx] \ __modify [ax] +static inline uint16_t dos_sft_decref(DOSSFT __far *sft); +#pragma aux dos_sft_decref = \ + "mov ax, 0x1208" \ + "int 0x2F" \ + __parm [es di] \ + __value [ax] + // Network redirector interface enum DOS_REDIR_SUBFUNCTION { @@ -29,33 +29,33 @@ all: vbmouse.exe vbmouse.drv vbsf.exe .SYMBOLIC # DOS mouse driver vbmouse.exe: vbmouse.lnk $(mousedosobjs) - wlink @$[@ name $@ file { $(mousedosobjs) } + *wlink @$[@ name $@ file { $(mousedosobjs) } mousetsr.obj: mousetsr.c .AUTODEPEND - wcc -fo=$^@ $(doscflags) $(dostsrcflags) $[@ + *wcc -fo=$^@ $(doscflags) $(dostsrcflags) $[@ mousmain.obj: mousmain.c .AUTODEPEND - wcc -fo=$^@ $(doscflags) $[@ + *wcc -fo=$^@ $(doscflags) $[@ vbox.obj: vbox.c .AUTODEPEND - wcc -fo=$^@ $(doscflags) $[@ + *wcc -fo=$^@ $(doscflags) $[@ # Windows 3.x mouse driver vbmouse.drv: mousew16.lnk $(mousew16objs) - wlink @$[@ name $@ file { $(mousew16objs) } + *wlink @$[@ name $@ file { $(mousew16objs) } mousew16.obj: mousew16.c .AUTODEPEND - wcc -fo=$^@ $(w16cflags) $[@ + *wcc -fo=$^@ $(w16cflags) $[@ # DOS shared folders vbsf.exe: vbsf.lnk $(sfdosobjs) - wlink @$[@ name $@ file { $(sfdosobjs) } + *wlink @$[@ name $@ file { $(sfdosobjs) } sfmain.obj: sfmain.c .AUTODEPEND - wcc -fo=$^@ $(doscflags) $[@ + *wcc -fo=$^@ $(doscflags) $[@ sftsr.obj: sftsr.c .AUTODEPEND - wcc -fo=$^@ $(doscflags) $(dostsrcflags) $[@ + *wcc -fo=$^@ $(doscflags) $(dostsrcflags) $[@ clean: .SYMBOLIC rm -f vbmouse.exe vbmouse.drv vbsf.exe vbmouse.flp *.obj *.map @@ -464,6 +464,8 @@ static void handle_close(union INTPACK __far *r) return; } + dos_sft_decref(sft); + data.files[openfile].root = SHFL_ROOT_NIL; data.files[openfile].handle = SHFL_HANDLE_NIL; |