From c11a85405cc39fd05641d779bfec6a1e838178f5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Dec 2017 02:29:51 +0100 Subject: [PATCH] Cleanups --- mednafen/file.c | 26 -------------------------- mednafen/file.h | 2 -- 2 files changed, 28 deletions(-) diff --git a/mednafen/file.c b/mednafen/file.c index 5ec0b1a6..db282506 100644 --- a/mednafen/file.c +++ b/mednafen/file.c @@ -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; -} diff --git a/mednafen/file.h b/mednafen/file.h index f035e4a5..9f167b38 100644 --- a/mednafen/file.h +++ b/mednafen/file.h @@ -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