From 422171f796d7ae292e8e6e3c01add89e9800af35 Mon Sep 17 00:00:00 2001 From: "Robert G. Jakabosky" Date: Sat, 29 Jan 2022 20:50:45 +0800 Subject: [PATCH] Whitespace cleanup. --- src/lib/openjp2/j2k.c | 4 ++-- src/lib/openjp2/openjpeg.c | 8 +++----- src/lib/openjp2/openjpeg.h | 2 +- src/lib/openjp2/t2.c | 24 ++++++++++++------------ 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index 16dd1c31..3c88f955 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -4966,11 +4966,11 @@ static OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k, opj_stream_get_number_byte_left(p_stream)) { if(p_j2k->m_cp.strict) { opj_event_msg(p_manager, EVT_ERROR, - "Tile part length size inconsistent with stream length\n"); + "Tile part length size inconsistent with stream length\n"); return OPJ_FALSE; } else { opj_event_msg(p_manager, EVT_WARNING, - "Tile part length size inconsistent with stream length\n"); + "Tile part length size inconsistent with stream length\n"); } } if (p_j2k->m_specific_param.m_decoder.m_sot_length > diff --git a/src/lib/openjp2/openjpeg.c b/src/lib/openjp2/openjpeg.c index de5a1d04..294285afc 100644 --- a/src/lib/openjp2/openjpeg.c +++ b/src/lib/openjp2/openjpeg.c @@ -433,8 +433,8 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, return OPJ_FALSE; } - OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict) - { +OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict) +{ if (p_codec) { opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; @@ -449,9 +449,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, return OPJ_TRUE; } return OPJ_FALSE; - - } - +} OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 1f42e79a..ebaeda3c 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -1356,7 +1356,7 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, * @return true if the decoder is correctly set */ - OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict); +OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict); /** * Allocates worker threads for the compressor/decompressor. diff --git a/src/lib/openjp2/t2.c b/src/lib/openjp2/t2.c index c00f8f56..70a35f26 100644 --- a/src/lib/openjp2/t2.c +++ b/src/lib/openjp2/t2.c @@ -1429,15 +1429,15 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2, (partial_buffer)) { if(p_t2->cp->strict) { opj_event_msg(p_manager, EVT_WARNING, - "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, - p_pi->compno); + "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", + l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, + p_pi->compno); return OPJ_FALSE; } else { opj_event_msg(p_manager, EVT_WARNING, - "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, - p_pi->compno); + "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", + l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, + p_pi->compno); // skip this codeblock since it is a partial read partial_buffer = OPJ_TRUE; l_cblk->numchunks = 0; @@ -1583,15 +1583,15 @@ static OPJ_BOOL opj_t2_skip_packet_data(opj_t2_t* p_t2, ((*p_data_read + l_seg->newlen) > p_max_length)) { if(p_t2->cp->strict) { opj_event_msg(p_manager, EVT_ERROR, - "skip: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, - p_pi->compno); + "skip: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", + l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, + p_pi->compno); return OPJ_FALSE; } else { opj_event_msg(p_manager, EVT_WARNING, - "skip: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, - p_pi->compno); + "skip: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", + l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, + p_pi->compno); } }