libpsx: Add rewind(3)

This commit is contained in:
Xavier Del Campo Romero 2023-11-29 12:55:31 +01:00
parent 2ffa7e5c7b
commit c157ae7c78
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
2 changed files with 7 additions and 0 deletions

View File

@ -123,6 +123,7 @@ size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
int fgetc(FILE *f);
int ftell(FILE *f);
int fseek(FILE *f, int offset, int whence);
void rewind(FILE *f);
int fputs(const char *str, FILE *stream);
void clearerr(FILE *stream);

View File

@ -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')