[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1.6.2,1.1.1.1.6.3
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1.6.2,1.1.1.1.6.3 CREDITS,1.1.2.1,1.1.2.2 CWProjects.sit,1.1.2.1,1.1.2.2 Doxyfile,1.1.2.1,1.1.2.2 TODO,1.1.1.1.6.1,1.1.1.1.6.2 configure.in,1.1.2.5,1.1.2.6 physfs.h,1.1.1.1.6.2,1.1.1.1.6.3 physfs_byteorder.c,1.1.2.2,1.1.2.3 |
Date: |
Thu, 11 Jul 2002 04:59:31 -0400 |
Update of /cvsroot/paragui/paragui/src/physfs
In directory subversions:/tmp/cvs-serv32618/src/physfs
Modified Files:
Tag: devel-1-0
CHANGELOG CREDITS CWProjects.sit Doxyfile TODO configure.in
physfs.h physfs_byteorder.c
Log Message:
removed acconfig.h from the distribution
other physfs sync cycle
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CHANGELOG,v
retrieving revision 1.1.1.1.6.2
retrieving revision 1.1.1.1.6.3
diff -C2 -r1.1.1.1.6.2 -r1.1.1.1.6.3
*** CHANGELOG 3 Jul 2002 14:30:10 -0000 1.1.1.1.6.2
--- CHANGELOG 11 Jul 2002 08:59:29 -0000 1.1.1.1.6.3
***************
*** 3,6 ****
--- 3,13 ----
*/
+ 07112002 - configure.in updated to make it happier on newer autoconfs
+ (thanks again, Alexander!).
+ 07102002 - Added a byteorder-friendly convenience API, so you can read/write
+ data and convert to the native byteorder without too much effort.
+ Upped version to 0.1.7.
+ Build system corrections for BeOS and Cygwin (thanks, Alexander!).
+ Added RPM specfile for PhysicsFS (thanks, Edward Rudd!).
06292002 - Fixed incorrect error message when opening a file for read without
defining a search path. LOTS of win32 updates and fixes; lots of
***************
*** 10,14 ****
detecting mounted CD-ROM drives...it only occurs when a drive is
detected, and it probably won't result in your box getting rooted,
! but upgrade soon anyhow.
06282002 - Reworked build system _AGAIN_.
06222002 - Alexander Pipelka spotted a bug in the file open routines in
--- 17,22 ----
detecting mounted CD-ROM drives...it only occurs when a drive is
detected, and it probably won't result in your box getting rooted,
! but upgrade soon anyhow. Readded the .cvsignore files from the old
! build system.
06282002 - Reworked build system _AGAIN_.
06222002 - Alexander Pipelka spotted a bug in the file open routines in
Index: CREDITS
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CREDITS,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** CREDITS 21 Jun 2002 20:09:07 -0000 1.1.2.1
--- CREDITS 11 Jul 2002 08:59:29 -0000 1.1.2.2
***************
*** 25,28 ****
--- 25,29 ----
configure fixes,
+ RPM specfile,
Edward Rudd
***************
*** 30,33 ****
--- 31,37 ----
other stuff,
John R. Hall
+
+ Various support, fixes and suggestions,
+ Alexander Pipelka
Other stuff:
Index: CWProjects.sit
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/CWProjects.sit,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
Binary files /tmp/cvsVIYwiT and /tmp/cvsAWTrcC differ
Index: Doxyfile
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/Doxyfile,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** Doxyfile 21 Jun 2002 20:09:07 -0000 1.1.2.1
--- Doxyfile 11 Jul 2002 08:59:29 -0000 1.1.2.2
***************
*** 24,28 ****
# if some version control system is used.
! PROJECT_NUMBER = 0.1.6
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
--- 24,28 ----
# if some version control system is used.
! PROJECT_NUMBER = 0.1.7
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
Index: TODO
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/TODO,v
retrieving revision 1.1.1.1.6.1
retrieving revision 1.1.1.1.6.2
diff -C2 -r1.1.1.1.6.1 -r1.1.1.1.6.2
*** TODO 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.1
--- TODO 11 Jul 2002 08:59:29 -0000 1.1.1.1.6.2
***************
*** 5,9 ****
- Include the Visual Studio.NET project file in CVS directly.
- - A PHYSFS_readUint32(), _readSint32(), etc API.
- Improve ZIP_seek() (archivers/zip.c)
- Make the zipfile parse symlinks with relative paths. See the function
--- 5,8 ----
Index: configure.in
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/configure.in,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** configure.in 10 Jul 2002 19:12:49 -0000 1.1.2.5
--- configure.in 11 Jul 2002 08:59:29 -0000 1.1.2.6
***************
*** 16,20 ****
MAJOR_VERSION=0
MINOR_VERSION=1
! MICRO_VERSION=6
INTERFACE_AGE=0
BINARY_AGE=0
--- 16,20 ----
MAJOR_VERSION=0
MINOR_VERSION=1
! MICRO_VERSION=7
INTERFACE_AGE=0
BINARY_AGE=0
***************
*** 76,84 ****
fi
CFLAGS="$CFLAGS -Werror -Wall"
! AC_DEFINE([DEBUG], 1, [Define if debug mode is enabled])
! AC_DEFINE([DEBUG_CHATTER], 1, [More debug])
else
CFLAGS="-O2"
! AC_DEFINE([NDEBUG], 1, [Define if ndebug mode is enabled])
fi
--- 76,84 ----
fi
CFLAGS="$CFLAGS -Werror -Wall"
! AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
! AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
else
CFLAGS="-O2"
! AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
fi
***************
*** 101,105 ****
dnl AC_CHECK_LIB(c, llseek, have_llseek=yes)
if test x$have_llseek = xyes; then
! AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [Define if we have llseek])
fi
--- 101,105 ----
dnl AC_CHECK_LIB(c, llseek, have_llseek=yes)
if test x$have_llseek = xyes; then
! AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
fi
***************
*** 111,115 ****
, enable_zip=yes)
if test x$enable_zip = xyes; then
! AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [Define if we need zip support])
require_zlib="yes"
fi
--- 111,115 ----
, enable_zip=yes)
if test x$enable_zip = xyes; then
! AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
require_zlib="yes"
fi
***************
*** 121,125 ****
, enable_grp=yes)
if test x$enable_grp = xyes; then
! AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [Define if we need grp support])
fi
--- 121,125 ----
, enable_grp=yes)
if test x$enable_grp = xyes; then
! AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
fi
***************
*** 189,193 ****
if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
! AC_DEFINE([PHYSFS_HAVE_READLINE], 1, [Define if we have readline])
LIBS="$LIBS -lreadline -lcurses"
fi
--- 189,193 ----
if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
! AC_DEFINE([PHYSFS_HAVE_READLINE], 1, [define if we have readline])
LIBS="$LIBS -lreadline -lcurses"
fi
Index: physfs.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs.h,v
retrieving revision 1.1.1.1.6.2
retrieving revision 1.1.1.1.6.3
diff -C2 -r1.1.1.1.6.2 -r1.1.1.1.6.3
*** physfs.h 21 Jun 2002 20:07:52 -0000 1.1.1.1.6.2
--- physfs.h 11 Jul 2002 08:59:29 -0000 1.1.1.1.6.3
***************
*** 313,317 ****
#define PHYSFS_VER_MAJOR 0
#define PHYSFS_VER_MINOR 1
! #define PHYSFS_VER_PATCH 6
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
--- 313,317 ----
#define PHYSFS_VER_MAJOR 0
#define PHYSFS_VER_MINOR 1
! #define PHYSFS_VER_PATCH 7
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
***************
*** 1338,1341 ****
--- 1338,1742 ----
*/
__EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
+
+
+ /**
+ * \fn int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
+ * \brief Read and convert a signed 16-bit littleendian value.
+ *
+ * Convenience function. Read a signed 16-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val);
+
+
+ /**
+ * \fn int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
+ * \brief Read and convert an unsigned 16-bit littleendian value.
+ *
+ * Convenience function. Read an unsigned 16-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ */
+ __EXPORT__ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val);
+
+
+ /**
+ * \fn int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
+ * \brief Read and convert a signed 16-bit bigendian value.
+ *
+ * Convenience function. Read a signed 16-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val);
+
+
+ /**
+ * \fn int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
+ * \brief Read and convert an unsigned 16-bit bigendian value.
+ *
+ * Convenience function. Read an unsigned 16-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ */
+ __EXPORT__ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val);
+
+
+ /**
+ * \fn int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
+ * \brief Read and convert a signed 32-bit littleendian value.
+ *
+ * Convenience function. Read a signed 32-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val);
+
+
+ /**
+ * \fn int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
+ * \brief Read and convert an unsigned 32-bit littleendian value.
+ *
+ * Convenience function. Read an unsigned 32-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ */
+ __EXPORT__ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val);
+
+
+ /**
+ * \fn int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
+ * \brief Read and convert a signed 32-bit bigendian value.
+ *
+ * Convenience function. Read a signed 32-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val);
+
+
+ /**
+ * \fn int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
+ * \brief Read and convert an unsigned 32-bit bigendian value.
+ *
+ * Convenience function. Read an unsigned 32-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ */
+ __EXPORT__ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val);
+
+
+ /**
+ * \fn int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val)
+ * \brief Read and convert a signed 64-bit littleendian value.
+ *
+ * Convenience function. Read a signed 64-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val);
+
+
+ /**
+ * \fn int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
+ * \brief Read and convert an unsigned 64-bit littleendian value.
+ *
+ * Convenience function. Read an unsigned 64-bit littleendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val);
+
+
+ /**
+ * \fn int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val)
+ * \brief Read and convert a signed 64-bit bigendian value.
+ *
+ * Convenience function. Read a signed 64-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val);
+
+
+ /**
+ * \fn int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
+ * \brief Read and convert an unsigned 64-bit bigendian value.
+ *
+ * Convenience function. Read an unsigned 64-bit bigendian value from a
+ * file and convert it to the platform's native byte order.
+ *
+ * \param file PhysicsFS file handle from which to read.
+ * \param val pointer to where value should be stored.
+ * \return zero on failure, non-zero on success. If successful, (*val) will
+ * store the result. On failure, you can find out what went wrong
+ * from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val);
+
+
+ /**
+ * \fn int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
+ * \brief Convert and write a signed 16-bit littleendian value.
+ *
+ * Convenience function. Convert a signed 16-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val);
+
+
+ /**
+ * \fn int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
+ * \brief Convert and write an unsigned 16-bit littleendian value.
+ *
+ * Convenience function. Convert an unsigned 16-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val);
+
+
+ /**
+ * \fn int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
+ * \brief Convert and write a signed 16-bit bigendian value.
+ *
+ * Convenience function. Convert a signed 16-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val);
+
+
+ /**
+ * \fn int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
+ * \brief Convert and write an unsigned 16-bit bigendian value.
+ *
+ * Convenience function. Convert an unsigned 16-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val);
+
+
+ /**
+ * \fn int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
+ * \brief Convert and write a signed 32-bit littleendian value.
+ *
+ * Convenience function. Convert a signed 32-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val);
+
+
+ /**
+ * \fn int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
+ * \brief Convert and write an unsigned 32-bit littleendian value.
+ *
+ * Convenience function. Convert an unsigned 32-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val);
+
+
+ /**
+ * \fn int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
+ * \brief Convert and write a signed 32-bit bigendian value.
+ *
+ * Convenience function. Convert a signed 32-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val);
+
+
+ /**
+ * \fn int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
+ * \brief Convert and write an unsigned 32-bit bigendian value.
+ *
+ * Convenience function. Convert an unsigned 32-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ */
+ __EXPORT__ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val);
+
+
+ /**
+ * \fn int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val)
+ * \brief Convert and write a signed 64-bit littleendian value.
+ *
+ * Convenience function. Convert a signed 64-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val);
+
+
+ /**
+ * \fn int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
+ * \brief Convert and write an unsigned 64-bit littleendian value.
+ *
+ * Convenience function. Convert an unsigned 64-bit value from the platform's
+ * native byte order to littleendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val);
+
+
+ /**
+ * \fn int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
+ * \brief Convert and write a signed 64-bit bigending value.
+ *
+ * Convenience function. Convert a signed 64-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val);
+
+
+ /**
+ * \fn int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val)
+ * \brief Convert and write an unsigned 64-bit bigendian value.
+ *
+ * Convenience function. Convert an unsigned 64-bit value from the platform's
+ * native byte order to bigendian and write it to a file.
+ *
+ * \param file PhysicsFS file handle to which to write.
+ * \param val Value to convert and write.
+ * \return zero on failure, non-zero on success. On failure, you can
+ * find out what went wrong from PHYSFS_GetLastError().
+ *
+ * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
+ * any sort of 64-bit support.
+ */
+ __EXPORT__ int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val);
+
#ifdef __cplusplus
Index: physfs_byteorder.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/physfs_byteorder.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** physfs_byteorder.c 21 Jun 2002 20:07:52 -0000 1.1.2.2
--- physfs_byteorder.c 11 Jul 2002 08:59:29 -0000 1.1.2.3
***************
*** 16,20 ****
#include <stdlib.h>
#include <assert.h>
! #include "physfs.h"
/* This byteorder stuff was lifted from SDL. http://www.libsdl.org/ */
--- 16,22 ----
#include <stdlib.h>
#include <assert.h>
!
! #define __PHYSICSFS_INTERNAL__
! #include "physfs_internal.h"
/* This byteorder stuff was lifted from SDL. http://www.libsdl.org/ */
***************
*** 118,121 ****
--- 120,340 ----
PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return(x); }
#endif
+
+
+ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
+ {
+ PHYSFS_sint16 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_swapSLE16(in);
+ return(1);
+ } /* PHYSFS_readSLE16 */
+
+
+ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
+ {
+ PHYSFS_uint16 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_swapULE16(in);
+ return(1);
+ } /* PHYSFS_readULE16 */
+
+
+ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
+ {
+ PHYSFS_sint16 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_swapSBE16(in);
+ return(1);
+ } /* PHYSFS_readSBE16 */
+
+
+ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
+ {
+ PHYSFS_uint16 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_swapUBE16(in);
+ return(1);
+ } /* PHYSFS_readUBE16 */
+
+
+ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
+ {
+ PHYSFS_sint32 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_swapSLE32(in);
+ return(1);
+ } /* PHYSFS_readSLE32 */
+
+
+ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
+ {
+ PHYSFS_uint32 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_swapULE32(in);
+ return(1);
+ } /* PHYSFS_readULE32 */
+
+
+ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
+ {
+ PHYSFS_sint32 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_swapSBE32(in);
+ return(1);
+ } /* PHYSFS_readSBE32 */
+
+
+ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
+ {
+ PHYSFS_uint32 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_swapUBE32(in);
+ return(1);
+ } /* PHYSFS_readUBE32 */
+
+
+ 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_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
+ {
+ PHYSFS_uint64 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_swapULE64(in);
+ return(1);
+ } /* PHYSFS_readULE64 */
+
+
+ int PHYSFS_readSBE64(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_swapSBE64(in);
+ return(1);
+ } /* PHYSFS_readSBE64 */
+
+
+ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
+ {
+ PHYSFS_uint64 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_swapUBE64(in);
+ return(1);
+ } /* PHYSFS_readUBE64 */
+
+
+
+ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
+ {
+ PHYSFS_sint16 out = PHYSFS_swapSLE16(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeSLE16 */
+
+
+ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
+ {
+ PHYSFS_uint16 out = PHYSFS_swapULE16(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeULE16 */
+
+
+ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
+ {
+ PHYSFS_sint16 out = PHYSFS_swapSBE16(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeSBE16 */
+
+
+ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
+ {
+ PHYSFS_uint16 out = PHYSFS_swapUBE16(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeUBE16 */
+
+
+ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
+ {
+ PHYSFS_sint32 out = PHYSFS_swapSLE32(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeSLE32 */
+
+
+ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
+ {
+ PHYSFS_uint32 out = PHYSFS_swapULE32(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeULE32 */
+
+
+ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
+ {
+ PHYSFS_sint32 out = PHYSFS_swapSBE32(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeSBE32 */
+
+
+ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
+ {
+ PHYSFS_uint32 out = PHYSFS_swapUBE32(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeUBE32 */
+
+
+ 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 */
+
+
+ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
+ {
+ PHYSFS_uint64 out = PHYSFS_swapULE64(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeULE64 */
+
+
+ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
+ {
+ PHYSFS_sint64 out = PHYSFS_swapSBE64(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeSBE64 */
+
+
+ int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val)
+ {
+ PHYSFS_uint64 out = PHYSFS_swapUBE64(val);
+ BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
+ return(1);
+ } /* PHYSFS_writeUBE64 */
/* end of physfs_byteorder.c ... */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/physfs CHANGELOG,1.1.1.1.6.2,1.1.1.1.6.3 CREDITS,1.1.2.1,1.1.2.2 CWProjects.sit,1.1.2.1,1.1.2.2 Doxyfile,1.1.2.1,1.1.2.2 TODO,1.1.1.1.6.1,1.1.1.1.6.2 configure.in,1.1.2.5,1.1.2.6 physfs.h,1.1.1.1.6.2,1.1.1.1.6.3 physfs_byteorder.c,1.1.2.2,1.1.2.3,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/physfs/platform Makefile.am,1.1.1.1.6.5,1.1.1.1.6.6 beos.cpp,1.1.2.3,1.1.2.4 unix.c,1.1.1.1.6.3,1.1.1.1.6.4 win32.c,1.1.1.1.6.10,1.1.1.1.6.11
- Next by Date:
[paragui-cvs] CVS: paragui/test paratest.cpp,1.2.6.3,1.2.6.4
- Previous by thread:
[paragui-cvs] CVS: paragui/src/physfs/platform Makefile.am,1.1.1.1.6.5,1.1.1.1.6.6 beos.cpp,1.1.2.3,1.1.2.4 unix.c,1.1.1.1.6.3,1.1.1.1.6.4 win32.c,1.1.1.1.6.10,1.1.1.1.6.11
- Next by thread:
[paragui-cvs] CVS: paragui/test paratest.cpp,1.2.6.3,1.2.6.4
- Index(es):