Use consistent/modern code formatting for pointers
The convention used by libjpeg:
type * variable;
is not very common anymore, because it looks too much like
multiplication. Some (particularly C++ programmers) prefer to tuck the
pointer symbol against the type:
type* variable;
to emphasize that a pointer to a type is effectively a new type.
However, this can also be confusing, since defining multiple variables
on the same line would not work properly:
type* variable1, variable2; /* Only variable1 is actually a
pointer. */
This commit reformats the entirety of the libjpeg-turbo code base so
that it uses the same code formatting convention for pointers that the
TurboJPEG API code uses:
type *variable1, *variable2;
This seems to be the most common convention among C programmers, and
it is the convention used by other codec libraries, such as libpng and
libtiff.
diff --git a/jsimddct.h b/jsimddct.h
index aa421fb..b19ab48 100644
--- a/jsimddct.h
+++ b/jsimddct.h
@@ -13,26 +13,26 @@
EXTERN(int) jsimd_can_convsamp_float (void);
EXTERN(void) jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
- DCTELEM * workspace);
+ DCTELEM *workspace);
EXTERN(void) jsimd_convsamp_float (JSAMPARRAY sample_data,
JDIMENSION start_col,
- FAST_FLOAT * workspace);
+ FAST_FLOAT *workspace);
EXTERN(int) jsimd_can_fdct_islow (void);
EXTERN(int) jsimd_can_fdct_ifast (void);
EXTERN(int) jsimd_can_fdct_float (void);
-EXTERN(void) jsimd_fdct_islow (DCTELEM * data);
-EXTERN(void) jsimd_fdct_ifast (DCTELEM * data);
-EXTERN(void) jsimd_fdct_float (FAST_FLOAT * data);
+EXTERN(void) jsimd_fdct_islow (DCTELEM *data);
+EXTERN(void) jsimd_fdct_ifast (DCTELEM *data);
+EXTERN(void) jsimd_fdct_float (FAST_FLOAT *data);
EXTERN(int) jsimd_can_quantize (void);
EXTERN(int) jsimd_can_quantize_float (void);
-EXTERN(void) jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors,
- DCTELEM * workspace);
-EXTERN(void) jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
- FAST_FLOAT * workspace);
+EXTERN(void) jsimd_quantize (JCOEFPTR coef_block, DCTELEM *divisors,
+ DCTELEM *workspace);
+EXTERN(void) jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT *divisors,
+ FAST_FLOAT *workspace);
EXTERN(int) jsimd_can_idct_2x2 (void);
EXTERN(int) jsimd_can_idct_4x4 (void);
@@ -40,19 +40,19 @@
EXTERN(int) jsimd_can_idct_12x12 (void);
EXTERN(void) jsimd_idct_2x2 (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
EXTERN(void) jsimd_idct_4x4 (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
EXTERN(void) jsimd_idct_6x6 (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
EXTERN(void) jsimd_idct_12x12 (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
@@ -61,14 +61,14 @@
EXTERN(int) jsimd_can_idct_float (void);
EXTERN(void) jsimd_idct_islow (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
EXTERN(void) jsimd_idct_ifast (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
EXTERN(void) jsimd_idct_float (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);