aboutsummaryrefslogtreecommitdiff
path: root/jdatadst.c
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-05-09 18:00:32 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-05-09 18:00:32 +0000
commitc9101fd20ef8d13e640b78335256b73212d3fbbe (patch)
tree15635e90fb161603a0e0f1308a246d7f590d1c2b /jdatadst.c
parentf5fd2d3ef36c2f5d509d51e7d34fdb1dc792556f (diff)
Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1278 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jdatadst.c')
-rw-r--r--jdatadst.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/jdatadst.c b/jdatadst.c
index 1b89fab..3fbc449 100644
--- a/jdatadst.c
+++ b/jdatadst.c
@@ -22,7 +22,7 @@
#include "jpeglib.h"
#include "jerror.h"
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
+#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
extern void * malloc JPP((size_t size));
extern void free JPP((void *ptr));
#endif
@@ -33,13 +33,13 @@ extern void free JPP((void *ptr));
typedef struct {
struct jpeg_destination_mgr pub; /* public fields */
- FILE * outfile; /* target stream */
- JOCTET * buffer; /* start of buffer */
+ FILE * outfile; /* target stream */
+ JOCTET * buffer; /* start of buffer */
} my_destination_mgr;
typedef my_destination_mgr * my_dest_ptr;
-#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
+#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
@@ -48,10 +48,10 @@ typedef my_destination_mgr * my_dest_ptr;
typedef struct {
struct jpeg_destination_mgr pub; /* public fields */
- unsigned char ** outbuffer; /* target buffer */
+ unsigned char ** outbuffer; /* target buffer */
unsigned long * outsize;
- unsigned char * newbuffer; /* newly allocated buffer */
- JOCTET * buffer; /* start of buffer */
+ unsigned char * newbuffer; /* newly allocated buffer */
+ JOCTET * buffer; /* start of buffer */
size_t bufsize;
} my_mem_destination_mgr;
@@ -72,7 +72,7 @@ init_destination (j_compress_ptr cinfo)
/* Allocate the output buffer --- it will be released when done with image */
dest->buffer = (JOCTET *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- OUTPUT_BUF_SIZE * SIZEOF(JOCTET));
+ OUTPUT_BUF_SIZE * SIZEOF(JOCTET));
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
@@ -213,10 +213,10 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
* manager serially with the same JPEG object, because their private object
* sizes may be different. Caveat programmer.
*/
- if (cinfo->dest == NULL) { /* first time for this JPEG object? */
+ if (cinfo->dest == NULL) { /* first time for this JPEG object? */
cinfo->dest = (struct jpeg_destination_mgr *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
- SIZEOF(my_destination_mgr));
+ SIZEOF(my_destination_mgr));
}
dest = (my_dest_ptr) cinfo->dest;
@@ -241,20 +241,20 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
GLOBAL(void)
jpeg_mem_dest (j_compress_ptr cinfo,
- unsigned char ** outbuffer, unsigned long * outsize)
+ unsigned char ** outbuffer, unsigned long * outsize)
{
my_mem_dest_ptr dest;
- if (outbuffer == NULL || outsize == NULL) /* sanity check */
+ if (outbuffer == NULL || outsize == NULL) /* sanity check */
ERREXIT(cinfo, JERR_BUFFER_SIZE);
/* The destination object is made permanent so that multiple JPEG images
* can be written to the same buffer without re-executing jpeg_mem_dest.
*/
- if (cinfo->dest == NULL) { /* first time for this JPEG object? */
+ if (cinfo->dest == NULL) { /* first time for this JPEG object? */
cinfo->dest = (struct jpeg_destination_mgr *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
- SIZEOF(my_mem_destination_mgr));
+ SIZEOF(my_mem_destination_mgr));
}
dest = (my_mem_dest_ptr) cinfo->dest;