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/sscanf.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/MSL_C.PPCEABI.bare.H/sscanf.c (limited to 'src/MSL_C.PPCEABI.bare.H/sscanf.c') diff --git a/src/MSL_C.PPCEABI.bare.H/sscanf.c b/src/MSL_C.PPCEABI.bare.H/sscanf.c new file mode 100644 index 0000000..171ee58 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/sscanf.c @@ -0,0 +1,26 @@ +#include "stdio.h" + +int __StringRead(void* isc, int ch, int Action) { + char ret; + __InStrCtrl* iscp = (__InStrCtrl*)isc; + switch (Action) { + case __GetChar: + ret = *(iscp->NextChar); + if (ret == '\0') { + iscp->NullCharDetected = 1; + return (EOF); + } else { + iscp->NextChar++; + return ((unsigned char)ret); + } + case __UngetChar: + if (!iscp->NullCharDetected) + iscp->NextChar--; + else + iscp->NullCharDetected = 0; + return (ch); + case __CheckForError: + return (iscp->NullCharDetected); + } + return 0; +} -- cgit v1.2.3-13-gbd6f