physfs.h
changeset 654 c0ae01de361d
parent 650 298b8bb26775
child 657 dad3b5c307a9
equal deleted inserted replaced
653:89d56fcb2b40 654:c0ae01de361d
   242 
   242 
   243 #endif  /* DOXYGEN_SHOULD_IGNORE_THIS */
   243 #endif  /* DOXYGEN_SHOULD_IGNORE_THIS */
   244 
   244 
   245 
   245 
   246 /**
   246 /**
   247  * \struct PHYSFS_file
   247  * \struct PHYSFS_File
   248  * \brief A PhysicsFS file handle.
   248  * \brief A PhysicsFS file handle.
   249  *
   249  *
   250  * You get a pointer to one of these when you open a file for reading,
   250  * You get a pointer to one of these when you open a file for reading,
   251  *  writing, or appending via PhysicsFS.
   251  *  writing, or appending via PhysicsFS.
   252  *
   252  *
   267  * \sa PHYSFS_flush
   267  * \sa PHYSFS_flush
   268  */
   268  */
   269 typedef struct
   269 typedef struct
   270 {
   270 {
   271     void *opaque;  /**< That's all you get. Don't touch. */
   271     void *opaque;  /**< That's all you get. Don't touch. */
   272 } PHYSFS_file;
   272 } PHYSFS_File;
   273 
   273 
       
   274 typedef PHYSFS_File PHYSFS_file;  /* for backwards compatibility with 1.0 */
   274 
   275 
   275 
   276 
   276 /**
   277 /**
   277  * \struct PHYSFS_ArchiveInfo
   278  * \struct PHYSFS_ArchiveInfo
   278  * \brief Information on various PhysicsFS-supported archives.
   279  * \brief Information on various PhysicsFS-supported archives.
   985 
   986 
   986 
   987 
   987 /* i/o stuff... */
   988 /* i/o stuff... */
   988 
   989 
   989 /**
   990 /**
   990  * \fn PHYSFS_file *PHYSFS_openWrite(const char *filename)
   991  * \fn PHYSFS_File *PHYSFS_openWrite(const char *filename)
   991  * \brief Open a file for writing.
   992  * \brief Open a file for writing.
   992  *
   993  *
   993  * Open a file for writing, in platform-independent notation and in relation
   994  * Open a file for writing, in platform-independent notation and in relation
   994  *  to the write dir as the root of the writable filesystem. The specified
   995  *  to the write dir as the root of the writable filesystem. The specified
   995  *  file is created if it doesn't exist. If it does exist, it is truncated to
   996  *  file is created if it doesn't exist. If it does exist, it is truncated to
  1006  * \sa PHYSFS_openRead
  1007  * \sa PHYSFS_openRead
  1007  * \sa PHYSFS_openAppend
  1008  * \sa PHYSFS_openAppend
  1008  * \sa PHYSFS_write
  1009  * \sa PHYSFS_write
  1009  * \sa PHYSFS_close
  1010  * \sa PHYSFS_close
  1010  */
  1011  */
  1011 __EXPORT__ PHYSFS_file *PHYSFS_openWrite(const char *filename);
  1012 __EXPORT__ PHYSFS_File *PHYSFS_openWrite(const char *filename);
  1012 
  1013 
  1013 
  1014 
  1014 /**
  1015 /**
  1015  * \fn PHYSFS_file *PHYSFS_openAppend(const char *filename)
  1016  * \fn PHYSFS_File *PHYSFS_openAppend(const char *filename)
  1016  * \brief Open a file for appending.
  1017  * \brief Open a file for appending.
  1017  *
  1018  *
  1018  * Open a file for writing, in platform-independent notation and in relation
  1019  * Open a file for writing, in platform-independent notation and in relation
  1019  *  to the write dir as the root of the writable filesystem. The specified
  1020  *  to the write dir as the root of the writable filesystem. The specified
  1020  *  file is created if it doesn't exist. If it does exist, the writing offset
  1021  *  file is created if it doesn't exist. If it does exist, the writing offset
  1032  * \sa PHYSFS_openRead
  1033  * \sa PHYSFS_openRead
  1033  * \sa PHYSFS_openWrite
  1034  * \sa PHYSFS_openWrite
  1034  * \sa PHYSFS_write
  1035  * \sa PHYSFS_write
  1035  * \sa PHYSFS_close
  1036  * \sa PHYSFS_close
  1036  */
  1037  */
  1037 __EXPORT__ PHYSFS_file *PHYSFS_openAppend(const char *filename);
  1038 __EXPORT__ PHYSFS_File *PHYSFS_openAppend(const char *filename);
  1038 
  1039 
  1039 
  1040 
  1040 /**
  1041 /**
  1041  * \fn PHYSFS_file *PHYSFS_openRead(const char *filename)
  1042  * \fn PHYSFS_File *PHYSFS_openRead(const char *filename)
  1042  * \brief Open a file for reading.
  1043  * \brief Open a file for reading.
  1043  *
  1044  *
  1044  * Open a file for reading, in platform-independent notation. The search path
  1045  * Open a file for reading, in platform-independent notation. The search path
  1045  *  is checked one at a time until a matching file is found, in which case an
  1046  *  is checked one at a time until a matching file is found, in which case an
  1046  *  abstract filehandle is associated with it, and reading may be done.
  1047  *  abstract filehandle is associated with it, and reading may be done.
  1057  * \sa PHYSFS_openWrite
  1058  * \sa PHYSFS_openWrite
  1058  * \sa PHYSFS_openAppend
  1059  * \sa PHYSFS_openAppend
  1059  * \sa PHYSFS_read
  1060  * \sa PHYSFS_read
  1060  * \sa PHYSFS_close
  1061  * \sa PHYSFS_close
  1061  */
  1062  */
  1062 __EXPORT__ PHYSFS_file *PHYSFS_openRead(const char *filename);
  1063 __EXPORT__ PHYSFS_File *PHYSFS_openRead(const char *filename);
  1063 
  1064 
  1064 
  1065 
  1065 /**
  1066 /**
  1066  * \fn int PHYSFS_close(PHYSFS_file *handle)
  1067  * \fn int PHYSFS_close(PHYSFS_File *handle)
  1067  * \brief Close a PhysicsFS filehandle.
  1068  * \brief Close a PhysicsFS filehandle.
  1068  *
  1069  *
  1069  * This call is capable of failing if the operating system was buffering
  1070  * This call is capable of failing if the operating system was buffering
  1070  *  writes to the physical media, and, now forced to write those changes to
  1071  *  writes to the physical media, and, now forced to write those changes to
  1071  *  physical media, can not store the data for some reason. In such a case,
  1072  *  physical media, can not store the data for some reason. In such a case,
  1078  *
  1079  *
  1079  * \sa PHYSFS_openRead
  1080  * \sa PHYSFS_openRead
  1080  * \sa PHYSFS_openWrite
  1081  * \sa PHYSFS_openWrite
  1081  * \sa PHYSFS_openAppend
  1082  * \sa PHYSFS_openAppend
  1082  */
  1083  */
  1083 __EXPORT__ int PHYSFS_close(PHYSFS_file *handle);
  1084 __EXPORT__ int PHYSFS_close(PHYSFS_File *handle);
  1084 
  1085 
  1085 
  1086 
  1086 /**
  1087 /**
  1087  * \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
  1088  * \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
  1088  * \brief Read data from a PhysicsFS filehandle
  1089  * \brief Read data from a PhysicsFS filehandle
  1089  *
  1090  *
  1090  * The file must be opened for reading.
  1091  * The file must be opened for reading.
  1091  *
  1092  *
  1092  *   \param handle handle returned from PHYSFS_openRead().
  1093  *   \param handle handle returned from PHYSFS_openRead().
  1097  *           the reason this might be < (objCount), as can PHYSFS_eof().
  1098  *           the reason this might be < (objCount), as can PHYSFS_eof().
  1098  *            -1 if complete failure.
  1099  *            -1 if complete failure.
  1099  *
  1100  *
  1100  * \sa PHYSFS_eof
  1101  * \sa PHYSFS_eof
  1101  */
  1102  */
  1102 __EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle,
  1103 __EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
  1103                                      void *buffer,
  1104                                      void *buffer,
  1104                                      PHYSFS_uint32 objSize,
  1105                                      PHYSFS_uint32 objSize,
  1105                                      PHYSFS_uint32 objCount);
  1106                                      PHYSFS_uint32 objCount);
  1106 
  1107 
  1107 /**
  1108 /**
  1108  * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
  1109  * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
  1109  * \brief Write data to a PhysicsFS filehandle
  1110  * \brief Write data to a PhysicsFS filehandle
  1110  *
  1111  *
  1111  * The file must be opened for writing.
  1112  * The file must be opened for writing.
  1112  *
  1113  *
  1113  *   \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend().
  1114  *   \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend().
  1115  *   \param objSize size in bytes of objects being read from (handle).
  1116  *   \param objSize size in bytes of objects being read from (handle).
  1116  *   \param objCount number of (objSize) objects to read from (handle).
  1117  *   \param objCount number of (objSize) objects to read from (handle).
  1117  *  \return number of objects written. PHYSFS_getLastError() can shed light on
  1118  *  \return number of objects written. PHYSFS_getLastError() can shed light on
  1118  *           the reason this might be < (objCount). -1 if complete failure.
  1119  *           the reason this might be < (objCount). -1 if complete failure.
  1119  */
  1120  */
  1120 __EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle,
  1121 __EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
  1121                                       const void *buffer,
  1122                                       const void *buffer,
  1122                                       PHYSFS_uint32 objSize,
  1123                                       PHYSFS_uint32 objSize,
  1123                                       PHYSFS_uint32 objCount);
  1124                                       PHYSFS_uint32 objCount);
  1124 
  1125 
  1125 
  1126 
  1126 /* File position stuff... */
  1127 /* File position stuff... */
  1127 
  1128 
  1128 /**
  1129 /**
  1129  * \fn int PHYSFS_eof(PHYSFS_file *handle)
  1130  * \fn int PHYSFS_eof(PHYSFS_File *handle)
  1130  * \brief Check for end-of-file state on a PhysicsFS filehandle.
  1131  * \brief Check for end-of-file state on a PhysicsFS filehandle.
  1131  *
  1132  *
  1132  * Determine if the end of file has been reached in a PhysicsFS filehandle.
  1133  * Determine if the end of file has been reached in a PhysicsFS filehandle.
  1133  *
  1134  *
  1134  *   \param handle handle returned from PHYSFS_openRead().
  1135  *   \param handle handle returned from PHYSFS_openRead().
  1135  *  \return nonzero if EOF, zero if not.
  1136  *  \return nonzero if EOF, zero if not.
  1136  *
  1137  *
  1137  * \sa PHYSFS_read
  1138  * \sa PHYSFS_read
  1138  * \sa PHYSFS_tell
  1139  * \sa PHYSFS_tell
  1139  */
  1140  */
  1140 __EXPORT__ int PHYSFS_eof(PHYSFS_file *handle);
  1141 __EXPORT__ int PHYSFS_eof(PHYSFS_File *handle);
  1141 
  1142 
  1142 
  1143 
  1143 /**
  1144 /**
  1144  * \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle)
  1145  * \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle)
  1145  * \brief Determine current position within a PhysicsFS filehandle.
  1146  * \brief Determine current position within a PhysicsFS filehandle.
  1146  *
  1147  *
  1147  *   \param handle handle returned from PHYSFS_open*().
  1148  *   \param handle handle returned from PHYSFS_open*().
  1148  *  \return offset in bytes from start of file. -1 if error occurred.
  1149  *  \return offset in bytes from start of file. -1 if error occurred.
  1149  *           Specifics of the error can be gleaned from PHYSFS_getLastError().
  1150  *           Specifics of the error can be gleaned from PHYSFS_getLastError().
  1150  *
  1151  *
  1151  * \sa PHYSFS_seek
  1152  * \sa PHYSFS_seek
  1152  */
  1153  */
  1153 __EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle);
  1154 __EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle);
  1154 
  1155 
  1155 
  1156 
  1156 /**
  1157 /**
  1157  * \fn int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos)
  1158  * \fn int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
  1158  * \brief Seek to a new position within a PhysicsFS filehandle.
  1159  * \brief Seek to a new position within a PhysicsFS filehandle.
  1159  *
  1160  *
  1160  * The next read or write will occur at that place. Seeking past the
  1161  * The next read or write will occur at that place. Seeking past the
  1161  *  beginning or end of the file is not allowed, and causes an error.
  1162  *  beginning or end of the file is not allowed, and causes an error.
  1162  *
  1163  *
  1165  *  \return nonzero on success, zero on error. Specifics of the error can be
  1166  *  \return nonzero on success, zero on error. Specifics of the error can be
  1166  *          gleaned from PHYSFS_getLastError().
  1167  *          gleaned from PHYSFS_getLastError().
  1167  *
  1168  *
  1168  * \sa PHYSFS_tell
  1169  * \sa PHYSFS_tell
  1169  */
  1170  */
  1170 __EXPORT__ int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos);
  1171 __EXPORT__ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos);
  1171 
  1172 
  1172 
  1173 
  1173 /**
  1174 /**
  1174  * \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle)
  1175  * \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle)
  1175  * \brief Get total length of a file in bytes.
  1176  * \brief Get total length of a file in bytes.
  1176  *
  1177  *
  1177  * Note that if the file size can't be determined (since the archive is
  1178  * Note that if the file size can't be determined (since the archive is
  1178  *  "streamed" or whatnot) than this will report (-1). Also note that if
  1179  *  "streamed" or whatnot) than this will report (-1). Also note that if
  1179  *  another process/thread is writing to this file at the same time, then
  1180  *  another process/thread is writing to this file at the same time, then
  1184  *  \return size in bytes of the file. -1 if can't be determined.
  1185  *  \return size in bytes of the file. -1 if can't be determined.
  1185  *
  1186  *
  1186  * \sa PHYSFS_tell
  1187  * \sa PHYSFS_tell
  1187  * \sa PHYSFS_seek
  1188  * \sa PHYSFS_seek
  1188  */
  1189  */
  1189 __EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle);
  1190 __EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle);
  1190 
  1191 
  1191 
  1192 
  1192 /* Buffering stuff... */
  1193 /* Buffering stuff... */
  1193 
  1194 
  1194 /**
  1195 /**
  1195  * \fn int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 bufsize)
  1196  * \fn int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize)
  1196  * \brief Set up buffering for a PhysicsFS file handle.
  1197  * \brief Set up buffering for a PhysicsFS file handle.
  1197  *
  1198  *
  1198  * Define an i/o buffer for a file handle. A memory block of (bufsize) bytes
  1199  * Define an i/o buffer for a file handle. A memory block of (bufsize) bytes
  1199  *  will be allocated and associated with (handle).
  1200  *  will be allocated and associated with (handle).
  1200  *
  1201  *
  1229  * \sa PHYSFS_flush
  1230  * \sa PHYSFS_flush
  1230  * \sa PHYSFS_read
  1231  * \sa PHYSFS_read
  1231  * \sa PHYSFS_write
  1232  * \sa PHYSFS_write
  1232  * \sa PHYSFS_close
  1233  * \sa PHYSFS_close
  1233  */
  1234  */
  1234 __EXPORT__ int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 bufsize);
  1235 __EXPORT__ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize);
  1235 
  1236 
  1236 
  1237 
  1237 /**
  1238 /**
  1238  * \fn int PHYSFS_flush(PHYSFS_file *handle)
  1239  * \fn int PHYSFS_flush(PHYSFS_File *handle)
  1239  * \brief Flush a buffered PhysicsFS file handle.
  1240  * \brief Flush a buffered PhysicsFS file handle.
  1240  *
  1241  *
  1241  * For buffered files opened for writing, this will put the current contents
  1242  * For buffered files opened for writing, this will put the current contents
  1242  *  of the buffer to disk and flag the buffer as empty if possible.
  1243  *  of the buffer to disk and flag the buffer as empty if possible.
  1243  *
  1244  *
  1248  *  \return nonzero if successful, zero on error.
  1249  *  \return nonzero if successful, zero on error.
  1249  *
  1250  *
  1250  * \sa PHYSFS_setBuffer
  1251  * \sa PHYSFS_setBuffer
  1251  * \sa PHYSFS_close
  1252  * \sa PHYSFS_close
  1252  */
  1253  */
  1253 __EXPORT__ int PHYSFS_flush(PHYSFS_file *handle);
  1254 __EXPORT__ int PHYSFS_flush(PHYSFS_File *handle);
  1254 
  1255 
  1255 
  1256 
  1256 /* Byteorder stuff... */
  1257 /* Byteorder stuff... */
  1257 
  1258 
  1258 /**
  1259 /**
  1419  */
  1420  */
  1420 __EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
  1421 __EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
  1421 
  1422 
  1422 
  1423 
  1423 /**
  1424 /**
  1424  * \fn int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
  1425  * \fn int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val)
  1425  * \brief Read and convert a signed 16-bit littleendian value.
  1426  * \brief Read and convert a signed 16-bit littleendian value.
  1426  *
  1427  *
  1427  * Convenience function. Read a signed 16-bit littleendian value from a
  1428  * Convenience function. Read a signed 16-bit littleendian value from a
  1428  *  file and convert it to the platform's native byte order.
  1429  *  file and convert it to the platform's native byte order.
  1429  *
  1430  *
  1431  *    \param val pointer to where value should be stored.
  1432  *    \param val pointer to where value should be stored.
  1432  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1433  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1433  *           store the result. On failure, you can find out what went wrong
  1434  *           store the result. On failure, you can find out what went wrong
  1434  *           from PHYSFS_GetLastError().
  1435  *           from PHYSFS_GetLastError().
  1435  */
  1436  */
  1436 __EXPORT__ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val);
  1437 __EXPORT__ int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val);
  1437 
  1438 
  1438 
  1439 
  1439 /**
  1440 /**
  1440  * \fn int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
  1441  * \fn int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val)
  1441  * \brief Read and convert an unsigned 16-bit littleendian value.
  1442  * \brief Read and convert an unsigned 16-bit littleendian value.
  1442  *
  1443  *
  1443  * Convenience function. Read an unsigned 16-bit littleendian value from a
  1444  * Convenience function. Read an unsigned 16-bit littleendian value from a
  1444  *  file and convert it to the platform's native byte order.
  1445  *  file and convert it to the platform's native byte order.
  1445  *
  1446  *
  1448  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1449  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1449  *           store the result. On failure, you can find out what went wrong
  1450  *           store the result. On failure, you can find out what went wrong
  1450  *           from PHYSFS_GetLastError().
  1451  *           from PHYSFS_GetLastError().
  1451  *
  1452  *
  1452  */
  1453  */
  1453 __EXPORT__ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val);
  1454 __EXPORT__ int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val);
  1454 
  1455 
  1455 
  1456 
  1456 /**
  1457 /**
  1457  * \fn int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
  1458  * \fn int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val)
  1458  * \brief Read and convert a signed 16-bit bigendian value.
  1459  * \brief Read and convert a signed 16-bit bigendian value.
  1459  *
  1460  *
  1460  * Convenience function. Read a signed 16-bit bigendian value from a
  1461  * Convenience function. Read a signed 16-bit bigendian value from a
  1461  *  file and convert it to the platform's native byte order.
  1462  *  file and convert it to the platform's native byte order.
  1462  *
  1463  *
  1464  *    \param val pointer to where value should be stored.
  1465  *    \param val pointer to where value should be stored.
  1465  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1466  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1466  *           store the result. On failure, you can find out what went wrong
  1467  *           store the result. On failure, you can find out what went wrong
  1467  *           from PHYSFS_GetLastError().
  1468  *           from PHYSFS_GetLastError().
  1468  */
  1469  */
  1469 __EXPORT__ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val);
  1470 __EXPORT__ int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val);
  1470 
  1471 
  1471 
  1472 
  1472 /**
  1473 /**
  1473  * \fn int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
  1474  * \fn int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val)
  1474  * \brief Read and convert an unsigned 16-bit bigendian value.
  1475  * \brief Read and convert an unsigned 16-bit bigendian value.
  1475  *
  1476  *
  1476  * Convenience function. Read an unsigned 16-bit bigendian value from a
  1477  * Convenience function. Read an unsigned 16-bit bigendian value from a
  1477  *  file and convert it to the platform's native byte order.
  1478  *  file and convert it to the platform's native byte order.
  1478  *
  1479  *
  1481  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1482  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1482  *           store the result. On failure, you can find out what went wrong
  1483  *           store the result. On failure, you can find out what went wrong
  1483  *           from PHYSFS_GetLastError().
  1484  *           from PHYSFS_GetLastError().
  1484  *
  1485  *
  1485  */
  1486  */
  1486 __EXPORT__ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val);
  1487 __EXPORT__ int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val);
  1487 
  1488 
  1488 
  1489 
  1489 /**
  1490 /**
  1490  * \fn int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
  1491  * \fn int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val)
  1491  * \brief Read and convert a signed 32-bit littleendian value.
  1492  * \brief Read and convert a signed 32-bit littleendian value.
  1492  *
  1493  *
  1493  * Convenience function. Read a signed 32-bit littleendian value from a
  1494  * Convenience function. Read a signed 32-bit littleendian value from a
  1494  *  file and convert it to the platform's native byte order.
  1495  *  file and convert it to the platform's native byte order.
  1495  *
  1496  *
  1497  *    \param val pointer to where value should be stored.
  1498  *    \param val pointer to where value should be stored.
  1498  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1499  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1499  *           store the result. On failure, you can find out what went wrong
  1500  *           store the result. On failure, you can find out what went wrong
  1500  *           from PHYSFS_GetLastError().
  1501  *           from PHYSFS_GetLastError().
  1501  */
  1502  */
  1502 __EXPORT__ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val);
  1503 __EXPORT__ int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val);
  1503 
  1504 
  1504 
  1505 
  1505 /**
  1506 /**
  1506  * \fn int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
  1507  * \fn int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val)
  1507  * \brief Read and convert an unsigned 32-bit littleendian value.
  1508  * \brief Read and convert an unsigned 32-bit littleendian value.
  1508  *
  1509  *
  1509  * Convenience function. Read an unsigned 32-bit littleendian value from a
  1510  * Convenience function. Read an unsigned 32-bit littleendian value from a
  1510  *  file and convert it to the platform's native byte order.
  1511  *  file and convert it to the platform's native byte order.
  1511  *
  1512  *
  1514  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1515  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1515  *           store the result. On failure, you can find out what went wrong
  1516  *           store the result. On failure, you can find out what went wrong
  1516  *           from PHYSFS_GetLastError().
  1517  *           from PHYSFS_GetLastError().
  1517  *
  1518  *
  1518  */
  1519  */
  1519 __EXPORT__ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val);
  1520 __EXPORT__ int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val);
  1520 
  1521 
  1521 
  1522 
  1522 /**
  1523 /**
  1523  * \fn int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
  1524  * \fn int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val)
  1524  * \brief Read and convert a signed 32-bit bigendian value.
  1525  * \brief Read and convert a signed 32-bit bigendian value.
  1525  *
  1526  *
  1526  * Convenience function. Read a signed 32-bit bigendian value from a
  1527  * Convenience function. Read a signed 32-bit bigendian value from a
  1527  *  file and convert it to the platform's native byte order.
  1528  *  file and convert it to the platform's native byte order.
  1528  *
  1529  *
  1530  *    \param val pointer to where value should be stored.
  1531  *    \param val pointer to where value should be stored.
  1531  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1532  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1532  *           store the result. On failure, you can find out what went wrong
  1533  *           store the result. On failure, you can find out what went wrong
  1533  *           from PHYSFS_GetLastError().
  1534  *           from PHYSFS_GetLastError().
  1534  */
  1535  */
  1535 __EXPORT__ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val);
  1536 __EXPORT__ int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val);
  1536 
  1537 
  1537 
  1538 
  1538 /**
  1539 /**
  1539  * \fn int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
  1540  * \fn int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val)
  1540  * \brief Read and convert an unsigned 32-bit bigendian value.
  1541  * \brief Read and convert an unsigned 32-bit bigendian value.
  1541  *
  1542  *
  1542  * Convenience function. Read an unsigned 32-bit bigendian value from a
  1543  * Convenience function. Read an unsigned 32-bit bigendian value from a
  1543  *  file and convert it to the platform's native byte order.
  1544  *  file and convert it to the platform's native byte order.
  1544  *
  1545  *
  1547  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1548  *   \return zero on failure, non-zero on success. If successful, (*val) will
  1548  *           store the result. On failure, you can find out what went wrong
  1549  *           store the result. On failure, you can find out what went wrong
  1549  *           from PHYSFS_GetLastError().
  1550  *           from PHYSFS_GetLastError().
  1550  *
  1551  *
  1551  */
  1552  */
  1552 __EXPORT__ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val);
  1553 __EXPORT__ int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val);
  1553 
  1554 
  1554 
  1555 
  1555 /**
  1556 /**
  1556  * \fn int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val)
  1557  * \fn int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val)
  1557  * \brief Read and convert a signed 64-bit littleendian value.
  1558  * \brief Read and convert a signed 64-bit littleendian value.
  1558  *
  1559  *
  1559  * Convenience function. Read a signed 64-bit littleendian value from a
  1560  * Convenience function. Read a signed 64-bit littleendian value from a
  1560  *  file and convert it to the platform's native byte order.
  1561  *  file and convert it to the platform's native byte order.
  1561  *
  1562  *
  1566  *           from PHYSFS_GetLastError().
  1567  *           from PHYSFS_GetLastError().
  1567  *
  1568  *
  1568  * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
  1569  * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
  1569  *          any sort of 64-bit support.
  1570  *          any sort of 64-bit support.
  1570  */
  1571  */
  1571 __EXPORT__ int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val);
  1572 __EXPORT__ int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val);
  1572 
  1573 
  1573 
  1574 
  1574 /**
  1575 /**
  1575  * \fn int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
  1576  * \fn int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val)
  1576  * \brief Read and convert an unsigned 64-bit littleendian value.
  1577  * \brief Read and convert an unsigned 64-bit littleendian value.
  1577  *
  1578  *
  1578  * Convenience function. Read an unsigned 64-bit littleendian value from a
  1579  * Convenience function. Read an unsigned 64-bit littleendian value from a
  1579  *  file and convert it to the platform's native byte order.
  1580  *  file and convert it to the platform's native byte order.
  1580  *
  1581  *
  1585  *           from PHYSFS_GetLastError().
  1586  *           from PHYSFS_GetLastError().
  1586  *
  1587  *
  1587  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1588  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1588  *          any sort of 64-bit support.
  1589  *          any sort of 64-bit support.
  1589  */
  1590  */
  1590 __EXPORT__ int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val);
  1591 __EXPORT__ int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val);
  1591 
  1592 
  1592 
  1593 
  1593 /**
  1594 /**
  1594  * \fn int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val)
  1595  * \fn int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val)
  1595  * \brief Read and convert a signed 64-bit bigendian value.
  1596  * \brief Read and convert a signed 64-bit bigendian value.
  1596  *
  1597  *
  1597  * Convenience function. Read a signed 64-bit bigendian value from a
  1598  * Convenience function. Read a signed 64-bit bigendian value from a
  1598  *  file and convert it to the platform's native byte order.
  1599  *  file and convert it to the platform's native byte order.
  1599  *
  1600  *
  1604  *           from PHYSFS_GetLastError().
  1605  *           from PHYSFS_GetLastError().
  1605  *
  1606  *
  1606  * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
  1607  * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
  1607  *          any sort of 64-bit support.
  1608  *          any sort of 64-bit support.
  1608  */
  1609  */
  1609 __EXPORT__ int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val);
  1610 __EXPORT__ int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val);
  1610 
  1611 
  1611 
  1612 
  1612 /**
  1613 /**
  1613  * \fn int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
  1614  * \fn int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val)
  1614  * \brief Read and convert an unsigned 64-bit bigendian value.
  1615  * \brief Read and convert an unsigned 64-bit bigendian value.
  1615  *
  1616  *
  1616  * Convenience function. Read an unsigned 64-bit bigendian value from a
  1617  * Convenience function. Read an unsigned 64-bit bigendian value from a
  1617  *  file and convert it to the platform's native byte order.
  1618  *  file and convert it to the platform's native byte order.
  1618  *
  1619  *
  1623  *           from PHYSFS_GetLastError().
  1624  *           from PHYSFS_GetLastError().
  1624  *
  1625  *
  1625  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1626  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1626  *          any sort of 64-bit support.
  1627  *          any sort of 64-bit support.
  1627  */
  1628  */
  1628 __EXPORT__ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val);
  1629 __EXPORT__ int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val);
  1629 
  1630 
  1630 
  1631 
  1631 /**
  1632 /**
  1632  * \fn int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
  1633  * \fn int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val)
  1633  * \brief Convert and write a signed 16-bit littleendian value.
  1634  * \brief Convert and write a signed 16-bit littleendian value.
  1634  *
  1635  *
  1635  * Convenience function. Convert a signed 16-bit value from the platform's
  1636  * Convenience function. Convert a signed 16-bit value from the platform's
  1636  *  native byte order to littleendian and write it to a file.
  1637  *  native byte order to littleendian and write it to a file.
  1637  *
  1638  *
  1638  *    \param file PhysicsFS file handle to which to write.
  1639  *    \param file PhysicsFS file handle to which to write.
  1639  *    \param val Value to convert and write.
  1640  *    \param val Value to convert and write.
  1640  *   \return zero on failure, non-zero on success. On failure, you can
  1641  *   \return zero on failure, non-zero on success. On failure, you can
  1641  *           find out what went wrong from PHYSFS_GetLastError().
  1642  *           find out what went wrong from PHYSFS_GetLastError().
  1642  */
  1643  */
  1643 __EXPORT__ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val);
  1644 __EXPORT__ int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val);
  1644 
  1645 
  1645 
  1646 
  1646 /**
  1647 /**
  1647  * \fn int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
  1648  * \fn int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val)
  1648  * \brief Convert and write an unsigned 16-bit littleendian value.
  1649  * \brief Convert and write an unsigned 16-bit littleendian value.
  1649  *
  1650  *
  1650  * Convenience function. Convert an unsigned 16-bit value from the platform's
  1651  * Convenience function. Convert an unsigned 16-bit value from the platform's
  1651  *  native byte order to littleendian and write it to a file.
  1652  *  native byte order to littleendian and write it to a file.
  1652  *
  1653  *
  1653  *    \param file PhysicsFS file handle to which to write.
  1654  *    \param file PhysicsFS file handle to which to write.
  1654  *    \param val Value to convert and write.
  1655  *    \param val Value to convert and write.
  1655  *   \return zero on failure, non-zero on success. On failure, you can
  1656  *   \return zero on failure, non-zero on success. On failure, you can
  1656  *           find out what went wrong from PHYSFS_GetLastError().
  1657  *           find out what went wrong from PHYSFS_GetLastError().
  1657  */
  1658  */
  1658 __EXPORT__ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val);
  1659 __EXPORT__ int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val);
  1659 
  1660 
  1660 
  1661 
  1661 /**
  1662 /**
  1662  * \fn int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
  1663  * \fn int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val)
  1663  * \brief Convert and write a signed 16-bit bigendian value.
  1664  * \brief Convert and write a signed 16-bit bigendian value.
  1664  *
  1665  *
  1665  * Convenience function. Convert a signed 16-bit value from the platform's
  1666  * Convenience function. Convert a signed 16-bit value from the platform's
  1666  *  native byte order to bigendian and write it to a file.
  1667  *  native byte order to bigendian and write it to a file.
  1667  *
  1668  *
  1668  *    \param file PhysicsFS file handle to which to write.
  1669  *    \param file PhysicsFS file handle to which to write.
  1669  *    \param val Value to convert and write.
  1670  *    \param val Value to convert and write.
  1670  *   \return zero on failure, non-zero on success. On failure, you can
  1671  *   \return zero on failure, non-zero on success. On failure, you can
  1671  *           find out what went wrong from PHYSFS_GetLastError().
  1672  *           find out what went wrong from PHYSFS_GetLastError().
  1672  */
  1673  */
  1673 __EXPORT__ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val);
  1674 __EXPORT__ int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val);
  1674 
  1675 
  1675 
  1676 
  1676 /**
  1677 /**
  1677  * \fn int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
  1678  * \fn int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val)
  1678  * \brief Convert and write an unsigned 16-bit bigendian value.
  1679  * \brief Convert and write an unsigned 16-bit bigendian value.
  1679  *
  1680  *
  1680  * Convenience function. Convert an unsigned 16-bit value from the platform's
  1681  * Convenience function. Convert an unsigned 16-bit value from the platform's
  1681  *  native byte order to bigendian and write it to a file.
  1682  *  native byte order to bigendian and write it to a file.
  1682  *
  1683  *
  1683  *    \param file PhysicsFS file handle to which to write.
  1684  *    \param file PhysicsFS file handle to which to write.
  1684  *    \param val Value to convert and write.
  1685  *    \param val Value to convert and write.
  1685  *   \return zero on failure, non-zero on success. On failure, you can
  1686  *   \return zero on failure, non-zero on success. On failure, you can
  1686  *           find out what went wrong from PHYSFS_GetLastError().
  1687  *           find out what went wrong from PHYSFS_GetLastError().
  1687  */
  1688  */
  1688 __EXPORT__ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val);
  1689 __EXPORT__ int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val);
  1689 
  1690 
  1690 
  1691 
  1691 /**
  1692 /**
  1692  * \fn int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
  1693  * \fn int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val)
  1693  * \brief Convert and write a signed 32-bit littleendian value.
  1694  * \brief Convert and write a signed 32-bit littleendian value.
  1694  *
  1695  *
  1695  * Convenience function. Convert a signed 32-bit value from the platform's
  1696  * Convenience function. Convert a signed 32-bit value from the platform's
  1696  *  native byte order to littleendian and write it to a file.
  1697  *  native byte order to littleendian and write it to a file.
  1697  *
  1698  *
  1698  *    \param file PhysicsFS file handle to which to write.
  1699  *    \param file PhysicsFS file handle to which to write.
  1699  *    \param val Value to convert and write.
  1700  *    \param val Value to convert and write.
  1700  *   \return zero on failure, non-zero on success. On failure, you can
  1701  *   \return zero on failure, non-zero on success. On failure, you can
  1701  *           find out what went wrong from PHYSFS_GetLastError().
  1702  *           find out what went wrong from PHYSFS_GetLastError().
  1702  */
  1703  */
  1703 __EXPORT__ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val);
  1704 __EXPORT__ int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val);
  1704 
  1705 
  1705 
  1706 
  1706 /**
  1707 /**
  1707  * \fn int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
  1708  * \fn int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val)
  1708  * \brief Convert and write an unsigned 32-bit littleendian value.
  1709  * \brief Convert and write an unsigned 32-bit littleendian value.
  1709  *
  1710  *
  1710  * Convenience function. Convert an unsigned 32-bit value from the platform's
  1711  * Convenience function. Convert an unsigned 32-bit value from the platform's
  1711  *  native byte order to littleendian and write it to a file.
  1712  *  native byte order to littleendian and write it to a file.
  1712  *
  1713  *
  1713  *    \param file PhysicsFS file handle to which to write.
  1714  *    \param file PhysicsFS file handle to which to write.
  1714  *    \param val Value to convert and write.
  1715  *    \param val Value to convert and write.
  1715  *   \return zero on failure, non-zero on success. On failure, you can
  1716  *   \return zero on failure, non-zero on success. On failure, you can
  1716  *           find out what went wrong from PHYSFS_GetLastError().
  1717  *           find out what went wrong from PHYSFS_GetLastError().
  1717  */
  1718  */
  1718 __EXPORT__ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val);
  1719 __EXPORT__ int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val);
  1719 
  1720 
  1720 
  1721 
  1721 /**
  1722 /**
  1722  * \fn int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
  1723  * \fn int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val)
  1723  * \brief Convert and write a signed 32-bit bigendian value.
  1724  * \brief Convert and write a signed 32-bit bigendian value.
  1724  *
  1725  *
  1725  * Convenience function. Convert a signed 32-bit value from the platform's
  1726  * Convenience function. Convert a signed 32-bit value from the platform's
  1726  *  native byte order to bigendian and write it to a file.
  1727  *  native byte order to bigendian and write it to a file.
  1727  *
  1728  *
  1728  *    \param file PhysicsFS file handle to which to write.
  1729  *    \param file PhysicsFS file handle to which to write.
  1729  *    \param val Value to convert and write.
  1730  *    \param val Value to convert and write.
  1730  *   \return zero on failure, non-zero on success. On failure, you can
  1731  *   \return zero on failure, non-zero on success. On failure, you can
  1731  *           find out what went wrong from PHYSFS_GetLastError().
  1732  *           find out what went wrong from PHYSFS_GetLastError().
  1732  */
  1733  */
  1733 __EXPORT__ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val);
  1734 __EXPORT__ int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val);
  1734 
  1735 
  1735 
  1736 
  1736 /**
  1737 /**
  1737  * \fn int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
  1738  * \fn int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val)
  1738  * \brief Convert and write an unsigned 32-bit bigendian value.
  1739  * \brief Convert and write an unsigned 32-bit bigendian value.
  1739  *
  1740  *
  1740  * Convenience function. Convert an unsigned 32-bit value from the platform's
  1741  * Convenience function. Convert an unsigned 32-bit value from the platform's
  1741  *  native byte order to bigendian and write it to a file.
  1742  *  native byte order to bigendian and write it to a file.
  1742  *
  1743  *
  1743  *    \param file PhysicsFS file handle to which to write.
  1744  *    \param file PhysicsFS file handle to which to write.
  1744  *    \param val Value to convert and write.
  1745  *    \param val Value to convert and write.
  1745  *   \return zero on failure, non-zero on success. On failure, you can
  1746  *   \return zero on failure, non-zero on success. On failure, you can
  1746  *           find out what went wrong from PHYSFS_GetLastError().
  1747  *           find out what went wrong from PHYSFS_GetLastError().
  1747  */
  1748  */
  1748 __EXPORT__ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val);
  1749 __EXPORT__ int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val);
  1749 
  1750 
  1750 
  1751 
  1751 /**
  1752 /**
  1752  * \fn int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val)
  1753  * \fn int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val)
  1753  * \brief Convert and write a signed 64-bit littleendian value.
  1754  * \brief Convert and write a signed 64-bit littleendian value.
  1754  *
  1755  *
  1755  * Convenience function. Convert a signed 64-bit value from the platform's
  1756  * Convenience function. Convert a signed 64-bit value from the platform's
  1756  *  native byte order to littleendian and write it to a file.
  1757  *  native byte order to littleendian and write it to a file.
  1757  *
  1758  *
  1761  *           find out what went wrong from PHYSFS_GetLastError().
  1762  *           find out what went wrong from PHYSFS_GetLastError().
  1762  *
  1763  *
  1763  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1764  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1764  *          any sort of 64-bit support.
  1765  *          any sort of 64-bit support.
  1765  */
  1766  */
  1766 __EXPORT__ int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val);
  1767 __EXPORT__ int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val);
  1767 
  1768 
  1768 
  1769 
  1769 /**
  1770 /**
  1770  * \fn int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
  1771  * \fn int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val)
  1771  * \brief Convert and write an unsigned 64-bit littleendian value.
  1772  * \brief Convert and write an unsigned 64-bit littleendian value.
  1772  *
  1773  *
  1773  * Convenience function. Convert an unsigned 64-bit value from the platform's
  1774  * Convenience function. Convert an unsigned 64-bit value from the platform's
  1774  *  native byte order to littleendian and write it to a file.
  1775  *  native byte order to littleendian and write it to a file.
  1775  *
  1776  *
  1779  *           find out what went wrong from PHYSFS_GetLastError().
  1780  *           find out what went wrong from PHYSFS_GetLastError().
  1780  *
  1781  *
  1781  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1782  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1782  *          any sort of 64-bit support.
  1783  *          any sort of 64-bit support.
  1783  */
  1784  */
  1784 __EXPORT__ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val);
  1785 __EXPORT__ int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val);
  1785 
  1786 
  1786 
  1787 
  1787 /**
  1788 /**
  1788  * \fn int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
  1789  * \fn int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val)
  1789  * \brief Convert and write a signed 64-bit bigending value.
  1790  * \brief Convert and write a signed 64-bit bigending value.
  1790  *
  1791  *
  1791  * Convenience function. Convert a signed 64-bit value from the platform's
  1792  * Convenience function. Convert a signed 64-bit value from the platform's
  1792  *  native byte order to bigendian and write it to a file.
  1793  *  native byte order to bigendian and write it to a file.
  1793  *
  1794  *
  1797  *           find out what went wrong from PHYSFS_GetLastError().
  1798  *           find out what went wrong from PHYSFS_GetLastError().
  1798  *
  1799  *
  1799  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1800  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1800  *          any sort of 64-bit support.
  1801  *          any sort of 64-bit support.
  1801  */
  1802  */
  1802 __EXPORT__ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val);
  1803 __EXPORT__ int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val);
  1803 
  1804 
  1804 
  1805 
  1805 /**
  1806 /**
  1806  * \fn int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val)
  1807  * \fn int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val)
  1807  * \brief Convert and write an unsigned 64-bit bigendian value.
  1808  * \brief Convert and write an unsigned 64-bit bigendian value.
  1808  *
  1809  *
  1809  * Convenience function. Convert an unsigned 64-bit value from the platform's
  1810  * Convenience function. Convert an unsigned 64-bit value from the platform's
  1810  *  native byte order to bigendian and write it to a file.
  1811  *  native byte order to bigendian and write it to a file.
  1811  *
  1812  *
  1815  *           find out what went wrong from PHYSFS_GetLastError().
  1816  *           find out what went wrong from PHYSFS_GetLastError().
  1816  *
  1817  *
  1817  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1818  * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
  1818  *          any sort of 64-bit support.
  1819  *          any sort of 64-bit support.
  1819  */
  1820  */
  1820 __EXPORT__ int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val);
  1821 __EXPORT__ int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val);
  1821 
  1822 
  1822 
  1823 
  1823 /* Everything above this line is part of the PhysicsFS 1.0 API. */
  1824 /* Everything above this line is part of the PhysicsFS 1.0 API. */
  1824 
  1825 
  1825 /**
  1826 /**