From 21a0040650e8f61e137c1d5df8bd545f59f18cc9 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 10 Oct 2017 14:21:31 +0000 Subject: [PATCH] Move definition of LocalFile to header file, requested by bruenor41, makes sense to make it available at a larger scope. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4058 --- include/dos_system.h | 17 +++++++++++++++++ src/dos/drive_local.cpp | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/dos_system.h b/include/dos_system.h index 152fee3f..b8133960 100644 --- a/include/dos_system.h +++ b/include/dos_system.h @@ -117,6 +117,23 @@ private: Bitu devnum; }; +class localFile : public DOS_File { +public: + localFile(const char* name, FILE * handle); + bool Read(Bit8u * data,Bit16u * size); + bool Write(Bit8u * data,Bit16u * size); + bool Seek(Bit32u * pos,Bit32u type); + bool Close(); + Bit16u GetInformation(void); + bool UpdateDateTimeFromHost(void); + void FlagReadOnlyMedium(void); + void Flush(void); +private: + FILE * fhandle; + bool read_only_medium; + enum { NONE,READ,WRITE } last_action; +}; + /* The following variable can be lowered to free up some memory. * The negative side effect: The stored searches will be turned over faster. * Should not have impact on systems with few directory entries. */ diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 396cc098..562ebee4 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -30,23 +30,6 @@ #include "cross.h" #include "inout.h" -class localFile : public DOS_File { -public: - localFile(const char* name, FILE * handle); - bool Read(Bit8u * data,Bit16u * size); - bool Write(Bit8u * data,Bit16u * size); - bool Seek(Bit32u * pos,Bit32u type); - bool Close(); - Bit16u GetInformation(void); - bool UpdateDateTimeFromHost(void); - void FlagReadOnlyMedium(void); - void Flush(void); -private: - FILE * fhandle; - bool read_only_medium; - enum { NONE,READ,WRITE } last_action; -}; - bool localDrive::FileCreate(DOS_File * * file,char * name,Bit16u /*attributes*/) { //TODO Maybe care for attributes but not likely