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/jdsample.h b/jdsample.h
index 630d07e..a6bf08a 100644
--- a/jdsample.h
+++ b/jdsample.h
@@ -13,9 +13,9 @@
/* Pointer to routine to upsample a single component */
typedef void (*upsample1_ptr) (j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
+ jpeg_component_info *compptr,
JSAMPARRAY input_data,
- JSAMPARRAY * output_data_ptr);
+ JSAMPARRAY *output_data_ptr);
/* Private subobject */
@@ -47,4 +47,4 @@
UINT8 v_expand[MAX_COMPONENTS];
} my_upsampler;
-typedef my_upsampler * my_upsample_ptr;
+typedef my_upsampler *my_upsample_ptr;