src/physfs_internal.h
changeset 1372 1a64a2857a0c
parent 1371 da48b9ff4c9b
child 1373 527ef3c6a2d6
equal deleted inserted replaced
1371:da48b9ff4c9b 1372:1a64a2857a0c
   160 /*
   160 /*
   161  * Sort an array (or whatever) of (max) elements. This uses a mixture of
   161  * Sort an array (or whatever) of (max) elements. This uses a mixture of
   162  *  a QuickSort and BubbleSort internally.
   162  *  a QuickSort and BubbleSort internally.
   163  * (cmpfn) is used to determine ordering, and (swapfn) does the actual
   163  * (cmpfn) is used to determine ordering, and (swapfn) does the actual
   164  *  swapping of elements in the list.
   164  *  swapping of elements in the list.
   165  *
       
   166  *  See zip.c for an example.
       
   167  */
   165  */
   168 void __PHYSFS_sort(void *entries, size_t max,
   166 void __PHYSFS_sort(void *entries, size_t max,
   169                    int (*cmpfn)(void *, size_t, size_t),
   167                    int (*cmpfn)(void *, size_t, size_t),
   170                    void (*swapfn)(void *, size_t, size_t));
   168                    void (*swapfn)(void *, size_t, size_t));
   171 
   169 
   250 /*
   248 /*
   251  * Like strdup(), but uses the current PhysicsFS allocator.
   249  * Like strdup(), but uses the current PhysicsFS allocator.
   252  */
   250  */
   253 char *__PHYSFS_strdup(const char *str);
   251 char *__PHYSFS_strdup(const char *str);
   254 
   252 
       
   253 /*
       
   254  * Give a hash value for a C string (uses djb's xor hashing algorithm).
       
   255  */
       
   256 PHYSFS_uint32 __PHYSFS_hashString(const char *str, size_t len);
       
   257 
   255 
   258 
   256 /*
   259 /*
   257  * The current allocator. Not valid before PHYSFS_init is called!
   260  * The current allocator. Not valid before PHYSFS_init is called!
   258  */
   261  */
   259 extern PHYSFS_Allocator __PHYSFS_AllocatorHooks;
   262 extern PHYSFS_Allocator __PHYSFS_AllocatorHooks;