summaryrefslogtreecommitdiff
path: root/libpsx/src/libc.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-29 12:55:31 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-29 12:55:31 +0100
commitc157ae7c78965f390d380a068fe08db0843bb813 (patch)
tree4adfa852336c5c6c9ac17c18dca7b2cfd8a1524f /libpsx/src/libc.c
parent2ffa7e5c7b6b75df9eb7e54f8c4f73af7dd28563 (diff)
libpsx: Add rewind(3)
Diffstat (limited to 'libpsx/src/libc.c')
-rw-r--r--libpsx/src/libc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpsx/src/libc.c b/libpsx/src/libc.c
index 3baccf4..58884b0 100644
--- a/libpsx/src/libc.c
+++ b/libpsx/src/libc.c
@@ -420,6 +420,12 @@ int fseek(FILE *f, int offset, int whence)
return 0;
}
+void rewind(FILE *f)
+{
+ fseek(f, 0, SEEK_SET);
+ clearerr(f);
+}
+
int toupper(int c)
{
if(c >= 'a' && c <= 'z')