src/physfs_internal.h
changeset 1097 6e67897d4628
parent 1089 5491e6c69162
child 1098 4e86cec1143f
equal deleted inserted replaced
1096:b7582afaa07d 1097:6e67897d4628
  1020                    int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
  1020                    int (*cmpfn)(void *, PHYSFS_uint32, PHYSFS_uint32),
  1021                    void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32));
  1021                    void (*swapfn)(void *, PHYSFS_uint32, PHYSFS_uint32));
  1022 
  1022 
  1023 
  1023 
  1024 /* These get used all over for lessening code clutter. */
  1024 /* These get used all over for lessening code clutter. */
  1025 #define BAIL_MACRO(e, r) { __PHYSFS_setError(e); return r; }
  1025 #define BAIL_MACRO(e, r) do { __PHYSFS_setError(e); return r; } while (0)
  1026 #define BAIL_IF_MACRO(c, e, r) if (c) { __PHYSFS_setError(e); return r; }
  1026 #define BAIL_IF_MACRO(c, e, r) do { if (c) { __PHYSFS_setError(e); return r; } } while (0)
  1027 #define BAIL_MACRO_MUTEX(e, m, r) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1027 #define BAIL_MACRO_MUTEX(e, m, r) do {  __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0)
  1028 #define BAIL_IF_MACRO_MUTEX(c, e, m, r) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1028 #define BAIL_IF_MACRO_MUTEX(c, e, m, r) do { if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0)
  1029 #define GOTO_MACRO(e, g) { __PHYSFS_setError(e); goto g; }
  1029 #define GOTO_MACRO(e, g) do { __PHYSFS_setError(e); goto g; } while (0)
  1030 #define GOTO_IF_MACRO(c, e, g) if (c) { __PHYSFS_setError(e); goto g; }
  1030 #define GOTO_IF_MACRO(c, e, g) do { if (c) { __PHYSFS_setError(e); goto g; } } while (0)
  1031 #define GOTO_MACRO_MUTEX(e, m, g) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; }
  1031 #define GOTO_MACRO_MUTEX(e, m, g) do { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0)
  1032 #define GOTO_IF_MACRO_MUTEX(c, e, m, g) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; }
  1032 #define GOTO_IF_MACRO_MUTEX(c, e, m, g) do { if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0)
  1033 
  1033 
  1034 #define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) )
  1034 #define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) )
  1035 
  1035 
  1036 #if (defined __GNUC__)
  1036 #if (defined __GNUC__)
  1037 #define __PHYSFS_SI64(x) x##LL
  1037 #define __PHYSFS_SI64(x) x##LL