Rename boolean to wxjpeg_boolean to avoid conflicts, e.g. with boolean defined in the Windows headers.

This is partial cherry-pick of e604ac7991a2f5bae2ea3ba01662be566e01af8d
from the main repository.
This commit is contained in:
Michael Wetherell 2006-11-28 16:24:45 +00:00 committed by Vadim Zeitlin
parent 13d8529046
commit bccd1f6886
38 changed files with 224 additions and 204 deletions

View File

@ -116,7 +116,7 @@ jpeg_abort_compress (j_compress_ptr cinfo)
*/
GLOBAL(void)
jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
jpeg_suppress_tables (j_compress_ptr cinfo, wxjpeg_boolean suppress)
{
int i;
JQUANT_TBL * qtbl;

View File

@ -35,7 +35,7 @@
*/
GLOBAL(void)
jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
jpeg_start_compress (j_compress_ptr cinfo, wxjpeg_boolean write_all_tables)
{
if (cinfo->global_state != CSTATE_START)
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

View File

@ -58,12 +58,12 @@ typedef my_coef_controller * my_coef_ptr;
/* Forward declarations */
METHODDEF(boolean) compress_data
METHODDEF(wxjpeg_boolean) compress_data
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
#ifdef FULL_COEF_BUFFER_SUPPORTED
METHODDEF(boolean) compress_first_pass
METHODDEF(wxjpeg_boolean) compress_first_pass
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
METHODDEF(boolean) compress_output
METHODDEF(wxjpeg_boolean) compress_output
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
#endif
@ -139,7 +139,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
* which we index according to the component's SOF position.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@ -241,7 +241,7 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
* at the scan-dependent variables (MCU dimensions, etc).
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@ -337,7 +337,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
* NB: input_buf is ignored; it is likely to be a NULL pointer.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@ -402,7 +402,7 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
*/
GLOBAL(void)
jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
jinit_c_coef_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_coef_ptr coef;

View File

@ -86,11 +86,11 @@ typedef struct {
/* Forward declarations */
METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
#ifdef ENTROPY_OPT_SUPPORTED
METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
#endif
@ -103,7 +103,7 @@ METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
*/
METHODDEF(void)
start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
start_pass_huff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
int ci, dctbl, actbl;
@ -176,7 +176,7 @@ start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
*/
GLOBAL(void)
jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
jpeg_make_c_derived_tbl (j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
c_derived_tbl ** pdtbl)
{
JHUFF_TBL *htbl;
@ -274,7 +274,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
{ action; } }
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
dump_buffer (working_state * state)
/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
{
@ -298,7 +298,7 @@ dump_buffer (working_state * state)
*/
INLINE
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
emit_bits (working_state * state, unsigned int code, int size)
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
{
@ -336,7 +336,7 @@ emit_bits (working_state * state, unsigned int code, int size)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
flush_bits (working_state * state)
{
if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
@ -349,7 +349,7 @@ flush_bits (working_state * state)
/* Encode a single block's worth of coefficients */
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
c_derived_tbl *dctbl, c_derived_tbl *actbl)
{
@ -447,7 +447,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
* Emit a restart marker & resynchronize predictions.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
emit_restart (working_state * state, int restart_num)
{
int ci;
@ -472,7 +472,7 @@ emit_restart (working_state * state, int restart_num)
* Encode and output one MCU's worth of Huffman-compressed coefficients.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@ -641,7 +641,7 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
* No data is actually output, so no suspension return is possible.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@ -849,8 +849,8 @@ finish_pass_gather (j_compress_ptr cinfo)
int ci, dctbl, actbl;
jpeg_component_info * compptr;
JHUFF_TBL **htblptr;
boolean did_dc[NUM_HUFF_TBLS];
boolean did_ac[NUM_HUFF_TBLS];
wxjpeg_boolean did_dc[NUM_HUFF_TBLS];
wxjpeg_boolean did_ac[NUM_HUFF_TBLS];
/* It's important not to apply jpeg_gen_optimal_table more than once
* per table, because it clobbers the input frequency counts!

View File

@ -39,7 +39,7 @@ typedef struct {
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_c_derived_tbl
JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
JPP((j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
c_derived_tbl ** pdtbl));
/* Generate an optimal table definition given the specified counts */

View File

@ -56,7 +56,7 @@ jinit_compress_master (j_compress_ptr cinfo)
/* Need a full-image coefficient buffer in any multi-pass mode. */
jinit_c_coef_controller(cinfo,
(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
(wxjpeg_boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
jinit_marker_writer(cinfo);

View File

@ -30,7 +30,7 @@ typedef struct {
JDIMENSION cur_iMCU_row; /* number of current iMCU row */
JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */
boolean suspended; /* remember if we suspended output */
wxjpeg_boolean suspended; /* remember if we suspended output */
J_BUF_MODE pass_mode; /* current operating mode */
/* If using just a strip buffer, this points to the entire set of buffers
@ -173,7 +173,7 @@ process_data_buffer_main (j_compress_ptr cinfo,
my_main_ptr mymain = (my_main_ptr) cinfo->main;
int ci;
jpeg_component_info *compptr;
boolean writing = (mymain->pass_mode != JBUF_CRANK_DEST);
wxjpeg_boolean writing = (mymain->pass_mode != JBUF_CRANK_DEST);
while (mymain->cur_iMCU_row < cinfo->total_iMCU_rows) {
/* Realign the virtual buffers if at the start of an iMCU row. */
@ -242,7 +242,7 @@ process_data_buffer_main (j_compress_ptr cinfo,
*/
GLOBAL(void)
jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
jinit_c_main_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_main_ptr mymain;
int ci;

View File

@ -181,7 +181,7 @@ emit_dqt (j_compress_ptr cinfo, int index)
LOCAL(void)
emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
emit_dht (j_compress_ptr cinfo, int index, wxjpeg_boolean is_ac)
/* Emit a DHT marker */
{
JHUFF_TBL * htbl;
@ -494,7 +494,7 @@ METHODDEF(void)
write_frame_header (j_compress_ptr cinfo)
{
int ci, prec;
boolean is_baseline;
wxjpeg_boolean is_baseline;
jpeg_component_info *compptr;
/* Emit DQT for each quantization table.

View File

@ -135,7 +135,7 @@ validate_script (j_compress_ptr cinfo)
const jpeg_scan_info * scanptr;
int scanno, ncomps, ci, coefi, thisi;
int Ss, Se, Ah, Al;
boolean component_sent[MAX_COMPONENTS];
wxjpeg_boolean component_sent[MAX_COMPONENTS];
#ifdef C_PROGRESSIVE_SUPPORTED
int * last_bitpos_ptr;
int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
@ -540,7 +540,7 @@ finish_pass_master (j_compress_ptr cinfo)
*/
GLOBAL(void)
jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
jinit_c_master_control (j_compress_ptr cinfo, wxjpeg_boolean transcode_only)
{
my_master_ptr master;

View File

@ -22,7 +22,7 @@
GLOBAL(void)
jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
const unsigned int *basic_table,
int scale_factor, boolean force_baseline)
int scale_factor, wxjpeg_boolean force_baseline)
/* Define a quantization table equal to the basic_table times
* a scale factor (given as a percentage).
* If force_baseline is TRUE, the computed quantization table entries
@ -62,7 +62,7 @@ jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
GLOBAL(void)
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
boolean force_baseline)
wxjpeg_boolean force_baseline)
/* Set or change the 'quality' (quantization) setting, using default tables
* and a straight percentage-scaling quality scale. In most cases it's better
* to use jpeg_set_quality (below); this entry point is provided for
@ -129,7 +129,7 @@ jpeg_quality_scaling (int quality)
GLOBAL(void)
jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
jpeg_set_quality (j_compress_ptr cinfo, int quality, wxjpeg_boolean force_baseline)
/* Set or change the 'quality' (quantization) setting, using default tables.
* This is the standard quality-adjusting entry point for typical user
* interfaces; only those who want detailed control over quantization tables

View File

@ -25,7 +25,7 @@ typedef struct {
struct jpeg_entropy_encoder pub; /* public fields */
/* Mode flag: TRUE for optimization, FALSE for actual data output */
boolean gather_statistics;
wxjpeg_boolean gather_statistics;
/* Bit-level coding status.
* next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
@ -86,13 +86,13 @@ typedef phuff_entropy_encoder * phuff_entropy_ptr;
#endif
/* Forward declarations */
METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
METHODDEF(wxjpeg_boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
@ -103,10 +103,10 @@ METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
*/
METHODDEF(void)
start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)
start_pass_phuff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
boolean is_DC_band;
wxjpeg_boolean is_DC_band;
int ci, tbl;
jpeg_component_info * compptr;
@ -373,7 +373,7 @@ emit_restart (phuff_entropy_ptr entropy, int restart_num)
* or first pass of successive approximation).
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -460,7 +460,7 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
* or first pass of successive approximation).
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -567,7 +567,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
* is not very clear on the point.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -614,7 +614,7 @@ encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
* MCU encoding for AC successive approximation refinement scan.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -767,11 +767,11 @@ METHODDEF(void)
finish_pass_gather_phuff (j_compress_ptr cinfo)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
boolean is_DC_band;
wxjpeg_boolean is_DC_band;
int ci, tbl;
jpeg_component_info * compptr;
JHUFF_TBL **htblptr;
boolean did[NUM_HUFF_TBLS];
wxjpeg_boolean did[NUM_HUFF_TBLS];
/* Flush out buffered data (all we care about is counting the EOB symbol) */
emit_eobrun(entropy);

View File

@ -312,7 +312,7 @@ create_context_buffer (j_compress_ptr cinfo)
*/
GLOBAL(void)
jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
jinit_c_prep_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_prep_ptr prep;
int ci;

View File

@ -466,7 +466,7 @@ jinit_downsampler (j_compress_ptr cinfo)
my_downsample_ptr downsample;
int ci;
jpeg_component_info * compptr;
boolean smoothok = TRUE;
wxjpeg_boolean smoothok = TRUE;
downsample = (my_downsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,

View File

@ -274,7 +274,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
* NB: input_buf is ignored; it is likely to be a NULL pointer.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;

View File

@ -238,7 +238,7 @@ default_decompress_parms (j_decompress_ptr cinfo)
*/
GLOBAL(int)
jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
jpeg_read_header (j_decompress_ptr cinfo, wxjpeg_boolean require_image)
{
int retcode;
@ -330,7 +330,7 @@ jpeg_consume_input (j_decompress_ptr cinfo)
* Have we finished reading the input file?
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_input_complete (j_decompress_ptr cinfo)
{
/* Check for valid jpeg object */
@ -345,7 +345,7 @@ jpeg_input_complete (j_decompress_ptr cinfo)
* Is there more than one scan?
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_has_multiple_scans (j_decompress_ptr cinfo)
{
/* Only valid after jpeg_read_header completes */
@ -365,7 +365,7 @@ jpeg_has_multiple_scans (j_decompress_ptr cinfo)
* a suspending data source is used.
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_finish_decompress (j_decompress_ptr cinfo)
{
if ((cinfo->global_state == DSTATE_SCANNING ||

View File

@ -20,7 +20,7 @@
/* Forward declarations */
LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
LOCAL(wxjpeg_boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
/*
@ -34,7 +34,7 @@ LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
* a suspending data source is used.
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_start_decompress (j_decompress_ptr cinfo)
{
if (cinfo->global_state == DSTATE_READY) {
@ -91,7 +91,7 @@ jpeg_start_decompress (j_decompress_ptr cinfo)
* If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
output_pass_setup (j_decompress_ptr cinfo)
{
if (cinfo->global_state != DSTATE_PRESCAN) {
@ -224,7 +224,7 @@ jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
* Initialize for an output pass in buffered-image mode.
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
{
if (cinfo->global_state != DSTATE_BUFIMAGE &&
@ -249,7 +249,7 @@ jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
* a suspending data source is used.
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_finish_output (j_decompress_ptr cinfo)
{
if ((cinfo->global_state == DSTATE_SCANNING ||

View File

@ -77,7 +77,7 @@ init_destination (j_compress_ptr cinfo)
* write it out when emptying the buffer externally.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;

View File

@ -27,7 +27,7 @@ typedef struct {
FILE * infile; /* source stream */
JOCTET * buffer; /* start of buffer */
boolean start_of_file; /* have we gotten any data yet? */
wxjpeg_boolean start_of_file; /* have we gotten any data yet? */
} my_source_mgr;
typedef my_source_mgr * my_src_ptr;
@ -86,7 +86,7 @@ init_source (j_decompress_ptr cinfo)
* the front of the buffer rather than discarding it.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;

View File

@ -69,7 +69,7 @@ METHODDEF(int) decompress_data
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
#endif
#ifdef BLOCK_SMOOTHING_SUPPORTED
LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
LOCAL(wxjpeg_boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
METHODDEF(int) decompress_smooth_data
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
#endif
@ -401,11 +401,11 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
* more accurately than they really are.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
smoothing_ok (j_decompress_ptr cinfo)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
boolean smoothing_useful = FALSE;
wxjpeg_boolean smoothing_useful = FALSE;
int ci, coefi;
jpeg_component_info *compptr;
JQUANT_TBL * qtable;
@ -470,7 +470,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
JDIMENSION output_col;
jpeg_component_info *compptr;
inverse_DCT_method_ptr inverse_DCT;
boolean first_row, last_row;
wxjpeg_boolean first_row, last_row;
JBLOCK workspace;
int *coef_bits;
JQUANT_TBL *quanttbl;
@ -673,7 +673,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
*/
GLOBAL(void)
jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
jinit_d_coef_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_coef_ptr coef;

View File

@ -71,8 +71,8 @@ typedef struct {
d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
/* Whether we care about the DC and AC coefficient values for each block */
boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
wxjpeg_boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
wxjpeg_boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
} huff_entropy_decoder;
typedef huff_entropy_decoder * huff_entropy_ptr;
@ -146,7 +146,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo)
*/
GLOBAL(void)
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
d_derived_tbl ** pdtbl)
{
JHUFF_TBL *htbl;
@ -288,7 +288,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
#endif
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_fill_bit_buffer (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left,
int nbits)
@ -464,7 +464,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
* Returns FALSE if must suspend.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
process_restart (j_decompress_ptr cinfo)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@ -513,7 +513,7 @@ process_restart (j_decompress_ptr cinfo)
* this module, since we'll just re-assign them on the next call.)
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;

View File

@ -47,7 +47,7 @@ typedef struct {
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_d_derived_tbl
JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
JPP((j_decompress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
d_derived_tbl ** pdtbl));
@ -151,7 +151,7 @@ typedef struct { /* Bitreading working state within an MCU */
(bits_left -= (nbits))
/* Load up the bit buffer to a depth of at least nbits */
EXTERN(boolean) jpeg_fill_bit_buffer
EXTERN(wxjpeg_boolean) jpeg_fill_bit_buffer
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, int nbits));

View File

@ -21,7 +21,7 @@
typedef struct {
struct jpeg_input_controller pub; /* public fields */
boolean inheaders; /* TRUE until first SOS is reached */
wxjpeg_boolean inheaders; /* TRUE until first SOS is reached */
} my_input_controller;
typedef my_input_controller * my_inputctl_ptr;

View File

@ -117,7 +117,7 @@ typedef struct {
/* Pointer to allocated workspace (M or M+2 row groups). */
JSAMPARRAY buffer[MAX_COMPONENTS];
boolean buffer_full; /* Have we gotten an iMCU row from decoder? */
wxjpeg_boolean buffer_full; /* Have we gotten an iMCU row from decoder? */
JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */
/* Remaining fields are only used in the context case. */
@ -473,7 +473,7 @@ process_data_crank_post (j_decompress_ptr cinfo,
*/
GLOBAL(void)
jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
jinit_d_main_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_main_ptr main;
int ci, rgroup, ngroups;

View File

@ -193,7 +193,7 @@ typedef my_marker_reader * my_marker_ptr;
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_soi (j_decompress_ptr cinfo)
/* Process an SOI marker */
{
@ -233,8 +233,8 @@ get_soi (j_decompress_ptr cinfo)
}
LOCAL(boolean)
get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
LOCAL(wxjpeg_boolean)
get_sof (j_decompress_ptr cinfo, wxjpeg_boolean is_prog, wxjpeg_boolean is_arith)
/* Process a SOFn marker */
{
JPEG_INT32 length;
@ -297,7 +297,7 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_sos (j_decompress_ptr cinfo)
/* Process a SOS marker */
{
@ -369,7 +369,7 @@ get_sos (j_decompress_ptr cinfo)
#ifdef D_ARITH_CODING_SUPPORTED
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_dac (j_decompress_ptr cinfo)
/* Process a DAC marker */
{
@ -415,7 +415,7 @@ get_dac (j_decompress_ptr cinfo)
#endif /* D_ARITH_CODING_SUPPORTED */
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_dht (j_decompress_ptr cinfo)
/* Process a DHT marker */
{
@ -486,7 +486,7 @@ get_dht (j_decompress_ptr cinfo)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_dqt (j_decompress_ptr cinfo)
/* Process a DQT marker */
{
@ -544,7 +544,7 @@ get_dqt (j_decompress_ptr cinfo)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
get_dri (j_decompress_ptr cinfo)
/* Process a DRI marker */
{
@ -687,7 +687,7 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
}
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
get_interesting_appn (j_decompress_ptr cinfo)
/* Process an APP0 or APP14 marker without saving it */
{
@ -735,7 +735,7 @@ get_interesting_appn (j_decompress_ptr cinfo)
#ifdef SAVE_MARKERS_SUPPORTED
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
save_marker (j_decompress_ptr cinfo)
/* Save an APPn or COM marker into the marker list */
{
@ -841,7 +841,7 @@ save_marker (j_decompress_ptr cinfo)
#endif /* SAVE_MARKERS_SUPPORTED */
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
skip_variable (j_decompress_ptr cinfo)
/* Skip over an unknown or uninteresting variable-length marker */
{
@ -870,7 +870,7 @@ skip_variable (j_decompress_ptr cinfo)
* but it will never be 0 or FF.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
next_marker (j_decompress_ptr cinfo)
{
int c;
@ -917,7 +917,7 @@ next_marker (j_decompress_ptr cinfo)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
first_marker (j_decompress_ptr cinfo)
/* Like next_marker, but used to obtain the initial SOI marker. */
/* For this marker, we do not allow preceding garbage or fill; otherwise,
@ -1109,7 +1109,7 @@ read_markers (j_decompress_ptr cinfo)
* it holds a marker which the decoder will be unable to read past.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
read_restart_marker (j_decompress_ptr cinfo)
{
/* Obtain a marker unless we already did. */
@ -1188,7 +1188,7 @@ read_restart_marker (j_decompress_ptr cinfo)
* any other marker would have to be bogus data in that case.
*/
GLOBAL(boolean)
GLOBAL(wxjpeg_boolean)
jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
{
int marker = cinfo->unread_marker;

View File

@ -23,7 +23,7 @@ typedef struct {
int pass_number; /* # of passes completed */
boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
wxjpeg_boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
/* Saved references to initialized quantizer modules,
* in case we need to switch modes.
@ -40,7 +40,7 @@ typedef my_decomp_master * my_master_ptr;
* CRUCIAL: this must match the actual capabilities of jdmerge.c!
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
use_merged_upsample (j_decompress_ptr cinfo)
{
#ifdef UPSAMPLE_MERGING_SUPPORTED
@ -288,7 +288,7 @@ LOCAL(void)
master_selection (j_decompress_ptr cinfo)
{
my_master_ptr master = (my_master_ptr) cinfo->master;
boolean use_c_buffer;
wxjpeg_boolean use_c_buffer;
long samplesperrow;
JDIMENSION jd_samplesperrow;

View File

@ -61,7 +61,7 @@ typedef struct {
* to discard the dummy last row if the image height is odd.
*/
JSAMPROW spare_row;
boolean spare_full; /* T if spare buffer is occupied */
wxjpeg_boolean spare_full; /* T if spare buffer is occupied */
JDIMENSION out_row_width; /* samples per output row */
JDIMENSION rows_to_go; /* counts rows remaining in image */

View File

@ -74,13 +74,13 @@ typedef struct {
typedef phuff_entropy_decoder * phuff_entropy_ptr;
/* Forward declarations */
METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
METHODDEF(wxjpeg_boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
METHODDEF(wxjpeg_boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
METHODDEF(wxjpeg_boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
METHODDEF(wxjpeg_boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
@ -92,7 +92,7 @@ METHODDEF(void)
start_pass_phuff_decoder (j_decompress_ptr cinfo)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
boolean is_DC_band, bad;
wxjpeg_boolean is_DC_band, bad;
int ci, coefi, tbl;
int *coef_bit_ptr;
jpeg_component_info * compptr;
@ -224,7 +224,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
* Returns FALSE if must suspend.
*/
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
process_restart (j_decompress_ptr cinfo)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -282,7 +282,7 @@ process_restart (j_decompress_ptr cinfo)
* or first pass of successive approximation).
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -353,7 +353,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* or first pass of successive approximation).
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -438,7 +438,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* is not very clear on the point.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
@ -487,7 +487,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* MCU decoding for AC successive approximation refinement scan.
*/
METHODDEF(boolean)
METHODDEF(wxjpeg_boolean)
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;

View File

@ -247,7 +247,7 @@ post_process_2pass (j_decompress_ptr cinfo,
*/
GLOBAL(void)
jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
jinit_d_post_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
{
my_post_ptr post;

View File

@ -401,7 +401,7 @@ jinit_upsampler (j_decompress_ptr cinfo)
my_upsample_ptr upsample;
int ci;
jpeg_component_info * compptr;
boolean need_buffer, do_fancy;
wxjpeg_boolean need_buffer, do_fancy;
int h_in_group, v_in_group, h_out_group, v_out_group;
upsample = (my_upsample_ptr)

View File

@ -161,7 +161,7 @@ format_message (j_common_ptr cinfo, char * buffer)
const char * msgtext = NULL;
const char * msgptr;
char ch;
boolean isstring;
wxjpeg_boolean isstring;
/* Look up message string in proper table */
if (msg_code > 0 && msg_code <= err->last_jpeg_message) {

View File

@ -284,7 +284,7 @@ close_file_store (j_common_ptr cinfo, backing_store_ptr info)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
open_file_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
@ -410,7 +410,7 @@ close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
@ -550,7 +550,7 @@ close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
}
LOCAL(boolean)
LOCAL(wxjpeg_boolean)
open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{

View File

@ -156,9 +156,9 @@ struct jvirt_sarray_control {
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
JDIMENSION cur_start_row; /* first logical row # in the buffer */
JDIMENSION first_undef_row; /* row # of first uninitialized row */
boolean pre_zero; /* pre-zero mode requested? */
boolean dirty; /* do current buffer contents need written? */
boolean b_s_open; /* is backing-store data valid? */
wxjpeg_boolean pre_zero; /* pre-zero mode requested? */
wxjpeg_boolean dirty; /* do current buffer contents need written? */
wxjpeg_boolean b_s_open; /* is backing-store data valid? */
jvirt_sarray_ptr next; /* link to next virtual sarray control block */
backing_store_info b_s_info; /* System-dependent control info */
};
@ -172,9 +172,9 @@ struct jvirt_barray_control {
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
JDIMENSION cur_start_row; /* first logical row # in the buffer */
JDIMENSION first_undef_row; /* row # of first uninitialized row */
boolean pre_zero; /* pre-zero mode requested? */
boolean dirty; /* do current buffer contents need written? */
boolean b_s_open; /* is backing-store data valid? */
wxjpeg_boolean pre_zero; /* pre-zero mode requested? */
wxjpeg_boolean dirty; /* do current buffer contents need written? */
wxjpeg_boolean b_s_open; /* is backing-store data valid? */
jvirt_barray_ptr next; /* link to next virtual barray control block */
backing_store_info b_s_info; /* System-dependent control info */
};
@ -520,7 +520,7 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
METHODDEF(jvirt_sarray_ptr)
request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
request_virt_sarray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero,
JDIMENSION samplesperrow, JDIMENSION numrows,
JDIMENSION maxaccess)
/* Request a virtual 2-D sample array */
@ -550,7 +550,7 @@ request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
METHODDEF(jvirt_barray_ptr)
request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
request_virt_barray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero,
JDIMENSION blocksperrow, JDIMENSION numrows,
JDIMENSION maxaccess)
/* Request a virtual 2-D coefficient-block array */
@ -687,7 +687,7 @@ realize_virt_arrays (j_common_ptr cinfo)
LOCAL(void)
do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, wxjpeg_boolean writing)
/* Do backing store read or write of a virtual sample array */
{
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
@ -720,7 +720,7 @@ do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
LOCAL(void)
do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, wxjpeg_boolean writing)
/* Do backing store read or write of a virtual coefficient-block array */
{
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
@ -755,7 +755,7 @@ do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
METHODDEF(JSAMPARRAY)
access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
JDIMENSION start_row, JDIMENSION num_rows,
boolean writable)
wxjpeg_boolean writable)
/* Access the part of a virtual sample array starting at start_row */
/* and extending for num_rows rows. writable is true if */
/* caller intends to modify the accessed area. */
@ -840,7 +840,7 @@ access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
METHODDEF(JBLOCKARRAY)
access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
JDIMENSION start_row, JDIMENSION num_rows,
boolean writable)
wxjpeg_boolean writable)
/* Access the part of a virtual block array starting at start_row */
/* and extending for num_rows rows. writable is true if */
/* caller intends to modify the accessed area. */

View File

@ -231,9 +231,29 @@ typedef unsigned int JDIMENSION;
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
*/
#if 0
#ifndef HAVE_BOOLEAN
typedef int boolean;
#endif
#endif
/*
* Notes about boolean above:
*
* The main conflict we see is with the Windows headers of some compilers that
* have a different definition of boolean. Therefore boolean has been replaced
* with wxjpeg_boolean throughout the jpeg sources. The alternative would have
* been to make the definition here the same as the Windows definition. It's
* not enough to just define HAVE_BOOLEAN when using the jpeg library, the
* definition of boolean must match when the jpeg library is compiled too.
*
* System jepg libs won't have this type, of course, so to use test
* HAVE_WXJPEG_BOOLEAN and fall back to boolean when not defined.
*/
typedef int wxjpeg_boolean;
#define HAVE_WXJPEG_BOOLEAN
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif

View File

@ -48,8 +48,8 @@ struct jpeg_comp_master {
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
/* State variables made visible to other modules */
boolean call_pass_startup; /* True if pass_startup must be called */
boolean is_last_pass; /* True during last pass */
wxjpeg_boolean call_pass_startup; /* True if pass_startup must be called */
wxjpeg_boolean is_last_pass; /* True during last pass */
};
/* Main buffer control (downsampled-data buffer) */
@ -75,7 +75,7 @@ struct jpeg_c_prep_controller {
/* Coefficient buffer control */
struct jpeg_c_coef_controller {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
JMETHOD(wxjpeg_boolean, compress_data, (j_compress_ptr cinfo,
JSAMPIMAGE input_buf));
};
@ -95,7 +95,7 @@ struct jpeg_downsampler {
JSAMPIMAGE output_buf,
JDIMENSION out_row_group_index));
boolean need_context_rows; /* TRUE if need rows above & below */
wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Forward DCT (also controls coefficient quantization) */
@ -111,8 +111,8 @@ struct jpeg_forward_dct {
/* Entropy encoding */
struct jpeg_entropy_encoder {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
JMETHOD(void, start_pass, (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics));
JMETHOD(wxjpeg_boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
};
@ -139,7 +139,7 @@ struct jpeg_decomp_master {
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
wxjpeg_boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
};
/* Input control module */
@ -150,8 +150,8 @@ struct jpeg_input_controller {
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
boolean has_multiple_scans; /* True if file has multiple scans */
boolean eoi_reached; /* True when EOI has been consumed */
wxjpeg_boolean has_multiple_scans; /* True if file has multiple scans */
wxjpeg_boolean eoi_reached; /* True when EOI has been consumed */
};
/* Main buffer control (downsampled-data buffer) */
@ -199,8 +199,8 @@ struct jpeg_marker_reader {
/* State of marker reader --- nominally internal, but applications
* supplying COM or APPn handlers might like to know the state.
*/
boolean saw_SOI; /* found SOI? */
boolean saw_SOF; /* found SOF? */
wxjpeg_boolean saw_SOI; /* found SOI? */
wxjpeg_boolean saw_SOF; /* found SOF? */
int next_restart_num; /* next restart number expected (0-7) */
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
};
@ -208,12 +208,12 @@ struct jpeg_marker_reader {
/* Entropy decoding */
struct jpeg_entropy_decoder {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
JMETHOD(wxjpeg_boolean, decode_mcu, (j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
/* This is here to share code between baseline and progressive decoders; */
/* other modules probably should not use it */
boolean insufficient_data; /* set TRUE after emitting warning */
wxjpeg_boolean insufficient_data; /* set TRUE after emitting warning */
};
/* Inverse DCT (also performs dequantization) */
@ -239,7 +239,7 @@ struct jpeg_upsampler {
JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail));
boolean need_context_rows; /* TRUE if need rows above & below */
wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Colorspace conversion */
@ -252,7 +252,7 @@ struct jpeg_color_deconverter {
/* Color quantization or color precision reduction */
struct jpeg_color_quantizer {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan));
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
int num_rows));
@ -333,13 +333,13 @@ struct jpeg_color_quantizer {
/* Compression module initialization routines */
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
boolean transcode_only));
wxjpeg_boolean transcode_only));
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
@ -349,11 +349,11 @@ EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
/* Decompression module initialization routines */
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer));
wxjpeg_boolean need_full_buffer));
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));

View File

@ -91,7 +91,7 @@ typedef struct {
* You could suppress output of a table by setting this to TRUE.
* (See jpeg_suppress_tables for an example.)
*/
boolean sent_table; /* TRUE when table has been output */
wxjpeg_boolean sent_table; /* TRUE when table has been output */
} JQUANT_TBL;
@ -107,7 +107,7 @@ typedef struct {
* You could suppress output of a table by setting this to TRUE.
* (See jpeg_suppress_tables for an example.)
*/
boolean sent_table; /* TRUE when table has been output */
wxjpeg_boolean sent_table; /* TRUE when table has been output */
} JHUFF_TBL;
@ -157,7 +157,7 @@ typedef struct {
* components will be ignored (eg grayscale output from YCbCr image),
* we can skip most computations for the unused components.
*/
boolean component_needed; /* do we need the value of this component? */
wxjpeg_boolean component_needed; /* do we need the value of this component? */
/* These values are computed before starting a scan of the component. */
/* The decompressor output side may not use these variables. */
@ -243,7 +243,7 @@ typedef enum {
struct jpeg_memory_mgr * mem; /* Memory manager module */\
struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
void * client_data; /* Available for use by application */\
boolean is_decompressor; /* So common code can tell which is which */\
wxjpeg_boolean is_decompressor; /* So common code can tell which is which */\
int global_state /* For checking call sequence validity */
/* Routines that are to be used by both halves of the library are declared
@ -317,10 +317,10 @@ struct jpeg_compress_struct {
* set num_scans and scan_info to point to an array of scan definitions.
*/
boolean raw_data_in; /* TRUE=caller supplies downsampled data */
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
wxjpeg_boolean raw_data_in; /* TRUE=caller supplies downsampled data */
wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
wxjpeg_boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
J_DCT_METHOD dct_method; /* DCT algorithm selector */
@ -334,7 +334,7 @@ struct jpeg_compress_struct {
/* Parameters controlling emission of special markers. */
boolean write_JFIF_header; /* should a JFIF marker be written? */
wxjpeg_boolean write_JFIF_header; /* should a JFIF marker be written? */
UINT8 JFIF_major_version; /* What to write for the JFIF version number */
UINT8 JFIF_minor_version;
/* These three values are not used by the JPEG code, merely copied */
@ -344,8 +344,8 @@ struct jpeg_compress_struct {
UINT8 density_unit; /* JFIF code for pixel size units */
UINT16 X_density; /* Horizontal pixel density */
UINT16 Y_density; /* Vertical pixel density */
boolean write_Adobe_marker; /* should an Adobe marker be written? */
wxjpeg_boolean write_Adobe_marker; /* should an Adobe marker be written? */
/* State variable: index of next scanline to be written to
* jpeg_write_scanlines(). Application may use this to control its
* processing loop, e.g., "while (next_scanline < image_height)".
@ -360,7 +360,7 @@ struct jpeg_compress_struct {
/*
* These fields are computed during compression startup
*/
boolean progressive_mode; /* TRUE if scan script uses progressive mode */
wxjpeg_boolean progressive_mode; /* TRUE if scan script uses progressive mode */
int max_h_samp_factor; /* largest h_samp_factor */
int max_v_samp_factor; /* largest v_samp_factor */
@ -433,22 +433,22 @@ struct jpeg_decompress_struct {
double output_gamma; /* image gamma wanted in output */
boolean buffered_image; /* TRUE=multiple output passes */
boolean raw_data_out; /* TRUE=downsampled data wanted */
wxjpeg_boolean buffered_image; /* TRUE=multiple output passes */
wxjpeg_boolean raw_data_out; /* TRUE=downsampled data wanted */
J_DCT_METHOD dct_method; /* IDCT algorithm selector */
boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
wxjpeg_boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
wxjpeg_boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
boolean quantize_colors; /* TRUE=colormapped output wanted */
wxjpeg_boolean quantize_colors; /* TRUE=colormapped output wanted */
/* the following are ignored if not quantize_colors: */
J_DITHER_MODE dither_mode; /* type of color dithering to use */
boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
wxjpeg_boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
int desired_number_of_colors; /* max # colors to use in created colormap */
/* these are significant only in buffered-image mode: */
boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
boolean enable_external_quant;/* enable future use of external colormap */
boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
wxjpeg_boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
wxjpeg_boolean enable_external_quant;/* enable future use of external colormap */
wxjpeg_boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
/* Description of actual output image that will be returned to application.
* These fields are computed by jpeg_start_decompress().
@ -535,8 +535,8 @@ struct jpeg_decompress_struct {
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
wxjpeg_boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
@ -547,17 +547,17 @@ struct jpeg_decompress_struct {
/* These fields record data obtained from optional markers recognized by
* the JPEG library.
*/
boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
wxjpeg_boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
/* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
UINT8 JFIF_major_version; /* JFIF version number */
UINT8 JFIF_minor_version;
UINT8 density_unit; /* JFIF code for pixel size units */
UINT16 X_density; /* Horizontal pixel density */
UINT16 Y_density; /* Vertical pixel density */
boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
wxjpeg_boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
UINT8 Adobe_transform; /* Color transform code from Adobe marker */
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */
/* Aside from the specific data retained from APPn markers known to the
* library, the uninterpreted contents of any or all APPn and COM markers
@ -715,7 +715,7 @@ struct jpeg_destination_mgr {
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
JMETHOD(void, init_destination, (j_compress_ptr cinfo));
JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
JMETHOD(wxjpeg_boolean, empty_output_buffer, (j_compress_ptr cinfo));
JMETHOD(void, term_destination, (j_compress_ptr cinfo));
};
@ -727,9 +727,9 @@ struct jpeg_source_mgr {
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
JMETHOD(void, init_source, (j_decompress_ptr cinfo));
JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
JMETHOD(wxjpeg_boolean, fill_input_buffer, (j_decompress_ptr cinfo));
JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
JMETHOD(wxjpeg_boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
JMETHOD(void, term_source, (j_decompress_ptr cinfo));
};
@ -767,13 +767,13 @@ struct jpeg_memory_mgr {
JDIMENSION numrows));
JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
int pool_id,
boolean pre_zero,
wxjpeg_boolean pre_zero,
JDIMENSION samplesperrow,
JDIMENSION numrows,
JDIMENSION maxaccess));
JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
int pool_id,
boolean pre_zero,
wxjpeg_boolean pre_zero,
JDIMENSION blocksperrow,
JDIMENSION numrows,
JDIMENSION maxaccess));
@ -782,12 +782,12 @@ struct jpeg_memory_mgr {
jvirt_sarray_ptr ptr,
JDIMENSION start_row,
JDIMENSION num_rows,
boolean writable));
wxjpeg_boolean writable));
JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
jvirt_barray_ptr ptr,
JDIMENSION start_row,
JDIMENSION num_rows,
boolean writable));
wxjpeg_boolean writable));
JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
JMETHOD(void, self_destruct, (j_common_ptr cinfo));
@ -806,7 +806,7 @@ struct jpeg_memory_mgr {
/* Routine signature for application-supplied marker processing methods.
* Need not pass marker code since it is stored in cinfo->unread_marker.
*/
typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
typedef JMETHOD(wxjpeg_boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
/* Declarations for routines called by application.
@ -917,24 +917,24 @@ EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
J_COLOR_SPACE colorspace));
EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
boolean force_baseline));
wxjpeg_boolean force_baseline));
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
int scale_factor,
boolean force_baseline));
wxjpeg_boolean force_baseline));
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
const unsigned int *basic_table,
int scale_factor,
boolean force_baseline));
wxjpeg_boolean force_baseline));
EXTERN(int) jpeg_quality_scaling JPP((int quality));
EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
boolean suppress));
wxjpeg_boolean suppress));
EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
/* Main entry points for compression */
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
boolean write_all_tables));
wxjpeg_boolean write_all_tables));
EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
JSAMPARRAY scanlines,
JDIMENSION num_lines));
@ -960,7 +960,7 @@ EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
/* Decompression startup: read start of JPEG datastream to see what's there */
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
boolean require_image));
wxjpeg_boolean require_image));
/* Return value is one of: */
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
@ -972,11 +972,11 @@ EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
*/
/* Main entry points for decompression */
EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
EXTERN(wxjpeg_boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
JSAMPARRAY scanlines,
JDIMENSION max_lines));
EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
EXTERN(wxjpeg_boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
@ -984,11 +984,11 @@ EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
JDIMENSION max_lines));
/* Additional entry points for buffered-image mode. */
EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
EXTERN(wxjpeg_boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
EXTERN(wxjpeg_boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
int scan_number));
EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
EXTERN(wxjpeg_boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
EXTERN(wxjpeg_boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
/* Return value is one of: */
@ -1034,7 +1034,7 @@ EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
/* Default restart-marker-resync procedure for use by data source modules */
EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
EXTERN(wxjpeg_boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
int desired));

View File

@ -112,7 +112,7 @@ select_transform (JXFORM_CODE transform)
LOCAL(int)
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
int last_file_arg_seen, boolean for_real)
int last_file_arg_seen, wxjpeg_boolean for_real)
/* Parse optional switches.
* Returns argv[] index of first file-name argument (== argc if none).
* Any file names with indexes <= last_file_arg_seen are ignored;
@ -124,7 +124,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
{
int argn;
char * arg;
boolean simple_progressive;
wxjpeg_boolean simple_progressive;
char * scansarg = NULL; /* saves -scans parm if any */
/* Set up default JPEG parameters. */
@ -176,7 +176,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
/* Enable debug printouts. */
/* On first -d, print version identification */
static boolean printed_version = FALSE;
static wxjpeg_boolean printed_version = FALSE;
if (! printed_version) {
fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",

View File

@ -151,7 +151,7 @@ typedef struct {
* premultiplied as described above. Since colormap indexes must fit into
* JSAMPLEs, the entries of this array will too.
*/
boolean is_padded; /* is the colorindex padded for odither? */
wxjpeg_boolean is_padded; /* is the colorindex padded for odither? */
int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */
@ -161,7 +161,7 @@ typedef struct {
/* Variables for Floyd-Steinberg dithering */
FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
boolean on_odd_row; /* flag to remember which row we are on */
wxjpeg_boolean on_odd_row; /* flag to remember which row we are on */
} my_cquantizer;
typedef my_cquantizer * my_cquantize_ptr;
@ -191,7 +191,7 @@ select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
int nc = cinfo->out_color_components; /* number of color components */
int max_colors = cinfo->desired_number_of_colors;
int total_colors, iroot, i, j;
boolean changed;
wxjpeg_boolean changed;
long temp;
static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
@ -738,7 +738,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
*/
METHODDEF(void)
start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
start_pass_1_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan)
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
size_t arraysize;

View File

@ -200,11 +200,11 @@ typedef struct {
/* Variables for accumulating image statistics */
hist3d histogram; /* pointer to the histogram */
boolean needs_zeroed; /* TRUE if next pass must zero histogram */
wxjpeg_boolean needs_zeroed; /* TRUE if next pass must zero histogram */
/* Variables for Floyd-Steinberg dithering */
FSERRPTR fserrors; /* accumulated errors */
boolean on_odd_row; /* flag to remember which row we are on */
wxjpeg_boolean on_odd_row; /* flag to remember which row we are on */
int * error_limiter; /* table for clamping the applied error */
} my_cquantizer;
@ -1164,7 +1164,7 @@ finish_pass2 (j_decompress_ptr cinfo)
*/
METHODDEF(void)
start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
start_pass_2_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan)
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
hist3d histogram = cquantize->histogram;