Adjust braces on function declarations

This commit is contained in:
MrDave
2020-11-21 20:39:32 -07:00
committed by Mr-Dave
parent 54a09a60a4
commit 1684e05200
25 changed files with 1541 additions and 899 deletions

View File

@@ -49,32 +49,7 @@
#include "jpegutils.hpp"
#include "exif.hpp"
#include <setjmp.h>
/* This is a workaround regarding these defines. The config.h file defines
* HAVE_STDLIB_H as 1 whereas the jpeglib.h just defines it without a value.
* this causes massive warnings/error on mis-matched definitions. We do not
* control either of these so we have to suffer through this workaround hack
*/
#if (HAVE_STDLIB_H == 1)
#undef HAVE_STDLIB_H
#define HAVE_STDLIB_H_ORIG 1
#endif
#include <jpeglib.h>
#ifdef HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H_ORIG
#undef HAVE_STDLIB_H
#undef HAVE_STDLIB_H_ORIG
#define HAVE_STDLIB_H 1
#else
#undef HAVE_STDLIB_H
#endif
#endif
#include <jerror.h>
#include <assert.h>
@@ -416,10 +391,8 @@ static GLOBAL(int) _jpeg_mem_size(j_compress_ptr cinfo)
* It must be called after jpeg_start_compress() but before
* any image data is written by jpeg_write_scanlines().
*/
static void put_jpeg_exif(j_compress_ptr cinfo,
const struct ctx_cam *cam,
const struct timespec *ts1,
const struct ctx_coord *box)
static void put_jpeg_exif(j_compress_ptr cinfo, const struct ctx_cam *cam,
const struct timespec *ts1, const struct ctx_coord *box)
{
unsigned char *exif = NULL;
unsigned exif_len = exif_prepare(&exif, cam, ts1, box);
@@ -447,7 +420,7 @@ static void put_jpeg_exif(j_compress_ptr cinfo,
* Success 0, Failure -1
*/
int jpgutl_decode_jpeg (unsigned char *jpeg_data_in, int jpeg_data_len,
unsigned int width, unsigned int height, unsigned char *volatile img_out)
unsigned int width, unsigned int height, unsigned char *volatile img_out)
{
JSAMPARRAY line; /* Array of decomp data lines */
unsigned char *wline; /* Will point to line[0] */
@@ -544,8 +517,8 @@ int jpgutl_decode_jpeg (unsigned char *jpeg_data_in, int jpeg_data_len,
}
int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size,
unsigned char *input_image, int width, int height, int quality,
struct ctx_cam *cam, struct timespec *ts1, struct ctx_coord *box)
unsigned char *input_image, int width, int height, int quality,
struct ctx_cam *cam, struct timespec *ts1, struct ctx_coord *box)
{
int i, j, jpeg_image_size;
@@ -633,8 +606,8 @@ int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size,
int jpgutl_put_grey(unsigned char *dest_image, int image_size,
unsigned char *input_image, int width, int height, int quality,
struct ctx_cam *cam, struct timespec *ts1, struct ctx_coord *box)
unsigned char *input_image, int width, int height, int quality,
struct ctx_cam *cam, struct timespec *ts1, struct ctx_coord *box)
{
int y, dest_image_size;
JSAMPROW row_ptr[1];