From 8258274a9040fc99c79c79bf747ae3b882978b0f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 1 Aug 2011 17:32:56 -0400 Subject: [PATCH] Removed __PHYSFS_platformEOF(). It's not used anymore. --- src/physfs_internal.h | 11 ----------- src/platform_os2.c | 13 ------------- src/platform_pocketpc.c | 16 ---------------- src/platform_posix.c | 8 -------- src/platform_windows.c | 16 ---------------- 5 files changed, 64 deletions(-) diff --git a/src/physfs_internal.h b/src/physfs_internal.h index a75fed38..b3139ad2 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -1199,17 +1199,6 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *handle); */ int __PHYSFS_platformStat(const char *fn, int *exists, PHYSFS_Stat *stat); - -/* - * Determine if a file is at EOF. (opaque) should be cast to whatever data - * type your platform uses. - * - * The caller expects that there was a short read before calling this. - * - * Return non-zero if EOF, zero if it is _not_ EOF. - */ -int __PHYSFS_platformEOF(void *opaque); - /* * Flush any pending writes to disk. (opaque) should be cast to whatever data * type your platform uses. Be sure to check for errors; the caller expects diff --git a/src/platform_os2.c b/src/platform_os2.c index 797c1b77..a5dbc538 100644 --- a/src/platform_os2.c +++ b/src/platform_os2.c @@ -543,19 +543,6 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) } /* __PHYSFS_platformFileLength */ -int __PHYSFS_platformEOF(void *opaque) -{ - PHYSFS_sint64 len, pos; - - len = __PHYSFS_platformFileLength(opaque); - BAIL_IF_MACRO(len == -1, NULL, 1); /* (*shrug*) */ - pos = __PHYSFS_platformTell(opaque); - BAIL_IF_MACRO(pos == -1, NULL, 1); /* (*shrug*) */ - - return (pos >= len); -} /* __PHYSFS_platformEOF */ - - int __PHYSFS_platformFlush(void *opaque) { return (os2err(DosResetBuffer((HFILE) opaque)) == NO_ERROR); diff --git a/src/platform_pocketpc.c b/src/platform_pocketpc.c index 49f6028e..7d8607c7 100644 --- a/src/platform_pocketpc.c +++ b/src/platform_pocketpc.c @@ -445,22 +445,6 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) } /* __PHYSFS_platformFileLength */ -int __PHYSFS_platformEOF(void *opaque) -{ - PHYSFS_sint64 FilePosition; - int retval = 0; - - /* Get the current position in the file */ - if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0) - { - /* Non-zero if EOF is equal to the file length */ - retval = FilePosition == __PHYSFS_platformFileLength(opaque); - } /* if */ - - return retval; -} /* __PHYSFS_platformEOF */ - - int __PHYSFS_platformFlush(void *opaque) { winCEfile *fh = ((winCEfile *) opaque); diff --git a/src/platform_posix.c b/src/platform_posix.c index 0170f082..1ef6cb27 100644 --- a/src/platform_posix.c +++ b/src/platform_posix.c @@ -362,14 +362,6 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) } /* __PHYSFS_platformFileLength */ -int __PHYSFS_platformEOF(void *opaque) -{ - const PHYSFS_sint64 pos = __PHYSFS_platformTell(opaque); - const PHYSFS_sint64 len = __PHYSFS_platformFileLength(opaque); - return (pos >= len); -} /* __PHYSFS_platformEOF */ - - int __PHYSFS_platformFlush(void *opaque) { const int fd = *((int *) opaque); diff --git a/src/platform_windows.c b/src/platform_windows.c index a2295e46..d1512908 100644 --- a/src/platform_windows.c +++ b/src/platform_windows.c @@ -1088,22 +1088,6 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) } /* __PHYSFS_platformFileLength */ -int __PHYSFS_platformEOF(void *opaque) -{ - PHYSFS_sint64 FilePosition; - int retval = 0; - - /* Get the current position in the file */ - if ((FilePosition = __PHYSFS_platformTell(opaque)) != 0) - { - /* Non-zero if EOF is equal to the file length */ - retval = FilePosition == __PHYSFS_platformFileLength(opaque); - } /* if */ - - return retval; -} /* __PHYSFS_platformEOF */ - - int __PHYSFS_platformFlush(void *opaque) { WinApiFile *fh = ((WinApiFile *) opaque);