diff options
author | DRC <information@libjpeg-turbo.org> | 2016-02-19 08:53:33 -0600 |
---|---|---|
committer | DRC <information@libjpeg-turbo.org> | 2016-02-19 09:10:07 -0600 |
commit | bd49803f92da151be5c4bd3910a2840d2068e7e3 (patch) | |
tree | 9f4259d57ac62d064779ab10879d13ce9fc67ec0 /jdatasrc-tj.c | |
parent | ae4112884525c9ae4390c2020668831a9bade412 (diff) |
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.
Diffstat (limited to 'jdatasrc-tj.c')
-rw-r--r-- | jdatasrc-tj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jdatasrc-tj.c b/jdatasrc-tj.c index 6624fd3..0b99ee1 100644 --- a/jdatasrc-tj.c +++ b/jdatasrc-tj.c @@ -106,7 +106,7 @@ fill_mem_input_buffer (j_decompress_ptr cinfo) METHODDEF(void) skip_input_data (j_decompress_ptr cinfo, long num_bytes) { - struct jpeg_source_mgr * src = cinfo->src; + struct jpeg_source_mgr *src = cinfo->src; /* Just a dumb implementation for now. Could use fseek() except * it doesn't work on pipes. Not clear that being smart is worth @@ -158,9 +158,9 @@ term_source (j_decompress_ptr cinfo) GLOBAL(void) jpeg_mem_src_tj (j_decompress_ptr cinfo, - const unsigned char * inbuffer, unsigned long insize) + const unsigned char *inbuffer, unsigned long insize) { - struct jpeg_source_mgr * src; + struct jpeg_source_mgr *src; if (inbuffer == NULL || insize == 0) /* Treat empty input as fatal error */ ERREXIT(cinfo, JERR_INPUT_EMPTY); |