int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val) { PHYSFS_sint64 in; BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0); BAIL_IF_MACRO(PHYSFS_read(file, &in, sizeof (in), 1) != 1, NULL, 0); *val = PHYSFS_swapSLE64(in); return(1); } /* PHYSFS_readSLE64 */
int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val) { PHYSFS_sint64 out = PHYSFS_swapSLE64(val); BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0); return(1); } /* PHYSFS_writeSLE64 */
sint64 Util::swapSLE64(sint64 value) { return PHYSFS_swapSLE64(value); }