Minor patches from Adam.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 08 Apr 2003 05:51:11 +0000
changeset 562 1e307df36810
parent 561 c8fe65f89fb9
child 563 b335449def59
Minor patches from Adam.
extras/abs-file.h
--- a/extras/abs-file.h	Wed Apr 02 06:56:47 2003 +0000
+++ b/extras/abs-file.h	Tue Apr 08 05:51:11 2003 +0000
@@ -1,5 +1,5 @@
 /*
- * stdio/physfs abstraction layer 2002-12-03
+ * stdio/physfs abstraction layer 2003-04-02
  *
  * Adam D. Moss <adam@gimp.org> <aspirin@icculus.org>
  *
@@ -15,7 +15,7 @@
 is (at the time of writing) released under a different license with
 additional restrictions.
 
-Copyright (C) 2002 Adam D. Moss (the "Author").  All Rights Reserved.
+Copyright (C) 2002-2003 Adam D. Moss (the "Author").  All Rights Reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -55,6 +55,8 @@
  * MY_GETC              fgetc(...)
  * MY_GETS              fgets(...)
  * MY_ATEOF             feof(...)
+ * MY_TELL              ftell(...)
+ * MY_SEEK              fseek(..., SEEK_SET)
  * MY_REWIND            rewind(...)
  * MY_SETBUFFER         (not a standard for stdio, does nothing there)
  */
@@ -140,7 +142,9 @@
 }
 #define MY_CLOSE(fp) PHYSFS_close(fp)
 #define MY_ATEOF(fp) PHYSFS_eof(fp)
-#define MY_REWIND(fp) PHYSFS_seek(fp,0)
+#define MY_TELL(fp) PHYSFS_tell(fp)
+#define MY_SEEK(fp,o) PHYSFS_seek(fp,o)
+#define MY_REWIND(fp) MY_SEEK(fp,0)
 
 #else
 
@@ -151,8 +155,11 @@
 #define MY_GETS(str,size,fp) fgets(str,size,fp)
 #define MY_CLOSE(fp) fclose(fp)
 #define MY_ATEOF(fp) feof(fp)
+#define MY_TELL(fp) ftell(fp)
+#define MY_SEEK(fp,o) fseek(fp,o, SEEK_SET)
 #define MY_REWIND(fp) rewind(fp)
-static void MY_SETBUFFER(const MY_FILETYPE *const file, const int num) { }
+/*static void MY_SETBUFFER(const MY_FILETYPE *const file, const int num) { }*/
+#define MY_SETBUFFER(fp,size)
 #endif
 
 #endif