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+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1278 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/jcmainct.c b/jcmainct.c
index 5b7ff21..5a0549a 100644
--- a/jcmainct.c
+++ b/jcmainct.c
@@ -28,10 +28,10 @@
 typedef struct {
   struct jpeg_c_main_controller pub; /* public fields */
 
-  JDIMENSION cur_iMCU_row;	/* number of current iMCU row */
-  JDIMENSION rowgroup_ctr;	/* counts row groups received in iMCU row */
-  boolean suspended;		/* remember if we suspended output */
-  J_BUF_MODE pass_mode;		/* current operating mode */
+  JDIMENSION cur_iMCU_row;      /* number of current iMCU row */
+  JDIMENSION rowgroup_ctr;      /* counts row groups received in iMCU row */
+  boolean suspended;            /* remember if we suspended output */
+  J_BUF_MODE pass_mode;         /* current operating mode */
 
   /* If using just a strip buffer, this points to the entire set of buffers
    * (we allocate one for each component).  In the full-image case, this
@@ -52,12 +52,12 @@
 
 /* Forward declarations */
 METHODDEF(void) process_data_simple_main
-	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
-	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+        JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
+             JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
 #ifdef FULL_MAIN_BUFFER_SUPPORTED
 METHODDEF(void) process_data_buffer_main
-	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
-	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+        JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
+             JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
 #endif
 
 
@@ -74,10 +74,10 @@
   if (cinfo->raw_data_in)
     return;
 
-  main_ptr->cur_iMCU_row = 0;	/* initialize counters */
+  main_ptr->cur_iMCU_row = 0;   /* initialize counters */
   main_ptr->rowgroup_ctr = 0;
   main_ptr->suspended = FALSE;
-  main_ptr->pass_mode = pass_mode;	/* save mode for use by process_data */
+  main_ptr->pass_mode = pass_mode;      /* save mode for use by process_data */
 
   switch (pass_mode) {
   case JBUF_PASS_THRU:
@@ -111,8 +111,8 @@
 
 METHODDEF(void)
 process_data_simple_main (j_compress_ptr cinfo,
-			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-			  JDIMENSION in_rows_avail)
+                          JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+                          JDIMENSION in_rows_avail)
 {
   my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
 
@@ -120,9 +120,9 @@
     /* Read input data if we haven't filled the main buffer yet */
     if (main_ptr->rowgroup_ctr < DCTSIZE)
       (*cinfo->prep->pre_process_data) (cinfo,
-					input_buf, in_row_ctr, in_rows_avail,
-					main_ptr->buffer, &main_ptr->rowgroup_ctr,
-					(JDIMENSION) DCTSIZE);
+                                        input_buf, in_row_ctr, in_rows_avail,
+                                        main_ptr->buffer, &main_ptr->rowgroup_ctr,
+                                        (JDIMENSION) DCTSIZE);
 
     /* If we don't have a full iMCU row buffered, return to application for
      * more data.  Note that preprocessor will always pad to fill the iMCU row
@@ -140,8 +140,8 @@
        * think we were done.
        */
       if (! main_ptr->suspended) {
-	(*in_row_ctr)--;
-	main_ptr->suspended = TRUE;
+        (*in_row_ctr)--;
+        main_ptr->suspended = TRUE;
       }
       return;
     }
