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.
This commit is contained in:
DRC
2016-02-19 08:53:33 -06:00
parent ae41128845
commit bd49803f92
125 changed files with 980 additions and 978 deletions

View File

@@ -109,7 +109,8 @@ jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
} }
GLOBAL(void) GLOBAL(void)
jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo,
jpeg_component_info *compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data) JSAMPARRAY input_data, JSAMPARRAY output_data)
{ {
} }

View File

@@ -78,7 +78,8 @@ static int q_scale_factor[NUM_QUANT_TBLS] = {100, 100, 100, 100};
#endif #endif
GLOBAL(boolean) GLOBAL(boolean)
read_quant_tables (j_compress_ptr cinfo, char * filename, boolean force_baseline) read_quant_tables (j_compress_ptr cinfo, char *filename,
boolean force_baseline)
/* Read a set of quantization tables from the specified file. /* Read a set of quantization tables from the specified file.
* The file is plain ASCII text: decimal numbers with whitespace between. * The file is plain ASCII text: decimal numbers with whitespace between.
* Comments preceded by '#' may be included in the file. * Comments preceded by '#' may be included in the file.