From c157ae7c78965f390d380a068fe08db0843bb813 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 29 Nov 2023 12:55:31 +0100 Subject: libpsx: Add rewind(3) --- libpsx/src/libc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpsx/src') 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') -- cgit v1.2.3