DEFAULT_DEFAULT_wxUSE_MOTIF=0
DEFAULT_DEFAULT_wxUSE_MSW=1
wxUSE_SHARED=no
+ CC=${CC:-winegcc}
+ CXX=${CXX:-wineg++}
fi
if test "$wxUSE_WINE" = "yes"; then
wants_win32=1
- CC=winegcc
- CXX=wineg++
LDFLAGS_GUI="-mwindows"
fi
WIN32INSTALL=win32install
- echo "$as_me:$LINENO: checking for boolean" >&5
-echo $ECHO_N "checking for boolean... $ECHO_C" >&6
-if test "${ac_cv_type_boolean+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <windows.h>
-
-int
-main ()
-{
-if ((boolean *) 0)
- return 0;
-if (sizeof (boolean))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_boolean=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_boolean=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_boolean" >&5
-echo "${ECHO_T}$ac_cv_type_boolean" >&6
-if test $ac_cv_type_boolean = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_BOOLEAN 1
-_ACEOF
-
-
-fi
-
-
for ac_header in pbt.h
do
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Xlib.h>
+#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Xlib.h"; then
+ if test -r "$ac_dir/X11/Intrinsic.h"; then
ac_x_includes=$ac_dir
break
fi
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
- LIBS="-lX11 $LIBS"
+ LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Xlib.h>
+#include <X11/Intrinsic.h>
int
main ()
{
-XrmInitialize ()
+XtMalloc (0)
;
return 0;
}
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
- if test -r $ac_dir/libX11.$ac_extension; then
+ if test -r $ac_dir/libXt.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
dnl install Win32-specific files in "make install"
WIN32INSTALL=win32install
- dnl the jpeg header jmorecfg.h delcares the type boolean, which conflicts
- dnl on systems which declare it in the system headers. If HAVE_BOOLEAN is
- dnl defined then jmorecfg.h doesn't declare it, so checking for it here
- dnl solves the problem.
- AC_CHECK_TYPES(boolean, [], [], [#include <windows.h>])
-
dnl pbt.h is missing on Wine at least
AC_CHECK_HEADERS(pbt.h, [], [AC_DEFINE(NEED_PBT_H)])
fi
*/
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
-/* Define if the system headers declare the type boolean (which will conflict
- * with the jpeg headers unless HAVE_BOOLEAN is defined). */
-#undef HAVE_BOOLEAN
-
/* Define if the header pbt.h is missing. */
#undef NEED_PBT_H
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
-/* Define if the system headers declare the type boolean (which will conflict
- * with the jpeg headers unless HAVE_BOOLEAN is defined). */
-#undef HAVE_BOOLEAN
-
/* Define if the header pbt.h is missing. */
#undef NEED_PBT_H
#include "wx/module.h"
#endif
-// NB: Some compilers define boolean type in Windows headers
-// (e.g. Watcom C++, but not some Open Watcom versions).
-// This causes a conflict with jmorecfg.h header from libjpeg, so we have
-// to make sure libjpeg won't try to define boolean itself. This is done by
-// defining HAVE_BOOLEAN.
-#if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__DIGITALMARS__) || \
- (defined(__WATCOMC__) && !wxONLY_WATCOM_EARLIER_THAN(1,6)))
- #define HAVE_BOOLEAN
- #include "wx/msw/wrapwin.h"
-#endif
-
extern "C"
{
#if defined(__WXMSW__)
#include "jpeglib.h"
}
+#ifndef HAVE_WXJPEG_BOOLEAN
+typedef boolean wxjpeg_boolean;
+#endif
+
#include "wx/filefn.h"
#include "wx/wfstream.h"
{
}
-CPP_METHODDEF(boolean) wx_fill_input_buffer ( j_decompress_ptr cinfo )
+CPP_METHODDEF(wxjpeg_boolean) wx_fill_input_buffer ( j_decompress_ptr cinfo )
{
wx_src_ptr src = (wx_src_ptr) cinfo->src;
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
}
-CPP_METHODDEF(boolean) wx_empty_output_buffer (j_compress_ptr cinfo)
+CPP_METHODDEF(wxjpeg_boolean) wx_empty_output_buffer (j_compress_ptr cinfo)
{
wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest;
*/
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;
*/
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);
/* 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
* 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;
* 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;
* 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;
*/
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;
/* 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
*/
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;
*/
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;
{ action; } }
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
dump_buffer (working_state * state)
/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
{
*/
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 */
{
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
flush_bits (working_state * state)
{
if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
/* 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)
{
* Emit a restart marker & resynchronize predictions.
*/
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
emit_restart (working_state * state, int restart_num)
{
int ci;
* 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;
* 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;
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!
/* 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 */
/* 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);
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
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. */
*/
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;
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;
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.
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];
*/
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;
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
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
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
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.
#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));
*/
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;
* 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;
* 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;
* 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;
* 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;
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);
*/
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;
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,
* 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;
*/
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;
* Have we finished reading the input file?
*/
-GLOBAL(boolean)
+GLOBAL(wxjpeg_boolean)
jpeg_input_complete (j_decompress_ptr cinfo)
{
/* Check for valid jpeg object */
* 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 */
* a suspending data source is used.
*/
-GLOBAL(boolean)
+GLOBAL(wxjpeg_boolean)
jpeg_finish_decompress (j_decompress_ptr cinfo)
{
if ((cinfo->global_state == DSTATE_SCANNING ||
/* Forward declarations */
-LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
+LOCAL(wxjpeg_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) {
* 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) {
* 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 &&
* a suspending data source is used.
*/
-GLOBAL(boolean)
+GLOBAL(wxjpeg_boolean)
jpeg_finish_output (j_decompress_ptr cinfo)
{
if ((cinfo->global_state == DSTATE_SCANNING ||
* 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;
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;
* 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;
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
* 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;
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;
*/
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;
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;
*/
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;
#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)
* 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;
* 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;
/* 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));
(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));
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;
/* 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. */
*/
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;
*/
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_soi (j_decompress_ptr cinfo)
/* Process an SOI marker */
{
}
-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;
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_sos (j_decompress_ptr cinfo)
/* Process a SOS marker */
{
#ifdef D_ARITH_CODING_SUPPORTED
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_dac (j_decompress_ptr cinfo)
/* Process a DAC marker */
{
#endif /* D_ARITH_CODING_SUPPORTED */
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_dht (j_decompress_ptr cinfo)
/* Process a DHT marker */
{
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_dqt (j_decompress_ptr cinfo)
/* Process a DQT marker */
{
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
get_dri (j_decompress_ptr cinfo)
/* Process a DRI marker */
{
}
-METHODDEF(boolean)
+METHODDEF(wxjpeg_boolean)
get_interesting_appn (j_decompress_ptr cinfo)
/* Process an APP0 or APP14 marker without saving it */
{
#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 */
{
#endif /* SAVE_MARKERS_SUPPORTED */
-METHODDEF(boolean)
+METHODDEF(wxjpeg_boolean)
skip_variable (j_decompress_ptr cinfo)
/* Skip over an unknown or uninteresting variable-length marker */
{
* but it will never be 0 or FF.
*/
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
next_marker (j_decompress_ptr cinfo)
{
int c;
}
-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,
* 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. */
* 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;
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.
* 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
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;
* 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 */
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));
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;
* 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;
* 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;
* 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;
* 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;
* 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;
*/
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;
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)
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) {
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
open_file_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
}
-LOCAL(boolean)
+LOCAL(wxjpeg_boolean)
open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
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 */
};
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 */
};
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 */
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 */
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;
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;
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. */
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. */
* 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
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) */
/* 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));
};
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) */
/* 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));
};
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 */
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) */
/* 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 */
};
/* 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) */
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 */
/* 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));
/* 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));
/* 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));
* 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;
* 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;
* 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. */
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
* 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 */
/* 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 */
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
/*
* 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 */
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().
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 */
/* 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
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));
};
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));
};
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));
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));
/* 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.
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));
/* 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 */
*/
/* 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,
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: */
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));
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;
{
int argn;
char * arg;
- boolean simple_progressive;
+ wxjpeg_boolean simple_progressive;
char * scansarg = NULL; /* saves -scans parm if any */
/* Set up default JPEG parameters. */
} 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",
* 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 */
/* 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;
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 };
*/
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;
/* 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;
*/
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;