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/wrppm.c b/wrppm.c
index a930c81..7d13e2d 100644
--- a/wrppm.c
+++ b/wrppm.c
@@ -74,7 +74,7 @@
JDIMENSION samples_per_row; /* JSAMPLEs per output row */
} ppm_dest_struct;
-typedef ppm_dest_struct * ppm_dest_ptr;
+typedef ppm_dest_struct *ppm_dest_ptr;
/*
@@ -105,7 +105,7 @@
JDIMENSION rows_supplied)
{
ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
+ register char *bufferptr;
register JSAMPROW ptr;
register JDIMENSION col;
@@ -128,7 +128,7 @@
JDIMENSION rows_supplied)
{
ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
+ register char *bufferptr;
register int pixval;
register JSAMPROW ptr;
register JSAMPROW color_map0 = cinfo->colormap[0];
@@ -153,7 +153,7 @@
JDIMENSION rows_supplied)
{
ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
+ register char *bufferptr;
register JSAMPROW ptr;
register JSAMPROW color_map = cinfo->colormap[0];
register JDIMENSION col;