mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 08:49:47 +00:00
Cleanups
This commit is contained in:
parent
36d33b2334
commit
c11a85405c
@ -112,29 +112,3 @@ int file_seek(struct MDFNFILE *file, int64_t offset, int whence)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *file_fgets(struct MDFNFILE *file, char *s, int len)
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
if (!len)
|
||||
return(NULL);
|
||||
|
||||
if (file->location >= len)
|
||||
return(NULL);
|
||||
|
||||
while(pos < (len - 1) && file->location < len)
|
||||
{
|
||||
int v = file->data[file->location];
|
||||
s[pos] = v;
|
||||
file->location++;
|
||||
pos++;
|
||||
if (v == '\n')
|
||||
break;
|
||||
}
|
||||
|
||||
if (len)
|
||||
s[pos] = 0;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -27,8 +27,6 @@ uint64_t file_read(struct MDFNFILE *file, void *ptr,
|
||||
|
||||
int file_seek(struct MDFNFILE *file, int64_t offset, int whence);
|
||||
|
||||
char *file_fgets(struct MDFNFILE *file, char *s, int buffer_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user