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

@@ -39,8 +39,8 @@
*/
static const char * progname; /* program name for error messages */
static char * outfilename; /* for -outfile switch */
static const char *progname; /* program name for error messages */
static char *outfilename; /* for -outfile switch */
static JCOPY_OPTION copyoption; /* -copy switch */
static jpeg_transform_info transformoption; /* image transformation options */
@@ -132,9 +132,9 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
*/
{
int argn;
char * arg;
char *arg;
boolean simple_progressive;
char * scansarg = NULL; /* saves -scans parm if any */
char *scansarg = NULL; /* saves -scans parm if any */
/* Set up default JPEG parameters. */
simple_progressive = FALSE;
@@ -378,13 +378,13 @@ main (int argc, char **argv)
#ifdef PROGRESS_REPORT
struct cdjpeg_progress_mgr progress;
#endif
jvirt_barray_ptr * src_coef_arrays;
jvirt_barray_ptr * dst_coef_arrays;
jvirt_barray_ptr *src_coef_arrays;
jvirt_barray_ptr *dst_coef_arrays;
int file_index;
/* We assume all-in-memory processing and can therefore use only a
* single file pointer for sequential input and output operation.
*/
FILE * fp;
FILE *fp;
/* On Mac, fetch a command line. */
#ifdef USE_CCOMMAND