-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with -no-lm-aux where it wouldn't generate _customsize.bin
- Loading branch information
Showing
6 changed files
with
53 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
#ifndef FILES_IO_H | ||
#define FILES_IO_H | ||
|
||
#include "structs.h" | ||
#include <cstdio> | ||
#include <cstdlib> | ||
#include <string_view> | ||
#include "structs.h" | ||
|
||
FILE *open(const char *name, const char *mode); | ||
size_t file_size(FILE *file); | ||
[[nodiscard]] unsigned char *read_all(const char *file_name, bool text_mode = false, unsigned int minimum_size = 0u); | ||
[[nodiscard]] patchfile write_all(unsigned char *data, std::string_view file_name, unsigned int size); | ||
[[nodiscard]] patchfile write_all(unsigned char* data, std::string_view dir, std::string_view file_name, | ||
FILE* open(const char* name, const char* mode); | ||
size_t file_size(FILE* file); | ||
[[nodiscard]] unsigned char* read_all(const char* file_name, bool text_mode = false, unsigned int minimum_size = 0u); | ||
[[nodiscard]] patchfile write_all(const unsigned char* data, std::string_view file_name, unsigned int size); | ||
[[nodiscard]] patchfile write_all(const unsigned char* data, std::string_view dir, std::string_view file_name, | ||
unsigned int size); | ||
|
||
template <size_t N> | ||
[[nodiscard]] patchfile write_all(const unsigned char (&data)[N], std::string_view dir, std::string_view file_name) { | ||
return write_all(data, dir, file_name, N); | ||
} | ||
template <size_t N> [[nodiscard]] patchfile write_all(const unsigned char (&data)[N], std::string_view file_name) { | ||
return write_all(data, file_name, N); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters