Indent with spaces, not tabs
This commit is contained in:
parent
3616bf804b
commit
028d64948b
@ -43,7 +43,7 @@ static void hsv_to_rgb(int hue, int min, int max, rgb_t *p)
|
|||||||
|
|
||||||
switch((int)h) {
|
switch((int)h) {
|
||||||
case 0: p->r = c; p->g = X; return;
|
case 0: p->r = c; p->g = X; return;
|
||||||
case 1: p->r = X; p->g = c; return;
|
case 1: p->r = X; p->g = c; return;
|
||||||
case 2: p->g = c; p->b = X; return;
|
case 2: p->g = c; p->b = X; return;
|
||||||
case 3: p->g = X; p->b = c; return;
|
case 3: p->g = X; p->b = c; return;
|
||||||
case 4: p->r = X; p->b = c; return;
|
case 4: p->r = X; p->b = c; return;
|
||||||
|
|||||||
12
miniz_tdef.c
12
miniz_tdef.c
@ -740,15 +740,15 @@ static int tdefl_flush_block(tdefl_compressor *d, int flush)
|
|||||||
#ifdef MINIZ_UNALIGNED_USE_MEMCPY
|
#ifdef MINIZ_UNALIGNED_USE_MEMCPY
|
||||||
static inline mz_uint16 TDEFL_READ_UNALIGNED_WORD(const mz_uint8* p)
|
static inline mz_uint16 TDEFL_READ_UNALIGNED_WORD(const mz_uint8* p)
|
||||||
{
|
{
|
||||||
mz_uint16 ret;
|
mz_uint16 ret;
|
||||||
memcpy(&ret, p, sizeof(mz_uint16));
|
memcpy(&ret, p, sizeof(mz_uint16));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
static inline mz_uint16 TDEFL_READ_UNALIGNED_WORD2(const mz_uint16* p)
|
static inline mz_uint16 TDEFL_READ_UNALIGNED_WORD2(const mz_uint16* p)
|
||||||
{
|
{
|
||||||
mz_uint16 ret;
|
mz_uint16 ret;
|
||||||
memcpy(&ret, p, sizeof(mz_uint16));
|
memcpy(&ret, p, sizeof(mz_uint16));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16 *)(p)
|
#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16 *)(p)
|
||||||
|
|||||||
@ -547,7 +547,7 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
|||||||
pOut_buf_cur[2] = pSrc[2];
|
pOut_buf_cur[2] = pSrc[2];
|
||||||
pOut_buf_cur += 3;
|
pOut_buf_cur += 3;
|
||||||
pSrc += 3;
|
pSrc += 3;
|
||||||
counter -= 3;
|
counter -= 3;
|
||||||
}
|
}
|
||||||
if (counter > 0)
|
if (counter > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
20
miniz_zip.c
20
miniz_zip.c
@ -979,7 +979,7 @@ mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename,
|
|||||||
|
|
||||||
if (file_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
|
if (file_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
|
||||||
{
|
{
|
||||||
MZ_FCLOSE(pFile);
|
MZ_FCLOSE(pFile);
|
||||||
return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
|
return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3200,9 +3200,9 @@ mz_bool mz_zip_writer_add_mem_ex_v2(mz_zip_archive *pZip, const char *pArchive_n
|
|||||||
{
|
{
|
||||||
/* Bail early if the archive would obviously become too large */
|
/* Bail early if the archive would obviously become too large */
|
||||||
if ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size
|
if ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size
|
||||||
+ MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + user_extra_data_len +
|
+ MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + user_extra_data_len +
|
||||||
pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + user_extra_data_central_len
|
pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + user_extra_data_central_len
|
||||||
+ MZ_ZIP_DATA_DESCRIPTER_SIZE32) > 0xFFFFFFFF)
|
+ MZ_ZIP_DATA_DESCRIPTER_SIZE32) > 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
pState->m_zip64 = MZ_TRUE;
|
pState->m_zip64 = MZ_TRUE;
|
||||||
/*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
|
/*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
|
||||||
@ -3470,8 +3470,8 @@ mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchive_name,
|
|||||||
{
|
{
|
||||||
/* Bail early if the archive would obviously become too large */
|
/* Bail early if the archive would obviously become too large */
|
||||||
if ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE
|
if ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE
|
||||||
+ archive_name_size + comment_size + user_extra_data_len + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + 1024
|
+ archive_name_size + comment_size + user_extra_data_len + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + 1024
|
||||||
+ MZ_ZIP_DATA_DESCRIPTER_SIZE32 + user_extra_data_central_len) > 0xFFFFFFFF)
|
+ MZ_ZIP_DATA_DESCRIPTER_SIZE32 + user_extra_data_central_len) > 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
pState->m_zip64 = MZ_TRUE;
|
pState->m_zip64 = MZ_TRUE;
|
||||||
/*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
|
/*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
|
||||||
@ -4020,10 +4020,10 @@ mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *
|
|||||||
{
|
{
|
||||||
/* src is zip64, dest must be zip64 */
|
/* src is zip64, dest must be zip64 */
|
||||||
|
|
||||||
/* name uint32_t's */
|
/* name uint32_t's */
|
||||||
/* id 1 (optional in zip64?) */
|
/* id 1 (optional in zip64?) */
|
||||||
/* crc 1 */
|
/* crc 1 */
|
||||||
/* comp_size 2 */
|
/* comp_size 2 */
|
||||||
/* uncomp_size 2 */
|
/* uncomp_size 2 */
|
||||||
if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, (sizeof(mz_uint32) * 6)) != (sizeof(mz_uint32) * 6))
|
if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, (sizeof(mz_uint32) * 6)) != (sizeof(mz_uint32) * 6))
|
||||||
{
|
{
|
||||||
|
|||||||
14
miniz_zip.h
14
miniz_zip.h
@ -313,13 +313,13 @@ mz_bool mz_zip_reader_extract_file_to_cfile(mz_zip_archive *pZip, const char *pA
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* TODO */
|
/* TODO */
|
||||||
typedef void *mz_zip_streaming_extract_state_ptr;
|
typedef void *mz_zip_streaming_extract_state_ptr;
|
||||||
mz_zip_streaming_extract_state_ptr mz_zip_streaming_extract_begin(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags);
|
mz_zip_streaming_extract_state_ptr mz_zip_streaming_extract_begin(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags);
|
||||||
uint64_t mz_zip_streaming_extract_get_size(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
uint64_t mz_zip_streaming_extract_get_size(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
||||||
uint64_t mz_zip_streaming_extract_get_cur_ofs(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
uint64_t mz_zip_streaming_extract_get_cur_ofs(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
||||||
mz_bool mz_zip_streaming_extract_seek(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, uint64_t new_ofs);
|
mz_bool mz_zip_streaming_extract_seek(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, uint64_t new_ofs);
|
||||||
size_t mz_zip_streaming_extract_read(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, void *pBuf, size_t buf_size);
|
size_t mz_zip_streaming_extract_read(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, void *pBuf, size_t buf_size);
|
||||||
mz_bool mz_zip_streaming_extract_end(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
mz_bool mz_zip_streaming_extract_end(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This function compares the archive's local headers, the optional local zip64 extended information block, and the optional descriptor following the compressed data vs. the data in the central directory. */
|
/* This function compares the archive's local headers, the optional local zip64 extended information block, and the optional descriptor following the compressed data vs. the data in the central directory. */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user