diff --git a/src/jpeg/jdcoefct.c b/src/jpeg/jdcoefct.c index 4b89b62d24..5b5b3bbd49 100644 --- a/src/jpeg/jdcoefct.c +++ b/src/jpeg/jdcoefct.c @@ -104,13 +104,16 @@ start_iMCU_row (j_decompress_ptr cinfo) */ METHODDEF(void) +#if defined(__VISAGECPP__) +start_input_pass2 (j_decompress_ptr cinfo) +#else start_input_pass (j_decompress_ptr cinfo) +#endif { cinfo->input_iMCU_row = 0; start_iMCU_row(cinfo); } - /* * Initialize for an output processing pass. */ @@ -681,7 +684,12 @@ jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); cinfo->coef = (struct jpeg_d_coef_controller *) coef; +#if defined(__VISAGECPP__) + coef->pub.start_input_pass2 = start_input_pass2; +#else coef->pub.start_input_pass = start_input_pass; +#endif + coef->pub.start_output_pass = start_output_pass; #ifdef BLOCK_SMOOTHING_SUPPORTED coef->coef_bits_latch = NULL; @@ -734,3 +742,4 @@ jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ } } + diff --git a/src/jpeg/jdinput.c b/src/jpeg/jdinput.c index 324d0ffe0c..942a99c141 100644 --- a/src/jpeg/jdinput.c +++ b/src/jpeg/jdinput.c @@ -15,11 +15,6 @@ #include "jinclude.h" #include "jpeglib.h" -#if defined(__VISAGECPP__) -/* Visual Age fixups for multiple declarations */ -# define start_input_pass start_input_pass2 /* already in jcmaint.c */ -#endif - /* Private state */ typedef struct { @@ -260,7 +255,11 @@ start_input_pass (j_decompress_ptr cinfo) per_scan_setup(cinfo); latch_quant_tables(cinfo); (*cinfo->entropy->start_pass) (cinfo); +#if defined(__VISAGECPP__) + (*cinfo->coef->start_input_pass2) (cinfo); +#else (*cinfo->coef->start_input_pass) (cinfo); +#endif cinfo->inputctl->consume_input = cinfo->coef->consume_data; } @@ -384,8 +383,3 @@ jinit_input_controller (j_decompress_ptr cinfo) inputctl->inheaders = TRUE; } -#if defined(__VISAGECPP__) -# ifdef start_input_pass2 -# undef start_input_pass2 -# endif -#endif diff --git a/src/jpeg/jdmaster.c b/src/jpeg/jdmaster.c index f853b7ad19..8a5abc71fa 100644 --- a/src/jpeg/jdmaster.c +++ b/src/jpeg/jdmaster.c @@ -15,11 +15,6 @@ #include "jinclude.h" #include "jpeglib.h" -#if defined(__VISAGECPP__) -/* Visual Age fixups for multiple declarations */ -# define start_input_pass start_input_pass2 /* already in jcmaint.c */ -#endif - /* Private state */ typedef struct { @@ -560,9 +555,3 @@ jinit_master_decompress (j_decompress_ptr cinfo) master_selection(cinfo); } -#if defined(__VISAGECPP__) -# ifdef start_input_pass2 -# undef start_input_pass2 -# endif -#endif - diff --git a/src/jpeg/jdtrans.c b/src/jpeg/jdtrans.c index 6c0ab715d3..d22388684f 100644 --- a/src/jpeg/jdtrans.c +++ b/src/jpeg/jdtrans.c @@ -121,7 +121,6 @@ transdecode_master_selection (j_decompress_ptr cinfo) /* Initialize input side of decompressor to consume first scan. */ (*cinfo->inputctl->start_input_pass) (cinfo); - /* Initialize progress monitoring. */ if (cinfo->progress != NULL) { int nscans; @@ -141,3 +140,4 @@ transdecode_master_selection (j_decompress_ptr cinfo) cinfo->progress->total_passes = 1; } } + diff --git a/src/jpeg/jpegint.h b/src/jpeg/jpegint.h index 65091f4f08..4b0ee7a240 100644 --- a/src/jpeg/jpegint.h +++ b/src/jpeg/jpegint.h @@ -142,10 +142,6 @@ struct jpeg_decomp_master { boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ }; -#if defined(__VISAGECPP__) -/* Visual Age fixups for multiple declarations */ -# define start_input_pass start_input_pass2 /* already in jcmaint.c */ -#endif /* Input control module */ struct jpeg_input_controller { @@ -159,11 +155,6 @@ struct jpeg_input_controller { boolean eoi_reached; /* True when EOI has been consumed */ }; -#if defined(__VISAGECPP__) -# ifdef start_input_pass2 -# undef start_input_pass2 -# endif -#endif /* Main buffer control (downsampled-data buffer) */ struct jpeg_d_main_controller { @@ -175,7 +166,15 @@ struct jpeg_d_main_controller { /* Coefficient buffer control */ struct jpeg_d_coef_controller { +#if defined(__VISAGECPP__) + /* the start input pass in jdcoeft must have a different name than the + // one in jdtrans under VisualAge or else we get a dup symbol error + */ + JMETHOD(void, start_input_pass2, (j_decompress_ptr cinfo)); +#else JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); +#endif + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,