mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Report "<stdin>" or "<stdout>" when using "-" as a filename placeholder (#1297)
Also fix a memory leak with `targetFileNames`
This commit is contained in:
@@ -64,18 +64,4 @@ void error(struct FileStackNode const *where, uint32_t lineNo,
|
||||
[[noreturn]] void fatal(struct FileStackNode const *where, uint32_t lineNo,
|
||||
char const *fmt, ...) format_(printf, 3, 4);
|
||||
|
||||
/*
|
||||
* Opens a file if specified, and aborts on error.
|
||||
* @param fileName The name of the file to open; if NULL, no file will be opened
|
||||
* @param mode The mode to open the file with
|
||||
* @return A pointer to a valid FILE structure, or NULL if fileName was NULL
|
||||
*/
|
||||
FILE *openFile(char const *fileName, char const *mode);
|
||||
|
||||
#define closeFile(file) do { \
|
||||
FILE *tmp = file; \
|
||||
if (tmp) \
|
||||
fclose(tmp); \
|
||||
} while (0)
|
||||
|
||||
#endif // RGBDS_LINK_MAIN_H
|
||||
|
||||
Reference in New Issue
Block a user