diff options
author | 2016-03-13 13:54:57 +1100 | |
---|---|---|
committer | 2016-03-14 18:55:00 +1100 | |
commit | 42fbb9c3967fcda37f2d9ae17d5796a79cf027b9 (patch) | |
tree | a43047ee00431e5e22bfc5f8f612ff775586e415 /src/lib/util/chd.cpp | |
parent | 5fc27747031b6ed6f6c0582502098ebfb960be67 (diff) |
Make osd_file a polymorphic class that's held with smart pointers
Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures
Make zip_file and _7z_file classes rather than having free functions everywhere
Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache
Don't dump as much crap in global namespace
Add solaris PTY implementation
Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax
Rearrange stuff so the same things are in file module for all OSDs
Move file stuff into its own module
7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access
Directory functions still need to be moved to file module
SDL OSD may not initialise WinSock on Windows
Diffstat (limited to 'src/lib/util/chd.cpp')
-rw-r--r-- | src/lib/util/chd.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp index 93a1b34ba29..3a97c6ce0fe 100644 --- a/src/lib/util/chd.cpp +++ b/src/lib/util/chd.cpp @@ -660,8 +660,8 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun // create the new file util::core_file::ptr file; - const file_error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); - if (filerr != FILERR_NONE) + const osd_file::error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); + if (filerr != osd_file::error::NONE) return CHDERR_FILE_NOT_FOUND; // create the file normally, then claim the file @@ -672,7 +672,7 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun if (chderr != CHDERR_NONE) { file.reset(); - osd_rmfile(filename); + osd_file::remove(filename); } else { @@ -705,8 +705,8 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun // create the new file util::core_file::ptr file; - const file_error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); - if (filerr != FILERR_NONE) + const osd_file::error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); + if (filerr != osd_file::error::NONE) return CHDERR_FILE_NOT_FOUND; // create the file normally, then claim the file @@ -717,7 +717,7 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun if (chderr != CHDERR_NONE) { file.reset(); - osd_rmfile(filename); + osd_file::remove(filename); } else { @@ -749,8 +749,8 @@ chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent) // open the file const UINT32 openflags = writeable ? (OPEN_FLAG_READ | OPEN_FLAG_WRITE) : OPEN_FLAG_READ; util::core_file::ptr file; - const file_error filerr = util::core_file::open(filename, openflags, file); - if (filerr != FILERR_NONE) + const osd_file::error filerr = util::core_file::open(filename, openflags, file); + if (filerr != osd_file::error::NONE) return CHDERR_FILE_NOT_FOUND; // now open the CHD |