From 2651eb2eb9f2bb5fcdb4ac3db7845b7839d2f422 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 2 Nov 2008 15:22:02 -0500 Subject: [PATCH] Added struct typedefs that you can predeclare without including physfs.h --- CHANGELOG.txt | 3 ++- physfs.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ced7f0ef..47815086 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,8 @@ * CHANGELOG. */ -11022008 - iPhone support (thanks, Christian!) +11022008 - iPhone support (thanks, Christian!). Added struct typedefs that + are friendlier to predeclaring. 04032008 - Fixed PHYSFS_openAppend() to work as documented on Unix. 03122008 - Fixed aliasing bug in Windows platform layer (thanks, Dennis!). 03102008 - Changed some text files from ISO-8859-1 to UTF-8. Replaced all the diff --git a/physfs.h b/physfs.h index 53b37778..f33ac1f9 100644 --- a/physfs.h +++ b/physfs.h @@ -334,7 +334,7 @@ PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8); * \sa PHYSFS_setBuffer * \sa PHYSFS_flush */ -typedef struct +typedef struct PHYSFS_File { void *opaque; /**< That's all you get. Don't touch. */ } PHYSFS_File; @@ -369,7 +369,7 @@ typedef struct * * \sa PHYSFS_supportedArchiveTypes */ -typedef struct +typedef struct PHYSFS_ArchiveInfo { const char *extension; /**< Archive file extension: "ZIP", for example. */ const char *description; /**< Human-readable archive description. */ @@ -391,7 +391,7 @@ typedef struct * \sa PHYSFS_VERSION * \sa PHYSFS_getLinkedVersion */ -typedef struct +typedef struct PHYSFS_Version { PHYSFS_uint8 major; /**< major revision */ PHYSFS_uint8 minor; /**< minor revision */ @@ -1974,7 +1974,7 @@ __EXPORT__ int PHYSFS_symbolicLinksPermitted(void); * * \sa PHYSFS_setAllocator */ -typedef struct +typedef struct PHYSFS_Allocator { int (*Init)(void); /**< Initialize. Can be NULL. Zero on failure. */ void (*Deinit)(void); /**< Deinitialize your allocator. Can be NULL. */