summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/z80bin.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-08-22 09:06:15 +1000
committer GitHub <noreply@github.com>2021-08-22 09:06:15 +1000
commite8bbea1fc6e94e14768509d322f6c624403ffb36 (patch)
tree74dd1606a900d83de8aecff17a6737af4113308d /src/mame/machine/z80bin.cpp
parente319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff)
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/mame/machine/z80bin.cpp')
-rw-r--r--src/mame/machine/z80bin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/machine/z80bin.cpp b/src/mame/machine/z80bin.cpp
index ba24d545d1f..c14cf196819 100644
--- a/src/mame/machine/z80bin.cpp
+++ b/src/mame/machine/z80bin.cpp
@@ -23,7 +23,7 @@ image_init_result z80bin_load_file(device_image_interface &image, address_space
{
if (ch == EOF)
{
- image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file name");
+ image.seterror(image_error::INVALIDIMAGE, "Unexpected EOF while getting file name");
image.message(" Unexpected EOF while getting file name");
return image_init_result::FAIL;
}
@@ -32,7 +32,7 @@ image_init_result z80bin_load_file(device_image_interface &image, address_space
{
if (i >= (std::size(pgmname) - 1))
{
- image.seterror(IMAGE_ERROR_INVALIDIMAGE, "File name too long");
+ image.seterror(image_error::INVALIDIMAGE, "File name too long");
image.message(" File name too long");
return image_init_result::FAIL;
}
@@ -46,7 +46,7 @@ image_init_result z80bin_load_file(device_image_interface &image, address_space
if (image.fread(args, sizeof(args)) != sizeof(args))
{
- image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file size");
+ image.seterror(image_error::INVALIDIMAGE, "Unexpected EOF while getting file size");
image.message(" Unexpected EOF while getting file size");
return image_init_result::FAIL;
}
@@ -66,7 +66,7 @@ image_init_result z80bin_load_file(device_image_interface &image, address_space
if (image.fread(&data, 1) != 1)
{
snprintf(message, std::size(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j);
- image.seterror(IMAGE_ERROR_INVALIDIMAGE, message);
+ image.seterror(image_error::INVALIDIMAGE, message);
image.message("%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j);
return image_init_result::FAIL;
}