From 9fa0a7f1da1b70bee995f53c6c96c43189018772 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 1 Feb 2023 18:45:02 -0400 Subject: global: Import Dolphin SDK This version comes from the Metroid Prime decompilation project. https://github.com/PrimeDecomp/prime --- include/libc/ansi_files.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/libc/ansi_files.h (limited to 'include/libc/ansi_files.h') 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 + +#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 -- cgit v1.2.3-13-gbd6f