mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-21 22:34:32 +00:00
Avoid closing stdin/stdout/stderr standard streams
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "helpers.hpp" // assume
|
||||
#include "util.hpp" // xfclose
|
||||
|
||||
enum MissingInclude {
|
||||
INC_ERROR, // A missing included file is an error that halts assembly
|
||||
@@ -32,7 +33,7 @@ struct Options {
|
||||
|
||||
~Options() {
|
||||
if (dependFile) {
|
||||
fclose(dependFile);
|
||||
xfclose(dependFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <optional>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -21,6 +22,10 @@ enum NumberBase {
|
||||
BASE_16 = 16,
|
||||
};
|
||||
|
||||
// File-closing functions that will not close standard streams
|
||||
int xfclose(FILE *file);
|
||||
int xclose(int fd);
|
||||
|
||||
// Locale-independent character class functions
|
||||
bool isNewline(int c);
|
||||
bool isBlankSpace(int c);
|
||||
|
||||
Reference in New Issue
Block a user