Updated PHYSFS_Archiver with PHYSFS_EnumerateCallbackResult change.
This commit is contained in:
parent
4e0d3d55e9
commit
6ad71878fe
29
src/physfs.h
29
src/physfs.h
|
@ -3544,23 +3544,26 @@ typedef struct PHYSFS_Archiver
|
||||||
* you can dispose of it upon return from the callback. (dirname) is in
|
* you can dispose of it upon return from the callback. (dirname) is in
|
||||||
* platform-independent notation.
|
* platform-independent notation.
|
||||||
* If you have a failure, call PHYSFS_SetErrorCode() with whatever code
|
* If you have a failure, call PHYSFS_SetErrorCode() with whatever code
|
||||||
* seem appropriate and return -1.
|
* seem appropriate and return PHYSFS_ENUM_ERROR.
|
||||||
* If the callback returns -1, please call
|
* If the callback returns PHYSFS_ENUM_ERROR, please call
|
||||||
* PHYSFS_SetErrorCode(PHYSFS_ERR_APP_CALLBACK) and then return -1.
|
* PHYSFS_SetErrorCode(PHYSFS_ERR_APP_CALLBACK) and then return
|
||||||
* If the callback returns 0, stop enumerating and return 0. Don't call
|
* PHYSFS_ENUM_ERROR as well. Don't call the callback again in any
|
||||||
* the callback again in any circumstances. Don't set an error code in
|
* circumstances.
|
||||||
* this case.
|
* If the callback returns PHYSFS_ENUM_STOP, stop enumerating and return
|
||||||
* Callbacks are (currently) only supposed to return -1, 0, or 1. Any
|
* PHYSFS_ENUM_STOP as well. Don't call the callback again in any
|
||||||
* other result has undefined behavior.
|
* circumstances. Don't set an error code in this case.
|
||||||
* As long as the callback returned 1 and you haven't experienced any
|
* Callbacks are only supposed to return a value from
|
||||||
* errors of your own, keep enumerating until you're done and then return
|
* PHYSFS_EnumerateCallbackResult. Any other result has undefined
|
||||||
* 1 without setting an error code.
|
* behavior.
|
||||||
|
* As long as the callback returned PHYSFS_ENUM_OK and you haven't
|
||||||
|
* experienced any errors of your own, keep enumerating until you're done
|
||||||
|
* and then return PHYSFS_ENUM_OK without setting an error code.
|
||||||
*
|
*
|
||||||
* \warning PHYSFS_enumerate returns zero or non-zero (success or failure),
|
* \warning PHYSFS_enumerate returns zero or non-zero (success or failure),
|
||||||
* so be aware this function pointer returns different values!
|
* so be aware this function pointer returns different values!
|
||||||
*/
|
*/
|
||||||
int (*enumerate)(void *opaque, const char *dirname,
|
PHYSFS_EnumerateCallbackResult (*enumerate)(void *opaque,
|
||||||
PHYSFS_EnumerateCallback cb,
|
const char *dirname, PHYSFS_EnumerateCallback cb,
|
||||||
const char *origdir, void *callbackdata);
|
const char *origdir, void *callbackdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue