From f2eabdb6257c09cf2890dac5e9737912728542af Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 2 Feb 2023 17:29:19 -0400 Subject: global: Add rest of Dolphin SDK proper, add MSL, and MetroTRK Finally, it links properly. --- src/MSL_C.PPCEABI.bare.H/wchar_io.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/MSL_C.PPCEABI.bare.H/wchar_io.c (limited to 'src/MSL_C.PPCEABI.bare.H/wchar_io.c') diff --git a/src/MSL_C.PPCEABI.bare.H/wchar_io.c b/src/MSL_C.PPCEABI.bare.H/wchar_io.c new file mode 100644 index 0000000..87da4af --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/wchar_io.c @@ -0,0 +1,28 @@ +#include + +int fwide(FILE* stream, int mode) { + int orientation; + int result; + + if ((stream == NULL) || (stream->mode.file_kind == __closed_file)) + return 0; + orientation = stream->mode.file_orientation; + switch (orientation) { + case __unoriented: + if (mode > 0) + stream->mode.file_orientation = __wide_oriented; + else if (mode < 0) + stream->mode.file_orientation = __char_oriented; + result = mode; + break; + + case __wide_oriented: + result = 1; + break; + + case __char_oriented: + result = -1; + break; + } + return result; +} -- cgit v1.2.3-13-gbd6f