diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:45:02 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:50:25 -0400 |
commit | 9fa0a7f1da1b70bee995f53c6c96c43189018772 (patch) | |
tree | 114548896790eaff23cdca84a025281de86bbb51 /include/libc/ansi_files.h | |
parent | 2ba3289286bbfcf9fcc13fd135d976058d8b6c2e (diff) |
global: Import Dolphin SDK
This version comes from the Metroid Prime decompilation project.
https://github.com/PrimeDecomp/prime
Diffstat (limited to 'include/libc/ansi_files.h')
-rw-r--r-- | include/libc/ansi_files.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/libc/ansi_files.h b/include/libc/ansi_files.h new file mode 100644 index 0000000..60a39ec --- /dev/null +++ b/include/libc/ansi_files.h @@ -0,0 +1,30 @@ +#ifndef _DOLPHIN_ANSI_FILES_H +#define _DOLPHIN_ANSI_FILES_H +#include <stdio.h> + +#ifdef __cplusplus +extern "C" { +#endif // ifdef __cplusplus + +#define set_eof(file) \ + do { \ + (file)->state.io_state = __neutral; \ + (file)->state.eof = 1; \ + (file)->buffer_len = 0; \ + } while (0) + +#define set_error(file) \ + do { \ + (file)->state.error = 1; \ + (file)->buffer_len = 0; \ + } while (0) + +int __flush_buffer(FILE* file, size_t* length); +void __prep_buffer(FILE* file); +int __flush_all(); + +#ifdef __cplusplus +}; +#endif // ifdef __cplusplus + +#endif |