mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use a special name for stdin/stdout in diagnostics
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
static DefaultInitVec<uint8_t> readInto(std::string path) {
|
||||
File file;
|
||||
if (!file.open(path, std::ios::in | std::ios::binary)) {
|
||||
fatal("Failed to open \"%s\": %s", path.c_str(), strerror(errno));
|
||||
fatal("Failed to open \"%s\": %s", file.c_str(path), strerror(errno));
|
||||
}
|
||||
DefaultInitVec<uint8_t> data(128 * 16); // Begin with some room pre-allocated
|
||||
|
||||
@@ -149,7 +149,7 @@ void reverse() {
|
||||
if (!options.palettes.empty()) {
|
||||
File file;
|
||||
if (!file.open(options.palettes, std::ios::in | std::ios::binary)) {
|
||||
fatal("Failed to open \"%s\": %s", options.palettes.c_str(), strerror(errno));
|
||||
fatal("Failed to open \"%s\": %s", file.c_str(options.palettes), strerror(errno));
|
||||
}
|
||||
|
||||
palettes.clear();
|
||||
@@ -236,11 +236,11 @@ void reverse() {
|
||||
options.verbosePrint(Options::VERB_LOG_ACT, "Writing image...\n");
|
||||
File pngFile;
|
||||
if (!pngFile.open(options.input, std::ios::out | std::ios::binary)) {
|
||||
fatal("Failed to create \"%s\": %s", options.input.c_str(), strerror(errno));
|
||||
fatal("Failed to create \"%s\": %s", pngFile.c_str(options.input), strerror(errno));
|
||||
}
|
||||
png_structp png = png_create_write_struct(
|
||||
PNG_LIBPNG_VER_STRING,
|
||||
const_cast<png_voidp>(static_cast<void const *>(options.input.c_str())), pngError,
|
||||
const_cast<png_voidp>(static_cast<void const *>(pngFile.c_str(options.input))), pngError,
|
||||
pngWarning);
|
||||
if (!png) {
|
||||
fatal("Couldn't create PNG write struct: %s", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user