diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-30 00:53:31 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-30 00:53:31 +0200 |
| commit | 073a859acf16ccbc0f49364e38126bf2bf03aa3d (patch) | |
| tree | 90fac6072c5fe3ccee0505c881f89aa262d4eed7 /libpsn00b/include/lzp | |
| parent | 0e755e9801a2dcf7b9827c90cc38e9f532d06393 (diff) | |
| download | psn00bsdk-073a859acf16ccbc0f49364e38126bf2bf03aa3d.tar.gz | |
Deprecate u_short, u_int and u_long types in libpsn00b
Diffstat (limited to 'libpsn00b/include/lzp')
| -rw-r--r-- | libpsn00b/include/lzp/lzp.h | 20 | ||||
| -rw-r--r-- | libpsn00b/include/lzp/lzqlp.h | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/libpsn00b/include/lzp/lzp.h b/libpsn00b/include/lzp/lzp.h index cfeeb72..456de02 100644 --- a/libpsn00b/include/lzp/lzp.h +++ b/libpsn00b/include/lzp/lzp.h @@ -16,7 +16,7 @@ #ifndef _LZPACK_H #define _LZPACK_H -#include <sys/types.h> +#include <stdint.h> #ifdef _WIN32 #include <windows.h> #endif @@ -64,9 +64,9 @@ typedef struct { //! File ID (must always be 'LZP') - char id[3]; + char id[3]; //! File count - u_char numFiles; + uint8_t numFiles; } LZP_HEAD; @@ -74,15 +74,15 @@ typedef struct { typedef struct { //! File name - char fileName[16]; + char fileName[16]; //! CRC32 checksum of file - u_int crc; + uint32_t crc; //! Original size of file in bytes - u_int fileSize; + uint32_t fileSize; //! Compressed size of file - u_int packedSize; + uint32_t packedSize; //! File data offset - u_int offset; + uint32_t offset; } LZP_FILE; @@ -162,7 +162,7 @@ void lzResetHashSizes(); * * \returns CRC16 hash of specified buffer. */ -unsigned short lzCRC16(const void* buff, int bytes, unsigned short crc); +uint16_t lzCRC16(const void* buff, int bytes, uint16_t crc); /*! Calculates a CRC32 hash of the specified buffer. * @@ -172,7 +172,7 @@ unsigned short lzCRC16(const void* buff, int bytes, unsigned short crc); * * \returns CRC32 hash of specified buffer. */ -unsigned int lzCRC32(const void* buff, int bytes, unsigned int crc); +uint32_t lzCRC32(const void* buff, int bytes, uint32_t crc); /*! @} */ diff --git a/libpsn00b/include/lzp/lzqlp.h b/libpsn00b/include/lzp/lzqlp.h index 5b70b40..32ce0d7 100644 --- a/libpsn00b/include/lzp/lzqlp.h +++ b/libpsn00b/include/lzp/lzqlp.h @@ -1,7 +1,7 @@ #ifndef _QLP_H #define _QLP_H -#include <sys/types.h> +#include <stdint.h> #ifdef _WIN32 #include <windows.h> #endif @@ -13,14 +13,14 @@ #define PACK_ERR_READ_FAULT -4 typedef struct { - char id[3]; - u_char numfiles; + char id[3]; + uint8_t numfiles; } QLP_HEAD; typedef struct { - char name[16]; - u_int size; - u_int offs; + char name[16]; + uint32_t size; + uint32_t offs; } QLP_FILE; int qlpFileCount(const QLP_HEAD* qlpfile); |
