Skip to content

Commit

Permalink
Rerun clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
uroni committed Jan 3, 2017
1 parent 4fa873b commit 4c36ab0
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 274 deletions.
4 changes: 2 additions & 2 deletions miniz.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char
stream.next_in = pSource;
stream.avail_in = (mz_uint32)source_len;
stream.next_out = pDest;
stream.avail_out = (mz_uint32)*pDest_len;
stream.avail_out = (mz_uint32) * pDest_len;

status = mz_deflateInit(&stream, level);
if (status != MZ_OK)
Expand Down Expand Up @@ -534,7 +534,7 @@ int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char
stream.next_in = pSource;
stream.avail_in = (mz_uint32)source_len;
stream.next_out = pDest;
stream.avail_out = (mz_uint32)*pDest_len;
stream.avail_out = (mz_uint32) * pDest_len;

status = mz_inflateInit(&stream);
if (status != MZ_OK)
Expand Down
4 changes: 2 additions & 2 deletions miniz_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef struct mz_dummy_time_t_tag

#ifdef MINIZ_NO_MALLOC
#define MZ_MALLOC(x) NULL
#define MZ_FREE(x) (void)x, ((void)0)
#define MZ_FREE(x) (void) x, ((void)0)
#define MZ_REALLOC(p, x) NULL
#else
#define MZ_MALLOC(x) malloc(x)
Expand All @@ -57,7 +57,7 @@ typedef struct mz_dummy_time_t_tag
#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))

#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES &&MINIZ_LITTLE_ENDIAN
#define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
#define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
#else
Expand Down
3 changes: 1 addition & 2 deletions miniz_tdef.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int
static const mz_uint8 chans[] = { 0x00, 0x00, 0x04, 0x02, 0x06 };
mz_uint8 pnghdr[41] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0, 0, (mz_uint8)(w >> 8), (mz_uint8)w, 0, 0, (mz_uint8)(h >> 8), (mz_uint8)h, 8, chans[num_chans], 0, 0, 0, 0, 0, 0, 0,
(mz_uint8)(*pLen_out >> 24), (mz_uint8)(*pLen_out >> 16), (mz_uint8)(*pLen_out >> 8), (mz_uint8)*pLen_out, 0x49, 0x44, 0x41, 0x54 };
(mz_uint8)(*pLen_out >> 24), (mz_uint8)(*pLen_out >> 16), (mz_uint8)(*pLen_out >> 8), (mz_uint8) * pLen_out, 0x49, 0x44, 0x41, 0x54 };
c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, pnghdr + 12, 17);
for (i = 0; i < 4; ++i, c <<= 8)
((mz_uint8 *)(pnghdr + 29))[i] = (mz_uint8)(c >> 24);
Expand Down Expand Up @@ -1530,4 +1530,3 @@ void tdefl_compressor_free(tdefl_compressor *pComp)
#ifdef __cplusplus
}
#endif

7 changes: 3 additions & 4 deletions miniz_tinfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@
* THE SOFTWARE.
*
**************************************************************************/

#include "miniz_tinfl.h"

#ifdef __cplusplus
extern "C" {
#endif


/* ------------------- Low-level Decompression (completely independent from all compression API's) */

#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
Expand All @@ -46,7 +45,8 @@ extern "C" {
status = result; \
r->m_state = state_index; \
goto common_exit; \
case state_index:; \
case state_index: \
; \
} \
MZ_MACRO_END
#define TINFL_CR_RETURN_FOREVER(state_index, result) \
Expand Down Expand Up @@ -732,4 +732,3 @@ void tinfl_decompressor_free(tinfl_decompressor *pDecomp)
#ifdef __cplusplus
}
#endif

1 change: 0 additions & 1 deletion miniz_tinfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ typedef enum
/* (either exact or worst case) and will stop calling the inflator and fail after receiving too much. In pure streaming scenarios where you have no idea how many bytes to expect this may not be possible */
/* so I may need to add some code to address this. */
TINFL_STATUS_HAS_MORE_OUTPUT = 2

} tinfl_status;

/* Initializes the decompressor to its initial state. */
Expand Down
Loading

0 comments on commit 4c36ab0

Please sign in to comment.