Avoid closing stdin/stdout/stderr standard streams

This commit is contained in:
Rangi
2026-07-13 13:02:46 -04:00
parent 8ab6190f96
commit e9fa1e4e94
11 changed files with 42 additions and 22 deletions
+5
View File
@@ -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);