@@ -167,8 +167,8 @@
 
 METHODDEF(void)
 process_data_buffer_main (j_compress_ptr cinfo,
-			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-			  JDIMENSION in_rows_avail)
+                          JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+                          JDIMENSION in_rows_avail)
 {
   my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
   int ci;
@@ -179,16 +179,16 @@
     /* Realign the virtual buffers if at the start of an iMCU row. */
     if (main_ptr->rowgroup_ctr == 0) {
       for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	   ci++, compptr++) {
-	main_ptr->buffer[ci] = (*cinfo->mem->access_virt_sarray)
-	  ((j_common_ptr) cinfo, main_ptr->whole_image[ci],
-	   main_ptr->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
-	   (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
+           ci++, compptr++) {
+        main_ptr->buffer[ci] = (*cinfo->mem->access_virt_sarray)
+          ((j_common_ptr) cinfo, main_ptr->whole_image[ci],
+           main_ptr->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
+           (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
       }
       /* In a read pass, pretend we just read some source data. */
       if (! writing) {
-	*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
-	main_ptr->rowgroup_ctr = DCTSIZE;
+        *in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
+        main_ptr->rowgroup_ctr = DCTSIZE;
       }
     }
 
@@ -196,35 +196,35 @@
     /* Note: preprocessor will pad if necessary to fill the last iMCU row. */
     if (writing) {
       (*cinfo->prep->pre_process_data) (cinfo,
-					input_buf, in_row_ctr, in_rows_avail,
-					main_ptr->buffer, &main_ptr->rowgroup_ctr,
-					(JDIMENSION) DCTSIZE);
+                                        input_buf, in_row_ctr, in_rows_avail,
+                                        main_ptr->buffer, &main_ptr->rowgroup_ctr,
+                                        (JDIMENSION) DCTSIZE);
       /* Return to application if we need more data to fill the iMCU row. */
       if (main_ptr->rowgroup_ctr < DCTSIZE)
-	return;
+        return;
     }
 
     /* Emit data, unless this is a sink-only pass. */
     if (main_ptr->pass_mode != JBUF_SAVE_SOURCE) {
       if (! (*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) {
-	/* If compressor did not consume the whole row, then we must need to
-	 * suspend processing and return to the application.  In this situation
-	 * we pretend we didn't yet consume the last input row; otherwise, if
-	 * it happened to be the last row of the image, the application would
-	 * think we were done.
-	 */
-	if (! main_ptr->suspended) {
-	  (*in_row_ctr)--;
-	  main_ptr->suspended = TRUE;
-	}
-	return;
+        /* If compressor did not consume the whole row, then we must need to
+         * suspend processing and return to the application.  In this situation
+         * we pretend we didn't yet consume the last input row; otherwise, if
+         * it happened to be the last row of the image, the application would
+         * think we were done.
+         */
+        if (! main_ptr->suspended) {
+          (*in_row_ctr)--;
+          main_ptr->suspended = TRUE;
+        }
+        return;
       }
       /* We did finish the row.  Undo our little suspension hack if a previous
        * call suspended; then mark the main buffer empty.
        */
       if (main_ptr->suspended) {
-	(*in_row_ctr)++;
-	main_ptr->suspended = FALSE;
+        (*in_row_ctr)++;
+        main_ptr->suspended = FALSE;
       }
     }
 
@@ -250,7 +250,7 @@
 
   main_ptr = (my_main_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_main_controller));
+                                SIZEOF(my_main_controller));
   cinfo->main = (struct jpeg_c_main_controller *) main_ptr;
   main_ptr->pub.start_pass = start_pass_main;
 
@@ -266,13 +266,13 @@
     /* Allocate a full-image virtual array for each component */
     /* Note we pad the bottom to a multiple of the iMCU height */
     for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
+         ci++, compptr++) {
       main_ptr->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-	 compptr->width_in_blocks * DCTSIZE,
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor) * DCTSIZE,
-	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+        ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
+         compptr->width_in_blocks * DCTSIZE,
+         (JDIMENSION) jround_up((long) compptr->height_in_blocks,
+                                (long) compptr->v_samp_factor) * DCTSIZE,
+         (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
     }
 #else
     ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
@@ -283,11 +283,11 @@
 #endif
     /* Allocate a strip buffer for each component */
     for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
+         ci++, compptr++) {
       main_ptr->buffer[ci] = (*cinfo->mem->alloc_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE,
-	 compptr->width_in_blocks * DCTSIZE,
-	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+        ((j_common_ptr) cinfo, JPOOL_IMAGE,
+         compptr->width_in_blocks * DCTSIZE,
+         (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
     }
   }
 }