]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixups in jpeg lib for multiplely defined symbolsa under VisualAge for OS/2
authorDavid Webster <Dave.Webster@bhmi.com>
Fri, 11 Oct 2002 16:01:49 +0000 (16:01 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Fri, 11 Oct 2002 16:01:49 +0000 (16:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/jpeg/jctrans.c
src/jpeg/jdcolor.c
src/jpeg/jdinput.c
src/jpeg/jdmainct.c
src/jpeg/jdmaster.c
src/jpeg/jpegint.h

index 0e6d70769df543d84cd5a2bec154443648e5c61a..28270aaa0cbb28f1dbacc000dd237e876be193a7 100644 (file)
@@ -21,6 +21,12 @@ LOCAL(void) transencode_master_selection
 LOCAL(void) transencode_coef_controller
        JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
 
+#if defined(__VISAGECPP__)
+/* Visual Age fixups for multiple declarations */
+#  define start_pass_coef   start_pass_coef2 /* already in jccoeft.c */
+#  define compress_output   compress_output2 /* already in jccoeft.c */
+#endif
+
 
 /*
  * Compression initialization for writing raw-coefficient data.
@@ -246,7 +252,6 @@ start_iMCU_row (j_compress_ptr cinfo)
   coef->MCU_vert_offset = 0;
 }
 
-
 /*
  * Initialize for a processing pass.
  */
@@ -386,3 +391,12 @@ transencode_coef_controller (j_compress_ptr cinfo,
     coef->dummy_buffer[i] = buffer + i;
   }
 }
+
+#if defined(__VISAGECPP__)
+#  ifdef start_pass_coef2
+#   undef start_pass_coef2
+#  endif
+#  ifdef compress_output2
+#    undef compress_output2
+#  endif
+#endif
index c51854496016be6b63382d6af71c85c7e1ebd4f0..cca28422979b7f670c7a5b66970f1cebb133bef4 100644 (file)
 #include "jinclude.h"
 #include "jpeglib.h"
 
+#if defined(__VISAGECPP__)
+/* Visual Age fixups for multiple declarations */
+#  define null_convert   null_convert2 /* already in jcmaint.c */
+#  define grayscale_convert   grayscale_convert2 /* already in jcmaint.c */
+#endif
 
 /* Private subobject */
 
@@ -394,3 +399,12 @@ jinit_color_deconverter (j_decompress_ptr cinfo)
   else
     cinfo->output_components = cinfo->out_color_components;
 }
+
+#if defined(__VISAGECPP__)
+#  ifdef null_convert2
+#   undef null_convert2
+#  endif
+#  ifdef grayscale_convert2
+#   undef grayscale_convert2
+#  endif
+#endif
index 0c2ac8f120bca16bff13b989d8879ac9db85a011..324d0ffe0cd18bb588623bd804b21d94c3959bf1 100644 (file)
 #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 */
 
@@ -124,16 +128,16 @@ per_scan_setup (j_decompress_ptr cinfo)
 {
   int ci, mcublks, tmp;
   jpeg_component_info *compptr;
-  
+
   if (cinfo->comps_in_scan == 1) {
-    
+
     /* Noninterleaved (single-component) scan */
     compptr = cinfo->cur_comp_info[0];
-    
+
     /* Overall image size in MCUs */
     cinfo->MCUs_per_row = compptr->width_in_blocks;
     cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
-    
+
     /* For noninterleaved scan, always one block per MCU */
     compptr->MCU_width = 1;
     compptr->MCU_height = 1;
@@ -146,18 +150,18 @@ per_scan_setup (j_decompress_ptr cinfo)
     tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
     if (tmp == 0) tmp = compptr->v_samp_factor;
     compptr->last_row_height = tmp;
-    
+
     /* Prepare array describing MCU composition */
     cinfo->blocks_in_MCU = 1;
     cinfo->MCU_membership[0] = 0;
-    
+
   } else {
-    
+
     /* Interleaved (multi-component) scan */
     if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
       ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
               MAX_COMPS_IN_SCAN);
-    
+
     /* Overall image size in MCUs */
     cinfo->MCUs_per_row = (JDIMENSION)
       jdiv_round_up((long) cinfo->image_width,
@@ -165,9 +169,9 @@ per_scan_setup (j_decompress_ptr cinfo)
     cinfo->MCU_rows_in_scan = (JDIMENSION)
       jdiv_round_up((long) cinfo->image_height,
                    (long) (cinfo->max_v_samp_factor*DCTSIZE));
-    
+
     cinfo->blocks_in_MCU = 0;
-    
+
     for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
       compptr = cinfo->cur_comp_info[ci];
       /* Sampling factors give # of blocks of component in each MCU */
@@ -190,7 +194,7 @@ per_scan_setup (j_decompress_ptr cinfo)
        cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
       }
     }
-    
+
   }
 }
 
@@ -379,3 +383,9 @@ jinit_input_controller (j_decompress_ptr cinfo)
   inputctl->pub.eoi_reached = FALSE;
   inputctl->inheaders = TRUE;
 }
+
+#if defined(__VISAGECPP__)
+#  ifdef start_input_pass2
+#   undef start_input_pass2
+#  endif
+#endif
index 1c88b075e97ea6d572ef86fed1d30e1753d36edc..a188bef0e4bdc2aed635dda8bdfa6b6c830ddc2a 100644 (file)
@@ -141,6 +141,12 @@ typedef my_main_controller * my_main_ptr;
 #define CTX_POSTPONED_ROW      2       /* feeding postponed row group */
 
 
+#if defined(__VISAGECPP__)
+/* Visual Age fixups for multiple declarations */
+#  define start_pass_main   start_pass_main2 /* already in jcmaint.c */
+#  define process_data_simple_main process_data_simple_main2 /* already in jcmaint.c */
+#endif
+
 /* Forward declarations */
 METHODDEF(void) process_data_simple_main
        JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
@@ -512,3 +518,12 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
                         (JDIMENSION) (rgroup * ngroups));
   }
 }
+
+#if defined(__VISAGECPP__)
+#  ifdef start_pass_main2
+#   undef start_pass_main2
+#  endif
+#  ifdef process_data_simple_main2
+#   undef process_data_simple_main2
+#  endif
+#endif
index 2802c5b7b29757e27b561ccccedba169deb9b42c..f853b7ad19e2052575a01e06c4e64eb1fb6323e8 100644 (file)
 #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 */
 
@@ -217,7 +221,7 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
  * For most steps we can mathematically guarantee that the initial value
  * of x is within MAXJSAMPLE+1 of the legal range, so a table running from
  * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient.  But for the initial
- * limiting step (just after the IDCT), a wildly out-of-range value is 
+ * limiting step (just after the IDCT), a wildly out-of-range value is
  * possible if the input data is corrupt.  To avoid any chance of indexing
  * off the end of memory and getting a bad-pointer trap, we perform the
  * post-IDCT limiting thus:
@@ -555,3 +559,10 @@ jinit_master_decompress (j_decompress_ptr cinfo)
 
   master_selection(cinfo);
 }
+
+#if defined(__VISAGECPP__)
+#  ifdef start_input_pass2
+#   undef start_input_pass2
+#  endif
+#endif
+
index 51aa6c1f295e7f317e2798d5f732f437bbe84e08..65091f4f08c54a54772e8c7571310bfe58876568 100644 (file)
@@ -142,6 +142,11 @@ 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 {
   JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
@@ -154,6 +159,12 @@ 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 {
   JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));