From e6509a06a6f1dbbe5e21b1fc633af9de09ebf118 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 25 Mar 2005 09:09:22 +0000 Subject: [PATCH] added code to remove a virtual file Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2150 --- src/dos/drive_virtual.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/dos/drive_virtual.cpp b/src/dos/drive_virtual.cpp index a0c4440e..43a507ed 100644 --- a/src/dos/drive_virtual.cpp +++ b/src/dos/drive_virtual.cpp @@ -49,6 +49,19 @@ void VFILE_Register(const char * name,Bit8u * data,Bit32u size) { first_file=new_file; } +void VFILE_Remove(const char *name) { + VFILE_Block * chan=first_file; + VFILE_Block * * where=&first_file; + while (chan) { + if (strcmp(name,chan->name)==0) { + *where=chan->next; + delete chan; + return; + } + where=&chan->next; + chan=chan->next; + } +} class Virtual_File : public DOS_File { public: