gimp r27335 - in trunk: . plug-ins/common



Author: dindinx
Date: Mon Oct 20 06:04:39 2008
New Revision: 27335
URL: http://svn.gnome.org/viewvc/gimp?rev=27335&view=rev

Log:
* plug-ins/common/*.c: untabified


Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/animation-play.c
   trunk/plug-ins/common/blur-gauss.c
   trunk/plug-ins/common/blur.c
   trunk/plug-ins/common/color-enhance.c
   trunk/plug-ins/common/compose.c
   trunk/plug-ins/common/contrast-stretch-hsv.c
   trunk/plug-ins/common/crop-auto.c
   trunk/plug-ins/common/decompose.c
   trunk/plug-ins/common/despeckle.c
   trunk/plug-ins/common/edge-laplace.c
   trunk/plug-ins/common/file-cel.c
   trunk/plug-ins/common/file-dicom.c
   trunk/plug-ins/common/file-gbr.c
   trunk/plug-ins/common/file-gih.c
   trunk/plug-ins/common/file-glob.c
   trunk/plug-ins/common/file-header.c
   trunk/plug-ins/common/file-html-table.c
   trunk/plug-ins/common/file-pat.c
   trunk/plug-ins/common/file-pdf.c
   trunk/plug-ins/common/file-pix.c
   trunk/plug-ins/common/file-sunras.c
   trunk/plug-ins/common/file-wmf.c
   trunk/plug-ins/common/file-xbm.c
   trunk/plug-ins/common/file-xpm.c
   trunk/plug-ins/common/file-xwd.c
   trunk/plug-ins/common/film.c
   trunk/plug-ins/common/gee-zoom.c
   trunk/plug-ins/common/guillotine.c
   trunk/plug-ins/common/hot.c
   trunk/plug-ins/common/iwarp.c
   trunk/plug-ins/common/jigsaw.c
   trunk/plug-ins/common/mail.c
   trunk/plug-ins/common/newsprint.c
   trunk/plug-ins/common/noise-randomize.c
   trunk/plug-ins/common/pixelize.c
   trunk/plug-ins/common/ripple.c
   trunk/plug-ins/common/rotate.c
   trunk/plug-ins/common/screenshot.c
   trunk/plug-ins/common/semi-flatten.c
   trunk/plug-ins/common/tile-seamless.c
   trunk/plug-ins/common/unit-editor.c
   trunk/plug-ins/common/unsharp-mask.c
   trunk/plug-ins/common/value-propagate.c
   trunk/plug-ins/common/warp.c
   trunk/plug-ins/common/web-browser.c

Modified: trunk/plug-ins/common/animation-play.c
==============================================================================
--- trunk/plug-ins/common/animation-play.c	(original)
+++ trunk/plug-ins/common/animation-play.c	Mon Oct 20 06:04:39 2008
@@ -1443,8 +1443,8 @@
                            advance_frame_callback, NULL);
 
   g_object_set (action,
-		"tooltip", playing ? _("Stop playback") : _("Start playback"),
-		NULL);
+                "tooltip", playing ? _("Stop playback") : _("Start playback"),
+                NULL);
 }
 
 static gdouble

Modified: trunk/plug-ins/common/blur-gauss.c
==============================================================================
--- trunk/plug-ins/common/blur-gauss.c	(original)
+++ trunk/plug-ins/common/blur-gauss.c	Mon Oct 20 06:04:39 2008
@@ -1200,8 +1200,8 @@
 
   if (direct)
     gimp_pixel_rgn_init (&dest_rgn,
-			 drawable, 0, 0, drawable->width, drawable->height,
-			 TRUE, TRUE);
+                         drawable, 0, 0, drawable->width, drawable->height,
+                         TRUE, TRUE);
 
   progress = 0.0;
   max_progress  = (horz <= 0.0) ? 0 : width * height * horz;
@@ -1244,22 +1244,22 @@
           for (b = 0; b < bytes; b++)
             {
               gint same =  run_length_encode (src + b, rle, pix, bytes,
-					      height, length, TRUE);
+                                              height, length, TRUE);
 
               if (same > (3 * height) / 4)
-		{
-		  /* encoded_rle is only fastest if there are a lot of
-		   * repeating pixels
-		   */
+                {
+                  /* encoded_rle is only fastest if there are a lot of
+                   * repeating pixels
+                   */
                   do_encoded_lre (rle, pix, dest + b, height, length, bytes,
                                   curve, total, sum);
-		}
-	      else
-		{
-		  /* else a full but more simple algorithm is better */
-		  do_full_lre (pix, dest + b, height, length, bytes,
-			       curve, total);
-		}
+                }
+              else
+                {
+                  /* else a full but more simple algorithm is better */
+                  do_full_lre (pix, dest + b, height, length, bytes,
+                               curve, total);
+                }
             }
 
           if (has_alpha)
@@ -1356,22 +1356,22 @@
           for (b = 0; b < bytes; b++)
             {
               gint same = run_length_encode (src + b, rle, pix, bytes,
-					     width, length, TRUE);
+                                             width, length, TRUE);
 
               if (same > (3 * width) / 4)
-		{
-		  /* encoded_rle is only fastest if there are a lot of
-		   * repeating pixels
-		   */
+                {
+                  /* encoded_rle is only fastest if there are a lot of
+                   * repeating pixels
+                   */
                   do_encoded_lre (rle, pix, dest + b, width, length, bytes,
                                   curve, total, sum);
-		}
-	      else
-		{
-		  /* else a full but more simple algorithm is better */
-		  do_full_lre (pix, dest + b, width, length, bytes,
+                }
+              else
+                {
+                  /* else a full but more simple algorithm is better */
+                  do_full_lre (pix, dest + b, width, length, bytes,
                                curve, total);
-		}
+                }
             }
 
 
@@ -1461,15 +1461,15 @@
 
   if (method == BLUR_IIR)
     gauss_iir (drawable,
-	       horz, vert, method, preview_buffer, x1, y1, width, height);
+               horz, vert, method, preview_buffer, x1, y1, width, height);
   else
     gauss_rle (drawable,
-	       horz, vert, method, preview_buffer, x1, y1, width, height);
+               horz, vert, method, preview_buffer, x1, y1, width, height);
 
   if (preview)
     {
       gimp_preview_draw_buffer (GIMP_PREVIEW (preview),
-				preview_buffer, width * drawable->bpp);
+                                preview_buffer, width * drawable->bpp);
       g_free (preview_buffer);
     }
   else
@@ -1497,9 +1497,9 @@
       sum = *src1++ + *src2++;
 
       if (sum > 255)
-	sum = 255;
+        sum = 255;
       else if (sum < 0)
-	sum = 0;
+        sum = 0;
 
       *dest++ = (guchar) sum;
     }
@@ -1531,13 +1531,13 @@
 
   n_p [0] = x4 + x6;
   n_p [1] = (exp(x1)*(x7*sin(x3)-(x6+2*x4)*cos(x3)) +
-	     exp(x0)*(x5*sin(x2) - (2*x6+x4)*cos (x2)));
+             exp(x0)*(x5*sin(x2) - (2*x6+x4)*cos (x2)));
   n_p [2] = (2 * exp(x0+x1) *
-	     ((x4+x6)*cos(x3)*cos(x2) - x5*cos(x3)*sin(x2) -
-	      x7*cos(x2)*sin(x3)) +
-	     x6*exp(2*x0) + x4*exp(2*x1));
+             ((x4+x6)*cos(x3)*cos(x2) - x5*cos(x3)*sin(x2) -
+              x7*cos(x2)*sin(x3)) +
+             x6*exp(2*x0) + x4*exp(2*x1));
   n_p [3] = (exp(x1+2*x0) * (x7*sin(x3) - x6*cos(x3)) +
-	     exp(x0+2*x1) * (x5*sin(x2) - x4*cos(x2)));
+             exp(x0+2*x1) * (x5*sin(x2) - x4*cos(x2)));
   n_p [4] = 0.0;
 
   d_p [0] = 0.0;

Modified: trunk/plug-ins/common/blur.c
==============================================================================
--- trunk/plug-ins/common/blur.c	(original)
+++ trunk/plug-ins/common/blur.c	Mon Oct 20 06:04:39 2008
@@ -295,29 +295,29 @@
       d = dest;
       ind = 0;
       for (col = 0; col < (x2 - x1) * bytes; col++)
-	{
-	  ind++;
-	  if (ind == bytes || !has_alpha)
-	    {
-	      /*
-	       *  If no alpha channel,
-	       *   or if there is one and this is it...
-	       */
-	      *d++ = ((gint) pr[col - bytes] + (gint) pr[col] +
-		      (gint) pr[col + bytes] +
-		      (gint) cr[col - bytes] + (gint) cr[col] +
-		      (gint) cr[col + bytes] +
-		      (gint) nr[col - bytes] + (gint) nr[col] +
-		      (gint) nr[col + bytes] + 4) / 9;
-	      ind = 0;
-	    }
-	  else
-	    {
-	      /*
-	       *  otherwise we have an alpha channel,
-	       *   but this is a color channel
-	       */
-	      *d++ = ROUND(
+        {
+          ind++;
+          if (ind == bytes || !has_alpha)
+            {
+              /*
+               *  If no alpha channel,
+               *   or if there is one and this is it...
+               */
+              *d++ = ((gint) pr[col - bytes] + (gint) pr[col] +
+                      (gint) pr[col + bytes] +
+                      (gint) cr[col - bytes] + (gint) cr[col] +
+                      (gint) cr[col + bytes] +
+                      (gint) nr[col - bytes] + (gint) nr[col] +
+                      (gint) nr[col + bytes] + 4) / 9;
+              ind = 0;
+            }
+          else
+            {
+              /*
+               *  otherwise we have an alpha channel,
+               *   but this is a color channel
+               */
+              *d++ = ROUND(
                            ((gdouble) (pr[col - bytes] * pr[col - ind])
                             + (gdouble) (pr[col] * pr[col + bytes - ind])
                             + (gdouble) (pr[col + bytes] * pr[col + 2*bytes - ind])
@@ -336,8 +336,8 @@
                               + (gdouble) nr[col - ind]
                               + (gdouble) nr[col + bytes - ind]
                               + (gdouble) nr[col + 2*bytes - ind]));
-	    }
-	}
+            }
+        }
 
       /*
        *  Save the modified row, shuffle the row pointers, and every
@@ -351,7 +351,7 @@
       nr = tmp;
 
       if ((row % 32) == 0)
-	gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
+        gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
     }
 
   gimp_progress_update (1.0);

Modified: trunk/plug-ins/common/color-enhance.c
==============================================================================
--- trunk/plug-ins/common/color-enhance.c	(original)
+++ trunk/plug-ins/common/color-enhance.c	Mon Oct 20 06:04:39 2008
@@ -66,23 +66,23 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Stretch color saturation to cover maximum possible range"),
-			  "This simple plug-in does an automatic saturation "
-			  "stretch.  For each channel in the image, it finds "
-			  "the minimum and maximum values... it uses those "
-			  "values to stretch the individual histograms to the "
-			  "full range.  For some images it may do just what "
-			  "you want; for others it may not work that well.  "
-			  "This version differs from Contrast Autostretch in "
-			  "that it works in HSV space, and preserves hue.",
-			  "Martin Weber",
-		 	  "Martin Weber",
-		  	  "1997",
-			  N_("_Color Enhance"),
-	   	  	  "RGB*, INDEXED*",
- 			  GIMP_PLUGIN,
-	 	  	  G_N_ELEMENTS (args), 0,
- 			  args, NULL);
+                          N_("Stretch color saturation to cover maximum possible range"),
+                          "This simple plug-in does an automatic saturation "
+                          "stretch.  For each channel in the image, it finds "
+                          "the minimum and maximum values... it uses those "
+                          "values to stretch the individual histograms to the "
+                          "full range.  For some images it may do just what "
+                          "you want; for others it may not work that well.  "
+                          "This version differs from Contrast Autostretch in "
+                          "that it works in HSV space, and preserves hue.",
+                          "Martin Weber",
+                          "Martin Weber",
+                          "1997",
+                          N_("_Color Enhance"),
+                          "RGB*, INDEXED*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Colors/Auto");
 }
@@ -117,14 +117,14 @@
       Color_Enhance (drawable);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else if (gimp_drawable_is_indexed (drawable->drawable_id))
     {
       indexed_Color_Enhance (image_ID);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else
     {

Modified: trunk/plug-ins/common/compose.c
==============================================================================
--- trunk/plug-ins/common/compose.c	(original)
+++ trunk/plug-ins/common/compose.c	Mon Oct 20 06:04:39 2008
@@ -176,9 +176,9 @@
 
   /*  Compose functon  */
   void  (* compose_fun) (guchar **src,
-			 gint    *incr_src,
-			 gint     numpix,
-			 guchar  *dst,
+                         gint    *incr_src,
+                         gint     numpix,
+                         guchar  *dst,
                          gboolean dst_has_alpha);
 } COMPOSE_DSC;
 
@@ -401,49 +401,49 @@
   drw_args[6].description = type_desc->str;
 
   gimp_install_procedure (COMPOSE_PROC,
-			  N_("Create an image using multiple gray images as color channels"),
-			  "This function creates a new image from "
-			  "multiple gray images",
-			  "Peter Kirchgessner",
-			  "Peter Kirchgessner (peter kirchgessner net)",
-			  "1997",
-			  N_("C_ompose..."),
-			  "GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args),
+                          N_("Create an image using multiple gray images as color channels"),
+                          "This function creates a new image from "
+                          "multiple gray images",
+                          "Peter Kirchgessner",
+                          "Peter Kirchgessner (peter kirchgessner net)",
+                          "1997",
+                          N_("C_ompose..."),
+                          "GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args),
                           G_N_ELEMENTS (return_vals),
-			  args, return_vals);
+                          args, return_vals);
 
   gimp_plugin_menu_register (COMPOSE_PROC, "<Image>/Colors/Components");
 
   gimp_install_procedure (DRAWABLE_COMPOSE_PROC,
-			  "Compose an image from multiple drawables of gray images",
-			  "This function creates a new image from "
-			  "multiple drawables of gray images",
-			  "Peter Kirchgessner",
-			  "Peter Kirchgessner (peter kirchgessner net)",
-			  "1998",
-			  NULL,   /* It is not available in interactive mode */
-			  "GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (drw_args),
+                          "Compose an image from multiple drawables of gray images",
+                          "This function creates a new image from "
+                          "multiple drawables of gray images",
+                          "Peter Kirchgessner",
+                          "Peter Kirchgessner (peter kirchgessner net)",
+                          "1998",
+                          NULL,   /* It is not available in interactive mode */
+                          "GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (drw_args),
                           G_N_ELEMENTS (drw_return_vals),
-			  drw_args, drw_return_vals);
+                          drw_args, drw_return_vals);
 
   gimp_install_procedure (RECOMPOSE_PROC,
-			  N_("Recompose an image that was previously decomposed"),
-			  "This function recombines the grayscale layers produced "
-			  "by Decompose into a single RGB or RGBA layer, and "
+                          N_("Recompose an image that was previously decomposed"),
+                          "This function recombines the grayscale layers produced "
+                          "by Decompose into a single RGB or RGBA layer, and "
                           "replaces the originally decomposed layer with the "
                           "result.",
-			  "Bill Skaggs",
-			  "Bill Skaggs",
-			  "2004",
-			  N_("R_ecompose"),
-			  "GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (recompose_args), 0,
-			  recompose_args, NULL);
+                          "Bill Skaggs",
+                          "Bill Skaggs",
+                          "2004",
+                          N_("R_ecompose"),
+                          "GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (recompose_args), 0,
+                          recompose_args, NULL);
 
   gimp_plugin_menu_register (RECOMPOSE_PROC, "<Image>/Colors/Components");
 
@@ -616,12 +616,12 @@
                           compose_by_drawable);
 
       if (image_ID < 0)
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
       else
-	{
-	  values[1].data.d_int32 = image_ID;
+        {
+          values[1].data.d_int32 = image_ID;
 
           if (composevals.do_recompose)
             {
@@ -635,7 +635,7 @@
               if (run_mode != GIMP_RUN_NONINTERACTIVE)
                 gimp_display_new (image_ID);
             }
-	}
+        }
 
       /*  Store data  */
       if (run_mode == GIMP_RUN_INTERACTIVE)
@@ -714,7 +714,7 @@
       height = gimp_drawable_height (inputs[first_ID].comp.ID);
 
       for (j = first_ID + 1; j < num_images; j++)
-	{
+        {
           if (inputs[j].is_ID)
             {
               if (! gimp_drawable_is_valid (inputs[j].comp.ID))
@@ -731,7 +731,7 @@
                   return -1;
                 }
             }
-	}
+        }
       for (j = 0; j < num_images; j++)
         {
           if (inputs[j].is_ID)
@@ -746,7 +746,7 @@
       height = gimp_image_height (inputs[first_ID].comp.ID);
 
       for (j = first_ID + 1; j < num_images; j++)
-	{
+        {
           if (inputs[j].is_ID)
             {
               if ((width  != gimp_image_width (inputs[j].comp.ID)) ||
@@ -756,11 +756,11 @@
                   return -1;
                 }
             }
-	}
+        }
 
       /* Get first layer/drawable for all input images */
       for (j = 0; j < num_images; j++)
-	{
+        {
           if (inputs[j].is_ID)
             {
               gint32 *layers;
@@ -778,7 +778,7 @@
               drawable_src[j] = gimp_drawable_get (layers[0]);
               g_free (layers);
             }
-	}
+        }
     }
 
   /* Get pixel region for all input drawables */
@@ -868,14 +868,14 @@
                                    width, scan_lines);
 
       if (composevals.do_recompose)
-	gimp_pixel_rgn_get_rect (&pixel_rgn_dst_read, dst, 0, i,
-				 width, scan_lines);
+        gimp_pixel_rgn_get_rect (&pixel_rgn_dst_read, dst, 0, i,
+                                 width, scan_lines);
 
       /* Do the composition */
       compose_dsc[compose_idx].compose_fun (src,
-					    incr_src,
-					    width * tile_height,
-					    dst,
+                                            incr_src,
+                                            width * tile_height,
+                                            dst,
                                             gimp_drawable_has_alpha (layer_ID_dst));
 
       /* Set destination pixel region */
@@ -933,12 +933,12 @@
   gimp_image_set_filename (image_ID, filename);
 
   *layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
-			      gdtype, 100, GIMP_NORMAL_MODE);
+                              gdtype, 100, GIMP_NORMAL_MODE);
   gimp_image_add_layer (image_ID, *layer_ID, 0);
 
   *drawable = gimp_drawable_get (*layer_ID);
   gimp_pixel_rgn_init (pixel_rgn, *drawable, 0, 0, (*drawable)->width,
-		       (*drawable)->height, TRUE, FALSE);
+                       (*drawable)->height, TRUE, FALSE);
 
   return image_ID;
 }
@@ -962,24 +962,24 @@
   if ((red_incr == 1) && (green_incr == 1) && (blue_incr == 1))
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = *(red_src++);
-	  *(rgb_dst++) = *(green_src++);
-	  *(rgb_dst++) = *(blue_src++);
+        {
+          *(rgb_dst++) = *(red_src++);
+          *(rgb_dst++) = *(green_src++);
+          *(rgb_dst++) = *(blue_src++);
           if (dst_has_alpha)
             rgb_dst++;
-	}
+        }
     }
   else
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = *red_src;     red_src += red_incr;
-	  *(rgb_dst++) = *green_src;   green_src += green_incr;
-	  *(rgb_dst++) = *blue_src;    blue_src += blue_incr;
+        {
+          *(rgb_dst++) = *red_src;     red_src += red_incr;
+          *(rgb_dst++) = *green_src;   green_src += green_incr;
+          *(rgb_dst++) = *blue_src;    blue_src += blue_incr;
           if (dst_has_alpha)
             rgb_dst++;
-	}
+        }
     }
 }
 
@@ -1006,22 +1006,22 @@
       (alpha_incr == 1))
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = *(red_src++);
-	  *(rgb_dst++) = *(green_src++);
-	  *(rgb_dst++) = *(blue_src++);
-	  *(rgb_dst++) = *(alpha_src++);
-	}
+        {
+          *(rgb_dst++) = *(red_src++);
+          *(rgb_dst++) = *(green_src++);
+          *(rgb_dst++) = *(blue_src++);
+          *(rgb_dst++) = *(alpha_src++);
+        }
     }
   else
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = *red_src;    red_src += red_incr;
-	  *(rgb_dst++) = *green_src;  green_src += green_incr;
-	  *(rgb_dst++) = *blue_src;   blue_src += blue_incr;
-	  *(rgb_dst++) = *alpha_src;  alpha_src += alpha_incr;
-	}
+        {
+          *(rgb_dst++) = *red_src;    red_src += red_incr;
+          *(rgb_dst++) = *green_src;  green_src += green_incr;
+          *(rgb_dst++) = *blue_src;   blue_src += blue_incr;
+          *(rgb_dst++) = *alpha_src;  alpha_src += alpha_incr;
+        }
     }
 }
 
@@ -1045,8 +1045,8 @@
   while (count-- > 0)
     {
       gimp_hsv_to_rgb4 (rgb_dst, (gdouble) *hue_src / 255.0,
-			         (gdouble) *sat_src / 255.0,
-			         (gdouble) *val_src / 255.0);
+                                 (gdouble) *sat_src / 255.0,
+                                 (gdouble) *val_src / 255.0);
       rgb_dst += 3;
       hue_src += hue_incr;
       sat_src += sat_incr;
@@ -1115,27 +1115,27 @@
   if ((cyan_incr == 1) && (magenta_incr == 1) && (yellow_incr == 1))
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = 255 - *(cyan_src++);
-	  *(rgb_dst++) = 255 - *(magenta_src++);
-	  *(rgb_dst++) = 255 - *(yellow_src++);
+        {
+          *(rgb_dst++) = 255 - *(cyan_src++);
+          *(rgb_dst++) = 255 - *(magenta_src++);
+          *(rgb_dst++) = 255 - *(yellow_src++);
           if (dst_has_alpha)
             rgb_dst++;
-	}
+        }
     }
   else
     {
       while (count-- > 0)
-	{
-	  *(rgb_dst++) = 255 - *cyan_src;
-	  *(rgb_dst++) = 255 - *magenta_src;
-	  *(rgb_dst++) = 255 - *yellow_src;
-	  cyan_src += cyan_incr;
-	  magenta_src += magenta_incr;
-	  yellow_src += yellow_incr;
+        {
+          *(rgb_dst++) = 255 - *cyan_src;
+          *(rgb_dst++) = 255 - *magenta_src;
+          *(rgb_dst++) = 255 - *yellow_src;
+          cyan_src += cyan_incr;
+          magenta_src += magenta_incr;
+          yellow_src += yellow_incr;
           if (dst_has_alpha)
             rgb_dst++;
-	}
+        }
     }
 }
 
@@ -1163,25 +1163,25 @@
     {
       black = (gint)*black_src;
       if (black)
-	{
-	  cyan    = (gint) *cyan_src;
-	  magenta = (gint) *magenta_src;
-	  yellow  = (gint) *yellow_src;
-
-	  cyan    += black; if (cyan > 255) cyan = 255;
-	  magenta += black; if (magenta > 255) magenta = 255;
-	  yellow  += black; if (yellow > 255) yellow = 255;
-
-	  *(rgb_dst++) = 255 - cyan;
-	  *(rgb_dst++) = 255 - magenta;
-	  *(rgb_dst++) = 255 - yellow;
-	}
+        {
+          cyan    = (gint) *cyan_src;
+          magenta = (gint) *magenta_src;
+          yellow  = (gint) *yellow_src;
+
+          cyan    += black; if (cyan > 255) cyan = 255;
+          magenta += black; if (magenta > 255) magenta = 255;
+          yellow  += black; if (yellow > 255) yellow = 255;
+
+          *(rgb_dst++) = 255 - cyan;
+          *(rgb_dst++) = 255 - magenta;
+          *(rgb_dst++) = 255 - yellow;
+        }
       else
-	{
-	  *(rgb_dst++) = 255 - *cyan_src;
-	  *(rgb_dst++) = 255 - *magenta_src;
-	  *(rgb_dst++) = 255 - *yellow_src;
-	}
+        {
+          *(rgb_dst++) = 255 - *cyan_src;
+          *(rgb_dst++) = 255 - *magenta_src;
+          *(rgb_dst++) = 255 - *yellow_src;
+        }
       cyan_src += cyan_incr;
       magenta_src += magenta_incr;
       yellow_src += yellow_incr;
@@ -1622,7 +1622,7 @@
                           -1);
       g_object_unref (ico);
       gtk_table_attach (GTK_TABLE (table), combo, 1, 2, j, j + 1,
-			GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                        GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
       gtk_widget_show (combo);
 
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
@@ -1694,8 +1694,8 @@
 
 {
   return ((gimp_image_base_type (image_id) == GIMP_GRAY) &&
-	  (gimp_image_width  (image_id) == composeint.width) &&
-	  (gimp_image_height (image_id) == composeint.height));
+          (gimp_image_width  (image_id) == composeint.width) &&
+          (gimp_image_height (image_id) == composeint.height));
 }
 
 static void

Modified: trunk/plug-ins/common/contrast-stretch-hsv.c
==============================================================================
--- trunk/plug-ins/common/contrast-stretch-hsv.c	(original)
+++ trunk/plug-ins/common/contrast-stretch-hsv.c	Mon Oct 20 06:04:39 2008
@@ -65,24 +65,24 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Stretch image contrast to cover the maximum possible range"),
-			  "This simple plug-in does an automatic contrast "
-			  "stretch.  For each channel in the image, it finds "
-			  "the minimum and maximum values... it uses those "
-			  "values to stretch the individual histograms to the "
-			  "full contrast range.  For some images it may do "
-			  "just what you want; for others it may be total "
-			  "crap :).  This version differs from Contrast "
-			  "Autostretch in that it works in HSV space, and "
-			  "preserves hue.",
-			  "Scott Goehring and Federico Mena Quintero",
-			  "Scott Goehring and Federico Mena Quintero",
-			  "1997",
-			  N_("Stretch _HSV"),
-			  "RGB*, INDEXED*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          N_("Stretch image contrast to cover the maximum possible range"),
+                          "This simple plug-in does an automatic contrast "
+                          "stretch.  For each channel in the image, it finds "
+                          "the minimum and maximum values... it uses those "
+                          "values to stretch the individual histograms to the "
+                          "full contrast range.  For some images it may do "
+                          "just what you want; for others it may be total "
+                          "crap :).  This version differs from Contrast "
+                          "Autostretch in that it works in HSV space, and "
+                          "preserves hue.",
+                          "Scott Goehring and Federico Mena Quintero",
+                          "Scott Goehring and Federico Mena Quintero",
+                          "1997",
+                          N_("Stretch _HSV"),
+                          "RGB*, INDEXED*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Colors/Auto");
 }
@@ -118,14 +118,14 @@
       autostretch_hsv (drawable);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else if (gimp_drawable_is_indexed (drawable->drawable_id))
     {
       indexed_autostretch_hsv (image_ID);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else
     {
@@ -163,7 +163,7 @@
 
 static void
 autostretch_hsv_func (guchar *src, guchar *dest, gint bpp,
-		      AutostretchData *data)
+                      AutostretchData *data)
 {
   double h, s, v;
 
@@ -213,5 +213,5 @@
 
   gimp_rgn_iterate1 (drawable, 0 /* unused */, (GimpRgnFunc1) find_max, &data);
   gimp_rgn_iterate2 (drawable, 0 /* unused */, (GimpRgnFunc2) autostretch_hsv_func,
-		     &data);
+                     &data);
 }

Modified: trunk/plug-ins/common/crop-auto.c
==============================================================================
--- trunk/plug-ins/common/crop-auto.c	(original)
+++ trunk/plug-ins/common/crop-auto.c	Mon Oct 20 06:04:39 2008
@@ -414,9 +414,9 @@
 }
 
 static gboolean
-colors_equal (const guchar 	*col1,
-              const guchar	*col2,
-              gint  		 bytes)
+colors_equal (const guchar      *col1,
+              const guchar      *col2,
+              gint               bytes)
 {
   gboolean equal = TRUE;
   gint b;

Modified: trunk/plug-ins/common/decompose.c
==============================================================================
--- trunk/plug-ins/common/decompose.c	(original)
+++ trunk/plug-ins/common/decompose.c	Mon Oct 20 06:04:39 2008
@@ -309,36 +309,36 @@
   args[3].description = type_desc->str;
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Decompose an image into separate colorspace components"),
-			  "This function creates new gray images with "
-			  "different channel information in each of them",
-			  "Peter Kirchgessner",
-			  "Peter Kirchgessner",
-			  "1997",
-			  N_("_Decompose..."),
-			  "RGB*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args),
+                          N_("Decompose an image into separate colorspace components"),
+                          "This function creates new gray images with "
+                          "different channel information in each of them",
+                          "Peter Kirchgessner",
+                          "Peter Kirchgessner",
+                          "1997",
+                          N_("_Decompose..."),
+                          "RGB*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args),
                           G_N_ELEMENTS (return_vals),
-			  args, return_vals);
+                          args, return_vals);
 
   gimp_install_procedure (PLUG_IN_PROC_REG,
-			  N_("Decompose an image into separate colorspace components"),
-			  "This function creates new gray images with "
-			  "different channel information in each of them. "
-			  "Pixels in the foreground color will appear black "
+                          N_("Decompose an image into separate colorspace components"),
+                          "This function creates new gray images with "
+                          "different channel information in each of them. "
+                          "Pixels in the foreground color will appear black "
                           "in all output images.  This can be used for "
                           "things like crop marks that have to show up on "
                           "all channels.",
-			  "Peter Kirchgessner",
-			  "Peter Kirchgessner, Clarence Risher",
-			  "1997",
-			  N_("_Decompose..."),
-			  "RGB*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args),
+                          "Peter Kirchgessner",
+                          "Peter Kirchgessner, Clarence Risher",
+                          "1997",
+                          N_("_Decompose..."),
+                          "RGB*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args),
                           G_N_ELEMENTS (return_vals),
-			  args, return_vals);
+                          args, return_vals);
 
   gimp_plugin_menu_register (PLUG_IN_PROC_REG, "<Image>/Colors/Components");
 
@@ -388,24 +388,24 @@
 
       /*  First acquire information with a dialog  */
       if (! decompose_dialog ())
-	return;
+        return;
       break;
 
     case GIMP_RUN_NONINTERACTIVE:
       /*  Make sure all the arguments are there!  */
       if (nparams != 4 && nparams != 5 && nparams != 6)
-	{
-	  status = GIMP_PDB_CALLING_ERROR;
-	}
+        {
+          status = GIMP_PDB_CALLING_ERROR;
+        }
       else
-	{
+        {
           strncpy (decovals.extract_type, param[3].data.d_string,
                    sizeof (decovals.extract_type));
           decovals.extract_type[sizeof (decovals.extract_type)-1] = '\0';
 
           decovals.as_layers = nparams > 4 ? param[4].data.d_int32 : FALSE;
           decovals.use_registration = (strcmp (name, PLUG_IN_PROC_REG) == 0);
-	}
+        }
       break;
 
     case GIMP_RUN_WITH_LAST_VALS:
@@ -435,11 +435,11 @@
                               layer_ID_extract);
 
       if (num_images <= 0)
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
       else
-	{
+        {
           /* create decompose-data parasite */
           GString *data = g_string_new ("");
 
@@ -449,25 +449,25 @@
           for (j = 0; j < num_layers; j++)
             g_string_append_printf (data, "%d ", layer_ID_extract[j]);
 
-	  for (j = 0; j < num_images; j++)
-	    {
-	      values[j+1].data.d_int32 = image_ID_extract[j];
+          for (j = 0; j < num_images; j++)
+            {
+              values[j+1].data.d_int32 = image_ID_extract[j];
 
-	      gimp_image_undo_enable (image_ID_extract[j]);
-	      gimp_image_clean_all (image_ID_extract[j]);
+              gimp_image_undo_enable (image_ID_extract[j]);
+              gimp_image_clean_all (image_ID_extract[j]);
 
               gimp_image_attach_new_parasite (image_ID_extract[j],
                                               "decompose-data",
                                               0, data->len + 1, data->str);
 
-	      if (run_mode != GIMP_RUN_NONINTERACTIVE)
-		gimp_display_new (image_ID_extract[j]);
-	    }
-
-	  /*  Store data  */
-	  if (run_mode == GIMP_RUN_INTERACTIVE)
-	    gimp_set_data (PLUG_IN_PROC, &decovals, sizeof (DecoVals));
-	}
+              if (run_mode != GIMP_RUN_NONINTERACTIVE)
+                gimp_display_new (image_ID_extract[j]);
+            }
+
+          /*  Store data  */
+          if (run_mode == GIMP_RUN_INTERACTIVE)
+            gimp_set_data (PLUG_IN_PROC, &decovals, sizeof (DecoVals));
+        }
     }
 
   values[0].data.d_status = status;
@@ -501,10 +501,10 @@
   for (j = 0; j < G_N_ELEMENTS (extract); j++)
     {
       if (g_ascii_strcasecmp (extract_type, extract[j].type) == 0)
-	{
-	  extract_idx = j;
-	  break;
-	}
+        {
+          extract_idx = j;
+          break;
+        }
     }
   if (extract_idx < 0)
     return -1;
@@ -628,7 +628,7 @@
 
       /* Extract the channel information */
       extract[extract_idx].extract_fun (src, drawable_src->bpp, scan_lines*width,
-					dst);
+                                        dst);
 
       /* Transfer the registration color */
       if (decovals.use_registration)
@@ -637,8 +637,8 @@
 
       /* Set destination pixel regions */
       for (j = 0; j < num_layers; j++)
-	gimp_pixel_rgn_set_rect (&(pixel_rgn_dst[j]), dst[j], 0, i, width,
-				 scan_lines);
+        gimp_pixel_rgn_set_rect (&(pixel_rgn_dst[j]), dst[j], 0, i, width,
+                                 scan_lines);
       i += scan_lines;
 
       gimp_progress_update ((gdouble) i / (gdouble) height);
@@ -728,7 +728,7 @@
 
   *drawable = gimp_drawable_get (layer_ID);
   gimp_pixel_rgn_init (pixel_rgn, *drawable, 0, 0, (*drawable)->width,
-		       (*drawable)->height, TRUE, FALSE);
+                       (*drawable)->height, TRUE, FALSE);
 
   return layer_ID;
 }
@@ -773,9 +773,9 @@
 
 static void
 extract_rgb (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *red_dst = dst[0];
@@ -794,9 +794,9 @@
 
 static void
 extract_rgba (const guchar  *src,
-	      gint           bpp,
-	      gint           numpix,
-	      guchar       **dst)
+              gint           bpp,
+              gint           numpix,
+              guchar       **dst)
 {
   register const guchar *rgba_src = src;
   register guchar *red_dst = dst[0];
@@ -817,9 +817,9 @@
 
 static void
 extract_red (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *red_dst = dst[0];
@@ -835,9 +835,9 @@
 
 static void
 extract_green (const guchar  *src,
-	       gint           bpp,
-	       gint           numpix,
-	       guchar       **dst)
+               gint           bpp,
+               gint           numpix,
+               guchar       **dst)
 {
   register const guchar *rgb_src = src+1;
   register guchar *green_dst = dst[0];
@@ -853,9 +853,9 @@
 
 static void
 extract_blue (const guchar  *src,
-	      gint           bpp,
-	      gint           numpix,
-	      guchar       **dst)
+              gint           bpp,
+              gint           numpix,
+              guchar       **dst)
 {
   register const guchar *rgb_src = src+2;
   register guchar *blue_dst = dst[0];
@@ -871,9 +871,9 @@
 
 static void
 extract_alpha (const guchar  *src,
-	       gint           bpp,
-	       gint           numpix,
-	       guchar       **dst)
+               gint           bpp,
+               gint           numpix,
+               guchar       **dst)
 {
   register const guchar *rgb_src = src+3;
   register guchar *alpha_dst = dst[0];
@@ -889,9 +889,9 @@
 
 static void
 extract_cmy (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *cyan_dst = dst[0];
@@ -911,9 +911,9 @@
 
 static void
 extract_hsv (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *hue_dst = dst[0];
@@ -935,9 +935,9 @@
 
 static void
 extract_hue (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *hue_dst = dst[0];
@@ -955,9 +955,9 @@
 
 static void
 extract_sat (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *sat_dst = dst[0];
@@ -975,9 +975,9 @@
 
 static void
 extract_val (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *val_dst = dst[0];
@@ -995,9 +995,9 @@
 
 static void
 extract_hsl (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *hue_dst = dst[0];
@@ -1024,9 +1024,9 @@
 
 static void
 extract_huel (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *hue_dst = dst[0];
@@ -1048,9 +1048,9 @@
 
 static void
 extract_satl (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *sat_dst = dst[0];
@@ -1072,9 +1072,9 @@
 
 static void
 extract_lightness (const guchar  *src,
-		   gint           bpp,
-		   gint           numpix,
-		   guchar       **dst)
+                   gint           bpp,
+                   gint           numpix,
+                   guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *lum_dst = dst[0];
@@ -1095,9 +1095,9 @@
 
 static void
 extract_cyan (const guchar  *src,
-	      gint           bpp,
-	      gint           numpix,
-	      guchar       **dst)
+              gint           bpp,
+              gint           numpix,
+              guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *cyan_dst = dst[0];
@@ -1113,9 +1113,9 @@
 
 static void
 extract_magenta (const guchar  *src,
-		 gint           bpp,
-		 gint           numpix,
-		 guchar       **dst)
+                 gint           bpp,
+                 gint           numpix,
+                 guchar       **dst)
 {
   register const guchar *rgb_src = src+1;
   register guchar *magenta_dst = dst[0];
@@ -1131,9 +1131,9 @@
 
 static void
 extract_yellow (const guchar  *src,
-		gint           bpp,
-		gint           numpix,
-		guchar       **dst)
+                gint           bpp,
+                gint           numpix,
+                guchar       **dst)
 {
   register const guchar *rgb_src = src+2;
   register guchar *yellow_dst = dst[0];
@@ -1149,9 +1149,9 @@
 
 static void
 extract_cmyk (const guchar  *src,
-	      gint           bpp,
-	      gint           numpix,
-	      guchar       **dst)
+              gint           bpp,
+              gint           numpix,
+              guchar       **dst)
 
 {
   register const guchar *rgb_src = src;
@@ -1167,16 +1167,16 @@
       *cyan_dst = k = 255 - *(rgb_src++);
       *magenta_dst = s = 255 - *(rgb_src++);
       if (s < k)
-	k = s;
+        k = s;
       *yellow_dst = s = 255 - *(rgb_src++);
       if (s < k)
-	k = s;                /* Black intensity is minimum of c, m, y */
+        k = s;                /* Black intensity is minimum of c, m, y */
       if (k)
-	{
-	  *cyan_dst -= k;     /* Remove common part of c, m, y */
-	  *magenta_dst -= k;
-	  *yellow_dst -= k;
-	}
+        {
+          *cyan_dst -= k;     /* Remove common part of c, m, y */
+          *magenta_dst -= k;
+          *yellow_dst -= k;
+        }
       cyan_dst++;
       magenta_dst++;
       yellow_dst++;
@@ -1189,9 +1189,9 @@
 
 static void
 extract_cyank (const guchar  *src,
-	       gint           bpp,
-	       gint           numpix,
-	       guchar       **dst)
+               gint           bpp,
+               gint           numpix,
+               guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *cyan_dst = dst[0];
@@ -1215,9 +1215,9 @@
 
 static void
 extract_magentak (const guchar  *src,
-		  gint           bpp,
-		  gint           numpix,
-		  guchar       **dst)
+                  gint           bpp,
+                  gint           numpix,
+                  guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *magenta_dst = dst[0];
@@ -1229,12 +1229,12 @@
       k = 255 - *(rgb_src++);  /* cyan */
       *magenta_dst = s = 255 - *(rgb_src++);  /* magenta */
       if (s < k)
-	k = s;
+        k = s;
       s = 255 - *(rgb_src++);  /* yellow */
       if (s < k)
-	k = s;
+        k = s;
       if (k)
-	*magenta_dst -= k;
+        *magenta_dst -= k;
       magenta_dst++;
 
       rgb_src += offset;
@@ -1244,9 +1244,9 @@
 
 static void
 extract_yellowk (const guchar  *src,
-		 gint           bpp,
-		 gint           numpix,
-		 guchar       **dst)
+                 gint           bpp,
+                 gint           numpix,
+                 guchar       **dst)
 
 {
   register const guchar *rgb_src = src;
@@ -1261,9 +1261,9 @@
       if (s < k) k = s;
       *yellow_dst = s = 255 - *(rgb_src++);
       if (s < k)
-	k = s;
+        k = s;
       if (k)
-	*yellow_dst -= k;
+        *yellow_dst -= k;
       yellow_dst++;
 
       rgb_src += offset;
@@ -1272,9 +1272,9 @@
 
 static void
 extract_lab (const guchar  *src,
-	     gint           bpp,
-	     gint           numpix,
-	     guchar       **dst)
+             gint           bpp,
+             gint           numpix,
+             guchar       **dst)
 {
   register const guchar *rgb_src = src;
   register guchar *l_dst = dst[0];

Modified: trunk/plug-ins/common/despeckle.c
==============================================================================
--- trunk/plug-ins/common/despeckle.c	(original)
+++ trunk/plug-ins/common/despeckle.c	Mon Oct 20 06:04:39 2008
@@ -274,7 +274,7 @@
 
   if (status == GIMP_PDB_SUCCESS)
     {
-    	if (gimp_drawable_is_rgb(drawable->drawable_id) ||
+        if (gimp_drawable_is_rgb(drawable->drawable_id) ||
             gimp_drawable_is_gray(drawable->drawable_id))
         {
 

Modified: trunk/plug-ins/common/edge-laplace.c
==============================================================================
--- trunk/plug-ins/common/edge-laplace.c	(original)
+++ trunk/plug-ins/common/edge-laplace.c	Mon Oct 20 06:04:39 2008
@@ -72,21 +72,21 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("High-resolution edge detection"),
-			  "This plugin creates one-pixel wide edges from the "
-			  "image, with the value proportional to the gradient. "
-			  "It uses the Laplace operator (a 3x3 kernel with -8 "
-			  "in the middle). The image has to be laplacered to "
-			  "get useful results, a gauss_iir with 1.5 - 5.0 "
-			  "depending on the noise in the image is best.",
-			  "Thorsten Schnier",
-			  "Thorsten Schnier",
-			  "1997",
-			  N_("_Laplace"),
-			  "RGB*, GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          N_("High-resolution edge detection"),
+                          "This plugin creates one-pixel wide edges from the "
+                          "image, with the value proportional to the gradient. "
+                          "It uses the Laplace operator (a 3x3 kernel with -8 "
+                          "in the middle). The image has to be laplacered to "
+                          "get useful results, a gauss_iir with 1.5 - 5.0 "
+                          "depending on the noise in the image is best.",
+                          "Thorsten Schnier",
+                          "Thorsten Schnier",
+                          "1997",
+                          N_("_Laplace"),
+                          "RGB*, GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Edge-Detect");
 }
@@ -118,7 +118,7 @@
       laplace (drawable);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else
     {
@@ -137,10 +137,10 @@
 
 static void
 laplace_prepare_row (GimpPixelRgn *pixel_rgn,
-		     guchar       *data,
-		     gint          x,
-		     gint          y,
-		     gint          w)
+                     guchar       *data,
+                     gint          x,
+                     gint          y,
+                     gint          w)
 {
   gint bpp = pixel_rgn->bpp;
   gint b;
@@ -171,12 +171,12 @@
 
 static void
 minmax  (gint  x1,
-	 gint  x2,
-	 gint  x3,
-	 gint  x4,
-	 gint  x5,
-	 gint *min_result,
-	 gint *max_result)
+         gint  x2,
+         gint  x3,
+         gint  x4,
+         gint  x5,
+         gint *min_result,
+         gint *max_result)
 {
   gint min1, min2, max1, max2;
 
@@ -275,22 +275,22 @@
 
       d = dest;
       for (col = 0; col < (x2 - x1) * bytes; col++)
-	if (alpha && (((col + 1) % bytes) == 0)) /* the alpha channel */
+        if (alpha && (((col + 1) % bytes) == 0)) /* the alpha channel */
           {
             *d++ = cr[col];
           }
-	else
-	  {
-	    minmax (pr[col], cr[col - bytes], cr[col], cr[col + bytes],
-		    nr[col], &minval, &maxval); /* four-neighbourhood */
+        else
+          {
+            minmax (pr[col], cr[col - bytes], cr[col], cr[col + bytes],
+                    nr[col], &minval, &maxval); /* four-neighbourhood */
 
-	    gradient = (0.5 * MAX ((maxval - cr [col]), (cr[col]- minval)));
+            gradient = (0.5 * MAX ((maxval - cr [col]), (cr[col]- minval)));
 
-	    *d++ = (((pr[col - bytes] + pr[col]       + pr[col + bytes] +
+            *d++ = (((pr[col - bytes] + pr[col]       + pr[col + bytes] +
                       cr[col - bytes] - (8 * cr[col]) + cr[col + bytes] +
                       nr[col - bytes] + nr[col]       + nr[col + bytes]) > 0) ?
                     gradient : (128 + gradient));
-	  }
+          }
 
       /*  store the dest  */
       gimp_pixel_rgn_set_row (&destPR, dest, x1, row, (x2 - x1));
@@ -302,7 +302,7 @@
       nr = tmp;
 
       if ((row % 20) == 0)
-	gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
+        gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
     }
 
 
@@ -366,7 +366,7 @@
       nr = tmp;
 
       if ((row % 20) == 0)
-	gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
+        gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
     }
 
   /*  update the laplaced region  */

Modified: trunk/plug-ins/common/file-cel.c
==============================================================================
--- trunk/plug-ins/common/file-cel.c	(original)
+++ trunk/plug-ins/common/file-cel.c	Mon Oct 20 06:04:39 2008
@@ -127,7 +127,7 @@
                           "Nick Lamb <njl195 zepler org uk>",
                           "May 1998",
                           N_("KISS CEL"),
-			  "RGB*, INDEXED*",
+                          "RGB*, INDEXED*",
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (save_args), 0,
                           save_args, NULL);
@@ -214,27 +214,27 @@
 
       /*  eventually export the image */
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "CEL",
-				      (GIMP_EXPORT_CAN_HANDLE_RGB |
-				       GIMP_EXPORT_CAN_HANDLE_ALPHA |
-				       GIMP_EXPORT_CAN_HANDLE_INDEXED
-				       ));
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-	  break;
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "CEL",
+                                      (GIMP_EXPORT_CAN_HANDLE_RGB |
+                                       GIMP_EXPORT_CAN_HANDLE_ALPHA |
+                                       GIMP_EXPORT_CAN_HANDLE_INDEXED
+                                       ));
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+          break;
+        default:
+          break;
+        }
 
       if (save_image (param[3].data.d_string, param[4].data.d_string,
-		      image_ID, drawable_ID, &error))
+                      image_ID, drawable_ID, &error))
         {
           gimp_set_data (SAVE_PROC, palette_file, data_length);
         }
@@ -244,7 +244,7 @@
         }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {

Modified: trunk/plug-ins/common/file-dicom.c
==============================================================================
--- trunk/plug-ins/common/file-dicom.c	(original)
+++ trunk/plug-ins/common/file-dicom.c	Mon Oct 20 06:04:39 2008
@@ -49,9 +49,9 @@
 /* Declare local data types */
 typedef struct _DicomInfo
 {
-  guint      width, height;	 /* The size of the image                  */
-  gint       maxval;		 /* For 16 and 24 bit image files, the max
-				    value which we need to normalize to    */
+  guint      width, height;      /* The size of the image                  */
+  gint       maxval;             /* For 16 and 24 bit image files, the max
+                                    value which we need to normalize to    */
   gint       samples_per_pixel;  /* Number of image planes (0 for pbm)     */
   gint       bpp;
   gint       bits_stored;
@@ -136,7 +136,7 @@
   gimp_install_procedure (LOAD_PROC,
                           "loads files of the dicom file format",
                           "Load a file in the DICOM standard format."
-			  "The standard is defined at "
+                          "The standard is defined at "
                           "http://medical.nema.org/. The plug-in currently "
                           "only supports reading images with uncompressed "
                           "pixel sections.",
@@ -144,7 +144,7 @@
                           "Dov Grobgeld <dov imagic weizmann ac il>",
                           "2003",
                           N_("DICOM image"),
-			  NULL,
+                          NULL,
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (load_args),
                           G_N_ELEMENTS (load_return_vals),
@@ -152,10 +152,10 @@
 
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-dcm");
   gimp_register_magic_load_handler (LOAD_PROC,
-				    "dcm,dicom",
-				    "",
-				    "128,string,DICM"
-				    );
+                                    "dcm,dicom",
+                                    "",
+                                    "128,string,DICM"
+                                    );
 
   gimp_install_procedure (SAVE_PROC,
                           "Save file in the DICOM file format",
@@ -208,15 +208,15 @@
       image_ID = load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  *nreturn_vals = 2;
+        {
+          *nreturn_vals = 2;
 
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
 
           if (error)
             {
@@ -224,7 +224,7 @@
               values[1].type          = GIMP_PDB_STRING;
               values[1].data.d_string = error->message;
             }
- 	}
+        }
     }
   else if (strcmp (name, SAVE_PROC) == 0)
     {
@@ -232,13 +232,13 @@
       drawable_ID = param[2].data.d_int32;
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
 
-	  export = gimp_export_image (&image_ID, &drawable_ID, "DICOM",
-				      GIMP_EXPORT_CAN_HANDLE_RGB |
+          export = gimp_export_image (&image_ID, &drawable_ID, "DICOM",
+                                      GIMP_EXPORT_CAN_HANDLE_RGB |
                                       GIMP_EXPORT_CAN_HANDLE_GRAY);
           if (export == GIMP_EXPORT_CANCEL)
             {
@@ -270,8 +270,8 @@
         }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (! save_image (param[3].data.d_string, image_ID, drawable_ID,
+        {
+          if (! save_image (param[3].data.d_string, image_ID, drawable_ID,
                             &error))
             {
               status = GIMP_PDB_EXECUTION_ERROR;
@@ -286,7 +286,7 @@
         }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -368,7 +368,7 @@
       gboolean implicit_encoding = FALSE;
 
       if (fread (&group_word, 1, 2, DICOM) == 0)
-	break;
+        break;
       group_word = g_ntohs (GUINT16_SWAP_LE_BE (group_word));
 
       fread (&element_word, 1, 2, DICOM);
@@ -382,28 +382,28 @@
          better way of checking this...
        */
       if ((/* Always need lookup for implicit encoding */
-	   tag > 0x0002ffff && implicit_encoding)
-	  /* This heuristics isn't used if we are doing implicit
-	     encoding according to the value representation... */
-	  || ((value_rep[0] < 'A' || value_rep[0] > 'Z'
-	  || value_rep[1] < 'A' || value_rep[1] > 'Z')
-
-	  /* I found this in one of Ednas images. It seems like a
-	     bug...
-	  */
-	      && !(value_rep[0] == ' ' && value_rep[1]))
+           tag > 0x0002ffff && implicit_encoding)
+          /* This heuristics isn't used if we are doing implicit
+             encoding according to the value representation... */
+          || ((value_rep[0] < 'A' || value_rep[0] > 'Z'
+          || value_rep[1] < 'A' || value_rep[1] > 'Z')
+
+          /* I found this in one of Ednas images. It seems like a
+             bug...
+          */
+              && !(value_rep[0] == ' ' && value_rep[1]))
           )
         {
           /* Look up type from the dictionary. At the time we dont
-	     support this option... */
+             support this option... */
           gchar element_length_chars[4];
 
           /* Store the bytes that were read */
           element_length_chars[0] = value_rep[0];
           element_length_chars[1] = value_rep[1];
 
-	  /* Unknown value rep. It is not used right now anyhow */
-	  strcpy (value_rep, "??");
+          /* Unknown value rep. It is not used right now anyhow */
+          strcpy (value_rep, "??");
 
           /* For implicit value_values the length is always four bytes,
              so we need to read another two. */
@@ -415,30 +415,30 @@
       }
       /* Binary value reps are OB, OW, SQ or UN */
       else if (strncmp (value_rep, "OB", 2) == 0
-	  || strncmp (value_rep, "OW", 2) == 0
-	  || strncmp (value_rep, "SQ", 2) == 0
-	  || strncmp (value_rep, "UN", 2) == 0)
-	{
-	  fread (&element_length, 1, 2, DICOM); /* skip two bytes */
-	  fread (&element_length, 1, 4, DICOM);
-	  element_length = g_ntohl (GUINT32_SWAP_LE_BE (element_length));
-	}
+          || strncmp (value_rep, "OW", 2) == 0
+          || strncmp (value_rep, "SQ", 2) == 0
+          || strncmp (value_rep, "UN", 2) == 0)
+        {
+          fread (&element_length, 1, 2, DICOM); /* skip two bytes */
+          fread (&element_length, 1, 4, DICOM);
+          element_length = g_ntohl (GUINT32_SWAP_LE_BE (element_length));
+        }
       /* Short length */
       else
-	{
-	  guint16 el16;
+        {
+          guint16 el16;
 
-	  fread (&el16, 1, 2, DICOM);
-	  element_length = g_ntohs (GUINT16_SWAP_LE_BE (el16));
-	}
+          fread (&el16, 1, 2, DICOM);
+          element_length = g_ntohs (GUINT16_SWAP_LE_BE (el16));
+        }
 
       /* Sequence of items - just ignore the delimiters... */
       if (element_length == 0xffffffff)
-	continue;
+        continue;
 
       /* Sequence of items item tag... Ignore as well */
       if (tag == 0xFFFEE000)
-	continue;
+        continue;
 
       /* Even for pixel data, we don't handle very large element
          lengths */
@@ -478,38 +478,38 @@
             }
         }
       else if (group_word == 0x0028)
-	{
-	  switch (element_word)
-	    {
-	    case 0x0002:  /* samples per pixel */
-	      samples_per_pixel = ctx_us;
-	      break;
-	    case 0x0010:  /* rows */
-	      height = ctx_us;
-	      break;
-	    case 0x0011:  /* columns */
-	      width = ctx_us;
-	      break;
-	    case 0x0100:  /* bits allocated */
-	      bpp = ctx_us;
-	      break;
-	    case 0x0101:  /* bits stored */
-	      bits_stored = ctx_us;
-	      break;
-	    case 0x0102:  /* high bit */
-	      high_bit = ctx_us;
-	      break;
-	    case 0x0103:  /* is pixel representation signed? */
-	      is_signed = (ctx_us == 0) ? FALSE : TRUE;
-	      break;
-	    }
-	}
+        {
+          switch (element_word)
+            {
+            case 0x0002:  /* samples per pixel */
+              samples_per_pixel = ctx_us;
+              break;
+            case 0x0010:  /* rows */
+              height = ctx_us;
+              break;
+            case 0x0011:  /* columns */
+              width = ctx_us;
+              break;
+            case 0x0100:  /* bits allocated */
+              bpp = ctx_us;
+              break;
+            case 0x0101:  /* bits stored */
+              bits_stored = ctx_us;
+              break;
+            case 0x0102:  /* high bit */
+              high_bit = ctx_us;
+              break;
+            case 0x0103:  /* is pixel representation signed? */
+              is_signed = (ctx_us == 0) ? FALSE : TRUE;
+              break;
+            }
+        }
 
       /* Pixel data */
       if (group_word == 0x7fe0 && element_word == 0x0010)
-	{
-	  pix_buf = value;
-	}
+        {
+          pix_buf = value;
+        }
       else
         {
           g_free (value);
@@ -550,20 +550,20 @@
   /* Create a new image of the proper size and associate the filename with it.
    */
   image_ID = gimp_image_new (dicominfo->width, dicominfo->height,
-			     (dicominfo->samples_per_pixel >= 3 ?
+                             (dicominfo->samples_per_pixel >= 3 ?
                               GIMP_RGB : GIMP_GRAY));
   gimp_image_set_filename (image_ID, filename);
 
   layer_ID = gimp_layer_new (image_ID, _("Background"),
-			     dicominfo->width, dicominfo->height,
-			     (dicominfo->samples_per_pixel >= 3 ?
+                             dicominfo->width, dicominfo->height,
+                             (dicominfo->samples_per_pixel >= 3 ?
                               GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
-			     100, GIMP_NORMAL_MODE);
+                             100, GIMP_NORMAL_MODE);
   gimp_image_add_layer (image_ID, layer_ID, 0);
 
   drawable = gimp_drawable_get (layer_ID);
   gimp_pixel_rgn_init (&pixel_rgn, drawable,
-		       0, 0, drawable->width, drawable->height, TRUE, FALSE);
+                       0, 0, drawable->width, drawable->height, TRUE, FALSE);
 
 #if GUESS_ENDIAN
   if (bpp == 16)
@@ -587,8 +587,8 @@
 
 static void
 dicom_loader (guint8       *pix_buffer,
-	      DicomInfo    *info,
-	      GimpPixelRgn *pixel_rgn)
+              DicomInfo    *info,
+              GimpPixelRgn *pixel_rgn)
 {
   guchar  *data;
   gint     row_idx;
@@ -627,15 +627,15 @@
       scanlines = end - start;
 
       for (i = 0; i < scanlines; i++)
-	{
-	  if (info->bpp == 16)
-	    {
-	      guint16 *row_start;
-	      gint     col_idx;
+        {
+          if (info->bpp == 16)
+            {
+              guint16 *row_start;
+              gint     col_idx;
 
               row_start = buf16 + (row_idx + i) * width * samples_per_pixel;
 
-	      for (col_idx = 0; col_idx < width * samples_per_pixel; col_idx++)
+              for (col_idx = 0; col_idx < width * samples_per_pixel; col_idx++)
                 {
                   /* Shift it by 8 bits, or less in case bits_stored
                    * is less than bpp.
@@ -654,16 +654,16 @@
                         d[col_idx] <<= 1;
                     }
                 }
-	    }
-	  else if (info->bpp == 8)
-	    {
-	      guint8 *row_start;
-	      gint    col_idx;
+            }
+          else if (info->bpp == 8)
+            {
+              guint8 *row_start;
+              gint    col_idx;
 
               row_start = (pix_buffer +
                            (row_idx + i) * width * samples_per_pixel);
 
-	      for (col_idx = 0; col_idx < width * samples_per_pixel; col_idx++)
+              for (col_idx = 0; col_idx < width * samples_per_pixel; col_idx++)
                 {
                   /* Shift it by 0 bits, or more in case bits_stored is
                    * less than bpp.
@@ -682,10 +682,10 @@
                         d[col_idx] <<= 1;
                     }
                 }
-	    }
+            }
 
-	  d += width * samples_per_pixel;
-	}
+          d += width * samples_per_pixel;
+        }
 
       gimp_progress_update ((gdouble) row_idx / (gdouble) height);
       gimp_pixel_rgn_set_rect (pixel_rgn, data, 0, row_idx, width, scanlines);
@@ -704,7 +704,7 @@
  */
 static void
 guess_and_set_endian2 (guint16 *buf16,
-		       int length)
+                       int length)
 {
   guint16 *p          = buf16;
   gint     max_first  = -1;
@@ -727,7 +727,7 @@
 /* toggle_endian2 toggles the endian for a 16 bit entity.  */
 static void
 toggle_endian2 (guint16 *buf16,
-	        gint     length)
+                gint     length)
 {
   guint16 *p = buf16;
 
@@ -744,8 +744,8 @@
  */
 static gboolean
 save_image (const gchar  *filename,
-	    gint32        image_ID,
-	    gint32        drawable_ID,
+            gint32        image_ID,
+            gint32        drawable_ID,
             GError      **error)
 {
   FILE          *DICOM;
@@ -915,11 +915,11 @@
  */
 static void
 add_tag_pointer (GByteArray   *group_stream,
-		 gint          group,
-		 gint          element,
-		 const gchar  *value_rep,
-		 const guint8 *data,
-		 gint          length)
+                 gint          group,
+                 gint          element,
+                 const gchar  *value_rep,
+                 const guint8 *data,
+                 gint          length)
 {
   gboolean is_long;
   guint16  swapped16;
@@ -954,10 +954,10 @@
 /* Convenience function for adding a string to the dicom stream */
 static void
 add_tag_string (GByteArray  *group_stream,
-		gint         group,
-		gint         element,
-		const gchar *value_rep,
-		const gchar *s)
+                gint         group,
+                gint         element,
+                const gchar *value_rep,
+                const gchar *s)
 {
   add_tag_pointer (group_stream,
                    group, element, value_rep, (const guint8 *) s, strlen (s));
@@ -988,8 +988,8 @@
  */
 static gboolean
 write_group_to_file (FILE       *DICOM,
-		     gint        group,
-		     GByteArray *group_stream)
+                     gint        group,
+                     GByteArray *group_stream)
 {
   gboolean retval = TRUE;
   guint16  swapped16;

Modified: trunk/plug-ins/common/file-gbr.c
==============================================================================
--- trunk/plug-ins/common/file-gbr.c	(original)
+++ trunk/plug-ins/common/file-gbr.c	Mon Oct 20 06:04:39 2008
@@ -162,9 +162,9 @@
                              (const guint8 *) GIMP_STOCK_BRUSH);
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-gimp-gbr");
   gimp_register_magic_load_handler (LOAD_PROC,
-				    "gbr, gpb",
-				    "",
-				    "20, string, GIMP");
+                                    "gbr, gpb",
+                                    "",
+                                    "20, string, GIMP");
 
   gimp_install_procedure (SAVE_PROC,
                           "Saves files in the GIMP brush file format",
@@ -214,15 +214,15 @@
       image_ID = load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  *nreturn_vals = 2;
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+        {
+          *nreturn_vals = 2;
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else if (strcmp (name, SAVE_PROC) == 0)
     {
@@ -235,27 +235,27 @@
       orig_image_ID = image_ID;
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "GBR",
-				      GIMP_EXPORT_CAN_HANDLE_GRAY  |
-				      GIMP_EXPORT_CAN_HANDLE_RGB   |
-				      GIMP_EXPORT_CAN_HANDLE_ALPHA);
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-
-	  /*  Possibly retrieve data  */
-	  gimp_get_data (SAVE_PROC, &info);
-	  break;
-
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "GBR",
+                                      GIMP_EXPORT_CAN_HANDLE_GRAY  |
+                                      GIMP_EXPORT_CAN_HANDLE_RGB   |
+                                      GIMP_EXPORT_CAN_HANDLE_ALPHA);
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+
+          /*  Possibly retrieve data  */
+          gimp_get_data (SAVE_PROC, &info);
+          break;
+
+        default:
+          break;
+        }
 
       parasite = gimp_image_parasite_find (orig_image_ID, "gimp-brush-name");
       if (parasite)
@@ -269,45 +269,45 @@
         }
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	  if (! save_dialog ())
-	    status = GIMP_PDB_CANCEL;
-	  break;
-
-	case GIMP_RUN_NONINTERACTIVE:
-	  if (nparams != 7)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  else
-	    {
-	      info.spacing = (param[5].data.d_int32);
-	      strncpy (info.description, param[6].data.d_string,
+        {
+        case GIMP_RUN_INTERACTIVE:
+          if (! save_dialog ())
+            status = GIMP_PDB_CANCEL;
+          break;
+
+        case GIMP_RUN_NONINTERACTIVE:
+          if (nparams != 7)
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
+          else
+            {
+              info.spacing = (param[5].data.d_int32);
+              strncpy (info.description, param[6].data.d_string,
                        sizeof (info.description));
               info.description[sizeof (info.description) - 1] = '\0';
-	    }
-	  break;
+            }
+          break;
 
-	default:
-	  break;
-	}
+        default:
+          break;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (save_image (param[3].data.d_string, image_ID, drawable_ID,
+        {
+          if (save_image (param[3].data.d_string, image_ID, drawable_ID,
                           &error))
-	    {
-	      gimp_set_data (SAVE_PROC, &info, sizeof (info));
-	    }
-	  else
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-	}
+            {
+              gimp_set_data (SAVE_PROC, &info, sizeof (info));
+            }
+          else
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
 
       if (info.description && strlen (info.description))
         {
@@ -420,14 +420,14 @@
       gchar *temp = g_new (gchar, bn_size);
 
       if ((read (fd, temp, bn_size)) < bn_size)
-	{
+        {
           g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                        _("Error in GIMP brush file '%s'"),
                        gimp_filename_to_utf8 (filename));
-	  close (fd);
-	  g_free (temp);
-	  return -1;
-	}
+          close (fd);
+          g_free (temp);
+          return -1;
+        }
 
       name = gimp_any_to_utf8 (temp, -1,
                                _("Invalid UTF-8 string in brush file '%s'."),
@@ -554,7 +554,7 @@
     default:
       g_message ("Unsupported brush depth: %d\n"
                  "GIMP Brushes must be GRAY or RGBA\n",
-		 bh.bytes);
+                 bh.bytes);
       return -1;
     }
 
@@ -566,7 +566,7 @@
                                   strlen (name) + 1, name);
 
   layer_ID = gimp_layer_new (image_ID, name, bh.width, bh.height,
-			     image_type, 100, GIMP_NORMAL_MODE);
+                             image_type, 100, GIMP_NORMAL_MODE);
   gimp_image_add_layer (image_ID, layer_ID, 0);
 
   g_free (name);
@@ -577,7 +577,7 @@
                        TRUE, FALSE);
 
   gimp_pixel_rgn_set_rect (&pixel_rgn, brush_buf,
-			   0, 0, bh.width, bh.height);
+                           0, 0, bh.width, bh.height);
   g_free (brush_buf);
 
   if (image_type == GIMP_GRAY_IMAGE)
@@ -593,8 +593,8 @@
 
 static gboolean
 save_image (const gchar  *filename,
-	    gint32        image_ID,
-	    gint32        drawable_ID,
+            gint32        image_ID,
+            gint32        drawable_ID,
             GError      **error)
 {
   gint          fd;
@@ -662,8 +662,8 @@
     }
 
   gimp_pixel_rgn_init (&pixel_rgn, drawable,
-		       0, 0, drawable->width, drawable->height,
-		       FALSE, FALSE);
+                       0, 0, drawable->width, drawable->height,
+                       FALSE, FALSE);
 
   buffer = g_new (guchar, drawable->width * bpp);
 
@@ -675,8 +675,8 @@
         {
         case 1:
           /*  invert  */
-	  for (x = 0; x < drawable->width; x++)
-	    buffer[x] = 255 - buffer[x];
+          for (x = 0; x < drawable->width; x++)
+            buffer[x] = 255 - buffer[x];
           break;
 
         case 3:
@@ -692,11 +692,11 @@
         }
 
       if (write (fd, buffer, drawable->width * bpp) != drawable->width * bpp)
-	{
-	  g_free (buffer);
-	  close (fd);
-	  return FALSE;
-	}
+        {
+          g_free (buffer);
+          close (fd);
+          return FALSE;
+        }
 
       gimp_progress_update ((gdouble) line / (gdouble) drawable->height);
     }
@@ -742,10 +742,10 @@
   gtk_widget_show (table);
 
   spinbutton = gimp_spin_button_new (&adj,
-				     info.spacing, 1, 1000, 1, 10, 0, 1, 0);
+                                     info.spacing, 1, 1000, 1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("Spacing:"), 1.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Spacing:"), 1.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -755,8 +755,8 @@
   gtk_widget_set_size_request (entry, 200, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), info.description);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("Description:"), 1.0, 0.5,
-			     entry, 1, FALSE);
+                             _("Description:"), 1.0, 0.5,
+                             entry, 1, FALSE);
 
   g_signal_connect (entry, "changed",
                     G_CALLBACK (entry_callback),
@@ -773,7 +773,7 @@
 
 static void
 entry_callback (GtkWidget *widget,
-		gpointer   data)
+                gpointer   data)
 {
   strncpy (info.description, gtk_entry_get_text (GTK_ENTRY (widget)),
            sizeof (info.description));

Modified: trunk/plug-ins/common/file-gih.c
==============================================================================
--- trunk/plug-ins/common/file-gih.c	(original)
+++ trunk/plug-ins/common/file-gih.c	Mon Oct 20 06:04:39 2008
@@ -23,20 +23,20 @@
   (let ((ranks (cons-array 1 'byte)))
     (aset ranks 0 12)
     (file-gih-save 1
-		   img
-		   drawable
-		   "foo.gih"
-		   "foo.gih"
-		   100
-		   "test brush"
-		   125
-		   125
-		   3
-		   4
-		   1
-		   ranks
-		   1
-		   '("random")))
+                   img
+                   drawable
+                   "foo.gih"
+                   "foo.gih"
+                   100
+                   "test brush"
+                   125
+                   125
+                   3
+                   4
+                   1
+                   ranks
+                   1
+                   '("random")))
   */
 
 
@@ -117,8 +117,8 @@
   gint       nguides;
   gint32    *guides;
   gint      *value;
-  GtkWidget *count_label;	/* Corresponding count adjustment, */
-  gint      *count;		/* cols or rows                    */
+  GtkWidget *count_label;       /* Corresponding count adjustment, */
+  gint      *count;             /* cols or rows                    */
   gint      *other_count;       /* and the other one               */
   GtkObject *ncells;
   GtkObject *rank0;
@@ -134,24 +134,24 @@
  */
 static void   query    (void);
 static void   run      (const gchar      *name,
-			gint              nparams,
-			const GimpParam  *param,
-			gint             *nreturn_vals,
-			GimpParam       **return_vals);
+                        gint              nparams,
+                        const GimpParam  *param,
+                        gint             *nreturn_vals,
+                        GimpParam       **return_vals);
 
 static gint32    gih_load_image      (const gchar   *filename,
                                       GError       **error);
 static gboolean  gih_load_one_brush  (gint           fd,
-				      gint32         image_ID);
+                                      gint32         image_ID);
 
 static gboolean  gih_save_dialog     (gint32         image_ID);
 static gboolean  gih_save_one_brush  (gint           fd,
-				      GimpPixelRgn  *pixel_rgn,
-				      gchar         *name);
+                                      GimpPixelRgn  *pixel_rgn,
+                                      gchar         *name);
 static gboolean  gih_save_image      (const gchar   *filename,
-				      gint32         image_ID,
-				      gint32         orig_image_ID,
-				      gint32         drawable_ID,
+                                      gint32         image_ID,
+                                      gint32         orig_image_ID,
+                                      gint32         drawable_ID,
                                       GError       **error);
 
 
@@ -185,7 +185,7 @@
     /* The number of rank and sel args depend on the dimension */
     { GIMP_PDB_INT8ARRAY,   "rank",         "Ranks of the dimensions" },
     { GIMP_PDB_INT32,       "dimension",    "Dimension (again)" },
-    { GIMP_PDB_STRINGARRAY, "sel",	    "Selection modes" }
+    { GIMP_PDB_STRINGARRAY, "sel",          "Selection modes" }
   };
 
   static const GimpParamDef gih_load_args[] =
@@ -201,14 +201,14 @@
 
 
   gimp_install_procedure (LOAD_PROC,
-			  "loads images in GIMP brush pipe format",
-			  "This plug-in loads a GIMP brush pipe as an image.",
-			  "Jens Lautenbacher, Sven Neumann",
-			  "Jens Lautenbacher, Sven Neumann",
-			  "2000",
+                          "loads images in GIMP brush pipe format",
+                          "This plug-in loads a GIMP brush pipe as an image.",
+                          "Jens Lautenbacher, Sven Neumann",
+                          "Jens Lautenbacher, Sven Neumann",
+                          "2000",
                           N_("GIMP brush (animated)"),
-			  NULL,
-			  GIMP_PLUGIN,
+                          NULL,
+                          GIMP_PLUGIN,
                           G_N_ELEMENTS (gih_load_args),
                           G_N_ELEMENTS (gih_load_return_vals),
                           gih_load_args, gih_load_return_vals);
@@ -217,28 +217,28 @@
                              (const guint8 *) GIMP_STOCK_BRUSH);
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-gimp-gih");
   gimp_register_magic_load_handler (LOAD_PROC,
-				    "gih",
-				    "",
-				    "");
+                                    "gih",
+                                    "",
+                                    "");
 
   gimp_install_procedure (SAVE_PROC,
-			  "saves images in GIMP brush pipe format",
-			  "This plug-in saves an image in the GIMP brush pipe format. The image must have an alpha chnannel and can be multi-layered, and additionally the layers can be divided into a rectangular array of brushes.",
-			  "Tor Lillqvist",
-			  "Tor Lillqvist",
-			  "1999",
-			  N_("GIMP brush (animated)"),
-			  "RGBA, GRAYA",
-			  GIMP_PLUGIN,
+                          "saves images in GIMP brush pipe format",
+                          "This plug-in saves an image in the GIMP brush pipe format. The image must have an alpha chnannel and can be multi-layered, and additionally the layers can be divided into a rectangular array of brushes.",
+                          "Tor Lillqvist",
+                          "Tor Lillqvist",
+                          "1999",
+                          N_("GIMP brush (animated)"),
+                          "RGBA, GRAYA",
+                          GIMP_PLUGIN,
                           G_N_ELEMENTS (gih_save_args), 0,
-			  gih_save_args, NULL);
+                          gih_save_args, NULL);
 
   gimp_plugin_icon_register (SAVE_PROC, GIMP_ICON_TYPE_STOCK_ID,
                              (const guint8 *) GIMP_STOCK_BRUSH);
   gimp_register_file_handler_mime ("file_gih_save", "image/x-gimp-gih");
   gimp_register_save_handler (SAVE_PROC,
-			      "gih",
-			      "");
+                              "gih",
+                              "");
 }
 
 static void
@@ -277,15 +277,15 @@
       image_ID = gih_load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  *nreturn_vals = 2;
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+        {
+          *nreturn_vals = 2;
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else if (strcmp (name, SAVE_PROC) == 0)
     {
@@ -294,137 +294,137 @@
 
       /*  eventually export the image */
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "GIH",
-				      GIMP_EXPORT_CAN_HANDLE_RGB    |
-				      GIMP_EXPORT_CAN_HANDLE_GRAY   |
-				      GIMP_EXPORT_CAN_HANDLE_ALPHA  |
-				      GIMP_EXPORT_CAN_HANDLE_LAYERS |
-				      GIMP_EXPORT_NEEDS_ALPHA);
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-	  break;
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "GIH",
+                                      GIMP_EXPORT_CAN_HANDLE_RGB    |
+                                      GIMP_EXPORT_CAN_HANDLE_GRAY   |
+                                      GIMP_EXPORT_CAN_HANDLE_ALPHA  |
+                                      GIMP_EXPORT_CAN_HANDLE_LAYERS |
+                                      GIMP_EXPORT_NEEDS_ALPHA);
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+          break;
+        default:
+          break;
+        }
 
       layer_ID = gimp_image_get_layers (image_ID, &nlayers);
       num_useable_layers = 0;
       for (layer = 0; layer < nlayers; layer++)
-	{
-	  if (!gimp_drawable_has_alpha (layer_ID[layer]))
-	    {
-	      layer_name = gimp_drawable_get_name (layer_ID[layer]);
-	      g_message (_("Layer %s doesn't have an alpha channel, skipped"),
-			 layer_name);
-	      g_free (layer_name);
-	    }
-	  num_useable_layers++;
-	}
+        {
+          if (!gimp_drawable_has_alpha (layer_ID[layer]))
+            {
+              layer_name = gimp_drawable_get_name (layer_ID[layer]);
+              g_message (_("Layer %s doesn't have an alpha channel, skipped"),
+                         layer_name);
+              g_free (layer_name);
+            }
+          num_useable_layers++;
+        }
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	  /*  Possibly retrieve data  */
-	  gimp_get_data (SAVE_PROC, &info);
-
-	  gimp_pixpipe_params_init (&gihparams);
-
-	  /* Setup default values */
-	  if (gihparams.rows < 1) gihparams.rows = 1;
-	  if (gihparams.cols < 1) gihparams.cols = 1;
+        {
+        case GIMP_RUN_INTERACTIVE:
+          /*  Possibly retrieve data  */
+          gimp_get_data (SAVE_PROC, &info);
+
+          gimp_pixpipe_params_init (&gihparams);
+
+          /* Setup default values */
+          if (gihparams.rows < 1) gihparams.rows = 1;
+          if (gihparams.cols < 1) gihparams.cols = 1;
 
-	  gihparams.ncells = (num_useable_layers *
+          gihparams.ncells = (num_useable_layers *
                               gihparams.rows * gihparams.cols);
 
-	  if (gihparams.cellwidth == 1 && gihparams.cellheight == 1)
-	    {
-	      gihparams.cellwidth  =
-		gimp_image_width (image_ID)  / gihparams.cols;
-	      gihparams.cellheight =
-		gimp_image_height (image_ID) / gihparams.rows;
-	    }
-
-	  pipe_parasite =
-	    gimp_image_parasite_find (orig_image_ID,
-				      "gimp-brush-pipe-parameters");
-	  if (pipe_parasite)
-	    gimp_pixpipe_params_parse (gimp_parasite_data (pipe_parasite),
+          if (gihparams.cellwidth == 1 && gihparams.cellheight == 1)
+            {
+              gihparams.cellwidth  =
+                gimp_image_width (image_ID)  / gihparams.cols;
+              gihparams.cellheight =
+                gimp_image_height (image_ID) / gihparams.rows;
+            }
+
+          pipe_parasite =
+            gimp_image_parasite_find (orig_image_ID,
+                                      "gimp-brush-pipe-parameters");
+          if (pipe_parasite)
+            gimp_pixpipe_params_parse (gimp_parasite_data (pipe_parasite),
                                        &gihparams);
 
-	  if (!gih_save_dialog (image_ID))
-	    status = GIMP_PDB_CANCEL;
-	  break;
-
-	case GIMP_RUN_NONINTERACTIVE:
-	  if (nparams != 15)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  else
-	    {
-	      info.spacing = param[5].data.d_int32;
-	      strncpy (info.description, param[6].data.d_string, MAXDESCLEN);
-	      info.description[MAXDESCLEN] = 0;
-
-	      gimp_pixpipe_params_init (&gihparams);
-
-	      gihparams.cellwidth  = param[7].data.d_int32;
-	      gihparams.cellheight = param[8].data.d_int32;
-	      gihparams.cols       = param[9].data.d_int8;
-	      gihparams.rows       = param[10].data.d_int8;
-	      gihparams.dim        = param[11].data.d_int32;
-	      gihparams.ncells     = 1;
-
-	      if (param[13].data.d_int32 != gihparams.dim)
-		{
-		  status = GIMP_PDB_CALLING_ERROR;
-		}
-	      else
-		{
-		  for (i = 0; i < gihparams.dim; i++)
-		    {
-		      gihparams.rank[i]      = param[12].data.d_int8array[i];
-		      gihparams.selection[i] = g_strdup (param[14].data.d_stringarray[i]);
-		      gihparams.ncells       *= gihparams.rank[i];
-		    }
-		}
-	    }
-	  break;
-
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_get_data (SAVE_PROC, &info);
-	  pipe_parasite =
-	    gimp_image_parasite_find (orig_image_ID,
-				      "gimp-brush-pipe-parameters");
-	  gimp_pixpipe_params_init (&gihparams);
-	  if (pipe_parasite)
-	    gimp_pixpipe_params_parse (gimp_parasite_data (pipe_parasite),
+          if (!gih_save_dialog (image_ID))
+            status = GIMP_PDB_CANCEL;
+          break;
+
+        case GIMP_RUN_NONINTERACTIVE:
+          if (nparams != 15)
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
+          else
+            {
+              info.spacing = param[5].data.d_int32;
+              strncpy (info.description, param[6].data.d_string, MAXDESCLEN);
+              info.description[MAXDESCLEN] = 0;
+
+              gimp_pixpipe_params_init (&gihparams);
+
+              gihparams.cellwidth  = param[7].data.d_int32;
+              gihparams.cellheight = param[8].data.d_int32;
+              gihparams.cols       = param[9].data.d_int8;
+              gihparams.rows       = param[10].data.d_int8;
+              gihparams.dim        = param[11].data.d_int32;
+              gihparams.ncells     = 1;
+
+              if (param[13].data.d_int32 != gihparams.dim)
+                {
+                  status = GIMP_PDB_CALLING_ERROR;
+                }
+              else
+                {
+                  for (i = 0; i < gihparams.dim; i++)
+                    {
+                      gihparams.rank[i]      = param[12].data.d_int8array[i];
+                      gihparams.selection[i] = g_strdup (param[14].data.d_stringarray[i]);
+                      gihparams.ncells       *= gihparams.rank[i];
+                    }
+                }
+            }
+          break;
+
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_get_data (SAVE_PROC, &info);
+          pipe_parasite =
+            gimp_image_parasite_find (orig_image_ID,
+                                      "gimp-brush-pipe-parameters");
+          gimp_pixpipe_params_init (&gihparams);
+          if (pipe_parasite)
+            gimp_pixpipe_params_parse (gimp_parasite_data (pipe_parasite),
                                        &gihparams);
-	  break;
-	}
+          break;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (gih_save_image (param[3].data.d_string,
-			      image_ID, orig_image_ID, drawable_ID, &error))
-	    {
-	      gimp_set_data (SAVE_PROC, &info, sizeof (info));
-	    }
-	  else
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-	}
+        {
+          if (gih_save_image (param[3].data.d_string,
+                              image_ID, orig_image_ID, drawable_ID, &error))
+            {
+              gimp_set_data (SAVE_PROC, &info, sizeof (info));
+            }
+          else
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -446,7 +446,7 @@
 
 static gboolean
 gih_load_one_brush (gint   fd,
-		    gint32 image_ID)
+                    gint32 image_ID)
 {
   static gint    num_layers = 0;
   gchar         *name       = NULL;
@@ -499,11 +499,11 @@
     {
       name = g_new (gchar, bn_size);
       if ((read (fd, name, bn_size)) < bn_size)
-	{
+        {
           g_message (_("Error in GIMP brush pipe file."));
-	  g_free (name);
-	  return FALSE;
-	}
+          g_free (name);
+          return FALSE;
+        }
     }
   else
     {
@@ -515,7 +515,7 @@
   brush_buf = g_malloc (bh.width * bh.height * bh.bytes);
 
   if (read (fd, brush_buf,
-	    bh.width * bh.height * bh.bytes) != bh.width * bh.height * bh.bytes)
+            bh.width * bh.height * bh.bytes) != bh.width * bh.height * bh.bytes)
     {
       g_free (brush_buf);
       g_free (name);
@@ -528,50 +528,50 @@
       PatternHeader ph;
 
       /*  For backwards-compatibility, check if a pattern follows.
-	  The obsolete .gpb format did it this way.  */
+          The obsolete .gpb format did it this way.  */
 
       if (read (fd, &ph, sizeof(ph)) == sizeof(ph))
-	{
-	  /*  rearrange the bytes in each unsigned int  */
-	  ph.header_size  = g_ntohl (ph.header_size);
-	  ph.version      = g_ntohl (ph.version);
-	  ph.width        = g_ntohl (ph.width);
-	  ph.height       = g_ntohl (ph.height);
-	  ph.bytes        = g_ntohl (ph.bytes);
-	  ph.magic_number = g_ntohl (ph.magic_number);
-
-	  if (ph.magic_number == GPATTERN_MAGIC && ph.version == 1 &&
-	      ph.header_size > sizeof (ph) &&
-	      ph.bytes == 3 && ph.width == bh.width && ph.height == bh.height &&
-	      lseek (fd, ph.header_size - sizeof (ph), SEEK_CUR) > 0)
-	    {
-	      guchar *plain_brush = brush_buf;
-	      gint    i;
-
-	      bh.bytes = 4;
-	      brush_buf = g_malloc (4 * bh.width * bh.height);
-
-	      for (i = 0; i < ph.width * ph.height; i++)
-		{
-		  if (read (fd, brush_buf + i * 4, 3) != 3)
-		    {
-		      g_free (name);
-		      g_free (plain_brush);
-		      g_free (brush_buf);
-		      return FALSE;
-		    }
-		  brush_buf[i * 4 + 3] = plain_brush[i];
-		}
-	      g_free (plain_brush);
-	    }
-	  else if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
-	    {
-	      g_message (_("GIMP brush file appears to be corrupted."));
-	      g_free (name);
-	      g_free (brush_buf);
-	      return FALSE;
-	    }
-	}
+        {
+          /*  rearrange the bytes in each unsigned int  */
+          ph.header_size  = g_ntohl (ph.header_size);
+          ph.version      = g_ntohl (ph.version);
+          ph.width        = g_ntohl (ph.width);
+          ph.height       = g_ntohl (ph.height);
+          ph.bytes        = g_ntohl (ph.bytes);
+          ph.magic_number = g_ntohl (ph.magic_number);
+
+          if (ph.magic_number == GPATTERN_MAGIC && ph.version == 1 &&
+              ph.header_size > sizeof (ph) &&
+              ph.bytes == 3 && ph.width == bh.width && ph.height == bh.height &&
+              lseek (fd, ph.header_size - sizeof (ph), SEEK_CUR) > 0)
+            {
+              guchar *plain_brush = brush_buf;
+              gint    i;
+
+              bh.bytes = 4;
+              brush_buf = g_malloc (4 * bh.width * bh.height);
+
+              for (i = 0; i < ph.width * ph.height; i++)
+                {
+                  if (read (fd, brush_buf + i * 4, 3) != 3)
+                    {
+                      g_free (name);
+                      g_free (plain_brush);
+                      g_free (brush_buf);
+                      return FALSE;
+                    }
+                  brush_buf[i * 4 + 3] = plain_brush[i];
+                }
+              g_free (plain_brush);
+            }
+          else if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
+            {
+              g_message (_("GIMP brush file appears to be corrupted."));
+              g_free (name);
+              g_free (brush_buf);
+              return FALSE;
+            }
+        }
     }
 
   /*
@@ -587,12 +587,12 @@
     case 4:
       image_type = GIMP_RGBA_IMAGE;
       if (gimp_image_base_type (image_ID) == GIMP_GRAY)
-	gimp_image_convert_rgb (image_ID);
+        gimp_image_convert_rgb (image_ID);
       break;
 
     default:
       g_message ("Unsupported brush depth: %d\nGIMP Brushes must be GRAY or RGBA\n",
-		 bh.bytes);
+                 bh.bytes);
       return FALSE;
     }
 
@@ -604,26 +604,26 @@
       new_width  = MAX (width, bh.width);
       new_height = MAX (height, bh.height);
       gimp_image_resize (image_ID,
-			 new_width, new_height,
-			 (width - new_width) / 2, (height - new_height) / 2);
+                         new_width, new_height,
+                         (width - new_width) / 2, (height - new_height) / 2);
     }
 
   layer_ID = gimp_layer_new (image_ID, name,
-			     bh.width, bh.height,
-			     image_type, 100, GIMP_NORMAL_MODE);
+                             bh.width, bh.height,
+                             image_type, 100, GIMP_NORMAL_MODE);
   g_free (name);
 
   if (layer_ID != -1)
     {
       gimp_image_add_layer (image_ID, layer_ID, num_layers++);
       gimp_layer_set_offsets (layer_ID,
-			      (new_width - bh.width)   / 2,
-			      (new_height - bh.height) / 2);
+                              (new_width - bh.width)   / 2,
+                              (new_height - bh.height) / 2);
 
       drawable = gimp_drawable_get (layer_ID);
       gimp_pixel_rgn_init (&pixel_rgn, drawable,
-			   0, 0, drawable->width, drawable->height,
-			   TRUE, FALSE);
+                           0, 0, drawable->width, drawable->height,
+                           TRUE, FALSE);
 
       gimp_pixel_rgn_set_rect (&pixel_rgn,
                                brush_buf, 0, 0, bh.width, bh.height);
@@ -682,7 +682,7 @@
   if (!name)
     {
       g_message ("Couldn't read name for brush pipe from '%s'",
-		 gimp_filename_to_utf8 (filename));
+                 gimp_filename_to_utf8 (filename));
       close (fd);
       return -1;
     }
@@ -712,15 +712,15 @@
   for (i = 0; i < num_of_brushes; i++)
     {
       if (! gih_load_one_brush (fd, image_ID))
-	{
-	  g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+        {
+          g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                        "%s",
                        _("Couldn't load one brush in the pipe, giving up."));
-	  close (fd);
-	  g_free (name);
-	  g_string_free (buffer, TRUE);
-	  return -1;
-	}
+          close (fd);
+          g_free (name);
+          g_string_free (buffer, TRUE);
+          return -1;
+        }
 
       gimp_progress_update ((gdouble) i / (gdouble) num_of_brushes);
     }
@@ -744,15 +744,15 @@
 
       paramstring = gimp_pixpipe_params_build (&gihparams);
       if (paramstring)
-	{
-	  pipe_parasite = gimp_parasite_new ("gimp-brush-pipe-parameters",
-					     GIMP_PARASITE_PERSISTENT,
-					     strlen (paramstring) + 1,
-					     paramstring);
-	  gimp_image_parasite_attach (image_ID, pipe_parasite);
-	  gimp_parasite_free (pipe_parasite);
-	  g_free (paramstring);
-	}
+        {
+          pipe_parasite = gimp_parasite_new ("gimp-brush-pipe-parameters",
+                                             GIMP_PARASITE_PERSISTENT,
+                                             strlen (paramstring) + 1,
+                                             paramstring);
+          gimp_image_parasite_attach (image_ID, pipe_parasite);
+          gimp_parasite_free (pipe_parasite);
+          g_free (paramstring);
+        }
     }
 
   g_string_free (buffer, TRUE);
@@ -764,7 +764,7 @@
 
 static void
 size_adjustment_callback (GtkWidget *widget,
-			  gpointer   data)
+                          gpointer   data)
 {
   gint  i;
   gint  size;
@@ -788,8 +788,8 @@
       adj->nguides = newn - 1;
       adj->guides = g_new (gint32, adj->nguides);
       for (i = 0; i < adj->nguides; i++)
-	adj->guides[i] = gimp_image_add_vguide (adj->image,
-						*(adj->value) * (i+1));
+        adj->guides[i] = gimp_image_add_vguide (adj->image,
+                                                *(adj->value) * (i+1));
     }
   else
     {
@@ -798,8 +798,8 @@
       adj->nguides = newn - 1;
       adj->guides = g_new (gint32, adj->nguides);
       for (i = 0; i < adj->nguides; i++)
-	adj->guides[i] = gimp_image_add_hguide (adj->image,
-						*(adj->value) * (i+1));
+        adj->guides[i] = gimp_image_add_hguide (adj->image,
+                                                *(adj->value) * (i+1));
     }
   gimp_displays_flush ();
   sprintf (buf, "%2d", newn);
@@ -814,27 +814,27 @@
 
   if (adj->ncells != NULL)
     gtk_adjustment_set_value (GTK_ADJUSTMENT (adj->ncells),
-			      *(adj->other_count) * *(adj->count));
+                              *(adj->other_count) * *(adj->count));
   if (adj->rank0 != NULL)
     gtk_adjustment_set_value (GTK_ADJUSTMENT (adj->rank0),
-			      *(adj->other_count) * *(adj->count));
+                              *(adj->other_count) * *(adj->count));
 }
 
 static void
 entry_callback (GtkWidget *widget,
-		gpointer   data)
+                gpointer   data)
 {
   if (data == info.description)
     {
       strncpy (info.description,
-	       gtk_entry_get_text (GTK_ENTRY (widget)), MAXDESCLEN);
+               gtk_entry_get_text (GTK_ENTRY (widget)), MAXDESCLEN);
       info.description[MAXDESCLEN]  = 0;
     }
 }
 
 static void
 cb_callback (GtkWidget *widget,
-	     gpointer   data)
+             gpointer   data)
 {
   gint index;
 
@@ -906,10 +906,10 @@
    * Spacing: __
    */
   spinbutton = gimp_spin_button_new (&adjustment, info.spacing,
-				     1, 1000, 1, 10, 0, 1, 0);
+                                     1, 1000, 1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("Spacing (percent):"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Spacing (percent):"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   g_signal_connect (adjustment, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -922,8 +922,8 @@
   gtk_widget_set_size_request (entry, 200, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), info.description);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("Description:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("Description:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   g_signal_connect (entry, "changed",
                     G_CALLBACK (entry_callback),
@@ -935,9 +935,9 @@
   box = gtk_hbox_new (FALSE, 4);
 
   spinbutton = gimp_spin_button_new (&adjustment,
-				     gihparams.cellwidth,
-				     2, gimp_image_width (image_ID), 1, 10, 0,
-				     1, 0);
+                                     gihparams.cellwidth,
+                                     2, gimp_image_width (image_ID), 1, 10, 0,
+                                     1, 0);
   gtk_box_pack_start (GTK_BOX (box), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
@@ -958,9 +958,9 @@
   gtk_widget_show (label);
 
   spinbutton = gimp_spin_button_new (&adjustment,
-				     gihparams.cellheight,
-				     2, gimp_image_height (image_ID), 1, 10, 0,
-				     1, 0);
+                                     gihparams.cellheight,
+                                     2, gimp_image_height (image_ID), 1, 10, 0,
+                                     1, 0);
   gtk_box_pack_start (GTK_BOX (box), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
 
@@ -980,8 +980,8 @@
   gtk_widget_show (label);
 
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
-			     _("Cell size:"), 0.0, 0.5,
-			     box, 1, FALSE);
+                             _("Cell size:"), 0.0, 0.5,
+                             box, 1, FALSE);
 
   g_free (layer_ID);
 
@@ -989,11 +989,11 @@
    * Number of cells: ___
    */
   spinbutton = gimp_spin_button_new (&adjustment,
-				     gihparams.ncells, 1, 1000, 1, 10, 0,
-				     1, 0);
+                                     gihparams.ncells, 1, 1000, 1, 10, 0,
+                                     1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
-			     _("Number of cells:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Number of cells:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   g_signal_connect (adjustment, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -1042,17 +1042,17 @@
   cellh_adjust.warning_label = label;
 
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
-			     _("Display as:"), 0.0, 0.5,
-			     box, 1, FALSE);
+                             _("Display as:"), 0.0, 0.5,
+                             box, 1, FALSE);
 
   /*
    * Dimension: ___
    */
   spinbutton = gimp_spin_button_new (&adjustment, gihparams.dim,
-				     1, GIMP_PIXPIPE_MAXDIM, 1, 1, 0, 1, 0);
+                                     1, GIMP_PIXPIPE_MAXDIM, 1, 1, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 5,
-			     _("Dimension:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Dimension:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   g_signal_connect (adjustment, "value-changed",
                     G_CALLBACK (dim_callback),
@@ -1069,10 +1069,10 @@
       gint j;
 
       spinbutton = gimp_spin_button_new (&adjustment,
-					 gihparams.rank[i], 1, 100, 1, 1, 0,
-					 1, 0);
+                                         gihparams.rank[i], 1, 100, 1, 1, 0,
+                                         1, 0);
       gtk_table_attach (GTK_TABLE (dimtable), spinbutton, 0, 1, i, i + 1,
-			GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                        GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
       gtk_widget_show (spinbutton);
 
@@ -1086,12 +1086,12 @@
       cellw_adjust.rank_entry[i] = cellh_adjust.rank_entry[i] = spinbutton;
 
       if (i == 0)
-	{
-	  if (gihparams.dim == 1)
-	    cellw_adjust.rank0 = cellh_adjust.rank0 = adjustment;
-	  else
-	    cellw_adjust.rank0 = cellh_adjust.rank0 = NULL;
-	}
+        {
+          if (gihparams.dim == 1)
+            cellw_adjust.rank0 = cellh_adjust.rank0 = adjustment;
+          else
+            cellw_adjust.rank0 = cellh_adjust.rank0 = NULL;
+        }
 
       cb = gtk_combo_box_new_text ();
 
@@ -1109,7 +1109,7 @@
             }
 
       gtk_table_attach (GTK_TABLE (dimtable), cb, 1, 2, i, i + 1,
-			GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                        GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
       gtk_widget_show (cb);
 
@@ -1126,8 +1126,8 @@
     }
 
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 6,
-			     _("Ranks:"), 0.0, 0.0,
-			     dimtable, 1, FALSE);
+                             _("Ranks:"), 0.0, 0.0,
+                             dimtable, 1, FALSE);
 
   gtk_widget_show (dialog);
 
@@ -1142,8 +1142,8 @@
 
       /* Fix up bogus values */
       gihparams.ncells =
-	MIN (gihparams.ncells,
-	     num_useable_layers * gihparams.rows * gihparams.cols);
+        MIN (gihparams.ncells,
+             num_useable_layers * gihparams.rows * gihparams.cols);
     }
 
   gtk_widget_destroy (dialog);
@@ -1158,8 +1158,8 @@
 
 static gboolean
 gih_save_one_brush (gint          fd,
-		    GimpPixelRgn *pixel_rgn,
-		    gchar        *name)
+                    GimpPixelRgn *pixel_rgn,
+                    gchar        *name)
 {
   BrushHeader  header;
   guint        x;
@@ -1210,31 +1210,31 @@
   for (y = 0; y < pixel_rgn->h; y++)
     {
       gimp_pixel_rgn_get_row (pixel_rgn, buffer,
-			      0 + pixel_rgn->x, y + pixel_rgn->y,
-			      pixel_rgn->w);
+                              0 + pixel_rgn->x, y + pixel_rgn->y,
+                              pixel_rgn->w);
 
       if (pixel_rgn->bpp == 2) /* GRAYA */
-	{
-	  for (x = 0; x < pixel_rgn->w; x++)
-	    {
-	      guchar value = 255 - buffer[2 * x];
-
-	      if (write (fd, &value, 1) != 1)
-		{
-		  g_free (buffer);
-		  return FALSE;
-		}
-	    }
-	}
+        {
+          for (x = 0; x < pixel_rgn->w; x++)
+            {
+              guchar value = 255 - buffer[2 * x];
+
+              if (write (fd, &value, 1) != 1)
+                {
+                  g_free (buffer);
+                  return FALSE;
+                }
+            }
+        }
       else if (pixel_rgn->bpp == 4) /* RGBA */
-	{
-	  if (write (fd, buffer, pixel_rgn->w * pixel_rgn->bpp) !=
-	      pixel_rgn->w * pixel_rgn->bpp)
-	    {
-	      g_free (buffer);
-	      return FALSE;
-	    }
-	}
+        {
+          if (write (fd, buffer, pixel_rgn->w * pixel_rgn->bpp) !=
+              pixel_rgn->w * pixel_rgn->bpp)
+            {
+              g_free (buffer);
+              return FALSE;
+            }
+        }
     }
 
   g_free (buffer);
@@ -1244,9 +1244,9 @@
 
 static gboolean
 gih_save_image (const gchar  *filename,
-		gint32        image_ID,
-		gint32        orig_image_ID,
-		gint32        drawable_ID,
+                gint32        image_ID,
+                gint32        orig_image_ID,
+                gint32        drawable_ID,
                 GError      **error)
 {
   GimpDrawable *drawable;
@@ -1283,7 +1283,7 @@
   parstring = gimp_pixpipe_params_build (&gihparams);
 
   header = g_strdup_printf ("%s\n%d %s\n",
-			    info.description, gihparams.ncells, parstring);
+                            info.description, gihparams.ncells, parstring);
 
   if (write (fd, header, strlen (header)) != strlen (header))
     {
@@ -1296,8 +1296,8 @@
   g_free (header);
 
   pipe_parasite = gimp_parasite_new ("gimp-brush-pipe-parameters",
-				     GIMP_PARASITE_PERSISTENT,
-				     strlen (parstring) + 1, parstring);
+                                     GIMP_PARASITE_PERSISTENT,
+                                     strlen (parstring) + 1, parstring);
   gimp_image_parasite_attach (orig_image_ID, pipe_parasite);
   gimp_parasite_free (pipe_parasite);
 
@@ -1309,45 +1309,45 @@
   for (layer = 0; layer < nlayers; layer++)
     {
       if (!gimp_drawable_has_alpha (layer_ID[layer]))
-	continue;
+        continue;
 
       drawable = gimp_drawable_get (layer_ID[layer]);
       gimp_drawable_offsets (layer_ID[layer], &offsetx, &offsety);
 
       for (row = 0; row < gihparams.rows; row++)
-	{
-	  y = (row * imageh) / gihparams.rows ;
-	  ynext = ((row + 1) * imageh / gihparams.rows);
-	  /* Assume layer is offset to positive direction in x and y.
-	   * That's reasonable, as otherwise all of the layer
-	   * won't be visible.
-	   * thisy and thisx are in the drawable's coordinate space.
-	   */
-	  thisy = MAX (0, y - offsety);
-	  thish = (ynext - offsety) - thisy;
-	  thish = MIN (thish, drawable->height - thisy);
-
-	  for (col = 0; col < gihparams.cols; col++)
-	    {
-	      x = (col * imagew / gihparams.cols);
-	      xnext = ((col + 1) * imagew / gihparams.cols);
-	      thisx = MAX (0, x - offsetx);
-	      thisw = (xnext - offsetx) - thisx;
-	      thisw = MIN (thisw, drawable->width - thisx);
-	      gimp_pixel_rgn_init (&pixel_rgn, drawable, thisx, thisy,
-				   thisw, thish, FALSE, FALSE);
-
-	      if (! gih_save_one_brush (fd, &pixel_rgn,
-					gimp_drawable_get_name (layer_ID[layer])))
-		{
-		  close (fd);
-		  return FALSE;
-		}
-
-	      k++;
-	      gimp_progress_update ((gdouble) k / gihparams.ncells);
-	    }
-	}
+        {
+          y = (row * imageh) / gihparams.rows ;
+          ynext = ((row + 1) * imageh / gihparams.rows);
+          /* Assume layer is offset to positive direction in x and y.
+           * That's reasonable, as otherwise all of the layer
+           * won't be visible.
+           * thisy and thisx are in the drawable's coordinate space.
+           */
+          thisy = MAX (0, y - offsety);
+          thish = (ynext - offsety) - thisy;
+          thish = MIN (thish, drawable->height - thisy);
+
+          for (col = 0; col < gihparams.cols; col++)
+            {
+              x = (col * imagew / gihparams.cols);
+              xnext = ((col + 1) * imagew / gihparams.cols);
+              thisx = MAX (0, x - offsetx);
+              thisw = (xnext - offsetx) - thisx;
+              thisw = MIN (thisw, drawable->width - thisx);
+              gimp_pixel_rgn_init (&pixel_rgn, drawable, thisx, thisy,
+                                   thisw, thish, FALSE, FALSE);
+
+              if (! gih_save_one_brush (fd, &pixel_rgn,
+                                        gimp_drawable_get_name (layer_ID[layer])))
+                {
+                  close (fd);
+                  return FALSE;
+                }
+
+              k++;
+              gimp_progress_update ((gdouble) k / gihparams.ncells);
+            }
+        }
 
     }
 

Modified: trunk/plug-ins/common/file-glob.c
==============================================================================
--- trunk/plug-ins/common/file-glob.c	(original)
+++ trunk/plug-ins/common/file-glob.c	Mon Oct 20 06:04:39 2008
@@ -82,12 +82,12 @@
                           "Sven Neumann",
                           "2004",
                           NULL,
-			  NULL,
+                          NULL,
                           GIMP_PLUGIN,
-			  G_N_ELEMENTS (glob_args),
-			  G_N_ELEMENTS (glob_return_vals),
-			  glob_args,
-			  glob_return_vals);
+                          G_N_ELEMENTS (glob_args),
+                          G_N_ELEMENTS (glob_return_vals),
+                          glob_args,
+                          glob_return_vals);
 }
 
 static void
@@ -119,7 +119,7 @@
         {
           values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
           return;
-	}
+        }
 
       *nreturn_vals = 3;
 
@@ -269,7 +269,7 @@
 
 static gunichar
 get_unescaped_char (const char **str,
-		    gboolean    *was_escaped)
+                    gboolean    *was_escaped)
 {
   gunichar c = get_char (str);
 
@@ -299,140 +299,140 @@
       gunichar nc = get_char (&n);
 
       switch (c)
-	{
-   	case '?':
-	  if (nc == '\0')
-	    return FALSE;
-	  else if (nc == G_DIR_SEPARATOR)
-	    return FALSE;
-	  else if (nc == '.' && component_start && no_leading_period)
-	    return FALSE;
-	  break;
-	case '\\':
-	  if (DO_ESCAPE)
-	    c = get_char (&p);
-	  if (nc != c)
-	    return FALSE;
-	  break;
-	case '*':
-	  if (nc == '.' && component_start && no_leading_period)
-	    return FALSE;
-
-	  {
-	    const char *last_p = p;
-
-	    for (last_p = p, c = get_char (&p);
-		 c == '?' || c == '*';
-		 last_p = p, c = get_char (&p))
-	      {
-		if (c == '?')
-		  {
-		    if (nc == '\0')
-		      return FALSE;
-		    else if (nc == G_DIR_SEPARATOR)
-		      return FALSE;
-		    else
-		      {
-			last_n = n; nc = get_char (&n);
-		      }
-		  }
-	      }
-
-	    /* If the pattern ends with wildcards, we have a
-	     * guaranteed match unless there is a dir separator
-	     * in the remainder of the string.
-	     */
-	    if (c == '\0')
-	      {
-		if (strchr (last_n, G_DIR_SEPARATOR) != NULL)
-		  return FALSE;
-		else
-		  return TRUE;
-	      }
-
-	    if (DO_ESCAPE && c == '\\')
-	      c = get_char (&p);
-
-	    for (p = last_p; nc != '\0';)
-	      {
-		if ((c == '[' || nc == c) &&
-		    fnmatch_intern (p, last_n,
+        {
+        case '?':
+          if (nc == '\0')
+            return FALSE;
+          else if (nc == G_DIR_SEPARATOR)
+            return FALSE;
+          else if (nc == '.' && component_start && no_leading_period)
+            return FALSE;
+          break;
+        case '\\':
+          if (DO_ESCAPE)
+            c = get_char (&p);
+          if (nc != c)
+            return FALSE;
+          break;
+        case '*':
+          if (nc == '.' && component_start && no_leading_period)
+            return FALSE;
+
+          {
+            const char *last_p = p;
+
+            for (last_p = p, c = get_char (&p);
+                 c == '?' || c == '*';
+                 last_p = p, c = get_char (&p))
+              {
+                if (c == '?')
+                  {
+                    if (nc == '\0')
+                      return FALSE;
+                    else if (nc == G_DIR_SEPARATOR)
+                      return FALSE;
+                    else
+                      {
+                        last_n = n; nc = get_char (&n);
+                      }
+                  }
+              }
+
+            /* If the pattern ends with wildcards, we have a
+             * guaranteed match unless there is a dir separator
+             * in the remainder of the string.
+             */
+            if (c == '\0')
+              {
+                if (strchr (last_n, G_DIR_SEPARATOR) != NULL)
+                  return FALSE;
+                else
+                  return TRUE;
+              }
+
+            if (DO_ESCAPE && c == '\\')
+              c = get_char (&p);
+
+            for (p = last_p; nc != '\0';)
+              {
+                if ((c == '[' || nc == c) &&
+                    fnmatch_intern (p, last_n,
                                     component_start, no_leading_period))
-		  return TRUE;
+                  return TRUE;
 
-		component_start = (nc == G_DIR_SEPARATOR);
-		last_n = n;
-		nc = get_char (&n);
-	      }
-
-	    return FALSE;
-	  }
-
-	case '[':
-	  {
-	    /* Nonzero if the sense of the character class is inverted.  */
-	    gboolean not;
-	    gboolean was_escaped;
-
-	    if (nc == '\0' || nc == G_DIR_SEPARATOR)
-	      return FALSE;
-
-	    if (nc == '.' && component_start && no_leading_period)
-	      return FALSE;
-
-	    not = (*p == '!' || *p == '^');
-	    if (not)
-	      ++p;
-
-	    c = get_unescaped_char (&p, &was_escaped);
-	    for (;;)
-	      {
-		register gunichar cstart = c, cend = c;
-		if (c == '\0')
-		  /* [ (unterminated) loses.  */
-		  return FALSE;
-
-		c = get_unescaped_char (&p, &was_escaped);
-
-		if (!was_escaped && c == '-' && *p != ']')
-		  {
-		    cend = get_unescaped_char (&p, &was_escaped);
-		    if (cend == '\0')
-		      return FALSE;
-
-		    c = get_char (&p);
-		  }
-
-		if (nc >= cstart && nc <= cend)
-		  goto matched;
-
-		if (!was_escaped && c == ']')
-		  break;
-	      }
-	    if (!not)
-	      return FALSE;
-	    break;
-
-	  matched:;
-	    /* Skip the rest of the [...] that already matched.  */
-	    /* XXX 1003.2d11 is unclear if was_escaped is right.  */
-	    while (was_escaped || c != ']')
-	      {
-		if (c == '\0')
-		  /* [... (unterminated) loses.  */
-		  return FALSE;
-
-		c = get_unescaped_char (&p, &was_escaped);
-	      }
-	    if (not)
-	      return FALSE;
-	  }
-	  break;
-
-	default:
-	  if (c != nc)
-	    return FALSE;
-	}
+                component_start = (nc == G_DIR_SEPARATOR);
+                last_n = n;
+                nc = get_char (&n);
+              }
+
+            return FALSE;
+          }
+
+        case '[':
+          {
+            /* Nonzero if the sense of the character class is inverted.  */
+            gboolean not;
+            gboolean was_escaped;
+
+            if (nc == '\0' || nc == G_DIR_SEPARATOR)
+              return FALSE;
+
+            if (nc == '.' && component_start && no_leading_period)
+              return FALSE;
+
+            not = (*p == '!' || *p == '^');
+            if (not)
+              ++p;
+
+            c = get_unescaped_char (&p, &was_escaped);
+            for (;;)
+              {
+                register gunichar cstart = c, cend = c;
+                if (c == '\0')
+                  /* [ (unterminated) loses.  */
+                  return FALSE;
+
+                c = get_unescaped_char (&p, &was_escaped);
+
+                if (!was_escaped && c == '-' && *p != ']')
+                  {
+                    cend = get_unescaped_char (&p, &was_escaped);
+                    if (cend == '\0')
+                      return FALSE;
+
+                    c = get_char (&p);
+                  }
+
+                if (nc >= cstart && nc <= cend)
+                  goto matched;
+
+                if (!was_escaped && c == ']')
+                  break;
+              }
+            if (!not)
+              return FALSE;
+            break;
+
+          matched:;
+            /* Skip the rest of the [...] that already matched.  */
+            /* XXX 1003.2d11 is unclear if was_escaped is right.  */
+            while (was_escaped || c != ']')
+              {
+                if (c == '\0')
+                  /* [... (unterminated) loses.  */
+                  return FALSE;
+
+                c = get_unescaped_char (&p, &was_escaped);
+              }
+            if (not)
+              return FALSE;
+          }
+          break;
+
+        default:
+          if (c != nc)
+            return FALSE;
+        }
 
       component_start = (nc == G_DIR_SEPARATOR);
     }

Modified: trunk/plug-ins/common/file-header.c
==============================================================================
--- trunk/plug-ins/common/file-header.c	(original)
+++ trunk/plug-ins/common/file-header.c	Mon Oct 20 06:04:39 2008
@@ -75,7 +75,7 @@
                           "Spencer Kimball & Peter Mattis",
                           "1997",
                           N_("C source code header"),
-			  "INDEXED, RGB",
+                          "INDEXED, RGB",
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (save_args), 0,
                           save_args, NULL);
@@ -115,31 +115,31 @@
 
       /*  eventually export the image */
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "Header",
-				      (GIMP_EXPORT_CAN_HANDLE_RGB |
-				       GIMP_EXPORT_CAN_HANDLE_INDEXED));
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-	  break;
-
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "Header",
+                                      (GIMP_EXPORT_CAN_HANDLE_RGB |
+                                       GIMP_EXPORT_CAN_HANDLE_INDEXED));
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+          break;
+
+        default:
+          break;
+        }
 
       if (! save_image (param[3].data.d_string, image_ID, drawable_ID))
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -151,8 +151,8 @@
 
 static gboolean
 save_image (const gchar *filename,
-	    gint32       image_ID,
-	    gint32       drawable_ID)
+            gint32       image_ID,
+            gint32       drawable_ID)
 {
   GimpPixelRgn   pixel_rgn;
   GimpDrawable  *drawable;
@@ -174,10 +174,10 @@
   drawable = gimp_drawable_get (drawable_ID);
   drawable_type = gimp_drawable_type (drawable_ID);
   gimp_pixel_rgn_init (&pixel_rgn, drawable,
-		       0, 0, drawable->width, drawable->height, FALSE, FALSE);
+                       0, 0, drawable->width, drawable->height, FALSE, FALSE);
 
   fprintf (fp, "/*  GIMP header image file format (%s): %s  */\n\n",
-	   GIMP_RGB_IMAGE == drawable_type ? "RGB" : "INDEXED", filename);
+           GIMP_RGB_IMAGE == drawable_type ? "RGB" : "INDEXED", filename);
   fprintf (fp, "static unsigned int width = %d;\n", drawable->width);
   fprintf (fp, "static unsigned int height = %d;\n\n", drawable->height);
   fprintf (fp, "/*  Call this macro repeatedly.  After each use, the pixel data can be extracted  */\n\n");
@@ -197,19 +197,19 @@
 
       c = 0;
       for (y = 0; y < drawable->height; y++)
-	{
-	  gimp_pixel_rgn_get_row (&pixel_rgn, data, 0, y, drawable->width);
+        {
+          gimp_pixel_rgn_get_row (&pixel_rgn, data, 0, y, drawable->width);
 
-	  for (x = 0; x < drawable->width; x++)
-	    {
-	      d = data + x * drawable->bpp;
-
-	      buf[0] = ((d[0] >> 2) & 0x3F) + 33;
-	      buf[1] = ((((d[0] & 0x3) << 4) | (d[1] >> 4)) & 0x3F) + 33;
-	      buf[2] = ((((d[1] & 0xF) << 2) | (d[2] >> 6)) & 0x3F) + 33;
-	      buf[3] = (d[2] & 0x3F) + 33;
+          for (x = 0; x < drawable->width; x++)
+            {
+              d = data + x * drawable->bpp;
+
+              buf[0] = ((d[0] >> 2) & 0x3F) + 33;
+              buf[1] = ((((d[0] & 0x3) << 4) | (d[1] >> 4)) & 0x3F) + 33;
+              buf[2] = ((((d[1] & 0xF) << 2) | (d[2] >> 6)) & 0x3F) + 33;
+              buf[3] = (d[2] & 0x3F) + 33;
 
-	      for (b = 0; b < 4; b++)
+              for (b = 0; b < 4; b++)
                 {
                   if (buf[b] == '"')
                     fwrite (quote, 1, 2, fp);
@@ -219,14 +219,14 @@
                     fwrite (buf + b, 1, 1, fp);
                 }
 
-	      c++;
-	      if (c >= 16)
-		{
-		  fwrite (newline, 1, 4, fp);
-		  c = 0;
-		}
-	    }
-	}
+              c++;
+              if (c >= 16)
+                {
+                  fwrite (newline, 1, 4, fp);
+                  c = 0;
+                }
+            }
+        }
 
       fprintf (fp, "\";\n");
       break;
@@ -266,18 +266,18 @@
           gimp_pixel_rgn_get_row (&pixel_rgn, data, 0, y, drawable->width);
 
           for (x = 0; x < drawable->width-1; x++)
-	    {
-	      d = data + x * drawable->bpp;
+            {
+              d = data + x * drawable->bpp;
 
               fprintf (fp, "%d,", (int)d[0]);
 
-	      c++;
-	      if (c >= 16)
-	        {
-	          fprintf (fp, "\n\t");
-	          c = 0;
-	        }
-	    }
+              c++;
+              if (c >= 16)
+                {
+                  fprintf (fp, "\n\t");
+                  c = 0;
+                }
+            }
 
           if (y != drawable->height - 1)
             fprintf (fp, "%d,\n\t", (int)d[1]);

Modified: trunk/plug-ins/common/file-html-table.c
==============================================================================
--- trunk/plug-ins/common/file-html-table.c	(original)
+++ trunk/plug-ins/common/file-html-table.c	Mon Oct 20 06:04:39 2008
@@ -154,7 +154,7 @@
                           "Daniel Dunbar",
                           "1998",
                           _("HTML table"),
-			  "RGB*, GRAY*",
+                          "RGB*, GRAY*",
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (save_args), 0,
                           save_args, NULL);
@@ -190,13 +190,13 @@
   if (save_dialog (param[1].data.d_int32))
     {
       if (save_image (param[3].data.d_string, drawable, &error))
-	{
-	  gimp_set_data (SAVE_PROC, &gtmvals, sizeof (GTMValues));
-	}
+        {
+          gimp_set_data (SAVE_PROC, &gtmvals, sizeof (GTMValues));
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else
     {
@@ -215,7 +215,7 @@
 
 static gboolean
 save_image (const gchar   *filename,
-	    GimpDrawable  *drawable,
+            GimpDrawable  *drawable,
             GError       **error)
 {
   gint          row,col, cols, rows, x, y;
@@ -425,7 +425,7 @@
   main_vbox = gtk_vbox_new (FALSE, 12);
   gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), main_vbox,
-		      TRUE, TRUE, 0);
+                      TRUE, TRUE, 0);
 
   if (gimp_image_width (image_ID) * gimp_image_height (image_ID) > 4096)
     {
@@ -445,8 +445,8 @@
       gtk_box_pack_start (GTK_BOX (hbox), eek, FALSE, FALSE, 0);
 
       label = gtk_label_new (_("You are about to create a huge\n"
-			       "HTML file which will most likely\n"
-			       "crash your browser."));
+                               "HTML file which will most likely\n"
+                               "crash your browser."));
       gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
 
       gtk_widget_show_all (frame);
@@ -466,10 +466,10 @@
   gtk_widget_show (toggle);
 
   gimp_help_set_help_data (toggle,
-			   _("If checked GTM will output a full HTML document "
-			     "with <HTML>, <BODY>, etc. tags instead of just "
-			     "the table html."),
-			   NULL);
+                           _("If checked GTM will output a full HTML document "
+                             "with <HTML>, <BODY>, etc. tags instead of just "
+                             "the table html."),
+                           NULL);
 
   g_signal_connect (toggle, "toggled",
                     G_CALLBACK (gimp_toggle_button_update),
@@ -493,10 +493,10 @@
   gtk_widget_show (toggle);
 
   gimp_help_set_help_data (toggle,
-			   _("If checked GTM will replace any rectangular "
-			     "sections of identically colored blocks with one "
-			     "large cell with ROWSPAN and COLSPAN values."),
-			   NULL);
+                           _("If checked GTM will replace any rectangular "
+                             "sections of identically colored blocks with one "
+                             "large cell with ROWSPAN and COLSPAN values."),
+                           NULL);
 
   g_signal_connect (toggle, "toggled",
                     G_CALLBACK (gimp_toggle_button_update),
@@ -508,11 +508,11 @@
   gtk_widget_show (toggle);
 
   gimp_help_set_help_data (toggle,
-			   _("Checking this tag will cause GTM to leave no "
-			     "whitespace between the TD tags and the "
-			     "cellcontent.  This is only necessary for pixel "
-			     "level positioning control."),
-			   NULL);
+                           _("Checking this tag will cause GTM to leave no "
+                             "whitespace between the TD tags and the "
+                             "cellcontent.  This is only necessary for pixel "
+                             "level positioning control."),
+                           NULL);
 
   g_signal_connect (toggle, "toggled",
                     G_CALLBACK (gimp_toggle_button_update),
@@ -524,9 +524,9 @@
   gtk_widget_show (toggle);
 
   gimp_help_set_help_data (toggle,
-			   _("Check if you would like to have the table "
-			     "captioned."),
-			   NULL);
+                           _("Check if you would like to have the table "
+                             "captioned."),
+                           NULL);
 
   g_signal_connect (toggle, "toggled",
                     G_CALLBACK (gimp_toggle_button_update),
@@ -536,7 +536,7 @@
   gtk_widget_set_size_request (entry, 200, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.captiontxt);
   gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 2, 3,
-		    GTK_FILL | GTK_EXPAND, 0, 0, 0);
+                    GTK_FILL | GTK_EXPAND, 0, 0, 0);
   gtk_widget_show (entry);
 
   gimp_help_set_help_data (entry, _("The text for the table caption."), NULL);
@@ -552,8 +552,8 @@
   gtk_widget_set_size_request (entry, 200, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.cellcontent);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
-			     _("C_ell content:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("C_ell content:"), 0.0, 0.5,
+                             entry, 1, FALSE);
   gtk_widget_show (entry);
 
   gimp_help_set_help_data (entry, _("The text to go into each cell."), NULL);
@@ -575,14 +575,14 @@
   gtk_container_add (GTK_CONTAINER (frame), table);
 
   spinbutton = gimp_spin_button_new (&adj, gtmvals.border,
-				     0, 1000, 1, 10, 0, 1, 0);
+                                     0, 1000, 1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("_Border:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("_Border:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   gimp_help_set_help_data (spinbutton,
-			   _("The number of pixels in the table border."),
-			   NULL);
+                           _("The number of pixels in the table border."),
+                           NULL);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -592,13 +592,13 @@
   gtk_widget_set_size_request (entry, 60, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.clwidth);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("_Width:"), 0.0, 0.5,
-			     entry, 1, TRUE);
+                             _("_Width:"), 0.0, 0.5,
+                             entry, 1, TRUE);
 
   gimp_help_set_help_data (entry,
-			   _("The width for each table cell.  "
-			     "Can be a number or a percent."),
-			   NULL);
+                           _("The width for each table cell.  "
+                             "Can be a number or a percent."),
+                           NULL);
 
   g_signal_connect (entry, "changed",
                     G_CALLBACK (gtm_clwidth_callback),
@@ -608,39 +608,39 @@
   gtk_widget_set_size_request (entry, 60, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.clheight);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
-			     _("_Height:"), 0.0, 0.5,
-			     entry, 1, TRUE);
+                             _("_Height:"), 0.0, 0.5,
+                             entry, 1, TRUE);
 
   gimp_help_set_help_data (entry,
-			   _("The height for each table cell.  "
-			     "Can be a number or a percent."),
-			   NULL);
+                           _("The height for each table cell.  "
+                             "Can be a number or a percent."),
+                           NULL);
 
   g_signal_connect (entry, "changed",
                     G_CALLBACK (gtm_clheight_callback),
                     NULL);
 
   spinbutton = gimp_spin_button_new (&adj, gtmvals.cellpadding,
-				     0, 1000, 1, 10, 0, 1, 0);
+                                     0, 1000, 1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
-			     _("Cell-_padding:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Cell-_padding:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   gimp_help_set_help_data (spinbutton,
-			   _("The amount of cellpadding."), NULL);
+                           _("The amount of cellpadding."), NULL);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
                     &gtmvals.cellpadding);
 
   spinbutton = gimp_spin_button_new (&adj, gtmvals.cellspacing,
-				     0, 1000, 1, 10, 0, 1, 0);
+                                     0, 1000, 1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
-			     _("Cell-_spacing:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Cell-_spacing:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   gimp_help_set_help_data (spinbutton,
-			   _("The amount of cellspacing."), NULL);
+                           _("The amount of cellspacing."), NULL);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -660,7 +660,7 @@
 
 static gboolean
 color_comp (guchar *buffer,
-	    guchar *buf2)
+            guchar *buf2)
 {
   return (buffer[0] == buf2[0] &&
           buffer[1] == buf2[1] &&
@@ -671,28 +671,28 @@
 
 static void
 gtm_caption_callback (GtkWidget *widget,
-		      gpointer   data)
+                      gpointer   data)
 {
   strncpy (gtmvals.captiontxt, gtk_entry_get_text (GTK_ENTRY (widget)), 255);
 }
 
 static void
 gtm_cellcontent_callback (GtkWidget *widget,
-			  gpointer   data)
+                          gpointer   data)
 {
   strncpy (gtmvals.cellcontent, gtk_entry_get_text (GTK_ENTRY (widget)), 255);
 }
 
 static void
 gtm_clwidth_callback (GtkWidget *widget,
-		      gpointer   data)
+                      gpointer   data)
 {
   strncpy (gtmvals.clwidth, gtk_entry_get_text (GTK_ENTRY (widget)), 255);
 }
 
 static void
 gtm_clheight_callback (GtkWidget *widget,
-		       gpointer   data)
+                       gpointer   data)
 {
   strncpy (gtmvals.clheight, gtk_entry_get_text (GTK_ENTRY (widget)), 255);
 }

Modified: trunk/plug-ins/common/file-pat.c
==============================================================================
--- trunk/plug-ins/common/file-pat.c	(original)
+++ trunk/plug-ins/common/file-pat.c	Mon Oct 20 06:04:39 2008
@@ -59,15 +59,15 @@
 
 static void       query          (void);
 static void       run            (const gchar      *name,
-				  gint              nparams,
-				  const GimpParam  *param,
-				  gint             *nreturn_vals,
-				  GimpParam       **return_vals);
+                                  gint              nparams,
+                                  const GimpParam  *param,
+                                  gint             *nreturn_vals,
+                                  GimpParam       **return_vals);
 static gint32     load_image     (const gchar      *filename,
                                   GError          **error);
 static gboolean   save_image     (const gchar      *filename,
-				  gint32            image_ID,
-				  gint32            drawable_ID,
+                                  gint32            image_ID,
+                                  gint32            drawable_ID,
                                   GError          **error);
 
 static gboolean   save_dialog    (void);
@@ -116,7 +116,7 @@
   gimp_install_procedure (LOAD_PROC,
                           "Loads Gimp's .PAT pattern files",
                           "The images in the pattern dialog can be loaded "
-			  "directly with this plug-in",
+                          "directly with this plug-in",
                           "Tim Newsome",
                           "Tim Newsome",
                           "1997",
@@ -131,14 +131,14 @@
                              (const guint8 *) GIMP_STOCK_PATTERN);
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-gimp-pat");
   gimp_register_magic_load_handler (LOAD_PROC,
-				    "pat",
-				    "",
-				    "20,string,GPAT");
+                                    "pat",
+                                    "",
+                                    "20,string,GPAT");
 
   gimp_install_procedure (SAVE_PROC,
                           "Saves Gimp pattern file (.PAT)",
                           "New Gimp patterns can be created by saving them "
-			  "in the appropriate place with this plug-in.",
+                          "in the appropriate place with this plug-in.",
                           "Tim Newsome",
                           "Tim Newsome",
                           "1997",
@@ -184,15 +184,15 @@
       image_ID = load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  *nreturn_vals = 2;
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+        {
+          *nreturn_vals = 2;
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else if (strcmp (name, SAVE_PROC) == 0)
     {
@@ -205,27 +205,27 @@
       orig_image_ID = image_ID;
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "PAT",
-				      GIMP_EXPORT_CAN_HANDLE_GRAY |
-				      GIMP_EXPORT_CAN_HANDLE_RGB |
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "PAT",
+                                      GIMP_EXPORT_CAN_HANDLE_GRAY |
+                                      GIMP_EXPORT_CAN_HANDLE_RGB |
                                       GIMP_EXPORT_CAN_HANDLE_ALPHA);
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-
-	  /*  Possibly retrieve data  */
-	  gimp_get_data (SAVE_PROC, description);
-	  break;
-
-	default:
-	  break;
-	}
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+
+          /*  Possibly retrieve data  */
+          gimp_get_data (SAVE_PROC, description);
+          break;
+
+        default:
+          break;
+        }
 
       parasite = gimp_image_parasite_find (orig_image_ID, "gimp-pattern-name");
       if (parasite)
@@ -239,44 +239,44 @@
         }
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	  if (!save_dialog ())
-	    status = GIMP_PDB_CANCEL;
-	  break;
+        {
+        case GIMP_RUN_INTERACTIVE:
+          if (!save_dialog ())
+            status = GIMP_PDB_CANCEL;
+          break;
 
-	case GIMP_RUN_NONINTERACTIVE:
-	  if (nparams != 6)
+        case GIMP_RUN_NONINTERACTIVE:
+          if (nparams != 6)
             {
               status = GIMP_PDB_CALLING_ERROR;
             }
-	  else
+          else
             {
               strncpy (description, param[5].data.d_string,
                        sizeof (description));
               description[sizeof (description) - 1] = '\0';
             }
-	  break;
+          break;
 
-	default:
-	  break;
-	}
+        default:
+          break;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (save_image (param[3].data.d_string, image_ID, drawable_ID,
+        {
+          if (save_image (param[3].data.d_string, image_ID, drawable_ID,
                           &error))
-	    {
-	      gimp_set_data (SAVE_PROC, description, sizeof (description));
-	    }
-	  else
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-	}
+            {
+              gimp_set_data (SAVE_PROC, description, sizeof (description));
+            }
+          else
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
 
       if (strlen (description))
         {
@@ -425,11 +425,11 @@
   for (line = 0; line < ph.height; line++)
     {
       if (read (fd, buffer, ph.width * ph.bytes) != ph.width * ph.bytes)
-	{
-	  close (fd);
-	  g_free (buffer);
-	  return -1;
-	}
+        {
+          close (fd);
+          g_free (buffer);
+          return -1;
+        }
 
       gimp_pixel_rgn_set_row (&pixel_rgn, buffer, 0, line, ph.width);
 
@@ -443,8 +443,8 @@
 
 static gboolean
 save_image (const gchar  *filename,
-	    gint32        image_ID,
-	    gint32        drawable_ID,
+            gint32        image_ID,
+            gint32        drawable_ID,
             GError      **error)
 {
   gint          fd;
@@ -469,7 +469,7 @@
 
   drawable = gimp_drawable_get (drawable_ID);
   gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
-		       drawable->height, FALSE, FALSE);
+                       drawable->height, FALSE, FALSE);
 
   ph.header_size  = g_htonl (sizeof (PatternHeader) + strlen (description) + 1);
   ph.version      = g_htonl (1);
@@ -502,11 +502,11 @@
       gimp_pixel_rgn_get_row (&pixel_rgn, buffer, 0, line, drawable->width);
 
       if (write (fd, buffer, drawable->width * drawable->bpp) !=
-	  drawable->width * drawable->bpp)
-	{
-	  close (fd);
-	  return FALSE;
-	}
+          drawable->width * drawable->bpp)
+        {
+          close (fd);
+          return FALSE;
+        }
 
       gimp_progress_update ((gdouble) line / (gdouble) drawable->height);
     }
@@ -553,8 +553,8 @@
   gtk_entry_set_text (GTK_ENTRY (entry), description);
   gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("Description:"), 1.0, 0.5,
-			     entry, 1, FALSE);
+                             _("Description:"), 1.0, 0.5,
+                             entry, 1, FALSE);
   gtk_widget_show (entry);
 
   gtk_widget_show (dialog);

Modified: trunk/plug-ins/common/file-pdf.c
==============================================================================
--- trunk/plug-ins/common/file-pdf.c	(original)
+++ trunk/plug-ins/common/file-pdf.c	Mon Oct 20 06:04:39 2008
@@ -367,7 +367,7 @@
             status = GIMP_PDB_CANCEL;
           break;
 
-	case GIMP_RUN_WITH_LAST_VALS:
+        case GIMP_RUN_WITH_LAST_VALS:
           /* FIXME: implement last vals mode */
           status = GIMP_PDB_EXECUTION_ERROR;
           break;
@@ -481,14 +481,14 @@
 
           if (image != -1)
             {
-	      *nreturn_vals = 4;
+              *nreturn_vals = 4;
 
               values[1].type         = GIMP_PDB_IMAGE;
-	      values[1].data.d_image = image;
-	      values[2].type         = GIMP_PDB_INT32;
-	      values[2].data.d_int32 = width;
-	      values[3].type         = GIMP_PDB_INT32;
-	      values[3].data.d_int32 = height;
+              values[1].data.d_image = image;
+              values[2].type         = GIMP_PDB_INT32;
+              values[2].data.d_int32 = width;
+              values[3].type         = GIMP_PDB_INT32;
+              values[3].data.d_int32 = height;
             }
           else
             {

Modified: trunk/plug-ins/common/file-pix.c
==============================================================================
--- trunk/plug-ins/common/file-pix.c	(original)
+++ trunk/plug-ins/common/file-pix.c	Mon Oct 20 06:04:39 2008
@@ -74,23 +74,23 @@
 
 static void     query     (void);
 static void     run       (const gchar      *name,
-			   gint              nparams,
-			   const GimpParam  *param,
-			   gint             *nreturn_vals,
-			   GimpParam       **return_vals);
+                           gint              nparams,
+                           const GimpParam  *param,
+                           gint             *nreturn_vals,
+                           GimpParam       **return_vals);
 
 /* Local Helper Functions */
 
 static gint32   load_image (const gchar     *filename,
                             GError         **error);
 static gboolean save_image (const gchar     *filename,
-			    gint32           image_ID,
-			    gint32           drawable_ID,
+                            gint32           image_ID,
+                            gint32           drawable_ID,
                             GError         **error);
 
 static guint16  get_short  (FILE            *file);
 static void     put_short  (guint16          value,
-			    FILE            *file);
+                            FILE            *file);
 
 /******************
  * Implementation *
@@ -134,21 +134,21 @@
   };
 
   gimp_install_procedure (LOAD_PROC,
-			  "loads files of the Alias|Wavefront Pix file format",
-			  "loads files of the Alias|Wavefront Pix file format",
-			  "Michael Taylor",
-			  "Michael Taylor",
-			  "1997",
+                          "loads files of the Alias|Wavefront Pix file format",
+                          "loads files of the Alias|Wavefront Pix file format",
+                          "Michael Taylor",
+                          "Michael Taylor",
+                          "1997",
                           N_("Alias Pix image"),
-			  NULL,
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (load_args),
+                          NULL,
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (load_args),
                           G_N_ELEMENTS (load_return_vals),
-			  load_args, load_return_vals);
+                          load_args, load_return_vals);
 
   gimp_register_load_handler (LOAD_PROC,
-			      "pix,matte,mask,alpha,als",
-			      "");
+                              "pix,matte,mask,alpha,als",
+                              "");
 
   gimp_install_procedure (SAVE_PROC,
                           "save file in the Alias|Wavefront pix/matte file format",
@@ -207,17 +207,17 @@
       image_ID = load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  /* The image load was successful */
-	  *nreturn_vals = 2;
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+        {
+          /* The image load was successful */
+          *nreturn_vals = 2;
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  /* The image load falied */
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          /* The image load falied */
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else if (strcmp (name, LOAD_PROC) == 0)
     {
@@ -226,34 +226,34 @@
 
       /*  eventually export the image */
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "PIX",
-				      (GIMP_EXPORT_CAN_HANDLE_RGB |
-				       GIMP_EXPORT_CAN_HANDLE_GRAY));
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	    }
-	  break;
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "PIX",
+                                      (GIMP_EXPORT_CAN_HANDLE_RGB |
+                                       GIMP_EXPORT_CAN_HANDLE_GRAY));
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+          break;
+        default:
+          break;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (! save_image (param[3].data.d_string, image_ID, drawable_ID,
+        {
+          if (! save_image (param[3].data.d_string, image_ID, drawable_ID,
                             &error))
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-	}
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -295,7 +295,7 @@
 
 static void
 put_short (guint16  value,
-	   FILE    *file)
+           FILE    *file)
 {
   guchar buf[2];
   buf[0] = (value >> 8) & 0xFF;
@@ -380,13 +380,13 @@
   image_ID = gimp_image_new (width, height, imgtype);
   gimp_image_set_filename (image_ID, filename);
   layer_ID = gimp_layer_new (image_ID, _("Background"),
-			     width,
-			     height,
-			     gdtype, 100, GIMP_NORMAL_MODE);
+                             width,
+                             height,
+                             gdtype, 100, GIMP_NORMAL_MODE);
   gimp_image_add_layer (image_ID, layer_ID, 0);
   drawable = gimp_drawable_get (layer_ID);
   gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
-		       drawable->height, TRUE, FALSE);
+                       drawable->height, TRUE, FALSE);
 
   tile_height = gimp_tile_height ();
 
@@ -400,37 +400,37 @@
       dest_base = dest = g_new (guchar, 3 * width * tile_height);
 
       for (i = 0; i < height;)
-	{
-	  for (dest = dest_base, row = 0;
-	       row < tile_height && i < height;
-	       i++, row++)
-	    {
-	      guchar count;
-
-	      /* Read a row of the image */
-	      j = 0;
-	      while (j < width)
-		{
-		  readlen = fread (record, 1, 4, file);
-		  if (readlen < 4)
-		    break;
-
-		  for (count = 0; count < record[0]; ++count)
-		    {
-		      dest[0]   = record[3];
-		      dest[1]   = record[2];
-		      dest[2]   = record[1];
-		      dest += 3;
-		      j++;
-		      if (j >= width)
-			break;
-		    }
-		}
-	    }
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, dest_base, 0, i-row,
-				   width, row);
-	  gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          for (dest = dest_base, row = 0;
+               row < tile_height && i < height;
+               i++, row++)
+            {
+              guchar count;
+
+              /* Read a row of the image */
+              j = 0;
+              while (j < width)
+                {
+                  readlen = fread (record, 1, 4, file);
+                  if (readlen < 4)
+                    break;
+
+                  for (count = 0; count < record[0]; ++count)
+                    {
+                      dest[0]   = record[3];
+                      dest[1]   = record[2];
+                      dest[2]   = record[1];
+                      dest += 3;
+                      j++;
+                      if (j >= width)
+                        break;
+                    }
+                }
+            }
+          gimp_pixel_rgn_set_rect (&pixel_rgn, dest_base, 0, i-row,
+                                   width, row);
+          gimp_progress_update ((double) i / (double) height);
+        }
 
       g_free (dest_base);
     }
@@ -443,35 +443,35 @@
       dest_base = dest = g_new (guchar, width * tile_height);
 
       for (i = 0; i < height;)
-	{
-	  for (dest = dest_base, row = 0;
-	       row < tile_height && i < height;
-	       i++, row++)
-	    {
-	      guchar count;
-
-	      /* Read a row of the image */
-	      j = 0;
-	      while (j < width)
-		{
-		  readlen = fread(record, 1, 2, file);
-		  if (readlen < 2)
-		    break;
-
-		  for (count = 0; count < record[0]; ++count)
-		    {
-		      dest[j]   = record[1];
-		      j++;
-		      if (j >= width)
-			break;
-		    }
-		}
-	      dest += width;
-	    }
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, dest_base, 0, i-row,
-				   width, row);
-	  gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          for (dest = dest_base, row = 0;
+               row < tile_height && i < height;
+               i++, row++)
+            {
+              guchar count;
+
+              /* Read a row of the image */
+              j = 0;
+              while (j < width)
+                {
+                  readlen = fread(record, 1, 2, file);
+                  if (readlen < 2)
+                    break;
+
+                  for (count = 0; count < record[0]; ++count)
+                    {
+                      dest[j]   = record[1];
+                      j++;
+                      if (j >= width)
+                        break;
+                    }
+                }
+              dest += width;
+            }
+          gimp_pixel_rgn_set_rect (&pixel_rgn, dest_base, 0, i-row,
+                                   width, row);
+          gimp_progress_update ((double) i / (double) height);
+        }
       g_free (dest_base);
     }
 
@@ -495,8 +495,8 @@
 
 static gboolean
 save_image (const gchar  *filename,
-	    gint32        image_ID,
-	    gint32        drawable_ID,
+            gint32        image_ID,
+            gint32        drawable_ID,
             GError      **error)
 {
   gint       depth, i, j, row, tile_height, writelen, rectHeight;
@@ -511,7 +511,7 @@
   drawable = gimp_drawable_get (drawable_ID);
 
   gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
-		       drawable->height, FALSE, FALSE);
+                       drawable->height, FALSE, FALSE);
 
   savingColor = gimp_drawable_is_rgb (drawable_ID);
   depth = gimp_drawable_bpp (drawable_ID);
@@ -548,49 +548,49 @@
       put_short (24, file);
 
       for (i = 0; i < drawable->height;)
-	{
-	  rectHeight = (tile_height < (drawable->height - i - 1)) ?
-	    tile_height : (drawable->height - i - 1);
-	  gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
-				   drawable->width, rectHeight);
-
-	  for (src = src_base, row = 0;
-	       row < tile_height && i < drawable->height;
-	       i += 1, row += 1)
-	    {
-	      /* Write a row of the image */
-	      record[0] = 1;
-	      record[3] = src[0];
-	      record[2] = src[1];
-	      record[1] = src[2];
-	      src += depth;
-	      for (j = 1; j < drawable->width; ++j)
-		{
-		  if ((record[3] != src[0]) ||
-		       (record[2] != src[1]) ||
-		       (record[1] != src[2]) ||
-		       (record[0] == 255))
-		    {
-		      /* Write current RLE record and start a new one */
-
-		      writelen = fwrite (record, 1, 4, file);
-		      record[0] = 1;
-		      record[3] = src[0];
-		      record[2] = src[1];
-		      record[1] = src[2];
-		    }
-		  else
-		    {
-		      /* increment run length in current record */
-		      record[0]++;
-		    }
-		  src += depth;
-		}
-	      /* Write last record in row */
-	      writelen = fwrite (record, 1, 4, file);
-	    }
-	  gimp_progress_update ((double) i / (double) drawable->height);
-	}
+        {
+          rectHeight = (tile_height < (drawable->height - i - 1)) ?
+            tile_height : (drawable->height - i - 1);
+          gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
+                                   drawable->width, rectHeight);
+
+          for (src = src_base, row = 0;
+               row < tile_height && i < drawable->height;
+               i += 1, row += 1)
+            {
+              /* Write a row of the image */
+              record[0] = 1;
+              record[3] = src[0];
+              record[2] = src[1];
+              record[1] = src[2];
+              src += depth;
+              for (j = 1; j < drawable->width; ++j)
+                {
+                  if ((record[3] != src[0]) ||
+                       (record[2] != src[1]) ||
+                       (record[1] != src[2]) ||
+                       (record[0] == 255))
+                    {
+                      /* Write current RLE record and start a new one */
+
+                      writelen = fwrite (record, 1, 4, file);
+                      record[0] = 1;
+                      record[3] = src[0];
+                      record[2] = src[1];
+                      record[1] = src[2];
+                    }
+                  else
+                    {
+                      /* increment run length in current record */
+                      record[0]++;
+                    }
+                  src += depth;
+                }
+              /* Write last record in row */
+              writelen = fwrite (record, 1, 4, file);
+            }
+          gimp_progress_update ((double) i / (double) drawable->height);
+        }
     }
   else
     {
@@ -600,41 +600,41 @@
       put_short (8, file);
 
       for (i = 0; i < drawable->height;)
-	{
-	  rectHeight = (tile_height < (drawable->height - i - 1)) ?
-	    tile_height : (drawable->height - i - 1);
-	  gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
-				   drawable->width, rectHeight);
-
-	  for (src = src_base, row = 0;
-	       row < tile_height && i < drawable->height;
-	       i += 1, row += 1)
-	    {
-	      /* Write a row of the image */
-	      record[0] = 1;
-	      record[1] = src[0];
-	      src += depth;
-	      for (j = 1; j < drawable->width; ++j)
-		{
-		  if ((record[1] != src[0]) || (record[0] == 255))
-		    {
-		      /* Write current RLE record and start a new one */
-		      writelen = fwrite (record, 1, 2, file);
-		      record[0] = 1;
-		      record[1] = src[0];
-		    }
-		  else
-		    {
-		      /* increment run length in current record */
-		      record[0] ++;
-		    }
-		  src += depth;
-		}
-	      /* Write last record in row */
-	      writelen = fwrite (record, 1, 2, file);
-	    }
-	  gimp_progress_update ((double) i / (double) drawable->height);
-	}
+        {
+          rectHeight = (tile_height < (drawable->height - i - 1)) ?
+            tile_height : (drawable->height - i - 1);
+          gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
+                                   drawable->width, rectHeight);
+
+          for (src = src_base, row = 0;
+               row < tile_height && i < drawable->height;
+               i += 1, row += 1)
+            {
+              /* Write a row of the image */
+              record[0] = 1;
+              record[1] = src[0];
+              src += depth;
+              for (j = 1; j < drawable->width; ++j)
+                {
+                  if ((record[1] != src[0]) || (record[0] == 255))
+                    {
+                      /* Write current RLE record and start a new one */
+                      writelen = fwrite (record, 1, 2, file);
+                      record[0] = 1;
+                      record[1] = src[0];
+                    }
+                  else
+                    {
+                      /* increment run length in current record */
+                      record[0] ++;
+                    }
+                  src += depth;
+                }
+              /* Write last record in row */
+              writelen = fwrite (record, 1, 2, file);
+            }
+          gimp_progress_update ((double) i / (double) drawable->height);
+        }
     }
 
   g_free (src_base);

Modified: trunk/plug-ins/common/file-sunras.c
==============================================================================
--- trunk/plug-ins/common/file-sunras.c	(original)
+++ trunk/plug-ins/common/file-sunras.c	Mon Oct 20 06:04:39 2008
@@ -107,10 +107,10 @@
 static gint32 create_new_image (const gchar   *filename,
                                 guint          width,
                                 guint          height,
-				GimpImageBaseType type,
+                                GimpImageBaseType type,
                                 gint32        *layer_ID,
                                 GimpDrawable **drawable,
-				GimpPixelRgn  *pixel_rgn);
+                                GimpPixelRgn  *pixel_rgn);
 
 static gint32 load_sun_d1   (const gchar *,
                              FILE *, L_SUNFILEHEADER *, unsigned char *);
@@ -223,14 +223,14 @@
 
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-sun-raster");
   gimp_register_magic_load_handler (LOAD_PROC,
-				    "im1,im8,im24,im32,rs,ras",
-				    "",
-				    "0,long,0x59a66a95");
+                                    "im1,im8,im24,im32,rs,ras",
+                                    "",
+                                    "0,long,0x59a66a95");
 
   gimp_install_procedure (SAVE_PROC,
                           "save file in the SunRaster file format",
                           "SUNRAS saving handles all image types except "
-			  "those with alpha channels.",
+                          "those with alpha channels.",
                           "Peter Kirchgessner",
                           "Peter Kirchgessner",
                           "1996",
@@ -275,15 +275,15 @@
       image_ID = load_image (param[1].data.d_string, &error);
 
       if (image_ID != -1)
-	{
-	  *nreturn_vals = 2;
-	  values[1].type         = GIMP_PDB_IMAGE;
-	  values[1].data.d_image = image_ID;
-	}
+        {
+          *nreturn_vals = 2;
+          values[1].type         = GIMP_PDB_IMAGE;
+          values[1].data.d_image = image_ID;
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
   else if (strcmp (name, SAVE_PROC) == 0)
     {
@@ -292,23 +292,23 @@
 
       /*  eventually export the image */
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "SUNRAS",
-				      (GIMP_EXPORT_CAN_HANDLE_RGB |
-				       GIMP_EXPORT_CAN_HANDLE_GRAY |
-				       GIMP_EXPORT_CAN_HANDLE_INDEXED));
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-	  }
-	  break;
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "SUNRAS",
+                                      (GIMP_EXPORT_CAN_HANDLE_RGB |
+                                       GIMP_EXPORT_CAN_HANDLE_GRAY |
+                                       GIMP_EXPORT_CAN_HANDLE_INDEXED));
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+          }
+          break;
+        default:
+          break;
+        }
 
       switch (run_mode)
         {
@@ -324,13 +324,13 @@
         case GIMP_RUN_NONINTERACTIVE:
           /*  Make sure all the arguments are there!  */
           if (nparams != 6)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
           else
-	    {
-	      psvals.rle = (param[5].data.d_int32) ? TRUE : FALSE;
-	    }
+            {
+              psvals.rle = (param[5].data.d_int32) ? TRUE : FALSE;
+            }
           break;
 
         case GIMP_RUN_WITH_LAST_VALS:
@@ -343,21 +343,21 @@
         }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  if (save_image (param[3].data.d_string, image_ID, drawable_ID,
+        {
+          if (save_image (param[3].data.d_string, image_ID, drawable_ID,
                           &error))
-	    {
-	      /*  Store psvals data  */
-	      gimp_set_data (SAVE_PROC, &psvals, sizeof (SUNRASSaveVals));
-	    }
-	  else
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-	}
+            {
+              /*  Store psvals data  */
+              gimp_set_data (SAVE_PROC, &psvals, sizeof (SUNRASSaveVals));
+            }
+          else
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -428,27 +428,27 @@
       read_sun_cols (ifp, &sunhdr, suncolmap);
 #ifdef DEBUG
       {
-	int j, ncols;
-	printf ("File %s\n",filename);
-	ncols = sunhdr.l_ras_maplength/3;
-	for (j=0; j < ncols; j++)
-	  printf ("Entry 0x%08x: 0x%04x,  0x%04x, 0x%04x\n",
-		  j,suncolmap[j],suncolmap[j+ncols],suncolmap[j+2*ncols]);
+        int j, ncols;
+        printf ("File %s\n",filename);
+        ncols = sunhdr.l_ras_maplength/3;
+        for (j=0; j < ncols; j++)
+          printf ("Entry 0x%08x: 0x%04x,  0x%04x, 0x%04x\n",
+                  j,suncolmap[j],suncolmap[j+ncols],suncolmap[j+2*ncols]);
       }
 #endif
       if (sunhdr.l_ras_magic != RAS_MAGIC)
-	{
-	  g_message (_("Could not read color entries from '%s'"),
+        {
+          g_message (_("Could not read color entries from '%s'"),
                      gimp_filename_to_utf8 (filename));
-	  fclose (ifp);
-	  return (-1);
-	}
+          fclose (ifp);
+          return (-1);
+        }
     }
   else if (sunhdr.l_ras_maplength > 0)
     {
       g_message (_("Type of colormap not supported"));
       fseek (ifp, (sizeof (L_SUNFILEHEADER)/sizeof (L_CARD32))
-	     *4 + sunhdr.l_ras_maplength, SEEK_SET);
+             *4 + sunhdr.l_ras_maplength, SEEK_SET);
     }
 
   if (sunhdr.l_ras_width <= 0)
@@ -585,7 +585,7 @@
 
 static L_CARD32
 read_card32 (FILE *ifp,
-	     gint *err)
+             gint *err)
 {
   L_CARD32 c;
 
@@ -611,7 +611,7 @@
 
 static void
 write_card32 (FILE     *ofp,
-	      L_CARD32  c)
+              L_CARD32  c)
 {
   putc ((int)((c >> 24) & 0xff), ofp);
   putc ((int)((c >> 16) & 0xff), ofp);
@@ -623,9 +623,9 @@
 /* Convert n bytes of 0/1 to a line of bits */
 static void
 byte2bit (guchar   *byteline,
-	  gint      width,
-	  guchar   *bitline,
-	  gboolean  invert)
+          gint      width,
+          guchar   *bitline,
+          gboolean  invert)
 {
   register guchar bitval;
   guchar rest[8];
@@ -673,20 +673,20 @@
 /* Read uncompressed elements from RLE-stream */
 static gint
 rle_fread (gchar *ptr,
-	   gint   sz,
-	   gint   nelem,
-	   FILE  *ifp)
+           gint   sz,
+           gint   nelem,
+           FILE  *ifp)
 {
   int elem_read, cnt, val, err = 0;
 
   for (elem_read = 0; elem_read < nelem; elem_read++)
     {
       for (cnt = 0; cnt < sz; cnt++)
-	{
-	  val = rle_getc (ifp);
-	  if (val < 0) { err = 1; break; }
-	  *(ptr++) = (char)val;
-	}
+        {
+          val = rle_getc (ifp);
+          if (val < 0) { err = 1; break; }
+          *(ptr++) = (char)val;
+        }
       if (err) break;
     }
   return (elem_read);
@@ -731,9 +731,9 @@
 /* Write uncompressed elements to RLE-stream */
 static gint
 rle_fwrite (gchar *ptr,
-	    gint   sz,
-	    gint   nelem,
-	    FILE  *ofp)
+            gint   sz,
+            gint   nelem,
+            FILE  *ofp)
 {
   int elem_write, cnt, val, err = 0;
   guchar *pixels = (unsigned char *)ptr;
@@ -741,10 +741,10 @@
   for (elem_write = 0; elem_write < nelem; elem_write++)
     {
       for (cnt = 0; cnt < sz; cnt++)
-	{
-	  val = rle_fputc (*(pixels++), ofp);
-	  if (val < 0) { err = 1; break; }
-	}
+        {
+          val = rle_fputc (*(pixels++), ofp);
+          if (val < 0) { err = 1; break; }
+        }
       if (err) break;
     }
   return (elem_write);
@@ -754,7 +754,7 @@
 /* Write uncompressed character to RLE-stream */
 static gint
 rle_fputc (gint  val,
-	   FILE *ofp)
+           FILE *ofp)
 {
   int retval;
 
@@ -770,11 +770,11 @@
     {
       (rlebuf.n)++;
       if (rlebuf.n == 257) /* Can not be encoded in a single run ? */
-	{
-	  retval = rle_putrun (256, rlebuf.val, ofp);
-	  if (retval < 0) return (retval);
-	  rlebuf.n -= 256;
-	}
+        {
+          retval = rle_putrun (256, rlebuf.val, ofp);
+          if (retval < 0) return (retval);
+          rlebuf.n -= 256;
+        }
       return (val);
     }
 
@@ -792,8 +792,8 @@
 /* Write out a run with 0 < n < 257 */
 static gint
 rle_putrun (gint  n,
-	    gint  val,
-	    FILE *ofp)
+            gint  val,
+            FILE *ofp)
 {
   int retval, flag = 0x80;
 
@@ -812,9 +812,9 @@
   else  /* Write a single run */
     {
       if (val == flag)
-	retval = putc (flag, ofp), putc (0x00, ofp);
+        retval = putc (flag, ofp), putc (0x00, ofp);
       else
-	retval = putc (val, ofp);
+        retval = putc (val, ofp);
     }
 
   return ((retval < 0) ? retval : val);
@@ -912,8 +912,8 @@
 
 static void
 set_color_table (gint32           image_ID,
-		 L_SUNFILEHEADER *sunhdr,
-		 const guchar    *suncolmap)
+                 L_SUNFILEHEADER *sunhdr,
+                 const guchar    *suncolmap)
 {
   guchar ColorMap[256 * 3];
   gint   ncols, j;
@@ -933,7 +933,7 @@
   printf ("Set GIMP colortable:\n");
   for (j = 0; j < ncols; j++)
     printf ("%3d: 0x%02x 0x%02x 0x%02x\n", j,
-	    ColorMap[j*3], ColorMap[j*3+1], ColorMap[j*3+2]);
+            ColorMap[j*3], ColorMap[j*3+1], ColorMap[j*3+2]);
 #endif
 
   gimp_image_set_colormap (image_ID, ColorMap, ncols);
@@ -978,7 +978,7 @@
 
   *drawable = gimp_drawable_get (*layer_ID);
   gimp_pixel_rgn_init (pixel_rgn, *drawable, 0, 0, (*drawable)->width,
-		       (*drawable)->height, TRUE, FALSE);
+                       (*drawable)->height, TRUE, FALSE);
 
   return (image_ID);
 }
@@ -1007,7 +1007,7 @@
   height = sunhdr->l_ras_height;
 
   image_ID = create_new_image (filename, width, height, GIMP_INDEXED,
-			       &layer_ID, &drawable, &pixel_rgn);
+                               &layer_ID, &drawable, &pixel_rgn);
 
   tile_height = gimp_tile_height ();
   data = g_malloc (tile_height * width);
@@ -1041,39 +1041,39 @@
     {
       j = width;
       while (j >= 8)
-	{
-	  pix8 = rle ? rle_getc (ifp) : getc (ifp);
-	  if (pix8 < 0) { err = 1; pix8 = 0; }
-
-	  memcpy (dest, bit2byte + pix8*8, 8);
-	  dest += 8;
-	  j -= 8;
-	}
+        {
+          pix8 = rle ? rle_getc (ifp) : getc (ifp);
+          if (pix8 < 0) { err = 1; pix8 = 0; }
+
+          memcpy (dest, bit2byte + pix8*8, 8);
+          dest += 8;
+          j -= 8;
+        }
 
       if (j > 0)
-	{
-	  pix8 = rle ? rle_getc (ifp) : getc (ifp);
-	  if (pix8 < 0) { err = 1; pix8 = 0; }
-
-	  memcpy (dest, bit2byte + pix8*8, j);
-	  dest += j;
-	}
+        {
+          pix8 = rle ? rle_getc (ifp) : getc (ifp);
+          if (pix8 < 0) { err = 1; pix8 = 0; }
+
+          memcpy (dest, bit2byte + pix8*8, j);
+          dest += j;
+        }
 
       if (linepad)
-	err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
+        err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
 
       scan_lines++;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((double)(i+1) / (double)height);
+        gimp_progress_update ((double)(i+1) / (double)height);
 
       if ((scan_lines == tile_height) || ((i+1) == height))
-	{
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
-				   width, scan_lines);
-	  scan_lines = 0;
-	  dest = data;
-	}
+        {
+          gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
+                                   width, scan_lines);
+          scan_lines = 0;
+          dest = data;
+        }
     }
 
   g_free (data);
@@ -1115,20 +1115,20 @@
   if ((ncols > 0) && (suncolmap != NULL))
     {
       for (j = 0; j < ncols; j++)
-	{
-	  if (   (suncolmap[j] != j)
-		 || (suncolmap[j+ncols] != j)
-		 || (suncolmap[j+2*ncols] != j))
-	    {
-	      greyscale = 0;
-	      break;
-	    }
-	}
+        {
+          if (   (suncolmap[j] != j)
+                 || (suncolmap[j+ncols] != j)
+                 || (suncolmap[j+2*ncols] != j))
+            {
+              greyscale = 0;
+              break;
+            }
+        }
     }
 
   image_ID = create_new_image (filename, width, height,
-			       greyscale ? GIMP_GRAY : GIMP_INDEXED,
-			       &layer_ID, &drawable, &pixel_rgn);
+                               greyscale ? GIMP_GRAY : GIMP_INDEXED,
+                               &layer_ID, &drawable, &pixel_rgn);
 
   tile_height = gimp_tile_height ();
   data = g_malloc (tile_height * width);
@@ -1150,21 +1150,21 @@
                : fread ((char *)dest, 1, width, ifp)) != width);
 
       if (linepad)
-	err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
+        err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
 
       dest += width;
       scan_lines++;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((double)(i+1) / (double)height);
+        gimp_progress_update ((double)(i+1) / (double)height);
 
       if ((scan_lines == tile_height) || ((i+1) == height))
-	{
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
-				   width, scan_lines);
-	  scan_lines = 0;
-	  dest = data;
-	}
+        {
+          gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
+                                   width, scan_lines);
+          scan_lines = 0;
+          dest = data;
+        }
     }
 
   g_free (data);
@@ -1198,7 +1198,7 @@
   height = sunhdr->l_ras_height;
 
   image_ID = create_new_image (filename, width, height, GIMP_RGB,
-			       &layer_ID, &drawable, &pixel_rgn);
+                               &layer_ID, &drawable, &pixel_rgn);
 
   tile_height = gimp_tile_height ();
   data = g_malloc (tile_height * width * 3);
@@ -1217,35 +1217,35 @@
                : fread ((char *)dest, 3, width, ifp)) != width);
 
       if (linepad)
-	err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
+        err |= ((rle ? rle_getc (ifp) : getc (ifp)) < 0);
 
       if (sunhdr->l_ras_type == 3) /* RGB-format ? That is what GIMP wants */
-	{
-	  dest += width*3;
-	}
+        {
+          dest += width*3;
+        }
       else                         /* We have BGR format. Correct it */
-	{
-	  for (j = 0; j < width; j++)
-	    {
-	      blue = *dest;
-	      *dest = *(dest+2);
-	      *(dest+2) = blue;
-	      dest += 3;
-	    }
-	}
+        {
+          for (j = 0; j < width; j++)
+            {
+              blue = *dest;
+              *dest = *(dest+2);
+              *(dest+2) = blue;
+              dest += 3;
+            }
+        }
 
       scan_lines++;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((double)(i+1) / (double)height);
+        gimp_progress_update ((double)(i+1) / (double)height);
 
       if ((scan_lines == tile_height) || ((i+1) == height))
-	{
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
-				   width, scan_lines);
-	  scan_lines = 0;
-	  dest = data;
-	}
+        {
+          gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
+                                   width, scan_lines);
+          scan_lines = 0;
+          dest = data;
+        }
     }
 
   g_free (data);
@@ -1283,7 +1283,7 @@
   cerr = 0;
 
   image_ID = create_new_image (filename, width, height, GIMP_RGB,
-			       &layer_ID, &drawable, &pixel_rgn);
+                               &layer_ID, &drawable, &pixel_rgn);
 
   tile_height = gimp_tile_height ();
   data = g_malloc (tile_height * width * 3);
@@ -1296,51 +1296,51 @@
   for (i = 0; i < height; i++)
     {
       if (rle)
-	{
-	  for (j = 0; j < width; j++)
-	    {
-	      rle_getc (ifp);   /* Skip unused byte */
-	      *(dest++) = rle_getc (ifp);
-	      *(dest++) = rle_getc (ifp);
-	      *(dest++) = (cerr = (rle_getc (ifp)));
-	    }
-	}
+        {
+          for (j = 0; j < width; j++)
+            {
+              rle_getc (ifp);   /* Skip unused byte */
+              *(dest++) = rle_getc (ifp);
+              *(dest++) = rle_getc (ifp);
+              *(dest++) = (cerr = (rle_getc (ifp)));
+            }
+        }
       else
-	{
-	  for (j = 0; j < width; j++)
-	    {
-	      getc (ifp);   /* Skip unused byte */
-	      *(dest++) = getc (ifp);
-	      *(dest++) = getc (ifp);
-	      *(dest++) = (cerr = (getc (ifp)));
-	    }
-	}
+        {
+          for (j = 0; j < width; j++)
+            {
+              getc (ifp);   /* Skip unused byte */
+              *(dest++) = getc (ifp);
+              *(dest++) = getc (ifp);
+              *(dest++) = (cerr = (getc (ifp)));
+            }
+        }
       err |= (cerr < 0);
 
       if (sunhdr->l_ras_type != 3) /* BGR format ? Correct it */
-	{
-	  for (j = 0; j < width; j++)
-	    {
-	      dest -= 3;
-	      blue = *dest;
-	      *dest = *(dest+2);
-	      *(dest+2) = blue;
-	    }
-	  dest += width*3;
-	}
+        {
+          for (j = 0; j < width; j++)
+            {
+              dest -= 3;
+              blue = *dest;
+              *dest = *(dest+2);
+              *(dest+2) = blue;
+            }
+          dest += width*3;
+        }
 
       scan_lines++;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((double)(i+1) / (double)height);
+        gimp_progress_update ((double)(i+1) / (double)height);
 
       if ((scan_lines == tile_height) || ((i+1) == height))
-	{
-	  gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
-				   width, scan_lines);
-	  scan_lines = 0;
-	  dest = data;
-	}
+        {
+          gimp_pixel_rgn_set_rect (&pixel_rgn, data, 0, i-scan_lines+1,
+                                   width, scan_lines);
+          scan_lines = 0;
+          dest = data;
+        }
     }
 
   g_free (data);
@@ -1393,22 +1393,22 @@
       ncols = 256;
 
       for (j = 0; j < ncols; j++)
-	{
-	  suncolmap[j] = j;
-	  suncolmap[j+ncols] = j;
-	  suncolmap[j+ncols*2] = j;
-	}
+        {
+          suncolmap[j] = j;
+          suncolmap[j+ncols] = j;
+          suncolmap[j+ncols*2] = j;
+        }
     }
   else
     {
       cmap = gimp_image_get_colormap (image_ID, &ncols);
 
       for (j = 0; j < ncols; j++)
-	{
-	  suncolmap[j] = *(cmap++);
-	  suncolmap[j+ncols] = *(cmap++);
-	  suncolmap[j+ncols*2] = *(cmap++);
-	}
+        {
+          suncolmap[j] = *(cmap++);
+          suncolmap[j+ncols] = *(cmap++);
+          suncolmap[j+ncols*2] = *(cmap++);
+        }
     }
 
   bw = (ncols == 2);   /* Maybe this is a two-colour image */
@@ -1464,29 +1464,29 @@
   if (bw)  /* Two colour image */
     {
       for (i = 0; i < height; i++)
-	{
-	  if ((i % tile_height) == 0) GET_INDEX_TILE (data); /* Get more data */
-	  byte2bit (src, width, bwline, is_bw);
-	  (*write_fun) (bwline, bpl, 1, ofp);
-	  if (linepad) (*write_fun) ((char *)&tmp, linepad, 1, ofp);
-	  src += width;
-
-	  if ((i % 20) == 0)
-	    gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          if ((i % tile_height) == 0) GET_INDEX_TILE (data); /* Get more data */
+          byte2bit (src, width, bwline, is_bw);
+          (*write_fun) (bwline, bpl, 1, ofp);
+          if (linepad) (*write_fun) ((char *)&tmp, linepad, 1, ofp);
+          src += width;
+
+          if ((i % 20) == 0)
+            gimp_progress_update ((double) i / (double) height);
+        }
     }
   else   /* Colour or grey-image */
     {
       for (i = 0; i < height; i++)
-	{
-	  if ((i % tile_height) == 0) GET_INDEX_TILE (data); /* Get more data */
-	  (*write_fun) ((char *)src, width, 1, ofp);
-	  if (linepad) (*write_fun) ((char *)&tmp, linepad, 1, ofp);
-	  src += width;
-
-	  if ((i % 20) == 0)
-	    gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          if ((i % tile_height) == 0) GET_INDEX_TILE (data); /* Get more data */
+          (*write_fun) ((char *)src, width, 1, ofp);
+          if (linepad) (*write_fun) ((char *)&tmp, linepad, 1, ofp);
+          src += width;
+
+          if ((i % 20) == 0)
+            gimp_progress_update ((double) i / (double) height);
+        }
     }
 
   if (rle)
@@ -1562,44 +1562,44 @@
   if (!rle)
     {
       for (i = 0; i < height; i++)
-	{
-	  if ((i % tile_height) == 0) GET_RGB_TILE (data); /* Get more data */
-	  for (j = 0; j < width; j++)
-	    {
-	      if (bpp == 4) putc (0, ofp);   /* Dummy */
-	      putc (*(src+2), ofp);          /* Blue */
-	      putc (*(src+1), ofp);          /* Green */
-	      putc (*src, ofp);              /* Red */
-	      src += 3;
-	    }
-	  for (j = 0; j < linepad; j++)
-	    putc (0, ofp);
-
-	  if ((i % 20) == 0)
-	    gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          if ((i % tile_height) == 0) GET_RGB_TILE (data); /* Get more data */
+          for (j = 0; j < width; j++)
+            {
+              if (bpp == 4) putc (0, ofp);   /* Dummy */
+              putc (*(src+2), ofp);          /* Blue */
+              putc (*(src+1), ofp);          /* Green */
+              putc (*src, ofp);              /* Red */
+              src += 3;
+            }
+          for (j = 0; j < linepad; j++)
+            putc (0, ofp);
+
+          if ((i % 20) == 0)
+            gimp_progress_update ((double) i / (double) height);
+        }
     }
   else  /* Write runlength encoded */
     {
       rle_startwrite (ofp);
 
       for (i = 0; i < height; i++)
-	{
-	  if ((i % tile_height) == 0) GET_RGB_TILE (data); /* Get more data */
-	  for (j = 0; j < width; j++)
-	    {
-	      if (bpp == 4) rle_putc (0, ofp);   /* Dummy */
-	      rle_putc (*(src+2), ofp);          /* Blue */
-	      rle_putc (*(src+1), ofp);          /* Green */
-	      rle_putc (*src, ofp);              /* Red */
-	      src += 3;
-	    }
-	  for (j = 0; j < linepad; j++)
-	    rle_putc (0, ofp);
-
-	  if ((i % 20) == 0)
-	    gimp_progress_update ((double) i / (double) height);
-	}
+        {
+          if ((i % tile_height) == 0) GET_RGB_TILE (data); /* Get more data */
+          for (j = 0; j < width; j++)
+            {
+              if (bpp == 4) rle_putc (0, ofp);   /* Dummy */
+              rle_putc (*(src+2), ofp);          /* Blue */
+              rle_putc (*(src+1), ofp);          /* Green */
+              rle_putc (*src, ofp);              /* Red */
+              src += 3;
+            }
+          for (j = 0; j < linepad; j++)
+            rle_putc (0, ofp);
+
+          if ((i % 20) == 0)
+            gimp_progress_update ((double) i / (double) height);
+        }
 
       rle_endwrite (ofp);
     }
@@ -1645,12 +1645,12 @@
   /*  file save type  */
   frame = gimp_int_radio_group_new (TRUE, _("Data Formatting"),
                                     G_CALLBACK (gimp_radio_button_update),
-				    &psvals.rle, psvals.rle,
+                                    &psvals.rle, psvals.rle,
 
-				    _("RunLength Encoded"), TRUE,  NULL,
-				    _("Standard"),          FALSE, NULL,
+                                    _("RunLength Encoded"), TRUE,  NULL,
+                                    _("Standard"),          FALSE, NULL,
 
-				    NULL);
+                                    NULL);
 
   gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
@@ -1668,9 +1668,9 @@
 
 static int
 my_fwrite (void *ptr,
-	   int   size,
-	   int   nmemb,
-	   FILE *stream)
+           int   size,
+           int   nmemb,
+           FILE *stream)
 {
   return fwrite (ptr, size, nmemb, stream);
 }

Modified: trunk/plug-ins/common/file-wmf.c
==============================================================================
--- trunk/plug-ins/common/file-wmf.c	(original)
+++ trunk/plug-ins/common/file-wmf.c	Mon Oct 20 06:04:39 2008
@@ -37,7 +37,7 @@
 #define LOAD_THUMB_PROC         "file-wmf-load-thumb"
 #define PLUG_IN_BINARY          "file-wmf"
 
-#define WMF_DEFAULT_RESOLUTION	90.0
+#define WMF_DEFAULT_RESOLUTION  90.0
 #define WMF_DEFAULT_SIZE        500
 #define WMF_PREVIEW_SIZE        128
 
@@ -144,8 +144,8 @@
                           "Dom Lachowicz <cinamod hotmail com>",
                           "Dom Lachowicz <cinamod hotmail com>",
                           "(c) 2003 - Version 0.3.0",
-			  NULL,
-			  NULL,
+                          NULL,
+                          NULL,
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (thumb_args),
                           G_N_ELEMENTS (thumb_return_vals),
@@ -619,13 +619,13 @@
   gimp_size_entry_set_resolution (size, 1, load_vals.resolution, FALSE);
 
   g_signal_connect (size, "value-changed",
-		    G_CALLBACK (load_dialog_size_callback),
+                    G_CALLBACK (load_dialog_size_callback),
                     NULL);
 
   /*  Scale ratio  */
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 2, 4,
-		    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
+                    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
   gtk_widget_show (hbox);
 
   table2 = gtk_table_new (2, 2, FALSE);
@@ -645,14 +645,14 @@
   gtk_widget_show (spinbutton);
 
   g_signal_connect (xadj, "value-changed",
-		    G_CALLBACK (load_dialog_ratio_callback),
-		    NULL);
+                    G_CALLBACK (load_dialog_ratio_callback),
+                    NULL);
 
   label = gtk_label_new_with_mnemonic (_("_X ratio:"));
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
-		    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
+                    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
   spinbutton =
@@ -667,14 +667,14 @@
   gtk_widget_show (spinbutton);
 
   g_signal_connect (yadj, "value-changed",
-		    G_CALLBACK (load_dialog_ratio_callback),
-		    NULL);
+                    G_CALLBACK (load_dialog_ratio_callback),
+                    NULL);
 
   label = gtk_label_new_with_mnemonic (_("_Y ratio:"));
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
-		    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
+                    GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
   /*  the constrain ratio chainbutton  */
@@ -974,10 +974,10 @@
             GError      **error)
 {
   gint32        image;
-  gint32	layer;
+  gint32        layer;
   GimpDrawable *drawable;
   guchar       *pixels;
-  GimpPixelRgn	pixel_rgn;
+  GimpPixelRgn  pixel_rgn;
   guint         width, height;
   guint         rowstride;
   guint         count = 0;

Modified: trunk/plug-ins/common/file-xbm.c
==============================================================================
--- trunk/plug-ins/common/file-xbm.c	(original)
+++ trunk/plug-ins/common/file-xbm.c	Mon Oct 20 06:04:39 2008
@@ -80,12 +80,12 @@
 
 static XBMSaveVals xsvals =
 {
-  "###",		/* comment */
-  DEFAULT_X10_FORMAT,	/* x10_format */
+  "###",                /* comment */
+  DEFAULT_X10_FORMAT,   /* x10_format */
   FALSE,
-  0,			/* x_hot */
-  0,			/* y_hot */
-  DEFAULT_PREFIX,	/* prefix */
+  0,                    /* x_hot */
+  0,                    /* y_hot */
+  DEFAULT_PREFIX,       /* prefix */
   FALSE,                /* write_mask */
   "-mask"
 };
@@ -174,7 +174,7 @@
                           "Gordon Matzigkeit",
                           "1998",
                           N_("X BitMap image"),
-			  NULL,
+                          NULL,
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (load_args),
                           G_N_ELEMENTS (load_return_vals),
@@ -182,17 +182,17 @@
 
   gimp_register_file_handler_mime (LOAD_PROC, "image/x-xbitmap");
   gimp_register_load_handler (LOAD_PROC,
-			      "xbm,icon,bitmap",
-			      "");
+                              "xbm,icon,bitmap",
+                              "");
 
   gimp_install_procedure (SAVE_PROC,
                           "Save a file in X10 or X11 bitmap (XBM) file format",
                           "Save a file in X10 or X11 bitmap (XBM) file format.  XBM is a lossless format for flat black-and-white (two color indexed) images.",
-			  "Gordon Matzigkeit",
+                          "Gordon Matzigkeit",
                           "Gordon Matzigkeit",
                           "1998",
                           N_("X BitMap image"),
-			  "INDEXED",
+                          "INDEXED",
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (save_args), 0,
                           save_args, NULL);
@@ -282,171 +282,171 @@
       drawable_ID = param[2].data.d_int32;
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_ui_init (PLUG_IN_BINARY, FALSE);
-	  export = gimp_export_image (&image_ID, &drawable_ID, "XBM",
-				      GIMP_EXPORT_CAN_HANDLE_BITMAP |
-				      GIMP_EXPORT_CAN_HANDLE_ALPHA);
-
-	  if (export == GIMP_EXPORT_CANCEL)
-	    {
-	      values[0].data.d_status = GIMP_PDB_CANCEL;
-	      return;
-            }
-	  break;
-
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_ui_init (PLUG_IN_BINARY, FALSE);
+          export = gimp_export_image (&image_ID, &drawable_ID, "XBM",
+                                      GIMP_EXPORT_CAN_HANDLE_BITMAP |
+                                      GIMP_EXPORT_CAN_HANDLE_ALPHA);
+
+          if (export == GIMP_EXPORT_CANCEL)
+            {
+              values[0].data.d_status = GIMP_PDB_CANCEL;
+              return;
+            }
+          break;
+
+        default:
+          break;
+        }
 
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_WITH_LAST_VALS:
-	  /*  Possibly retrieve data  */
-	  gimp_get_data (SAVE_PROC, &xsvals);
-
-	  /* Always override the prefix with the filename. */
-	  mask_filename = g_strdup (init_prefix (param[3].data.d_string));
-	  break;
-
-	case GIMP_RUN_NONINTERACTIVE:
-	  /*  Make sure all the required arguments are there!  */
-	  if (nparams < 5)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  else
-	    {
-	      gint i = 5;
-
-	      if (nparams > i)
-		{
-		  memset (xsvals.comment, 0, sizeof (xsvals.comment));
-		  strncpy (xsvals.comment, param[i].data.d_string,
-			   MAX_COMMENT);
-		}
-
-	      i ++;
-	      if (nparams > i)
-		xsvals.x10_format = (param[i].data.d_int32) ? TRUE : FALSE;
-
-	      i += 2;
-	      if (nparams > i)
-		{
-		  /* They've asked for a hotspot. */
-		  xsvals.use_hot = TRUE;
-		  xsvals.x_hot = param[i - 1].data.d_int32;
-		  xsvals.y_hot = param[i].data.d_int32;
-		}
-
-	      mask_filename = g_strdup (init_prefix (param[3].data.d_string));
-
-	      i ++;
-	      if (nparams > i)
-		{
-		  memset (xsvals.prefix, 0, sizeof (xsvals.prefix));
-		  strncpy (xsvals.prefix, param[i].data.d_string,
-			   MAX_PREFIX);
-		}
-
-	      i += 2;
-	      if (nparams > i)
-		{
-		  xsvals.write_mask = param[i - 1].data.d_int32;
-		  memset (xsvals.mask_ext, 0, sizeof (xsvals.mask_ext));
-		  strncpy (xsvals.mask_ext, param[i].data.d_string,
-			   MAX_MASK_EXT);
-		}
-
-	      i ++;
-	      /* Too many arguments. */
-	      if (nparams > i)
-		status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  break;
-
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_WITH_LAST_VALS:
+          /*  Possibly retrieve data  */
+          gimp_get_data (SAVE_PROC, &xsvals);
+
+          /* Always override the prefix with the filename. */
+          mask_filename = g_strdup (init_prefix (param[3].data.d_string));
+          break;
+
+        case GIMP_RUN_NONINTERACTIVE:
+          /*  Make sure all the required arguments are there!  */
+          if (nparams < 5)
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
+          else
+            {
+              gint i = 5;
+
+              if (nparams > i)
+                {
+                  memset (xsvals.comment, 0, sizeof (xsvals.comment));
+                  strncpy (xsvals.comment, param[i].data.d_string,
+                           MAX_COMMENT);
+                }
+
+              i ++;
+              if (nparams > i)
+                xsvals.x10_format = (param[i].data.d_int32) ? TRUE : FALSE;
+
+              i += 2;
+              if (nparams > i)
+                {
+                  /* They've asked for a hotspot. */
+                  xsvals.use_hot = TRUE;
+                  xsvals.x_hot = param[i - 1].data.d_int32;
+                  xsvals.y_hot = param[i].data.d_int32;
+                }
+
+              mask_filename = g_strdup (init_prefix (param[3].data.d_string));
+
+              i ++;
+              if (nparams > i)
+                {
+                  memset (xsvals.prefix, 0, sizeof (xsvals.prefix));
+                  strncpy (xsvals.prefix, param[i].data.d_string,
+                           MAX_PREFIX);
+                }
+
+              i += 2;
+              if (nparams > i)
+                {
+                  xsvals.write_mask = param[i - 1].data.d_int32;
+                  memset (xsvals.mask_ext, 0, sizeof (xsvals.mask_ext));
+                  strncpy (xsvals.mask_ext, param[i].data.d_string,
+                           MAX_MASK_EXT);
+                }
+
+              i ++;
+              /* Too many arguments. */
+              if (nparams > i)
+                status = GIMP_PDB_CALLING_ERROR;
+            }
+          break;
+
+        default:
+          break;
+        }
 
       if (run_mode == GIMP_RUN_INTERACTIVE)
-	{
-	  /* Get the parasites */
+        {
+          /* Get the parasites */
           parasite = gimp_image_parasite_find (image_ID, "gimp-comment");
 
           if (parasite)
-    	    {
-	      gint size = gimp_parasite_data_size (parasite);
+            {
+              gint size = gimp_parasite_data_size (parasite);
 
-	      strncpy (xsvals.comment,
-		       gimp_parasite_data (parasite), MIN (size, MAX_COMMENT));
-	      xsvals.comment[MIN (size, MAX_COMMENT) + 1] = 0;
+              strncpy (xsvals.comment,
+                       gimp_parasite_data (parasite), MIN (size, MAX_COMMENT));
+              xsvals.comment[MIN (size, MAX_COMMENT) + 1] = 0;
 
-	      gimp_parasite_free (parasite);
-	    }
+              gimp_parasite_free (parasite);
+            }
 
           parasite = gimp_image_parasite_find (image_ID, "hot-spot");
 
           if (parasite)
-	    {
-	      gint x, y;
+            {
+              gint x, y;
 
-	      if (sscanf (gimp_parasite_data (parasite), "%i %i", &x, &y) == 2)
-	       {
-	         xsvals.use_hot = TRUE;
-	         xsvals.x_hot = x;
-	         xsvals.y_hot = y;
-	       }
-	     gimp_parasite_free (parasite);
-	   }
-
-	  /*  Acquire information with a dialog  */
-	  if (! save_dialog (drawable_ID))
-	    status = GIMP_PDB_CANCEL;
-	}
+              if (sscanf (gimp_parasite_data (parasite), "%i %i", &x, &y) == 2)
+               {
+                 xsvals.use_hot = TRUE;
+                 xsvals.x_hot = x;
+                 xsvals.y_hot = y;
+               }
+             gimp_parasite_free (parasite);
+           }
+
+          /*  Acquire information with a dialog  */
+          if (! save_dialog (drawable_ID))
+            status = GIMP_PDB_CANCEL;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  gchar *temp;
-	  gchar *mask_prefix;
-	  gchar *dirname;
-
-	  temp = mask_filename;
-
-	  if ((dirname = g_path_get_dirname (param[3].data.d_string)) != NULL)
-	    {
-	      mask_filename = g_strdup_printf ("%s/%s%s.xbm",
-					       dirname, temp, xsvals.mask_ext);
-	      g_free (dirname);
-	    }
-	  else
-	    {
-	      mask_filename = g_strdup_printf ("%s%s.xbm",
-					       temp, xsvals.mask_ext);
-	    }
+        {
+          gchar *temp;
+          gchar *mask_prefix;
+          gchar *dirname;
+
+          temp = mask_filename;
+
+          if ((dirname = g_path_get_dirname (param[3].data.d_string)) != NULL)
+            {
+              mask_filename = g_strdup_printf ("%s/%s%s.xbm",
+                                               dirname, temp, xsvals.mask_ext);
+              g_free (dirname);
+            }
+          else
+            {
+              mask_filename = g_strdup_printf ("%s%s.xbm",
+                                               temp, xsvals.mask_ext);
+            }
 
-	  g_free (temp);
+          g_free (temp);
 
-	  /* Change any non-alphanumeric prefix characters to underscores. */
-	  for (temp = xsvals.prefix; *temp; temp++)
+          /* Change any non-alphanumeric prefix characters to underscores. */
+          for (temp = xsvals.prefix; *temp; temp++)
             if (! g_ascii_isalnum (*temp))
               *temp = '_';
 
-	  mask_prefix = g_strdup_printf ("%s%s",
+          mask_prefix = g_strdup_printf ("%s%s",
                                          xsvals.prefix, xsvals.mask_ext);
 
-	  for (temp = mask_prefix; *temp; temp++)
+          for (temp = mask_prefix; *temp; temp++)
             if (! g_ascii_isalnum (*temp))
               *temp = '_';
 
-	  if (save_image (param[3].data.d_string,
-			  xsvals.prefix,
-			  xsvals.comment,
-			  FALSE,
-			  image_ID, drawable_ID,
+          if (save_image (param[3].data.d_string,
+                          xsvals.prefix,
+                          xsvals.comment,
+                          FALSE,
+                          image_ID, drawable_ID,
                           &error)
               && (! xsvals.write_mask || save_image (mask_filename,
                                                      mask_prefix,
@@ -454,21 +454,21 @@
                                                      TRUE,
                                                      image_ID, drawable_ID,
                                                      &error)))
-	    {
-	      /*  Store xsvals data  */
-	      gimp_set_data (SAVE_PROC, &xsvals, sizeof (xsvals));
-	    }
-	  else
-	    {
-	      status = GIMP_PDB_EXECUTION_ERROR;
-	    }
-
-	  g_free (mask_prefix);
-	  g_free (mask_filename);
-	}
+            {
+              /*  Store xsvals data  */
+              gimp_set_data (SAVE_PROC, &xsvals, sizeof (xsvals));
+            }
+          else
+            {
+              status = GIMP_PDB_EXECUTION_ERROR;
+            }
+
+          g_free (mask_prefix);
+          g_free (mask_filename);
+        }
 
       if (export == GIMP_EXPORT_EXPORT)
-	gimp_image_delete (image_ID);
+        gimp_image_delete (image_ID);
     }
   else
     {
@@ -489,7 +489,7 @@
 /* Return the value of a digit. */
 static gint
 getval (gint c,
-	gint base)
+        gint base)
 {
   const gchar *digits = "0123456789abcdefABCDEF";
   gint         val;
@@ -518,58 +518,58 @@
     {
       c = fgetc (fp);
       if (comment)
-	{
-	  if (c == '*')
-	    {
-	      /* In a comment, with potential to leave. */
-	      comment = 1;
-	    }
-	  else if (comment == 1 && c == '/')
-	    {
-	      gchar *retval;
-
-	      /* Leaving a comment. */
-	      comment = 0;
-
-	      retval = g_strstrip (g_strdup (str->str));
-	      g_string_free (str, TRUE);
-	      return retval;
-	    }
-	  else
-	    {
-	      /* In a comment, with no potential to leave. */
-	      comment = 2;
-	      g_string_append_c (str, c);
-	    }
-	}
+        {
+          if (c == '*')
+            {
+              /* In a comment, with potential to leave. */
+              comment = 1;
+            }
+          else if (comment == 1 && c == '/')
+            {
+              gchar *retval;
+
+              /* Leaving a comment. */
+              comment = 0;
+
+              retval = g_strstrip (g_strdup (str->str));
+              g_string_free (str, TRUE);
+              return retval;
+            }
+          else
+            {
+              /* In a comment, with no potential to leave. */
+              comment = 2;
+              g_string_append_c (str, c);
+            }
+        }
       else
-	{
-	  /* Not in a comment. */
-	  if (c == '/')
-	    {
-	      /* Potential to enter a comment. */
-	      c = fgetc (fp);
-	      if (c == '*')
-		{
-		  /* Entered a comment, with no potential to leave. */
-		  comment = 2;
-		  str = g_string_new (NULL);
-		}
-	      else
-		{
-		  /* put everything back and return */
-		  ungetc (c, fp);
-		  c = '/';
-		  ungetc (c, fp);
-		  return NULL;
-		}
-	    }
-	  else if (c != EOF && g_ascii_isspace (c))
-	    {
-	      /* Skip leading whitespace */
-	      continue;
-	    }
-	}
+        {
+          /* Not in a comment. */
+          if (c == '/')
+            {
+              /* Potential to enter a comment. */
+              c = fgetc (fp);
+              if (c == '*')
+                {
+                  /* Entered a comment, with no potential to leave. */
+                  comment = 2;
+                  str = g_string_new (NULL);
+                }
+              else
+                {
+                  /* put everything back and return */
+                  ungetc (c, fp);
+                  c = '/';
+                  ungetc (c, fp);
+                  return NULL;
+                }
+            }
+          else if (c != EOF && g_ascii_isspace (c))
+            {
+              /* Skip leading whitespace */
+              continue;
+            }
+        }
     }
   while (comment && c != EOF);
 
@@ -592,35 +592,35 @@
     {
       c = fgetc (fp);
       if (comment)
-	{
-	  if (c == '*')
-	    /* In a comment, with potential to leave. */
-	    comment = 1;
-	  else if (comment == 1 && c == '/')
-	    /* Leaving a comment. */
-	    comment = 0;
-	  else
-	    /* In a comment, with no potential to leave. */
-	    comment = 2;
-	}
+        {
+          if (c == '*')
+            /* In a comment, with potential to leave. */
+            comment = 1;
+          else if (comment == 1 && c == '/')
+            /* Leaving a comment. */
+            comment = 0;
+          else
+            /* In a comment, with no potential to leave. */
+            comment = 2;
+        }
       else
-	{
-	  /* Not in a comment. */
-	  if (c == '/')
-	    {
-	      /* Potential to enter a comment. */
-	      c = fgetc (fp);
-	      if (c == '*')
-		/* Entered a comment, with no potential to leave. */
-		comment = 2;
-	      else
-		{
-		  /* Just a slash in the open. */
-		  ungetc (c, fp);
-		  c = '/';
-		}
-	    }
-	}
+        {
+          /* Not in a comment. */
+          if (c == '/')
+            {
+              /* Potential to enter a comment. */
+              c = fgetc (fp);
+              if (c == '*')
+                /* Entered a comment, with no potential to leave. */
+                comment = 2;
+              else
+                {
+                  /* Just a slash in the open. */
+                  ungetc (c, fp);
+                  c = '/';
+                }
+            }
+        }
     }
   while (comment && c != EOF);
   return c;
@@ -638,9 +638,9 @@
     {
       c = fgetc (fp);
       if (c == *s)
-	s ++;
+        s ++;
       else
-	break;
+        break;
     }
   while (c != EOF && *s);
 
@@ -671,17 +671,17 @@
     {
       c = fgetc (fp);
       if (c == 'x' || c == 'X')
-	{
-	  c = fgetc (fp);
-	  base = 16;
-	}
+        {
+          c = fgetc (fp);
+          base = 16;
+        }
       else if (g_ascii_isdigit (c))
-	base = 8;
+        base = 8;
       else
-	{
-	  ungetc (c, fp);
-	  return 0;
-	}
+        {
+          ungetc (c, fp);
+          return 0;
+        }
     }
   else
     base = 10;
@@ -691,10 +691,10 @@
     {
       digval = getval (c, base);
       if (digval == -1)
-	{
-	  ungetc (c, fp);
-	  break;
-	}
+        {
+          ungetc (c, fp);
+          break;
+        }
       val *= base;
       val += digval;
       c = fgetc (fp);
@@ -725,8 +725,8 @@
 
   const guchar cmap[] =
   {
-    0x00, 0x00, 0x00,		/* black */
-    0xff, 0xff, 0xff		/* white */
+    0x00, 0x00, 0x00,           /* black */
+    0xff, 0xff, 0xff            /* white */
   };
 
   fp = g_fopen (filename, "rb");
@@ -749,66 +749,66 @@
   do
     {
       if (g_ascii_isspace (c))
-	{
-	  if (match (fp, "char"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  intbits = 8;
-		  continue;
-		}
-	    }
-	  else if (match (fp, "short"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  intbits = 16;
-		  continue;
-		}
-	    }
-	}
+        {
+          if (match (fp, "char"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  intbits = 8;
+                  continue;
+                }
+            }
+          else if (match (fp, "short"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  intbits = 16;
+                  continue;
+                }
+            }
+        }
 
       if (c == '_')
-	{
-	  if (match (fp, "width"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  width = get_int (fp);
-		  continue;
-		}
-	    }
-	  else if (match (fp, "height"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  height = get_int (fp);
-		  continue;
-		}
-	    }
-	  else if (match (fp, "x_hot"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  x_hot = get_int (fp);
-		  continue;
-		}
-	    }
-	  else if (match (fp, "y_hot"))
-	    {
-	      c = fgetc (fp);
-	      if (g_ascii_isspace (c))
-		{
-		  y_hot = get_int (fp);
-		  continue;
-		}
-	    }
-	}
+        {
+          if (match (fp, "width"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  width = get_int (fp);
+                  continue;
+                }
+            }
+          else if (match (fp, "height"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  height = get_int (fp);
+                  continue;
+                }
+            }
+          else if (match (fp, "x_hot"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  x_hot = get_int (fp);
+                  continue;
+                }
+            }
+          else if (match (fp, "y_hot"))
+            {
+              c = fgetc (fp);
+              if (g_ascii_isspace (c))
+                {
+                  y_hot = get_int (fp);
+                  continue;
+                }
+            }
+        }
 
       c = cpp_fgetc (fp);
     }
@@ -864,8 +864,8 @@
       GimpParasite *parasite;
 
       parasite = gimp_parasite_new ("gimp-comment",
-				    GIMP_PARASITE_PERSISTENT,
-				    strlen (comment) + 1, (gpointer) comment);
+                                    GIMP_PARASITE_PERSISTENT,
+                                    strlen (comment) + 1, (gpointer) comment);
       gimp_image_parasite_attach (image_ID, parasite);
       gimp_parasite_free (parasite);
 
@@ -882,8 +882,8 @@
 
       str = g_strdup_printf ("%d %d", x_hot, y_hot);
       parasite = gimp_parasite_new ("hot-spot",
-				    GIMP_PARASITE_PERSISTENT,
-				    strlen (str) + 1, (gpointer) str);
+                                    GIMP_PARASITE_PERSISTENT,
+                                    strlen (str) + 1, (gpointer) str);
       g_free (str);
       gimp_image_parasite_attach (image_ID, parasite);
       gimp_parasite_free (parasite);
@@ -893,11 +893,11 @@
   gimp_image_set_colormap (image_ID, cmap, 2);
 
   layer_ID = gimp_layer_new (image_ID,
-			     _("Background"),
-			     width, height,
-			     GIMP_INDEXED_IMAGE,
-			     100,
-			     GIMP_NORMAL_MODE);
+                             _("Background"),
+                             width, height,
+                             GIMP_INDEXED_IMAGE,
+                             100,
+                             GIMP_NORMAL_MODE);
   gimp_image_add_layer (image_ID, layer_ID, 0);
 
   drawable = gimp_drawable_get (layer_ID);
@@ -915,31 +915,31 @@
 
 #ifdef VERBOSE
       if (verbose > 1)
-	printf ("XBM: reading %dx(%d+%d) pixel region\n", width, i,
-		tileheight);
+        printf ("XBM: reading %dx(%d+%d) pixel region\n", width, i,
+                tileheight);
 #endif
 
       /* Parse the data from the file */
       for (j = 0; j < tileheight; j ++)
-	{
-	  /* Read each row. */
-	  rowoffset = j * width;
-	  for (k = 0; k < width; k ++)
-	    {
-	      /* Expand each integer into INTBITS pixels. */
-	      if (k % intbits == 0)
-		{
-		  c = get_int (fp);
+        {
+          /* Read each row. */
+          rowoffset = j * width;
+          for (k = 0; k < width; k ++)
+            {
+              /* Expand each integer into INTBITS pixels. */
+              if (k % intbits == 0)
+                {
+                  c = get_int (fp);
 
-		  /* Flip all the bits so that 1's become black and
+                  /* Flip all the bits so that 1's become black and
                      0's become white. */
-		  c ^= 0xffff;
-		}
+                  c ^= 0xffff;
+                }
 
-	      data[rowoffset + k] = c & 1;
-	      c >>= 1;
-	    }
-	}
+              data[rowoffset + k] = c & 1;
+              c >>= 1;
+            }
+        }
 
       /* Put the data into the image. */
       gimp_progress_update ((double) (i + tileheight) / (double) height);
@@ -958,11 +958,11 @@
 
 static gboolean
 save_image (const gchar  *filename,
-	    const gchar  *prefix,
-	    const gchar  *comment,
-	    gboolean      save_mask,
-	    gint32        image_ID,
-	    gint32        drawable_ID,
+            const gchar  *prefix,
+            const gchar  *comment,
+            gboolean      save_mask,
+            gint32        image_ID,
+            gint32        drawable_ID,
             GError      **error)
 {
   GimpDrawable *drawable;
@@ -995,9 +995,9 @@
     {
       /* The image is not black-and-white. */
       g_message (_("The image which you are trying to save as "
-		   "an XBM contains more than two colors.\n\n"
-		   "Please convert it to a black and white "
-		   "(1-bit) indexed image and try again."));
+                   "an XBM contains more than two colors.\n\n"
+                   "Please convert it to a black and white "
+                   "(1-bit) indexed image and try again."));
       return FALSE;
     }
 
@@ -1006,7 +1006,7 @@
   if (! has_alpha && save_mask)
     {
       g_message (_("You cannot save a cursor mask for an image\n"
-		   "which has no alpha channel."));
+                   "which has no alpha channel."));
       return FALSE;
     }
 
@@ -1023,7 +1023,7 @@
       second = (cmap[3] * cmap[3]) + (cmap[4] * cmap[4]) + (cmap[5] * cmap[5]);
 
       if (second < first)
-	dark = 1;
+        dark = 1;
     }
 
   /* Now actually save the data. */
@@ -1075,14 +1075,14 @@
     }
 
   fprintf (fp, "static %s %s_bits[] = {\n  ",
-	   xsvals.x10_format ? "unsigned short" : "unsigned char", prefix);
+           xsvals.x10_format ? "unsigned short" : "unsigned char", prefix);
 
   /* Allocate a new set of pixels. */
   tileheight = gimp_tile_height ();
   data = (guchar *) g_malloc (width * tileheight * bpp);
 
   gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, width, height,
-		       FALSE, FALSE);
+                       FALSE, FALSE);
 
   /* Write out the integers. */
   need_comma = 0;
@@ -1095,69 +1095,69 @@
 
 #ifdef VERBOSE
       if (verbose > 1)
-	printf ("XBM: writing %dx(%d+%d) pixel region\n",
-		width, i, tileheight);
+        printf ("XBM: writing %dx(%d+%d) pixel region\n",
+                width, i, tileheight);
 #endif
 
       for (j = 0; j < tileheight; j ++)
-	{
-	  /* Write out a row at a time. */
-	  rowoffset = j * width * bpp;
-	  c = 0;
-	  thisbit = 0;
-
-	  for (k = 0; k < width * bpp; k += bpp)
-	    {
-	      if (k != 0 && thisbit == intbits)
-		{
-		  /* Output a completed integer. */
-		  if (need_comma)
-		    fputc (',', fp);
-		  need_comma = 1;
-
-		  /* Maybe start a new line. */
-		  if (nints ++ >= lineints)
-		    {
-		      nints = 1;
-		      fputs ("\n  ", fp);
-		    }
-		  fprintf (fp, intfmt, c);
-
-		  /* Start a new integer. */
-		  c = 0;
-		  thisbit = 0;
-		}
-
-	      /* Pack INTBITS pixels into an integer. */
-	      if (save_mask)
-		{
-		  c |= ((data[rowoffset + k + 1] < 128) ? 0 : 1) << (thisbit ++);
-		}
-	      else
-		{
-		  if (has_alpha && (data[rowoffset + k + 1] < 128))
-		    c |= 0 << (thisbit ++);
-		  else
-		    c |= ((data[rowoffset + k] == dark) ? 1 : 0) << (thisbit ++);
-		}
-	    }
-
-	  if (thisbit != 0)
-	    {
-	      /* Write out the last oddball int. */
-	      if (need_comma)
-		fputc (',', fp);
-	      need_comma = 1;
-
-	      /* Maybe start a new line. */
-	      if (nints ++ == lineints)
-		{
-		  nints = 1;
-		  fputs ("\n  ", fp);
-		}
-	      fprintf (fp, intfmt, c);
-	    }
-	}
+        {
+          /* Write out a row at a time. */
+          rowoffset = j * width * bpp;
+          c = 0;
+          thisbit = 0;
+
+          for (k = 0; k < width * bpp; k += bpp)
+            {
+              if (k != 0 && thisbit == intbits)
+                {
+                  /* Output a completed integer. */
+                  if (need_comma)
+                    fputc (',', fp);
+                  need_comma = 1;
+
+                  /* Maybe start a new line. */
+                  if (nints ++ >= lineints)
+                    {
+                      nints = 1;
+                      fputs ("\n  ", fp);
+                    }
+                  fprintf (fp, intfmt, c);
+
+                  /* Start a new integer. */
+                  c = 0;
+                  thisbit = 0;
+                }
+
+              /* Pack INTBITS pixels into an integer. */
+              if (save_mask)
+                {
+                  c |= ((data[rowoffset + k + 1] < 128) ? 0 : 1) << (thisbit ++);
+                }
+              else
+                {
+                  if (has_alpha && (data[rowoffset + k + 1] < 128))
+                    c |= 0 << (thisbit ++);
+                  else
+                    c |= ((data[rowoffset + k] == dark) ? 1 : 0) << (thisbit ++);
+                }
+            }
+
+          if (thisbit != 0)
+            {
+              /* Write out the last oddball int. */
+              if (need_comma)
+                fputc (',', fp);
+              need_comma = 1;
+
+              /* Maybe start a new line. */
+              if (nints ++ == lineints)
+                {
+                  nints = 1;
+                  fputs ("\n  ", fp);
+                }
+              fprintf (fp, intfmt, c);
+            }
+        }
 
       gimp_progress_update ((double) (i + tileheight) / (double) height);
     }
@@ -1229,8 +1229,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), MAX_PREFIX);
   gtk_entry_set_text (GTK_ENTRY (entry), xsvals.prefix);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("_Identifier prefix:"), 0.0, 0.5,
-			     entry, 1, TRUE);
+                             _("_Identifier prefix:"), 0.0, 0.5,
+                             entry, 1, TRUE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (prefix_entry_callback),
                     NULL);
@@ -1243,8 +1243,8 @@
   gtk_widget_set_size_request (entry, 240, -1);
   gtk_entry_set_text (GTK_ENTRY (entry), xsvals.comment);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("Comment:"), 0.0, 0.5,
-			     entry, 1, TRUE);
+                             _("Comment:"), 0.0, 0.5,
+                             entry, 1, TRUE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (comment_entry_callback),
                     NULL);
@@ -1270,21 +1270,21 @@
   gtk_widget_set_sensitive (table, xsvals.use_hot);
 
   spinbutton = gimp_spin_button_new (&adj, xsvals.x_hot, 0,
-				     gimp_drawable_width (drawable_ID) - 1,
-				     1, 10, 0, 0, 0);
+                                     gimp_drawable_width (drawable_ID) - 1,
+                                     1, 10, 0, 0, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("Hot spot _X:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Hot spot _X:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
                     &xsvals.x_hot);
 
   spinbutton = gimp_spin_button_new (&adj, xsvals.y_hot, 0,
-				     gimp_drawable_height (drawable_ID) - 1,
-				     1, 10, 0, 0, 0);
+                                     gimp_drawable_height (drawable_ID) - 1,
+                                     1, 10, 0, 0, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("Hot spot _Y:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("Hot spot _Y:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
                     &xsvals.y_hot);
@@ -1313,8 +1313,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), MAX_MASK_EXT);
   gtk_entry_set_text (GTK_ENTRY (entry), xsvals.mask_ext);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("_Mask file extension:"), 0.0, 0.5,
-			     entry, 1, TRUE);
+                             _("_Mask file extension:"), 0.0, 0.5,
+                             entry, 1, TRUE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (mask_ext_entry_callback),
                     NULL);
@@ -1340,28 +1340,28 @@
 /* DISABLED - see http://bugzilla.gnome.org/show_bug.cgi?id=82763 */
 static void
 comment_entry_callback (GtkWidget *widget,
-			gpointer   data)
+                        gpointer   data)
 {
   memset (xsvals.comment, 0, sizeof (xsvals.comment));
   strncpy (xsvals.comment,
-	   gtk_entry_get_text (GTK_ENTRY (widget)), MAX_COMMENT);
+           gtk_entry_get_text (GTK_ENTRY (widget)), MAX_COMMENT);
 }
 #endif
 
 static void
 prefix_entry_callback (GtkWidget *widget,
-		       gpointer   data)
+                       gpointer   data)
 {
   memset (xsvals.prefix, 0, sizeof (xsvals.prefix));
   strncpy (xsvals.prefix,
-	   gtk_entry_get_text (GTK_ENTRY (widget)), MAX_PREFIX);
+           gtk_entry_get_text (GTK_ENTRY (widget)), MAX_PREFIX);
 }
 
 static void
 mask_ext_entry_callback (GtkWidget *widget,
-		       gpointer   data)
+                       gpointer   data)
 {
   memset (xsvals.mask_ext, 0, sizeof (xsvals.mask_ext));
   strncpy (xsvals.mask_ext,
-	   gtk_entry_get_text (GTK_ENTRY (widget)), MAX_MASK_EXT);
+           gtk_entry_get_text (GTK_ENTRY (widget)), MAX_MASK_EXT);
 }

Modified: trunk/plug-ins/common/file-xpm.c
==============================================================================
--- trunk/plug-ins/common/file-xpm.c	(original)
+++ trunk/plug-ins/common/file-xpm.c	Mon Oct 20 06:04:39 2008
@@ -47,7 +47,7 @@
 
 #include <glib/gstdio.h>
 
-#include <gdkconfig.h>		/* For GDK_WINDOWING_WIN32 */
+#include <gdkconfig.h>          /* For GDK_WINDOWING_WIN32 */
 
 #ifndef GDK_WINDOWING_X11
 #ifndef XPM_NO_X

Modified: trunk/plug-ins/common/file-xwd.c
==============================================================================
--- trunk/plug-ins/common/file-xwd.c	(original)
+++ trunk/plug-ins/common/file-xwd.c	Mon Oct 20 06:04:39 2008
@@ -2071,9 +2071,9 @@
 
 static gint
 save_index (FILE    *ofp,
-	    gint32   image_ID,
-	    gint32   drawable_ID,
-	    gint     gray)
+            gint32   image_ID,
+            gint32   drawable_ID,
+            gint     gray)
 {
   gint             height, width, linepad, tile_height, i, j;
   gint             ncolors, vclass;
@@ -2110,14 +2110,14 @@
       ncolors = 256;
 
       for (j = 0; j < ncolors; j++)
-	{
-	  xwdcolmap[j].l_pixel = j;
-	  xwdcolmap[j].l_red   = (j << 8) | j;
-	  xwdcolmap[j].l_green = (j << 8) | j;
-	  xwdcolmap[j].l_blue  = (j << 8) | j;
-	  xwdcolmap[j].l_flags = 7;
-	  xwdcolmap[j].l_pad = 0;
-	}
+        {
+          xwdcolmap[j].l_pixel = j;
+          xwdcolmap[j].l_red   = (j << 8) | j;
+          xwdcolmap[j].l_green = (j << 8) | j;
+          xwdcolmap[j].l_blue  = (j << 8) | j;
+          xwdcolmap[j].l_flags = 7;
+          xwdcolmap[j].l_pad = 0;
+        }
     }
   else
     {
@@ -2125,14 +2125,14 @@
       cmap = gimp_image_get_colormap (image_ID, &ncolors);
 
       for (j = 0; j < ncolors; j++)
-	{
-	  xwdcolmap[j].l_pixel = j;
-	  xwdcolmap[j].l_red   = ((*cmap) << 8) | *cmap; cmap++;
-	  xwdcolmap[j].l_green = ((*cmap) << 8) | *cmap; cmap++;
-	  xwdcolmap[j].l_blue  = ((*cmap) << 8) | *cmap; cmap++;
-	  xwdcolmap[j].l_flags = 7;
-	  xwdcolmap[j].l_pad = 0;
-	}
+        {
+          xwdcolmap[j].l_pixel = j;
+          xwdcolmap[j].l_red   = ((*cmap) << 8) | *cmap; cmap++;
+          xwdcolmap[j].l_green = ((*cmap) << 8) | *cmap; cmap++;
+          xwdcolmap[j].l_blue  = ((*cmap) << 8) | *cmap; cmap++;
+          xwdcolmap[j].l_flags = 7;
+          xwdcolmap[j].l_pad = 0;
+        }
     }
 
   /* Fill in the XWD header (header_size is evaluated by write_xwd_hdr ()) */
@@ -2168,12 +2168,12 @@
   for (i = 0; i < height; i++)
     {
       if ((i % tile_height) == 0)   /* Get more data */
-	{
+        {
           gint scan_lines = (i + tile_height - 1 < height) ? tile_height : (height - i);
 
           gimp_pixel_rgn_get_rect (&pixel_rgn, data, 0, i, width, scan_lines);
           src = data;
-	}
+        }
 
       fwrite (src, width, 1, ofp);
 
@@ -2183,7 +2183,7 @@
       src += width;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((gdouble) i / (gdouble) height);
+        gimp_progress_update ((gdouble) i / (gdouble) height);
     }
 
   g_free (data);
@@ -2266,12 +2266,12 @@
   for (i = 0; i < height; i++)
     {
       if ((i % tile_height) == 0)   /* Get more data */
-	{
+        {
           gint scan_lines = (i + tile_height - 1 < height) ? tile_height : (height - i);
 
           gimp_pixel_rgn_get_rect (&pixel_rgn, data, 0, i, width, scan_lines);
           src = data;
-	}
+        }
 
       fwrite (src, width * 3, 1, ofp);
 
@@ -2281,7 +2281,7 @@
       src += width * 3;
 
       if ((i % 20) == 0)
-	gimp_progress_update ((gdouble) i / (gdouble) height);
+        gimp_progress_update ((gdouble) i / (gdouble) height);
     }
 
   g_free (data);

Modified: trunk/plug-ins/common/film.c
==============================================================================
--- trunk/plug-ins/common/film.c	(original)
+++ trunk/plug-ins/common/film.c	Mon Oct 20 06:04:39 2008
@@ -472,7 +472,7 @@
       f = ((gdouble) picture_height) / (gdouble) height;
       picture_width = width * f;
       if (gimp_image_base_type (image_ID_tmp) != GIMP_RGB_IMAGE)
-	gimp_image_convert_rgb (image_ID_tmp);
+        gimp_image_convert_rgb (image_ID_tmp);
       gimp_image_scale (image_ID_tmp, picture_width, picture_height);
 
       layers = gimp_image_get_layers (image_ID_tmp, &num_layers);
@@ -484,11 +484,11 @@
           picture_x0 += picture_space / 2;
 
           layer_ID_src = layers[k];
-	  gimp_layer_resize_to_image_size (layer_ID_src);
-	  new_layer = gimp_layer_new_from_drawable (layer_ID_src,
-						    image_ID_dst);
-	  gimp_image_add_layer (image_ID_dst, new_layer, -1);
-	  gimp_layer_set_offsets (new_layer, picture_x0, picture_y0);
+          gimp_layer_resize_to_image_size (layer_ID_src);
+          new_layer = gimp_layer_new_from_drawable (layer_ID_src,
+                                                    image_ID_dst);
+          gimp_image_add_layer (image_ID_dst, new_layer, -1);
+          gimp_layer_set_offsets (new_layer, picture_x0, picture_y0);
 
           /* Draw picture numbers */
           if ((number_height > 0) &&
@@ -496,12 +496,12 @@
             {
               if (filmvals.number_pos[0])
                 draw_number (layer_ID_dst,
-			     filmvals.number_start + picture_count,
+                             filmvals.number_start + picture_count,
                              picture_x0 + picture_width/2,
                              (hole_offset-number_height)/2, number_height);
               if (filmvals.number_pos[1])
                 draw_number (layer_ID_dst,
-			     filmvals.number_start + picture_count,
+                             filmvals.number_start + picture_count,
                              picture_x0 + picture_width/2,
                              film_height - (hole_offset + number_height)/2,
                              number_height);
@@ -594,7 +594,7 @@
   for (k = radius-1; k > 0; k--)  /* Rounding corners */
     {
       length = (int)(radius - sqrt ((gdouble) (radius * radius - k * k))
-		     - 0.5);
+                     - 0.5);
       if (length > 0)
         {
           set_pixels (length, top, &filmvals.film_color);

Modified: trunk/plug-ins/common/gee-zoom.c
==============================================================================
--- trunk/plug-ins/common/gee-zoom.c	(original)
+++ trunk/plug-ins/common/gee-zoom.c	Mon Oct 20 06:04:39 2008
@@ -162,9 +162,9 @@
       drawable = gimp_drawable_get (param[2].data.d_drawable);
 
       if (drawable)
-	do_fun();
+        do_fun();
       else
-	status = GIMP_PDB_CALLING_ERROR;
+        status = GIMP_PDB_CALLING_ERROR;
     }
 
   values[0].type = GIMP_PDB_STATUS;
@@ -240,8 +240,8 @@
   for (i=0; i<LUTSIZE; i++)
     {
       wigglelut[i] = RINT((double)(wiggleamp<<11))*(sin((double)(i) /
-					    ((double)LUTSIZEMASK /
-					     10 * G_PI)));
+                                            ((double)LUTSIZEMASK /
+                                             10 * G_PI)));
     }
 }
 
@@ -273,7 +273,7 @@
 /* Adam's silly algorithm. */
 static void
 domap1 (unsigned char *src, unsigned char *dest,
-	int bx, int by, int cx, int cy)
+        int bx, int by, int cx, int cy)
 {
   unsigned int dy;
   signed int bycxmcybx;
@@ -318,30 +318,30 @@
       sx = (basesx-=bx2);
 
       if (wiggly)
-	{
-	  sx += wigglelut[(((basesy)>>11)+grrr) & LUTSIZEMASK];
-	  sy += wigglelut[(((basesx)>>11)+(grrr/3)) & LUTSIZEMASK];
-	}
+        {
+          sx += wigglelut[(((basesy)>>11)+grrr) & LUTSIZEMASK];
+          sy += wigglelut[(((basesx)>>11)+(grrr/3)) & LUTSIZEMASK];
+        }
 
       dx = 256;
       do
-	{
-	  *dest++ = (*(src +
-		   (
-		    (
-		     ((255&(
-			    (sx>>11)
-			    )))
-		     |
-		     ((((255&(
-			      (sy>>11)
-			      ))<<8)))
-		     )
-		    )));
-	  ;
-	  sx += by2;
-	  sy -= cy2;
-	}
+        {
+          *dest++ = (*(src +
+                   (
+                    (
+                     ((255&(
+                            (sx>>11)
+                            )))
+                     |
+                     ((((255&(
+                              (sy>>11)
+                              ))<<8)))
+                     )
+                    )));
+          ;
+          sx += by2;
+          sy -= cy2;
+        }
       while (--dx);
     }
 }
@@ -394,37 +394,37 @@
       sx = (basesx-=bx2);
 
       if (wiggly)
-	{
-	  sx += wigglelut[(((basesy)>>11)+grrr) & LUTSIZEMASK];
-	  sy += wigglelut[(((basesx)>>11)+(grrr/3)) & LUTSIZEMASK];
-	}
+        {
+          sx += wigglelut[(((basesy)>>11)+grrr) & LUTSIZEMASK];
+          sy += wigglelut[(((basesx)>>11)+(grrr/3)) & LUTSIZEMASK];
+        }
 
       dx = 256;
 
       do
-	{
-	  unsigned char* addr;
+        {
+          unsigned char* addr;
 
-	  addr = src + 3*
-	    (
-	     (
-	      ((255&(
-		     (sx>>11)
-		     )))
-	      |
-	      ((((255&(
-		       (sy>>11)
-		       ))<<8)))
-	      )
-	     );
-
-	  *dest++ = *(addr);
-	  *dest++ = *(addr+1);
-	  *dest++ = *(addr+2);
-
-	  sx += by2;
-	  sy -= cy2;
-	}
+          addr = src + 3*
+            (
+             (
+              ((255&(
+                     (sx>>11)
+                     )))
+              |
+              ((((255&(
+                       (sy>>11)
+                       ))<<8)))
+              )
+             );
+
+          *dest++ = *(addr);
+          *dest++ = *(addr+1);
+          *dest++ = *(addr+2);
+
+          sx += by2;
+          sy -= cy2;
+        }
       while (--dx);
     }
 }
@@ -456,11 +456,11 @@
   if (frame==0)
     {
       for (i=0;i<pixels;i++)
-	{
-	  preview_data2[i] =
-	    preview_data1[i] =
-	    seed_data[i];
-	}
+        {
+          preview_data2[i] =
+            preview_data1[i] =
+            seed_data[i];
+        }
     }
 
   gdk_window_get_pointer (drawing_area->window, &rxp, &ryp, &mask);
@@ -474,109 +474,109 @@
   if (rgb_mode)
     {
       domap3(preview_data2, preview_data1,
-	     -(yp-xp)/2, xp+yp
-	     ,
-	     xp+yp, (yp-xp)/2
-	     );
+             -(yp-xp)/2, xp+yp
+             ,
+             xp+yp, (yp-xp)/2
+             );
 
       gdk_draw_rgb_image (drawing_area->window,
                           style->white_gc,
-			  0, 0, width, height,
-			  GDK_RGB_DITHER_NORMAL,
-			  preview_data1, width * 3);
+                          0, 0, width, height,
+                          GDK_RGB_DITHER_NORMAL,
+                          preview_data1, width * 3);
 
       /*      memcpy(preview_data1, seed_data, 256*256*3); */
 
       if (frame != 0)
-	{
-	  if (feedbacktype)
-	    {
-	      for (i=0;i<pixels;i++)
-		{
-		  gint t;
-		  t = preview_data1[i] + seed_data[i] - 128;
-		  preview_data1[i] = /*CLAMP(t,0,255);*/
-		    (t&256)? (~(t>>10)) : t; /* Quick specialized clamp */
-		}
-	    }
-	  else/* if (0) */
-	    {
-	      gint pixwords = pixels/sizeof(gint32);
-	      gint32* seedwords = (gint32*) seed_data;
-	      gint32* prevwords = (gint32*) preview_data1;
-
-	      for (i=0;i<pixwords;i++)
-		{
-		  /*preview_data1[i] = (preview_data1[i]*2 +
-		    seed_data[i]) /3;*/
-
-		  /* mod'd version of the below for a 'deeper' mix */
-		  prevwords[i] =
-		    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
-		    ((prevwords[i] >> 2) & 0x3f3f3f3f) +
-		    ((seedwords[i] >> 2) & 0x3f3f3f3f);
-		  /* This is from Raph L... it should be a fast 50%/50%
-		     blend, though I don't know if 50%/50% is as nice as
-		     the old ratio. */
-		  /*
-		    prevwords[i] =
-		    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
-		    ((seedwords[i] >> 1) & 0x7f7f7f7f) +
-		    (prevwords[i] & seedwords[i] & 0x01010101); */
-		}
-	    }
-	}
+        {
+          if (feedbacktype)
+            {
+              for (i=0;i<pixels;i++)
+                {
+                  gint t;
+                  t = preview_data1[i] + seed_data[i] - 128;
+                  preview_data1[i] = /*CLAMP(t,0,255);*/
+                    (t&256)? (~(t>>10)) : t; /* Quick specialized clamp */
+                }
+            }
+          else/* if (0) */
+            {
+              gint pixwords = pixels/sizeof(gint32);
+              gint32* seedwords = (gint32*) seed_data;
+              gint32* prevwords = (gint32*) preview_data1;
+
+              for (i=0;i<pixwords;i++)
+                {
+                  /*preview_data1[i] = (preview_data1[i]*2 +
+                    seed_data[i]) /3;*/
+
+                  /* mod'd version of the below for a 'deeper' mix */
+                  prevwords[i] =
+                    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
+                    ((prevwords[i] >> 2) & 0x3f3f3f3f) +
+                    ((seedwords[i] >> 2) & 0x3f3f3f3f);
+                  /* This is from Raph L... it should be a fast 50%/50%
+                     blend, though I don't know if 50%/50% is as nice as
+                     the old ratio. */
+                  /*
+                    prevwords[i] =
+                    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
+                    ((seedwords[i] >> 1) & 0x7f7f7f7f) +
+                    (prevwords[i] & seedwords[i] & 0x01010101); */
+                }
+            }
+        }
     }
   else /* GRAYSCALE */
     {
       domap1(preview_data2, preview_data1,
-	     -(yp-xp)/2, xp+yp
-	     ,
-	     xp+yp, (yp-xp)/2
-	     );
+             -(yp-xp)/2, xp+yp
+             ,
+             xp+yp, (yp-xp)/2
+             );
 
       gdk_draw_gray_image (drawing_area->window,
                            style->white_gc,
-			   0, 0, width, height,
-			   GDK_RGB_DITHER_NORMAL,
-			   preview_data1, width);
+                           0, 0, width, height,
+                           GDK_RGB_DITHER_NORMAL,
+                           preview_data1, width);
       if (frame != 0)
-	{
-	  if (feedbacktype)
-	    {
-	      for (i=0;i<pixels;i++)
-		{
-		  int t;
-		  t = preview_data1[i] + seed_data[i] - 128;
-		  preview_data1[i] = /*CLAMP(t,0,255);*/
-		    (t&256)? (~(t>>10)) : t; /* Quick specialized clamp */
-		}
-	    }
-	  else
-	    {
-	      gint pixwords = pixels/sizeof(gint32);
-	      gint32* seedwords = (gint32*) seed_data;
-	      gint32* prevwords = (gint32*) preview_data1;
-
-	      for (i=0;i<pixwords;i++)
-		{
-
-		  /* mod'd version of the below for a 'deeper' mix */
-		  prevwords[i] =
-		    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
-		    ((prevwords[i] >> 2) & 0x3f3f3f3f) +
-		    ((seedwords[i] >> 2) & 0x3f3f3f3f);
-		  /* This is from Raph L... it should be a fast 50%/50%
-		     blend, though I don't know if 50%/50% is as nice as
-		     the old ratio. */
-		  /*
-		    prevwords[i] =
-		    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
-		    ((seedwords[i] >> 1) & 0x7f7f7f7f) +
-		    (prevwords[i] & seedwords[i] & 0x01010101); */
-		}
-	    }
-	}
+        {
+          if (feedbacktype)
+            {
+              for (i=0;i<pixels;i++)
+                {
+                  int t;
+                  t = preview_data1[i] + seed_data[i] - 128;
+                  preview_data1[i] = /*CLAMP(t,0,255);*/
+                    (t&256)? (~(t>>10)) : t; /* Quick specialized clamp */
+                }
+            }
+          else
+            {
+              gint pixwords = pixels/sizeof(gint32);
+              gint32* seedwords = (gint32*) seed_data;
+              gint32* prevwords = (gint32*) preview_data1;
+
+              for (i=0;i<pixwords;i++)
+                {
+
+                  /* mod'd version of the below for a 'deeper' mix */
+                  prevwords[i] =
+                    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
+                    ((prevwords[i] >> 2) & 0x3f3f3f3f) +
+                    ((seedwords[i] >> 2) & 0x3f3f3f3f);
+                  /* This is from Raph L... it should be a fast 50%/50%
+                     blend, though I don't know if 50%/50% is as nice as
+                     the old ratio. */
+                  /*
+                    prevwords[i] =
+                    ((prevwords[i] >> 1) & 0x7f7f7f7f) +
+                    ((seedwords[i] >> 1) & 0x7f7f7f7f) +
+                    (prevwords[i] & seedwords[i] & 0x01010101); */
+                }
+            }
+        }
     }
 
   frame++;
@@ -603,62 +603,62 @@
   if ((drawable->width<256) || (drawable->height<256))
     {
       for (i=0;i<256;i++)
-	{
-	  if (i < drawable->height)
-	    {
-	      gimp_pixel_rgn_init (&pixel_rgn,
-				   drawable,
-				   drawable->width>256?
-				   (drawable->width/2-128):0,
-				   (drawable->height>256?
-				   (drawable->height/2-128):0)+i,
-				   MIN(256,drawable->width),
-				   1,
-				   FALSE,
-				   FALSE);
-	      gimp_pixel_rgn_get_rect (&pixel_rgn,
-				       &seed_data[(256*i +
-						 (
-						  (
-						   drawable->width<256 ?
-						   (256-drawable->width)/2 :
-						   0
-						   )
-						  +
-						  (
-						   drawable->height<256 ?
-						   (256-drawable->height)/2 :
-						   0
-						   ) * 256
-						  )) *
-						 gimp_drawable_bpp
-						 (drawable->drawable_id)
-				       ],
-				       drawable->width>256?
-				       (drawable->width/2-128):0,
-				       (drawable->height>256?
-				       (drawable->height/2-128):0)+i,
-				       MIN(256,drawable->width),
-				       1);
-	    }
-	}
+        {
+          if (i < drawable->height)
+            {
+              gimp_pixel_rgn_init (&pixel_rgn,
+                                   drawable,
+                                   drawable->width>256?
+                                   (drawable->width/2-128):0,
+                                   (drawable->height>256?
+                                   (drawable->height/2-128):0)+i,
+                                   MIN(256,drawable->width),
+                                   1,
+                                   FALSE,
+                                   FALSE);
+              gimp_pixel_rgn_get_rect (&pixel_rgn,
+                                       &seed_data[(256*i +
+                                                 (
+                                                  (
+                                                   drawable->width<256 ?
+                                                   (256-drawable->width)/2 :
+                                                   0
+                                                   )
+                                                  +
+                                                  (
+                                                   drawable->height<256 ?
+                                                   (256-drawable->height)/2 :
+                                                   0
+                                                   ) * 256
+                                                  )) *
+                                                 gimp_drawable_bpp
+                                                 (drawable->drawable_id)
+                                       ],
+                                       drawable->width>256?
+                                       (drawable->width/2-128):0,
+                                       (drawable->height>256?
+                                       (drawable->height/2-128):0)+i,
+                                       MIN(256,drawable->width),
+                                       1);
+            }
+        }
     }
   else
     {
       gimp_pixel_rgn_init (&pixel_rgn,
-			   drawable,
-			   drawable->width>256?(drawable->width/2-128):0,
-			   drawable->height>256?(drawable->height/2-128):0,
-			   MIN(256,drawable->width),
-			   MIN(256,drawable->height),
-			   FALSE,
-			   FALSE);
+                           drawable,
+                           drawable->width>256?(drawable->width/2-128):0,
+                           drawable->height>256?(drawable->height/2-128):0,
+                           MIN(256,drawable->width),
+                           MIN(256,drawable->height),
+                           FALSE,
+                           FALSE);
       gimp_pixel_rgn_get_rect (&pixel_rgn,
-			       seed_data,
-			       drawable->width>256?(drawable->width/2-128):0,
-			       drawable->height>256?(drawable->height/2-128):0,
-			       MIN(256,drawable->width),
-			       MIN(256,drawable->height));
+                               seed_data,
+                               drawable->width>256?(drawable->width/2-128):0,
+                               drawable->height>256?(drawable->height/2-128):0,
+                               MIN(256,drawable->width),
+                               MIN(256,drawable->height));
     }
 
   gimp_drawable_detach(drawable);
@@ -669,59 +669,59 @@
     {
     case GIMP_INDEXED:
       if (has_alpha)
-	{
-	  for (i=width*height;i>0;i--)
-	    {
-	      seed_data[3*(i-1)+2] =
-		((palette[3*(seed_data[(i-1)*2])+2]*seed_data[(i-1)*2+1])/255)
-		+ ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
-	      seed_data[3*(i-1)+1] =
-		((palette[3*(seed_data[(i-1)*2])+1]*seed_data[(i-1)*2+1])/255)
-		+ ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
-	      seed_data[3*(i-1)+0] =
-		((palette[3*(seed_data[(i-1)*2])+0]*seed_data[(i-1)*2+1])/255)
-		+ ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
-	    }
-	}
+        {
+          for (i=width*height;i>0;i--)
+            {
+              seed_data[3*(i-1)+2] =
+                ((palette[3*(seed_data[(i-1)*2])+2]*seed_data[(i-1)*2+1])/255)
+                + ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
+              seed_data[3*(i-1)+1] =
+                ((palette[3*(seed_data[(i-1)*2])+1]*seed_data[(i-1)*2+1])/255)
+                + ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
+              seed_data[3*(i-1)+0] =
+                ((palette[3*(seed_data[(i-1)*2])+0]*seed_data[(i-1)*2+1])/255)
+                + ((255-seed_data[(i-1)*2+1]) * g_rand_int_range (gr, 0, 256))/255;
+            }
+        }
       else
-	{
-	  for (i=width*height;i>0;i--)
-	    {
-	      seed_data[3*(i-1)+2] = palette[3*(seed_data[i-1])+2];
-	      seed_data[3*(i-1)+1] = palette[3*(seed_data[i-1])+1];
-	      seed_data[3*(i-1)+0] = palette[3*(seed_data[i-1])+0];
-	    }
-	}
+        {
+          for (i=width*height;i>0;i--)
+            {
+              seed_data[3*(i-1)+2] = palette[3*(seed_data[i-1])+2];
+              seed_data[3*(i-1)+1] = palette[3*(seed_data[i-1])+1];
+              seed_data[3*(i-1)+0] = palette[3*(seed_data[i-1])+0];
+            }
+        }
       break;
 
     case GIMP_GRAY:
       if (has_alpha)
-	{
-	  for (i=0;i<width*height;i++)
-	    {
-	      seed_data[i] =
-		(seed_data[i*2]*seed_data[i*2+1])/255
-		+ ((255-seed_data[i*2+1]) * g_rand_int_range (gr, 0, 256))/255;
-	    }
-	}
+        {
+          for (i=0;i<width*height;i++)
+            {
+              seed_data[i] =
+                (seed_data[i*2]*seed_data[i*2+1])/255
+                + ((255-seed_data[i*2+1]) * g_rand_int_range (gr, 0, 256))/255;
+            }
+        }
       break;
 
     case GIMP_RGB:
       if (has_alpha)
-	{
-	  for (i=0;i<width*height;i++)
-	    {
-	      seed_data[i*3+2] =
-		(seed_data[i*4+2]*seed_data[i*4+3])/255
-		+ ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
-	      seed_data[i*3+1] =
-		(seed_data[i*4+1]*seed_data[i*4+3])/255
-		+ ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
-	      seed_data[i*3+0] =
-		(seed_data[i*4+0]*seed_data[i*4+3])/255
-		+ ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
-	    }
-	}
+        {
+          for (i=0;i<width*height;i++)
+            {
+              seed_data[i*3+2] =
+                (seed_data[i*4+2]*seed_data[i*4+3])/255
+                + ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
+              seed_data[i*3+1] =
+                (seed_data[i*4+1]*seed_data[i*4+3])/255
+                + ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
+              seed_data[i*3+0] =
+                (seed_data[i*4+0]*seed_data[i*4+3])/255
+                + ((255-seed_data[i*4+3]) * g_rand_int_range (gr, 0, 256))/255;
+            }
+        }
       break;
 
     default:
@@ -758,7 +758,7 @@
 
 static gboolean
 toggle_feedbacktype (GtkWidget      *widget,
-		     GdkEventButton *bevent)
+                     GdkEventButton *bevent)
 {
   if (bevent->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK))
     {
@@ -779,9 +779,9 @@
   if (bevent->state & GDK_BUTTON3_MASK)
     {
       if (wiggleamp == LOWAMP)
-	wiggleamp = HIGHAMP;
+        wiggleamp = HIGHAMP;
       else
-	wiggleamp = LOWAMP;
+        wiggleamp = LOWAMP;
 
       wiggly = TRUE;
       init_lut ();

Modified: trunk/plug-ins/common/guillotine.c
==============================================================================
--- trunk/plug-ins/common/guillotine.c	(original)
+++ trunk/plug-ins/common/guillotine.c	Mon Oct 20 06:04:39 2008
@@ -268,7 +268,7 @@
 
               /* insert the coordinates before the extension */
               g_string_insert (new_filename, pos, fileindex);
-	      g_free (fileindex);
+              g_free (fileindex);
 
               gimp_image_set_filename (new_image, new_filename->str);
               g_string_free (new_filename, TRUE);

Modified: trunk/plug-ins/common/hot.c
==============================================================================
--- trunk/plug-ins/common/hot.c	(original)
+++ trunk/plug-ins/common/hot.c	Mon Oct 20 06:04:39 2008
@@ -19,30 +19,30 @@
 
 /*
  * hot.c - Scan an image for pixels with RGB values that will give
- *	"unsafe" values of chrominance signal or composite signal
- *	amplitude when encoded into an NTSC or PAL colour signal.
- *	(This happens for certain high-intensity high-saturation colours
- *	that are rare in real scenes, but can easily be present
- *	in synthetic images.)
- *
- * 	Such pixels can be flagged so the user may then choose other
- *	colours.  Or, the offending pixels can be made "safe"
- *	in a manner that preserves hue.
- *
- *	There are two reasonable ways to make a pixel "safe":
- *	We can reduce its intensity (luminance) while leaving
- *	hue and saturation the same.  Or, we can reduce saturation
- *	while leaving hue and luminance the same.  A #define selects
- *	which strategy to use.
+ *      "unsafe" values of chrominance signal or composite signal
+ *      amplitude when encoded into an NTSC or PAL colour signal.
+ *      (This happens for certain high-intensity high-saturation colours
+ *      that are rare in real scenes, but can easily be present
+ *      in synthetic images.)
+ *
+ *      Such pixels can be flagged so the user may then choose other
+ *      colours.  Or, the offending pixels can be made "safe"
+ *      in a manner that preserves hue.
+ *
+ *      There are two reasonable ways to make a pixel "safe":
+ *      We can reduce its intensity (luminance) while leaving
+ *      hue and saturation the same.  Or, we can reduce saturation
+ *      while leaving hue and luminance the same.  A #define selects
+ *      which strategy to use.
  *
  * Note to the user: You must add your own read_pixel() and write_pixel()
- *	routines.  You may have to modify pix_decode() and pix_encode().
- *	MAXPIX, WID, and HGT are likely to need modification.
+ *      routines.  You may have to modify pix_decode() and pix_encode().
+ *      MAXPIX, WID, and HGT are likely to need modification.
  */
 
 /*
  * Originally written as "ikNTSC.c" by Alan Wm Paeth,
- *	University of Waterloo, August, 1985
+ *      University of Waterloo, August, 1985
  * Updated by Dave Martindale, Imax Systems Corp., December 1990
  */
 
@@ -51,16 +51,16 @@
  *
  *
  * CHROMA_LIM is the limit (in IRE units) of the overall
- *	chrominance amplitude; it should be 50 or perhaps
- *	very slightly higher.
+ *      chrominance amplitude; it should be 50 or perhaps
+ *      very slightly higher.
  *
  * COMPOS_LIM is the maximum amplitude (in IRE units) allowed for
- *	the composite signal.  A value of 100 is the maximum
- *	monochrome white, and is always safe.  120 is the absolute
- *	limit for NTSC broadcasting, since the transmitter's carrier
- *	goes to zero with 120 IRE input signal.  Generally, 110
- *	is a good compromise - it allows somewhat brighter colours
- *	than 100, while staying safely away from the hard limit.
+ *      the composite signal.  A value of 100 is the maximum
+ *      monochrome white, and is always safe.  120 is the absolute
+ *      limit for NTSC broadcasting, since the transmitter's carrier
+ *      goes to zero with 120 IRE input signal.  Generally, 110
+ *      is a good compromise - it allows somewhat brighter colours
+ *      than 100, while staying safely away from the hard limit.
  */
 
 #include "config.h"
@@ -99,8 +99,8 @@
   MODE_PAL
 } hotModes;
 
-#define	CHROMA_LIM      50.0		/* chroma amplitude limit */
-#define	COMPOS_LIM      110.0		/* max IRE amplitude */
+#define CHROMA_LIM      50.0            /* chroma amplitude limit */
+#define COMPOS_LIM      110.0           /* max IRE amplitude */
 
 /*
  * RGB to YIQ encoding matrix.
@@ -133,14 +133,14 @@
 };
 
 
-#define SCALE	8192            /* scale factor: do floats with int math */
-#define MAXPIX	 255            /* white value */
+#define SCALE   8192            /* scale factor: do floats with int math */
+#define MAXPIX   255            /* white value */
 
-static gint	tab[3][3][MAXPIX+1]; /* multiply lookup table */
-static gdouble	chroma_lim;          /* chroma limit */
-static gdouble	compos_lim;          /* composite amplitude limit */
-static glong	ichroma_lim2;        /* chroma limit squared (scaled integer) */
-static gint	icompos_lim;         /* composite amplitude limit (scaled integer) */
+static gint     tab[3][3][MAXPIX+1]; /* multiply lookup table */
+static gdouble  chroma_lim;          /* chroma limit */
+static gdouble  compos_lim;          /* composite amplitude limit */
+static glong    ichroma_lim2;        /* chroma limit squared (scaled integer) */
+static gint     icompos_lim;         /* composite amplitude limit (scaled integer) */
 
 static void       query         (void);
 static void       run           (const gchar      *name,
@@ -169,10 +169,10 @@
 
 /*
  * pix_decode: decode an integer pixel value into a floating-point
- *	intensity in the range [0, 1].
+ *      intensity in the range [0, 1].
  *
  * pix_encode: encode a floating-point intensity into an integer
- *	pixel value.
+ *      pixel value.
  *
  * The code given here assumes simple linear encoding; you must change
  * these routines if you use a different pixel encoding technique.
@@ -204,21 +204,21 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Find and fix pixels that may be unsafely bright"),
-			  "hot scans an image for pixels that will give unsave "
-			  "values of chrominance or composite signale "
-			  "amplitude when encoded into an NTSC or PAL signal.  "
-			  "Three actions can be performed on these ``hot'' "
-			  "pixels. (0) reduce luminance, (1) reduce "
-			  "saturation, or (2) Blacken.",
-			  "Eric L. Hernes, Alan Wm Paeth",
-			  "Eric L. Hernes",
-			  "1997",
-			  N_("_Hot..."),
-			  "RGB",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          N_("Find and fix pixels that may be unsafely bright"),
+                          "hot scans an image for pixels that will give unsave "
+                          "values of chrominance or composite signale "
+                          "amplitude when encoded into an NTSC or PAL signal.  "
+                          "Three actions can be performed on these ``hot'' "
+                          "pixels. (0) reduce luminance, (1) reduce "
+                          "saturation, or (2) Blacken.",
+                          "Eric L. Hernes, Alan Wm Paeth",
+                          "Eric L. Hernes",
+                          "1997",
+                          N_("_Hot..."),
+                          "RGB",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Colors/Modify");
 }
@@ -254,19 +254,19 @@
     case GIMP_RUN_INTERACTIVE:
       /* XXX: add code here for interactive running */
       if (args.mode == -1)
-	{
-	  args.mode       = MODE_NTSC;
-	  args.action     = ACT_LREDUX;
-	  args.new_layerp = 1;
-	}
+        {
+          args.mode       = MODE_NTSC;
+          args.action     = ACT_LREDUX;
+          args.new_layerp = 1;
+        }
 
       if (plugin_dialog (&args))
-	{
+        {
           if (! pluginCore (&args))
             {
               rvals[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
             }
-	}
+        }
       else
         {
           rvals[0].data.d_status = GIMP_PDB_CANCEL;
@@ -278,27 +278,27 @@
     case GIMP_RUN_NONINTERACTIVE:
       /* XXX: add code here for non-interactive running */
       if (nparam != 6)
-	{
-	  rvals[0].data.d_status = GIMP_PDB_CALLING_ERROR;
-	  break;
-	}
+        {
+          rvals[0].data.d_status = GIMP_PDB_CALLING_ERROR;
+          break;
+        }
       args.mode       = param[3].data.d_int32;
       args.action     = param[4].data.d_int32;
       args.new_layerp = param[5].data.d_int32;
 
       if (! pluginCore (&args))
-	{
-	  rvals[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
-	  break;
-	}
+        {
+          rvals[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
+          break;
+        }
     break;
 
     case GIMP_RUN_WITH_LAST_VALS:
       /* XXX: add code here for last-values running */
       if (! pluginCore (&args))
-	{
-	  rvals[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          rvals[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
+        }
     break;
   }
 }
@@ -334,29 +334,29 @@
       gchar        name[40];
       const gchar *mode_names[] =
       {
-	"ntsc",
-	"pal",
+        "ntsc",
+        "pal",
       };
       const gchar *action_names[] =
       {
-	"lum redux",
-	"sat redux",
-	"flag",
+        "lum redux",
+        "sat redux",
+        "flag",
       };
 
       g_snprintf (name, sizeof (name), "hot mask (%s, %s)",
-		  mode_names[argp->mode],
-		  action_names[argp->action]);
+                  mode_names[argp->mode],
+                  action_names[argp->action]);
 
       nl = gimp_layer_new (argp->image, name, width, height,
-			   GIMP_RGBA_IMAGE, (gdouble)100, GIMP_NORMAL_MODE);
+                           GIMP_RGBA_IMAGE, (gdouble)100, GIMP_NORMAL_MODE);
       ndrw = gimp_drawable_get (nl);
       gimp_drawable_fill (nl, GIMP_TRANSPARENT_FILL);
       gimp_image_add_layer (argp->image, nl, 0);
     }
 
   gimp_drawable_mask_bounds (drw->drawable_id,
-			     &sel_x1, &sel_y1, &sel_x2, &sel_y2);
+                             &sel_x1, &sel_y1, &sel_x2, &sel_y2);
 
   width  = sel_x2 - sel_x1;
   height = sel_y2 - sel_y1;
@@ -392,161 +392,161 @@
       gint x;
 
       if (y % prog_interval == 0)
-	gimp_progress_update ((double) y / (double) (sel_y2 - sel_y1));
+        gimp_progress_update ((double) y / (double) (sel_y2 - sel_y1));
 
       for (x = sel_x1; x < sel_x2; x++)
-	{
-	  if (hotp (r = *(s + 0), g = *(s + 1), b = *(s + 2)))
-	    {
-	      if (argp->action == ACT_FLAG)
-		{
-		  for (i = 0; i < 3; i++)
-		    *d++ = 0;
-		  s += 3;
-		  if (bpp == 4)
-		    *d++ = *s++;
-		  else if (argp->new_layerp)
-		    *d++ = 255;
-		}
-	      else
-		{
-		  /*
-		   * Optimization: cache the last-computed hot pixel.
-		   */
-		  if (r == prev_r && g == prev_g && b == prev_b)
-		    {
-		      *d++ = new_r;
-		      *d++ = new_g;
-		      *d++ = new_b;
-		      s += 3;
-		      if (bpp == 4)
-			*d++ = *s++;
-		      else if (argp->new_layerp)
-			*d++ = 255;
-		    }
-		  else
-		    {
-		      Y = tab[0][0][r] + tab[0][1][g] + tab[0][2][b];
-		      I = tab[1][0][r] + tab[1][1][g] + tab[1][2][b];
-		      Q = tab[2][0][r] + tab[2][1][g] + tab[2][2][b];
-
-		      prev_r = r;
-		      prev_g = g;
-		      prev_b = b;
-		      /*
-		       * Get Y and chroma amplitudes in floating point.
-		       *
-		       * If your C library doesn't have hypot(), just use
-		       * hypot(a,b) = sqrt(a*a, b*b);
-		       *
-		       * Then extract linear (un-gamma-corrected)
-		       * floating-point pixel RGB values.
-		       */
-		      fy = (double)Y / (double)SCALE;
-		      fc = hypot ((double) I / (double) SCALE,
-				  (double) Q / (double) SCALE);
-
-		      pr = (double) pix_decode (r);
-		      pg = (double) pix_decode (g);
-		      pb = (double) pix_decode (b);
-
-		      /*
-		       * Reducing overall pixel intensity by scaling R,
-		       * G, and B reduces Y, I, and Q by the same factor.
-		       * This changes luminance but not saturation, since
-		       * saturation is determined by the chroma/luminance
-		       * ratio.
-		       *
-		       * On the other hand, by linearly interpolating
-		       * between the original pixel value and a grey
-		       * pixel with the same luminance (R=G=B=Y), we
-		       * change saturation without affecting luminance.
-		       */
-		      if (argp->action == ACT_LREDUX)
-			{
-			  /*
-			   * Calculate a scale factor that will bring the pixel
-			   * within both chroma and composite limits, if we scale
-			   * luminance and chroma simultaneously.
-			   *
-			   * The calculated chrominance reduction applies
-			   * to the gamma-corrected RGB values that are
-			   * the input to the RGB-to-YIQ operation.
-			   * Multiplying the original un-gamma-corrected
-			   * pixel values by the scaling factor raised to
-			   * the "gamma" power is equivalent, and avoids
-			   * calling gc() and inv_gc() three times each.  */
-			  scale = chroma_lim / fc;
-			  t = compos_lim / (fy + fc);
-			  if (t < scale)
-			    scale = t;
-			  scale = pow (scale, mode[argp->mode].gamma);
-
-			  r = (guint8) pix_encode (scale * pr);
-			  g = (guint8) pix_encode (scale * pg);
-			  b = (guint8) pix_encode (scale * pb);
-			}
-		      else
-			{ /* ACT_SREDUX hopefully */
-			  /*
-			   * Calculate a scale factor that will bring the
-			   * pixel within both chroma and composite
-			   * limits, if we scale chroma while leaving
-			   * luminance unchanged.
-			   *
-			   * We have to interpolate gamma-corrected RGB
-			   * values, so we must convert from linear to
-			   * gamma-corrected before interpolation and then
-			   * back to linear afterwards.
-			   */
-			  scale = chroma_lim / fc;
-			  t = (compos_lim - fy) / fc;
-			  if (t < scale)
-			    scale = t;
-
-			  pr = gc (pr, argp->mode);
-			  pg = gc (pg, argp->mode);
-			  pb = gc (pb, argp->mode);
+        {
+          if (hotp (r = *(s + 0), g = *(s + 1), b = *(s + 2)))
+            {
+              if (argp->action == ACT_FLAG)
+                {
+                  for (i = 0; i < 3; i++)
+                    *d++ = 0;
+                  s += 3;
+                  if (bpp == 4)
+                    *d++ = *s++;
+                  else if (argp->new_layerp)
+                    *d++ = 255;
+                }
+              else
+                {
+                  /*
+                   * Optimization: cache the last-computed hot pixel.
+                   */
+                  if (r == prev_r && g == prev_g && b == prev_b)
+                    {
+                      *d++ = new_r;
+                      *d++ = new_g;
+                      *d++ = new_b;
+                      s += 3;
+                      if (bpp == 4)
+                        *d++ = *s++;
+                      else if (argp->new_layerp)
+                        *d++ = 255;
+                    }
+                  else
+                    {
+                      Y = tab[0][0][r] + tab[0][1][g] + tab[0][2][b];
+                      I = tab[1][0][r] + tab[1][1][g] + tab[1][2][b];
+                      Q = tab[2][0][r] + tab[2][1][g] + tab[2][2][b];
+
+                      prev_r = r;
+                      prev_g = g;
+                      prev_b = b;
+                      /*
+                       * Get Y and chroma amplitudes in floating point.
+                       *
+                       * If your C library doesn't have hypot(), just use
+                       * hypot(a,b) = sqrt(a*a, b*b);
+                       *
+                       * Then extract linear (un-gamma-corrected)
+                       * floating-point pixel RGB values.
+                       */
+                      fy = (double)Y / (double)SCALE;
+                      fc = hypot ((double) I / (double) SCALE,
+                                  (double) Q / (double) SCALE);
+
+                      pr = (double) pix_decode (r);
+                      pg = (double) pix_decode (g);
+                      pb = (double) pix_decode (b);
+
+                      /*
+                       * Reducing overall pixel intensity by scaling R,
+                       * G, and B reduces Y, I, and Q by the same factor.
+                       * This changes luminance but not saturation, since
+                       * saturation is determined by the chroma/luminance
+                       * ratio.
+                       *
+                       * On the other hand, by linearly interpolating
+                       * between the original pixel value and a grey
+                       * pixel with the same luminance (R=G=B=Y), we
+                       * change saturation without affecting luminance.
+                       */
+                      if (argp->action == ACT_LREDUX)
+                        {
+                          /*
+                           * Calculate a scale factor that will bring the pixel
+                           * within both chroma and composite limits, if we scale
+                           * luminance and chroma simultaneously.
+                           *
+                           * The calculated chrominance reduction applies
+                           * to the gamma-corrected RGB values that are
+                           * the input to the RGB-to-YIQ operation.
+                           * Multiplying the original un-gamma-corrected
+                           * pixel values by the scaling factor raised to
+                           * the "gamma" power is equivalent, and avoids
+                           * calling gc() and inv_gc() three times each.  */
+                          scale = chroma_lim / fc;
+                          t = compos_lim / (fy + fc);
+                          if (t < scale)
+                            scale = t;
+                          scale = pow (scale, mode[argp->mode].gamma);
+
+                          r = (guint8) pix_encode (scale * pr);
+                          g = (guint8) pix_encode (scale * pg);
+                          b = (guint8) pix_encode (scale * pb);
+                        }
+                      else
+                        { /* ACT_SREDUX hopefully */
+                          /*
+                           * Calculate a scale factor that will bring the
+                           * pixel within both chroma and composite
+                           * limits, if we scale chroma while leaving
+                           * luminance unchanged.
+                           *
+                           * We have to interpolate gamma-corrected RGB
+                           * values, so we must convert from linear to
+                           * gamma-corrected before interpolation and then
+                           * back to linear afterwards.
+                           */
+                          scale = chroma_lim / fc;
+                          t = (compos_lim - fy) / fc;
+                          if (t < scale)
+                            scale = t;
+
+                          pr = gc (pr, argp->mode);
+                          pg = gc (pg, argp->mode);
+                          pb = gc (pb, argp->mode);
 
-			  py = pr * mode[argp->mode].code[0][0] +
+                          py = pr * mode[argp->mode].code[0][0] +
                                pg * mode[argp->mode].code[0][1] +
                                pb * mode[argp->mode].code[0][2];
 
-			  r = pix_encode (inv_gc (py + scale * (pr - py),
-						  argp->mode));
-			  g = pix_encode (inv_gc (py + scale * (pg - py),
-						  argp->mode));
-			  b = pix_encode (inv_gc (py + scale * (pb - py),
-						  argp->mode));
-			}
-
-		      *d++ = new_r = r;
-		      *d++ = new_g = g;
-		      *d++ = new_b = b;
-
-		      s += 3;
-
-		      if (bpp == 4)
-			*d++ = *s++;
-		      else if (argp->new_layerp)
-			*d++ = 255;
-		    }
-		}
-	    }
-	  else
-	    {
-	      if (!argp->new_layerp)
-		{
-		  for (i = 0; i < bpp; i++)
-		    *d++ = *s++;
-		}
-	      else
-		{
-		  s += bpp;
-		  d += 4;
-		}
-	    }
-	}
+                          r = pix_encode (inv_gc (py + scale * (pr - py),
+                                                  argp->mode));
+                          g = pix_encode (inv_gc (py + scale * (pg - py),
+                                                  argp->mode));
+                          b = pix_encode (inv_gc (py + scale * (pb - py),
+                                                  argp->mode));
+                        }
+
+                      *d++ = new_r = r;
+                      *d++ = new_g = g;
+                      *d++ = new_b = b;
+
+                      s += 3;
+
+                      if (bpp == 4)
+                        *d++ = *s++;
+                      else if (argp->new_layerp)
+                        *d++ = 255;
+                    }
+                }
+            }
+          else
+            {
+              if (!argp->new_layerp)
+                {
+                  for (i = 0; i < bpp; i++)
+                    *d++ = *s++;
+                }
+              else
+                {
+                  s += bpp;
+                  d += 4;
+                }
+            }
+        }
     }
 
   gimp_pixel_rgn_set_rect (&dstPr, dst, sel_x1, sel_y1, width, height);
@@ -585,12 +585,12 @@
 
   dlg = gimp_dialog_new (_("Hot"), PLUG_IN_BINARY,
                          NULL, 0,
-			 gimp_standard_help_func, PLUG_IN_PROC,
+                         gimp_standard_help_func, PLUG_IN_PROC,
 
-			 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-			 GTK_STOCK_OK,     GTK_RESPONSE_OK,
+                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                         GTK_STOCK_OK,     GTK_RESPONSE_OK,
 
-			 NULL);
+                         NULL);
 
   gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
                                            GTK_RESPONSE_OK,
@@ -609,13 +609,13 @@
   gtk_widget_show (vbox);
 
   frame = gimp_int_radio_group_new (TRUE, _("Mode"),
-				    G_CALLBACK (gimp_radio_button_update),
-				    &argp->mode, argp->mode,
+                                    G_CALLBACK (gimp_radio_button_update),
+                                    &argp->mode, argp->mode,
 
-				    "N_TSC", MODE_NTSC, NULL,
-				    "_PAL",  MODE_PAL,  NULL,
+                                    "N_TSC", MODE_NTSC, NULL,
+                                    "_PAL",  MODE_PAL,  NULL,
 
-				    NULL);
+                                    NULL);
 
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
@@ -705,8 +705,8 @@
       guint8 g,
       guint8 b)
 {
-  int	y, i, q;
-  long	y2, c2;
+  int   y, i, q;
+  long  y2, c2;
 
   /*
    * Pixel decoding, gamma correction, and matrix multiplication
@@ -728,19 +728,19 @@
    *
    * Chrominance is too large if
    *
-   *	sqrt(i^2, q^2)  >  chroma_lim.
+   *    sqrt(i^2, q^2)  >  chroma_lim.
    *
    * The composite signal amplitude is too large if
    *
-   *	y + sqrt(i^2, q^2)  >  compos_lim.
+   *    y + sqrt(i^2, q^2)  >  compos_lim.
    *
    * We avoid doing the sqrt by checking
    *
-   *	i^2 + q^2  >  chroma_lim^2
+   *    i^2 + q^2  >  chroma_lim^2
    * and
-   *	y + sqrt(i^2 + q^2)  >  compos_lim
-   *	sqrt(i^2 + q^2)  >  compos_lim - y
-   *	i^2 + q^2  >  (compos_lim - y)^2
+   *    y + sqrt(i^2 + q^2)  >  compos_lim
+   *    sqrt(i^2 + q^2)  >  compos_lim - y
+   *    i^2 + q^2  >  (compos_lim - y)^2
    *
    */
 
@@ -749,7 +749,7 @@
   y2 *= y2;
 
   if (c2 <= ichroma_lim2 && c2 <= y2)
-    {	/* no problems */
+    {   /* no problems */
       return FALSE;
     }
 

Modified: trunk/plug-ins/common/iwarp.c
==============================================================================
--- trunk/plug-ins/common/iwarp.c	(original)
+++ trunk/plug-ins/common/iwarp.c	Mon Oct 20 06:04:39 2008
@@ -737,7 +737,7 @@
 
               dest_row += dest_rgn.rowstride;
             }
-	  gimp_progress_update ((gdouble) (progress) / max_progress);
+          gimp_progress_update ((gdouble) (progress) / max_progress);
         }
       else
         {

Modified: trunk/plug-ins/common/jigsaw.c
==============================================================================
--- trunk/plug-ins/common/jigsaw.c	(original)
+++ trunk/plug-ins/common/jigsaw.c	Mon Oct 20 06:04:39 2008
@@ -448,7 +448,7 @@
       gimp_preview_get_size (preview, &width, &height);
       bytes  = drawable->bpp;
       buffer = gimp_drawable_get_thumbnail_data (drawable->drawable_id,
-						 &width, &height, &bytes);
+                                                 &width, &height, &bytes);
       buffer_size = bytes * width * height;
     }
   else
@@ -462,7 +462,7 @@
       buffer = g_new (guchar, buffer_size);
 
       gimp_pixel_rgn_init (&src_pr,  drawable, 0, 0, width, height,
-			   FALSE, FALSE);
+                           FALSE, FALSE);
       gimp_pixel_rgn_get_rect (&src_pr, buffer, 0, 0, width, height);
     }
 
@@ -483,7 +483,7 @@
   else
     {
       gimp_pixel_rgn_init (&dest_pr, drawable, 0, 0, width, height,
-			   TRUE, TRUE);
+                           TRUE, TRUE);
       gimp_pixel_rgn_set_rect (&dest_pr, buffer, 0, 0, width, height);
 
       gimp_drawable_flush (drawable);

Modified: trunk/plug-ins/common/mail.c
==============================================================================
--- trunk/plug-ins/common/mail.c	(original)
+++ trunk/plug-ins/common/mail.c	Mon Oct 20 06:04:39 2008
@@ -185,17 +185,17 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Send the image by email"),
-			  "You need to have sendmail installed",
-			  "Adrian Likins, Reagan Blundell",
-			  "Adrian Likins, Reagan Blundell, Daniel Risacher, "
+                          N_("Send the image by email"),
+                          "You need to have sendmail installed",
+                          "Adrian Likins, Reagan Blundell",
+                          "Adrian Likins, Reagan Blundell, Daniel Risacher, "
                           "Spencer Kimball and Peter Mattis",
-			  "1995-1997",
-			  N_("Send by E_mail..."),
-			  "*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          "1995-1997",
+                          N_("Send by E_mail..."),
+                          "*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/File/Send");
   gimp_plugin_icon_register (PLUG_IN_PROC, GIMP_ICON_TYPE_INLINE_PIXBUF,
@@ -230,9 +230,9 @@
   if (strcmp (name, PLUG_IN_PROC) == 0)
     {
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	  gimp_get_data (PLUG_IN_PROC, &mail_info);
+        {
+        case GIMP_RUN_INTERACTIVE:
+          gimp_get_data (PLUG_IN_PROC, &mail_info);
           if (! strlen (mail_info.filename))
             {
               gchar *filename = gimp_image_get_filename (image_ID);
@@ -247,47 +247,47 @@
                 }
             }
 
-	  if (! save_dialog ())
-	    status = GIMP_PDB_CANCEL;
-	  break;
-
-	case GIMP_RUN_NONINTERACTIVE:
-	  /*  Make sure all the arguments are there!  */
-	  if (nparams < 8)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  else
-	    {
-	      g_strlcpy (mail_info.filename,
+          if (! save_dialog ())
+            status = GIMP_PDB_CANCEL;
+          break;
+
+        case GIMP_RUN_NONINTERACTIVE:
+          /*  Make sure all the arguments are there!  */
+          if (nparams < 8)
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
+          else
+            {
+              g_strlcpy (mail_info.filename,
                          param[3].data.d_string, BUFFER_SIZE);
-	      g_strlcpy (mail_info.receipt,
+              g_strlcpy (mail_info.receipt,
                          param[4].data.d_string, BUFFER_SIZE);
-	      g_strlcpy (mail_info.from,
+              g_strlcpy (mail_info.from,
                          param[5].data.d_string, BUFFER_SIZE);
-	      g_strlcpy (mail_info.subject,
+              g_strlcpy (mail_info.subject,
                          param[6].data.d_string, BUFFER_SIZE);
-	      g_strlcpy (mail_info.comment,
+              g_strlcpy (mail_info.comment,
                          param[7].data.d_string, BUFFER_SIZE);
-	    }
-	  break;
+            }
+          break;
+
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_get_data (PLUG_IN_PROC, &mail_info);
+          break;
 
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_get_data (PLUG_IN_PROC, &mail_info);
-	  break;
-
-	default:
-	  break;
-	}
+        default:
+          break;
+        }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
-	  status = save_image (mail_info.filename,
-			       image_ID,
-			       drawable_ID,
-			       run_mode);
+        {
+          status = save_image (mail_info.filename,
+                               image_ID,
+                               drawable_ID,
+                               run_mode);
 
-	  if (status == GIMP_PDB_SUCCESS)
+          if (status == GIMP_PDB_SUCCESS)
             {
               if (mesg_body)
                 g_strlcpy (mail_info.comment, mesg_body, BUFFER_SIZE);
@@ -306,9 +306,9 @@
 
 static GimpPDBStatusType
 save_image (const gchar *filename,
-	    gint32       image_ID,
-	    gint32       drawable_ID,
-	    gint32       run_mode)
+            gint32       image_ID,
+            gint32       drawable_ID,
+            gint32       run_mode)
 {
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
   gchar             *ext;
@@ -342,10 +342,10 @@
   fflush (mailpipe);
 
   if (! (gimp_file_save (run_mode,
-			 image_ID,
-			 drawable_ID,
-			 tmpname,
-			 tmpname) && valid_file (tmpname)))
+                         image_ID,
+                         drawable_ID,
+                         tmpname,
+                         tmpname) && valid_file (tmpname)))
     {
       goto error;
     }
@@ -407,12 +407,12 @@
 
   dlg = gimp_dialog_new (_("Send by Email"), PLUG_IN_BINARY,
                          NULL, 0,
-			 gimp_standard_help_func, PLUG_IN_PROC,
+                         gimp_standard_help_func, PLUG_IN_PROC,
 
-			 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-			 _("_Send"),       GTK_RESPONSE_OK,
+                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                         _("_Send"),       GTK_RESPONSE_OK,
 
-			 NULL);
+                         NULL);
 
   gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
                                            GTK_RESPONSE_OK,
@@ -442,8 +442,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), BUFFER_SIZE - 1);
   gtk_entry_set_text (GTK_ENTRY (entry), mail_info.filename);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
-			     _("_Filename:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_Filename:"), 0.0, 0.5,
+                             entry, 1, FALSE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (mail_entry_callback),
                     mail_info.filename);
@@ -454,8 +454,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), BUFFER_SIZE - 1);
   gtk_entry_set_text (GTK_ENTRY (entry), mail_info.receipt);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
-			     _("_To:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_To:"), 0.0, 0.5,
+                             entry, 1, FALSE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (mail_entry_callback),
                     mail_info.receipt);
@@ -468,8 +468,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), BUFFER_SIZE - 1);
   gtk_entry_set_text (GTK_ENTRY (entry), mail_info.from);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
-			     _("_From:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_From:"), 0.0, 0.5,
+                             entry, 1, FALSE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (mail_entry_callback),
                     mail_info.from);
@@ -480,8 +480,8 @@
   gtk_entry_set_max_length (GTK_ENTRY (entry), BUFFER_SIZE - 1);
   gtk_entry_set_text (GTK_ENTRY (entry), mail_info.subject);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
-			     _("S_ubject:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("S_ubject:"), 0.0, 0.5,
+                             entry, 1, FALSE);
   g_signal_connect (entry, "changed",
                     G_CALLBACK (mail_entry_callback),
                     mail_info.subject);
@@ -500,7 +500,7 @@
 
   g_signal_connect (text_buffer, "changed",
                     G_CALLBACK (mesg_body_callback),
-		    NULL);
+                    NULL);
 
   gtk_text_buffer_set_text (text_buffer, mail_info.comment, -1);
 
@@ -563,9 +563,9 @@
   while (type_mappings[i])
     {
       if (g_ascii_strcasecmp (ext, type_mappings[i]) == 0)
-	{
-	  return g_strdup (type_mappings[i + 1]);
-	}
+        {
+          return g_strdup (type_mappings[i + 1]);
+        }
 
       i += 2;
     }
@@ -588,24 +588,24 @@
   while (TRUE)
     {
       if (!ext || ext[1] == '\0' || strchr (ext, G_DIR_SEPARATOR))
-	{
-	  g_message (_("some sort of error with the file extension "
+        {
+          g_message (_("some sort of error with the file extension "
                        "or lack thereof"));
 
-	  return NULL;
-	}
+          return NULL;
+        }
 
       if (0 != g_ascii_strcasecmp (ext, ".gz") &&
           0 != g_ascii_strcasecmp (ext, ".bz2"))
-	{
-	  return ext;
-	}
+        {
+          return ext;
+        }
       else
-	{
-	  /* we found somehting, loop back, and look again */
-	  *ext = 0;
-	  ext = strrchr (filename_copy, '.');
-	}
+        {
+          /* we found somehting, loop back, and look again */
+          *ext = 0;
+          ext = strrchr (filename_copy, '.');
+        }
     }
 
   return ext;
@@ -613,14 +613,14 @@
 
 static void
 mail_entry_callback (GtkWidget *widget,
-		     gchar     *data)
+                     gchar     *data)
 {
   g_strlcpy (data, gtk_entry_get_text (GTK_ENTRY (widget)), BUFFER_SIZE);
 }
 
 static void
 mesg_body_callback (GtkTextBuffer *buffer,
-		    gpointer       data)
+                    gpointer       data)
 {
   GtkTextIter start_iter;
   GtkTextIter end_iter;
@@ -721,7 +721,7 @@
   GError *err = NULL;
 
   if (! g_spawn_async_with_pipes (NULL, cmd, NULL, G_SPAWN_DO_NOT_REAP_CHILD,
-	                          NULL, NULL, pid, &fd, NULL, NULL, &err))
+                                  NULL, NULL, pid, &fd, NULL, NULL, &err))
     {
       g_message (_("Could not start sendmail (%s)"), err->message);
       g_error_free (err);

Modified: trunk/plug-ins/common/newsprint.c
==============================================================================
--- trunk/plug-ins/common/newsprint.c	(original)
+++ trunk/plug-ins/common/newsprint.c	Mon Oct 20 06:04:39 2008
@@ -1877,7 +1877,7 @@
           rot[3] = DEG2RAD (pvals.gry_ang);
           gf = pvals.gry_spotfn;
           ASRT (gf);
-	  spotfn_list[gf].thresh = spot2thresh (gf, width);
+          spotfn_list[gf].thresh = spot2thresh (gf, width);
           thresh[3] = spotfn_list[gf].thresh;
         }
     }

Modified: trunk/plug-ins/common/noise-randomize.c
==============================================================================
--- trunk/plug-ins/common/noise-randomize.c	(original)
+++ trunk/plug-ins/common/noise-randomize.c	Mon Oct 20 06:04:39 2008
@@ -147,19 +147,19 @@
 
 static void query (void);
 static void run   (const gchar      *name,
-		   gint              nparams,
-		   const GimpParam  *param,
-		   gint             *nreturn_vals,
-		   GimpParam       **return_vals);
+                   gint              nparams,
+                   const GimpParam  *param,
+                   gint             *nreturn_vals,
+                   GimpParam       **return_vals);
 
 static void randomize                    (GimpDrawable *drawable,
                                           GimpPreview  *preview);
 
 static inline void randomize_prepare_row (GimpPixelRgn *pixel_rgn,
-					  guchar       *data,
-					  gint          x,
-					  gint          y,
-					  gint          w);
+                                          guchar       *data,
+                                          gint          x,
+                                          gint          y,
+                                          gint          w);
 
 static gboolean    randomize_dialog      (GimpDrawable *drawable);
 
@@ -225,40 +225,40 @@
   const gchar *copyright_date = "1995-1998";
 
   gimp_install_procedure (PLUG_IN_PROC[0],
-			  hurl_blurb,
-			  hurl_help,
-			  author,
-			  copyrights,
-			  copyright_date,
-			  N_("_Hurl..."),
-			  "RGB*, GRAY*, INDEXED*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          hurl_blurb,
+                          hurl_help,
+                          author,
+                          copyrights,
+                          copyright_date,
+                          N_("_Hurl..."),
+                          "RGB*, GRAY*, INDEXED*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_install_procedure (PLUG_IN_PROC[1],
-			  pick_blurb,
-			  pick_help,
-			  author,
-			  copyrights,
-			  copyright_date,
-			  N_("_Pick..."),
-			  "RGB*, GRAY*, INDEXED*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          pick_blurb,
+                          pick_help,
+                          author,
+                          copyrights,
+                          copyright_date,
+                          N_("_Pick..."),
+                          "RGB*, GRAY*, INDEXED*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_install_procedure (PLUG_IN_PROC[2],
-			  slur_blurb,
-			  slur_help,
-			  author,
-			  copyrights,
-			  copyright_date,
-			  N_("_Slur..."),
-			  "RGB*, GRAY*, INDEXED*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          slur_blurb,
+                          slur_help,
+                          author,
+                          copyrights,
+                          copyright_date,
+                          N_("_Slur..."),
+                          "RGB*, GRAY*, INDEXED*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC[0], "<Image>/Filters/Noise");
   gimp_plugin_menu_register (PLUG_IN_PROC[1], "<Image>/Filters/Noise");
@@ -318,86 +318,86 @@
       gimp_tile_cache_ntiles (2 * drawable->ntile_cols);
 
       switch (run_mode)
-	{
-	  /*
-	   *  If we're running interactively, pop up the dialog box.
-	   */
-	case GIMP_RUN_INTERACTIVE:
-	  gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
-
-	  if (! randomize_dialog (drawable)) /* return on Cancel */
-	    return;
-	  break;
-	  /*
-	   *  If we're not interactive (probably scripting), we
-	   *  get the parameters from the param[] array, since
-	   *  we don't use the dialog box.  Make sure they all
-	   *  parameters have legitimate values.
-	   */
-	case GIMP_RUN_NONINTERACTIVE:
-	  if (nparams != 7)
-	    {
-	      status = GIMP_PDB_CALLING_ERROR;
-	    }
-	  else
-	    {
-	      pivals.rndm_pct    = (gdouble) param[3].data.d_float;
-	      pivals.rndm_rcount = (gdouble) param[4].data.d_float;
-	      pivals.randomize   = (gboolean) param[5].data.d_int32;
-	      pivals.seed        = (gint) param[6].data.d_int32;
+        {
+          /*
+           *  If we're running interactively, pop up the dialog box.
+           */
+        case GIMP_RUN_INTERACTIVE:
+          gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
+
+          if (! randomize_dialog (drawable)) /* return on Cancel */
+            return;
+          break;
+          /*
+           *  If we're not interactive (probably scripting), we
+           *  get the parameters from the param[] array, since
+           *  we don't use the dialog box.  Make sure they all
+           *  parameters have legitimate values.
+           */
+        case GIMP_RUN_NONINTERACTIVE:
+          if (nparams != 7)
+            {
+              status = GIMP_PDB_CALLING_ERROR;
+            }
+          else
+            {
+              pivals.rndm_pct    = (gdouble) param[3].data.d_float;
+              pivals.rndm_rcount = (gdouble) param[4].data.d_float;
+              pivals.randomize   = (gboolean) param[5].data.d_int32;
+              pivals.seed        = (gint) param[6].data.d_int32;
 
               if (pivals.randomize)
                 pivals.seed = g_random_int ();
 
-	      if ((rndm_type != RNDM_PICK &&
-		   rndm_type != RNDM_SLUR &&
-		   rndm_type != RNDM_HURL) ||
-		  (pivals.rndm_pct < 1.0 || pivals.rndm_pct > 100.0) ||
-		  (pivals.rndm_rcount < 1.0 || pivals.rndm_rcount > 100.0))
-		{
-		  status = GIMP_PDB_CALLING_ERROR;
-		}
-	    }
-	  break;
-	  /*
-	   *  If we're running with the last set of values, get those values.
-	   */
-	case GIMP_RUN_WITH_LAST_VALS:
-	  gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
+              if ((rndm_type != RNDM_PICK &&
+                   rndm_type != RNDM_SLUR &&
+                   rndm_type != RNDM_HURL) ||
+                  (pivals.rndm_pct < 1.0 || pivals.rndm_pct > 100.0) ||
+                  (pivals.rndm_rcount < 1.0 || pivals.rndm_rcount > 100.0))
+                {
+                  status = GIMP_PDB_CALLING_ERROR;
+                }
+            }
+          break;
+          /*
+           *  If we're running with the last set of values, get those values.
+           */
+        case GIMP_RUN_WITH_LAST_VALS:
+          gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
 
           if (pivals.randomize)
             pivals.seed = g_random_int ();
-	  break;
-	  /*
-	   *  Hopefully we never get here!
-	   */
-	default:
-	  break;
+          break;
+          /*
+           *  Hopefully we never get here!
+           */
+        default:
+          break;
         }
 
       if (status == GIMP_PDB_SUCCESS)
-	{
+        {
           gimp_progress_init_printf ("%s", gettext (RNDM_NAME[rndm_type - 1]));
 
-	  /*
-	   *  Initialize the g_rand() function seed
-	   */
+          /*
+           *  Initialize the g_rand() function seed
+           */
           g_rand_set_seed (gr, pivals.seed);
 
-	  randomize (drawable, NULL);
-	  /*
-	   *  If we ran interactively (even repeating) update the display.
-	   */
-	  if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	    {
-	      gimp_displays_flush ();
+          randomize (drawable, NULL);
+          /*
+           *  If we ran interactively (even repeating) update the display.
+           */
+          if (run_mode != GIMP_RUN_NONINTERACTIVE)
+            {
+              gimp_displays_flush ();
             }
-	  /*
-	   *  If we use the dialog popup, set the data for future use.
-	   */
-	  if (run_mode == GIMP_RUN_INTERACTIVE)
-	    {
-	      gimp_set_data (PLUG_IN_PROC[rndm_type - 1], &pivals,
+          /*
+           *  If we use the dialog popup, set the data for future use.
+           */
+          if (run_mode == GIMP_RUN_INTERACTIVE)
+            {
+              gimp_set_data (PLUG_IN_PROC[rndm_type - 1], &pivals,
                              sizeof (RandomizeVals));
             }
         }
@@ -430,10 +430,10 @@
 
 static inline void
 randomize_prepare_row (GimpPixelRgn *pixel_rgn,
-		       guchar    *data,
-		       int        x,
-		       int        y,
-		       int        w)
+                       guchar    *data,
+                       int        x,
+                       int        y,
+                       int        w)
 {
   gint b;
 
@@ -535,31 +535,31 @@
        *  loop through the rows, applying the selected convolution
        */
       for (row = y1; row < y2; row++)
-	{
-	  /*  prepare the next row  */
-	  randomize_prepare_row (sp, nr, x1, row + 1, (x2 - x1));
-
-	  d = dest;
-	  ind = 0;
-	  for (col = 0; col < (x2 - x1); col++)
-	    {
-	      if (g_rand_int_range (gr, 0, 100) <= (gint) pivals.rndm_pct)
-		{
-		  switch (rndm_type)
-		    {
-		      /*
-		       *  HURL
-		       *      Just assign a random value.
-		       */
-		    case RNDM_HURL:
+        {
+          /*  prepare the next row  */
+          randomize_prepare_row (sp, nr, x1, row + 1, (x2 - x1));
+
+          d = dest;
+          ind = 0;
+          for (col = 0; col < (x2 - x1); col++)
+            {
+              if (g_rand_int_range (gr, 0, 100) <= (gint) pivals.rndm_pct)
+                {
+                  switch (rndm_type)
+                    {
+                      /*
+                       *  HURL
+                       *      Just assign a random value.
+                       */
+                    case RNDM_HURL:
                       for (j = 0; j < bytes; j++)
                         *d++ = g_rand_int_range (gr, 0, 256);
                       break;
-		      /*
-		       *  PICK
-		       *      pick at random from a neighboring pixel.
-		       */
-		    case RNDM_PICK:
+                      /*
+                       *  PICK
+                       *      pick at random from a neighboring pixel.
+                       */
+                    case RNDM_PICK:
                       k = g_rand_int_range (gr, 0, 9);
                       for (j = 0; j < bytes; j++)
                         {
@@ -598,12 +598,12 @@
                         }
                       break;
                       /*
-		       *  SLUR
-		       *      80% chance it's from directly above,
-		       *      10% from above left,
-		       *      10% from above right.
-		       */
-		    case RNDM_SLUR:
+                       *  SLUR
+                       *      80% chance it's from directly above,
+                       *      10% from above left,
+                       *      10% from above right.
+                       */
+                    case RNDM_SLUR:
                       k = g_rand_int_range (gr, 0, 10);
                       for (j = 0; j < bytes; j++)
                         {
@@ -626,25 +626,25 @@
                     }
                   /*
                    *  Otherwise, this pixel was not selected for randomization,
-		   *  so use the current value.
-		   */
+                   *  so use the current value.
+                   */
                 }
-	      else
-		{
+              else
+                {
                   for (j = 0; j < bytes; j++)
                     *d++ = (gint) cr[col*bytes + j];
                 }
             }
-	  /*
-	   *  Save the modified row, shuffle the row pointers, and every
-	   *  so often, update the progress meter.
-	   */
-	  gimp_pixel_rgn_set_row (dp, dest, x1, row, (x2 - x1));
-
-	  tmp = pr;
-	  pr = cr;
-	  cr = nr;
-	  nr = tmp;
+          /*
+           *  Save the modified row, shuffle the row pointers, and every
+           *  so often, update the progress meter.
+           */
+          gimp_pixel_rgn_set_row (dp, dest, x1, row, (x2 - x1));
+
+          tmp = pr;
+          pr = cr;
+          cr = nr;
+          nr = tmp;
 
           if (! preview && PROG_UPDATE_TIME)
             {
@@ -659,18 +659,18 @@
        *  if we have more cycles to perform, swap the src and dest Pixel Regions
        */
       if (cnt < pivals.rndm_rcount)
-	{
-	  if (tp != NULL)
-	    {
-	      tp = dp;
-	      dp = sp;
-	      sp = tp;
+        {
+          if (tp != NULL)
+            {
+              tp = dp;
+              dp = sp;
+              sp = tp;
             }
-	  else
-	    {
-	      tp = &srcPR;
-	      sp = &destPR;
-	      dp = &destPR2;
+          else
+            {
+              tp = &srcPR;
+              sp = &destPR;
+              dp = &destPR2;
             }
         }
     }
@@ -731,12 +731,12 @@
 
   dlg = gimp_dialog_new (gettext (RNDM_NAME[rndm_type - 1]), PLUG_IN_BINARY,
                          NULL, 0,
-			 gimp_standard_help_func, PLUG_IN_PROC[rndm_type - 1],
+                         gimp_standard_help_func, PLUG_IN_PROC[rndm_type - 1],
 
-			 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-			 GTK_STOCK_OK,     GTK_RESPONSE_OK,
+                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                         GTK_STOCK_OK,     GTK_RESPONSE_OK,
 
-			 NULL);
+                         NULL);
 
   gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
                                            GTK_RESPONSE_OK,
@@ -768,19 +768,19 @@
   /*  Random Seed  */
   seed_hbox = gimp_random_seed_new (&pivals.seed, &pivals.randomize);
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-				     _("_Random seed:"), 0.0, 0.5,
-				     seed_hbox, 1, TRUE);
+                                     _("_Random seed:"), 0.0, 0.5,
+                                     seed_hbox, 1, TRUE);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label),
-				 GIMP_RANDOM_SEED_SPINBUTTON (seed_hbox));
+                                 GIMP_RANDOM_SEED_SPINBUTTON (seed_hbox));
 
   /*
    *  Randomization percentage label & scale (1 to 100)
    */
   adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-			      _("R_andomization (%):"), SCALE_WIDTH, 0,
-			      pivals.rndm_pct, 1.0, 100.0, 1.0, 10.0, 0,
-			      TRUE, 0, 0,
-			      _("Percentage of pixels to be filtered"), NULL);
+                              _("R_andomization (%):"), SCALE_WIDTH, 0,
+                              pivals.rndm_pct, 1.0, 100.0, 1.0, 10.0, 0,
+                              TRUE, 0, 0,
+                              _("Percentage of pixels to be filtered"), NULL);
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pivals.rndm_pct);
@@ -792,10 +792,10 @@
    *  Repeat count label & scale (1 to 100)
    */
   adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-			      _("R_epeat:"), SCALE_WIDTH, 0,
-			      pivals.rndm_rcount, 1.0, 100.0, 1.0, 10.0, 0,
-			      TRUE, 0, 0,
-			      _("Number of times to apply filter"), NULL);
+                              _("R_epeat:"), SCALE_WIDTH, 0,
+                              pivals.rndm_rcount, 1.0, 100.0, 1.0, 10.0, 0,
+                              TRUE, 0, 0,
+                              _("Number of times to apply filter"), NULL);
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pivals.rndm_rcount);

Modified: trunk/plug-ins/common/pixelize.c
==============================================================================
--- trunk/plug-ins/common/pixelize.c	(original)
+++ trunk/plug-ins/common/pixelize.c	Mon Oct 20 06:04:39 2008
@@ -12,7 +12,7 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
@@ -26,8 +26,8 @@
  *
  * This plug-in "pixelizes" the image.
  *
- *	Eiichi Takamori <taka ma1 seikyou ne jp>
- *	http://ha1.seikyou.ne.jp/home/taka/gimp/
+ *      Eiichi Takamori <taka ma1 seikyou ne jp>
+ *      http://ha1.seikyou.ne.jp/home/taka/gimp/
  *
  * Changes from version 1.03 to version 1.04:
  * - Added gtk_rc_parse
@@ -607,7 +607,7 @@
     }
   else
     {
-      /*  update the blurred region	 */
+      /*  update the blurred region      */
       gimp_drawable_flush (drawable);
       gimp_drawable_merge_shadow (drawable->drawable_id, TRUE);
       gimp_drawable_update (drawable->drawable_id, x1, y1, width, height);
@@ -686,7 +686,7 @@
 }
 
 /*
-  This function acts on one PixelArea.	Since there were so many
+  This function acts on one PixelArea.  Since there were so many
   nested FORs in pixelize_small(), I put a few of them here...
   */
 

Modified: trunk/plug-ins/common/ripple.c
==============================================================================
--- trunk/plug-ins/common/ripple.c	(original)
+++ trunk/plug-ins/common/ripple.c	Mon Oct 20 06:04:39 2008
@@ -279,10 +279,10 @@
     {
       needy = fmod(needy, height);
       if (needy < 0.0)
-	needy += height;
+        needy += height;
       yi = (yi % height);
       if (yi < 0)
-	yi += height;
+        yi += height;
       yi_a = (yi+1) % height;
     }
   /* Smear out the edges of the image by repeating pixels. */
@@ -296,22 +296,22 @@
   if (rvals.antialias)
     {
       if (yi >=0 && yi < height)
-	gimp_pixel_fetcher_get_pixel (pft, x, yi  , pixel[0]);
+        gimp_pixel_fetcher_get_pixel (pft, x, yi  , pixel[0]);
       else
-	memset(pixel[0], 0, 4);
+        memset(pixel[0], 0, 4);
       if (yi_a >=0 && yi_a < height)
-	gimp_pixel_fetcher_get_pixel (pft, x, yi_a, pixel[1]);
+        gimp_pixel_fetcher_get_pixel (pft, x, yi_a, pixel[1]);
       else
-	memset(pixel[1], 0, 4);
+        memset(pixel[1], 0, 4);
 
       average_two_pixels (dest, pixel, needy - yi, bpp, param->has_alpha);
     } /* antialias */
   else
     {
       if (yi >=0 && yi < height)
-	gimp_pixel_fetcher_get_pixel (pft, x, yi, dest);
+        gimp_pixel_fetcher_get_pixel (pft, x, yi, dest);
       else
-	memset(dest, 0, bpp);
+        memset(dest, 0, bpp);
     }
 }
 
@@ -339,10 +339,10 @@
     {
       needx = fmod((needx), width);
       while (needx < 0.0)
-	needx += width;
+        needx += width;
       xi = (xi % width);
       while (xi < 0)
-	xi += width;
+        xi += width;
       xi_a = (xi+1) % width;
     }
   /* Smear out the edges of the image by repeating pixels. */
@@ -356,13 +356,13 @@
   if (rvals.antialias)
     {
       if (xi >= 0 && xi < width)
-	gimp_pixel_fetcher_get_pixel (pft, xi,   y, pixel[0]);
+        gimp_pixel_fetcher_get_pixel (pft, xi,   y, pixel[0]);
       else
-	memset(pixel[0], 0, 4);
+        memset(pixel[0], 0, 4);
       if (xi_a >= 0 && xi_a < width)
-	gimp_pixel_fetcher_get_pixel (pft, xi_a, y, pixel[1]);
+        gimp_pixel_fetcher_get_pixel (pft, xi_a, y, pixel[1]);
       else
-	memset(pixel[1], 0, 4);
+        memset(pixel[1], 0, 4);
 
       average_two_pixels (dest, pixel, needx - xi, bpp, param->has_alpha);
     } /* antialias */
@@ -370,9 +370,9 @@
   else
     {
       if (xi >=0 && xi < width)
-	gimp_pixel_fetcher_get_pixel (pft, xi, y, dest);
+        gimp_pixel_fetcher_get_pixel (pft, xi, y, dest);
       else
-	memset(dest, 0, bpp);
+        memset(dest, 0, bpp);
     }
 }
 

Modified: trunk/plug-ins/common/rotate.c
==============================================================================
--- trunk/plug-ins/common/rotate.c	(original)
+++ trunk/plug-ins/common/rotate.c	Mon Oct 20 06:04:39 2008
@@ -86,25 +86,25 @@
 
 static void  query   (void);
 static void  run     (const gchar      *name,
-		      gint              nparams,
-		      const GimpParam  *param,
-		      gint             *nreturn_vals,
-		      GimpParam       **return_vals);
+                      gint              nparams,
+                      const GimpParam  *param,
+                      gint             *nreturn_vals,
+                      GimpParam       **return_vals);
 
 static void  rotate                 (void);
 static void  rotate_drawable        (GimpDrawable *drawable);
 static void  rotate_compute_offsets (gint         *offsetx,
-				     gint         *offsety,
-				     gint          image_width,
-				     gint          image_height,
-				     gint          width,
-				     gint          height);
+                                     gint         *offsety,
+                                     gint          image_width,
+                                     gint          image_height,
+                                     gint          width,
+                                     gint          height);
 
 /* Global Variables */
 const GimpPlugInInfo PLUG_IN_INFO =
 {
   NULL,  /* init_proc  */
-  NULL,	 /* quit_proc  */
+  NULL,  /* quit_proc  */
   query, /* query_proc */
   run    /* run_proc   */
 };
@@ -130,19 +130,19 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  "Rotates a layer or the whole image by 90, 180 or 270 degrees",
-			  "This plug-in does rotate the active layer or the "
-			  "whole image clockwise by multiples of 90 degrees. "
-			  "When the whole image is choosen, the image is "
-			  "resized if necessary.",
-			  PLUG_IN_AUTHOR,
-			  PLUG_IN_COPYRIGHT,
-			  PLUG_IN_VERSION,
-			  NULL,
-			  PLUG_IN_IMAGE_TYPES,
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          "Rotates a layer or the whole image by 90, 180 or 270 degrees",
+                          "This plug-in does rotate the active layer or the "
+                          "whole image clockwise by multiples of 90 degrees. "
+                          "When the whole image is choosen, the image is "
+                          "resized if necessary.",
+                          PLUG_IN_AUTHOR,
+                          PLUG_IN_COPYRIGHT,
+                          PLUG_IN_VERSION,
+                          NULL,
+                          PLUG_IN_IMAGE_TYPES,
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 }
 
 static void
@@ -170,29 +170,29 @@
   if (strcmp (name, PLUG_IN_PROC) == 0)
     {
       switch (run_mode)
-	{
-	case GIMP_RUN_INTERACTIVE:
-	case GIMP_RUN_NONINTERACTIVE:
-	  /* check to see if invoked with the correct number of parameters */
-	  if (nparams == 5)
-	    {
-	      rotvals.angle = (gint) param[3].data.d_int32;
-	      rotvals.angle = rotvals.angle % 4;
-	      rotvals.everything = (gint) param[4].data.d_int32;
-	      /* Store variable states for next run */
-	      gimp_set_data (PLUG_IN_PROC, &rotvals, sizeof (RotateValues));
-	    }
-	  else
-	    status = GIMP_PDB_CALLING_ERROR;
-	  break;
-	case GIMP_RUN_WITH_LAST_VALS:
-	  /* Possibly retrieve data from a previous run */
-	  gimp_get_data (PLUG_IN_PROC, &rotvals);
-	  rotvals.angle = rotvals.angle % 4;
-	  break;
-	default:
-	  break;
-	}
+        {
+        case GIMP_RUN_INTERACTIVE:
+        case GIMP_RUN_NONINTERACTIVE:
+          /* check to see if invoked with the correct number of parameters */
+          if (nparams == 5)
+            {
+              rotvals.angle = (gint) param[3].data.d_int32;
+              rotvals.angle = rotvals.angle % 4;
+              rotvals.everything = (gint) param[4].data.d_int32;
+              /* Store variable states for next run */
+              gimp_set_data (PLUG_IN_PROC, &rotvals, sizeof (RotateValues));
+            }
+          else
+            status = GIMP_PDB_CALLING_ERROR;
+          break;
+        case GIMP_RUN_WITH_LAST_VALS:
+          /* Possibly retrieve data from a previous run */
+          gimp_get_data (PLUG_IN_PROC, &rotvals);
+          rotvals.angle = rotvals.angle % 4;
+          break;
+        default:
+          break;
+        }
     }
   else
     {
@@ -205,9 +205,9 @@
       rotate ();
 
       /* If run mode is interactive, flush displays, else (script) don't
-	 do it, as the screen updates would make the scripts slow */
+         do it, as the screen updates would make the scripts slow */
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
 
   values[0].data.d_status = status;
@@ -215,40 +215,40 @@
 
 static void
 rotate_compute_offsets (gint *offsetx,
-			gint *offsety,
-			gint  image_width,
-			gint  image_height,
-			gint  width,
-			gint  height)
+                        gint *offsety,
+                        gint  image_width,
+                        gint  image_height,
+                        gint  width,
+                        gint  height)
 {
   gint buffer;
 
   if (rotvals.everything)  /* rotate around the image center */
     {
       switch (rotvals.angle)
-	{
-	case 1:   /* 90° */
-	  buffer   = *offsetx;
-	  *offsetx = image_height - *offsety - height;
-	  *offsety = buffer;
-	  break;
-	case 2:   /* 180° */
-	  *offsetx = image_width - *offsetx - width;
-	  *offsety = image_height - *offsety - height;
-	  break;
-	case 3:   /* 270° */
-	  buffer   = *offsetx;
-	  *offsetx = *offsety;
-	  *offsety = image_width - buffer - width;
-	}
+        {
+        case 1:   /* 90° */
+          buffer   = *offsetx;
+          *offsetx = image_height - *offsety - height;
+          *offsety = buffer;
+          break;
+        case 2:   /* 180° */
+          *offsetx = image_width - *offsetx - width;
+          *offsety = image_height - *offsety - height;
+          break;
+        case 3:   /* 270° */
+          buffer   = *offsetx;
+          *offsetx = *offsety;
+          *offsety = image_width - buffer - width;
+        }
     }
   else  /* rotate around the drawable center */
     {
       if (rotvals.angle != 2)
-	{
-	  *offsetx = *offsetx + (width-height)/2 ;
-	  *offsety = *offsety + (height-width)/2 ;
-	}
+        {
+          *offsetx = *offsetx + (width-height)/2 ;
+          *offsety = *offsety + (height-width)/2 ;
+        }
     }
   return;
 }
@@ -287,28 +287,28 @@
       gimp_tile_cache_ntiles (2 * (width / gimp_tile_width() + 1));
 
       gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height,
-			   FALSE, FALSE);
+                           FALSE, FALSE);
       gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height,
-			   TRUE, TRUE);
+                           TRUE, TRUE);
 
       src_row  = (guchar *) g_malloc (width * bytes);
       dest_row = (guchar *) g_malloc (width * bytes);
 
       for (row = 0; row < height; row++)
-	{
-	  gimp_pixel_rgn_get_row (&srcPR, src_row, 0, row, width);
-	  for (col = 0; col < width; col++)
-	    {
-	      memcpy (dest_row + col * bytes,
-		      src_row + (width - 1 - col) * bytes,
-		      bytes);
-	    }
-	  gimp_pixel_rgn_set_row (&destPR, dest_row, 0, (height - row - 1),
-				  width);
-
-	  if ((row % 5) == 0)
-	    gimp_progress_update ((double) row / (double) height);
-	}
+        {
+          gimp_pixel_rgn_get_row (&srcPR, src_row, 0, row, width);
+          for (col = 0; col < width; col++)
+            {
+              memcpy (dest_row + col * bytes,
+                      src_row + (width - 1 - col) * bytes,
+                      bytes);
+            }
+          gimp_pixel_rgn_set_row (&destPR, dest_row, 0, (height - row - 1),
+                                  width);
+
+          if ((row % 5) == 0)
+            gimp_progress_update ((double) row / (double) height);
+        }
 
       g_free (src_row);
       g_free (dest_row);
@@ -330,36 +330,36 @@
                               (longside / gimp_tile_height () + 1));
 
       gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, longside, longside,
-			   FALSE, FALSE);
+                           FALSE, FALSE);
       gimp_pixel_rgn_init (&destPR, drawable, 0, 0, longside, longside,
-			   TRUE, TRUE);
+                           TRUE, TRUE);
 
       buffer = g_malloc (longside * bytes);
 
       if (rotvals.angle == 1)     /* we're rotating by 90° */
-	{
-	  for (row = 0; row < height; row++)
-	    {
-	      gimp_pixel_rgn_get_row (&srcPR, buffer, 0, row, width);
-	      gimp_pixel_rgn_set_col (&destPR, buffer, (height - row - 1), 0,
-				      width);
-
-	      if ((row % 5) == 0)
-		gimp_progress_update ((double) row / (double) height);
-	    }
-	}
+        {
+          for (row = 0; row < height; row++)
+            {
+              gimp_pixel_rgn_get_row (&srcPR, buffer, 0, row, width);
+              gimp_pixel_rgn_set_col (&destPR, buffer, (height - row - 1), 0,
+                                      width);
+
+              if ((row % 5) == 0)
+                gimp_progress_update ((double) row / (double) height);
+            }
+        }
       else                        /* we're rotating by 270° */
-	{
-	  for (col = 0; col < width; col++)
-	    {
-	      gimp_pixel_rgn_get_col (&srcPR, buffer, col, 0, height);
-	      gimp_pixel_rgn_set_row (&destPR, buffer, 0, (width - col - 1),
-				      height);
-
-	      if ((col % 5) == 0)
-		gimp_progress_update ((double) col / (double) width);
-	    }
-	}
+        {
+          for (col = 0; col < width; col++)
+            {
+              gimp_pixel_rgn_get_col (&srcPR, buffer, col, 0, height);
+              gimp_pixel_rgn_set_row (&destPR, buffer, 0, (width - col - 1),
+                                      height);
+
+              if ((col % 5) == 0)
+                gimp_progress_update ((double) col / (double) width);
+            }
+        }
 
       g_free (buffer);
 
@@ -377,9 +377,9 @@
 
   gimp_drawable_offsets (drawable->drawable_id, &offsetx, &offsety);
   rotate_compute_offsets (&offsetx, &offsety,
-			  gimp_image_width (image_ID),
-			  gimp_image_height (image_ID),
-			  width, height);
+                          gimp_image_width (image_ID),
+                          gimp_image_height (image_ID),
+                          width, height);
   gimp_layer_set_offsets (drawable->drawable_id, offsetx, offsety);
 
   if (was_lock_alpha)
@@ -409,29 +409,29 @@
   if (rotvals.everything)
     {
       if (! gimp_selection_is_empty (image_ID))
-	{
-	  gimp_message (_("You can not rotate the whole image if there's a selection."));
-	  gimp_drawable_detach (active_drawable);
-	  return;
-	}
+        {
+          gimp_message (_("You can not rotate the whole image if there's a selection."));
+          gimp_drawable_detach (active_drawable);
+          return;
+        }
       if (gimp_drawable_is_layer (active_drawable->drawable_id) &&
           gimp_layer_is_floating_sel (active_drawable->drawable_id))
-	{
-	  gimp_message (_("You can not rotate the whole image if there's a floating selection."));
-	  gimp_drawable_detach (active_drawable);
-	  return;
-	}
+        {
+          gimp_message (_("You can not rotate the whole image if there's a floating selection."));
+          gimp_drawable_detach (active_drawable);
+          return;
+        }
     }
   else
     /* if we are trying to rotate a channel or a mask,
        create an error message and exit */
     {
       if (! gimp_drawable_is_layer (active_drawable->drawable_id))
-	{
-	  gimp_message (_("Sorry, channels and masks can not be rotated."));
-	  gimp_drawable_detach (active_drawable);
-	  return;
-	}
+        {
+          gimp_message (_("Sorry, channels and masks can not be rotated."));
+          gimp_drawable_detach (active_drawable);
+          return;
+        }
     }
 
   gimp_progress_init (_("Rotating"));
@@ -446,79 +446,79 @@
       gimp_drawable_detach (active_drawable);
       layers = gimp_image_get_layers (image_ID, &nlayers);
       for (i = 0; i < nlayers; i++)
-	{
-	  drawable = gimp_drawable_get (layers[i]);
-	  rotate_drawable (drawable);
-	  gimp_drawable_detach (drawable);
-	}
+        {
+          drawable = gimp_drawable_get (layers[i]);
+          rotate_drawable (drawable);
+          gimp_drawable_detach (drawable);
+        }
       g_free (layers);
 
       /* build a list of all guides and remove them */
       guide_ID = 0;
       while ((guide_ID = gimp_image_find_next_guide (image_ID, guide_ID)) != 0)
-	{
-	  guide = g_new (GuideInfo, 1);
-	  guide->ID = guide_ID;
-	  guide->orientation = gimp_image_get_guide_orientation (image_ID,
+        {
+          guide = g_new (GuideInfo, 1);
+          guide->ID = guide_ID;
+          guide->orientation = gimp_image_get_guide_orientation (image_ID,
                                                                  guide_ID);
-	  guide->position = gimp_image_get_guide_position (image_ID, guide_ID);
-	  guides = g_list_prepend (guides, guide);
-	}
+          guide->position = gimp_image_get_guide_position (image_ID, guide_ID);
+          guides = g_list_prepend (guides, guide);
+        }
       for (list = guides; list; list = list->next)
-	{
-	  guide = (GuideInfo *) list->data;
-	  gimp_image_delete_guide (image_ID, guide->ID);
-	}
+        {
+          guide = (GuideInfo *) list->data;
+          gimp_image_delete_guide (image_ID, guide->ID);
+        }
 
       /* if rotation is not 180 degrees, resize the image */
       /*    Do it now after the guides are removed, since */
       /*    gimp_image_resize() moves the guides.         */
       if (rotvals.angle != 2)
-	gimp_image_resize (image_ID, height, width, 0, 0);
+        gimp_image_resize (image_ID, height, width, 0, 0);
 
       /* add the guides back to the image */
       if (guides)
-	{
-	  switch (rotvals.angle)
-	    {
-	    case 1:
-	      for (list = guides; list; list = list->next)
-		{
-		  guide = (GuideInfo *)list->data;
-		  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
-		    gimp_image_add_vguide (image_ID, height - guide->position);
-		  else
-		    gimp_image_add_hguide (image_ID, guide->position);
-		  g_free (guide);
-		}
-	      break;
-	    case 2:
-	      for (list = guides; list; list = list->next)
-		{
-		  guide = (GuideInfo *)list->data;
-		  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
-		    gimp_image_add_hguide (image_ID, height - guide->position);
-		  else
-		    gimp_image_add_vguide (image_ID, width - guide->position);
-		  g_free (guide);
-		}
-	      break;
-	    case 3:
-	      for (list = guides; list; list = list->next)
-		{
-		  guide = (GuideInfo *)list->data;
-		  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
-		    gimp_image_add_vguide (image_ID, guide->position);
-		  else
-		    gimp_image_add_hguide (image_ID, width - guide->position);
-		  g_free (guide);
-		}
-	      break;
-	    default:
-	      break;
-	    }
-	  g_list_free (guides);
-	}
+        {
+          switch (rotvals.angle)
+            {
+            case 1:
+              for (list = guides; list; list = list->next)
+                {
+                  guide = (GuideInfo *)list->data;
+                  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
+                    gimp_image_add_vguide (image_ID, height - guide->position);
+                  else
+                    gimp_image_add_hguide (image_ID, guide->position);
+                  g_free (guide);
+                }
+              break;
+            case 2:
+              for (list = guides; list; list = list->next)
+                {
+                  guide = (GuideInfo *)list->data;
+                  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
+                    gimp_image_add_hguide (image_ID, height - guide->position);
+                  else
+                    gimp_image_add_vguide (image_ID, width - guide->position);
+                  g_free (guide);
+                }
+              break;
+            case 3:
+              for (list = guides; list; list = list->next)
+                {
+                  guide = (GuideInfo *)list->data;
+                  if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
+                    gimp_image_add_vguide (image_ID, guide->position);
+                  else
+                    gimp_image_add_hguide (image_ID, width - guide->position);
+                  g_free (guide);
+                }
+              break;
+            default:
+              break;
+            }
+          g_list_free (guides);
+        }
     }
   else  /* rotate only the active layer */
     {

Modified: trunk/plug-ins/common/screenshot.c
==============================================================================
--- trunk/plug-ins/common/screenshot.c	(original)
+++ trunk/plug-ins/common/screenshot.c	Mon Oct 20 06:04:39 2008
@@ -186,10 +186,10 @@
 
 static void      query (void);
 static void      run   (const gchar      *name,
-			gint              nparams,
-			const GimpParam  *param,
-			gint             *nreturn_vals,
-			GimpParam       **return_vals);
+                        gint              nparams,
+                        const GimpParam  *param,
+                        gint             *nreturn_vals,
+                        GimpParam       **return_vals);
 
 static GdkNativeWindow   select_window (GdkScreen    *screen);
 static gint32            create_image  (GdkPixbuf    *pixbuf,
@@ -207,7 +207,7 @@
 const GimpPlugInInfo PLUG_IN_INFO =
 {
   NULL,  /* init_proc  */
-  NULL,	 /* quit_proc  */
+  NULL,  /* quit_proc  */
   query, /* query_proc */
   run    /* run_proc   */
 };
@@ -237,7 +237,7 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Create an image from an area of the screen"),
+                          N_("Create an image from an area of the screen"),
                           "The plug-in allows to take screenshots of a an "
                           "interactively selected window or of the desktop, "
                           "either the whole desktop or an interactively "
@@ -246,16 +246,16 @@
                           "passed as a parameter.  The last four parameters "
                           "are optional and can be used to specify the corners "
                           "of the region to be grabbed.",
-			  "Sven Neumann <sven gimp org>, "
+                          "Sven Neumann <sven gimp org>, "
                           "Henrik Brix Andersen <brix gimp org>",
-			  "1998 - 2008",
-			  "v1.1 (2008/04)",
-			  N_("_Screenshot..."),
-			  NULL,
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args),
+                          "1998 - 2008",
+                          "v1.1 (2008/04)",
+                          N_("_Screenshot..."),
+                          NULL,
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args),
                           G_N_ELEMENTS (return_vals),
-			  args, return_vals);
+                          args, return_vals);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/File/Create/Acquire");
   gimp_plugin_icon_register (PLUG_IN_PROC, GIMP_ICON_TYPE_INLINE_PIXBUF,
@@ -295,35 +295,35 @@
 
      /* Get information from the dialog */
       if (! shoot_dialog (&screen))
-	status = GIMP_PDB_CANCEL;
+        status = GIMP_PDB_CANCEL;
       break;
 
     case GIMP_RUN_NONINTERACTIVE:
       if (nparams == 3)
-	{
+        {
           gboolean do_root = param[1].data.d_int32;
 
           shootvals.shoot_type   = do_root ? SHOOT_ROOT : SHOOT_WINDOW;
-	  shootvals.window_id    = param[2].data.d_int32;
+          shootvals.window_id    = param[2].data.d_int32;
           shootvals.select_delay = 0;
-	}
+        }
       else if (nparams == 7)
-	{
-	  shootvals.shoot_type   = SHOOT_REGION;
-	  shootvals.window_id    = param[2].data.d_int32;
+        {
+          shootvals.shoot_type   = SHOOT_REGION;
+          shootvals.window_id    = param[2].data.d_int32;
           shootvals.select_delay = 0;
           shootvals.x1           = param[3].data.d_int32;
           shootvals.y1           = param[4].data.d_int32;
           shootvals.x2           = param[5].data.d_int32;
           shootvals.y2           = param[6].data.d_int32;
-	}
+        }
       else
         {
           status = GIMP_PDB_CALLING_ERROR;
         }
 
       if (! gdk_init_check (NULL, NULL))
-	status = GIMP_PDB_CALLING_ERROR;
+        status = GIMP_PDB_CALLING_ERROR;
       break;
 
     case GIMP_RUN_WITH_LAST_VALS:
@@ -338,7 +338,7 @@
   if (status == GIMP_PDB_SUCCESS)
     {
       if (shootvals.select_delay > 0)
-	shoot_delay (shootvals.select_delay);
+        shoot_delay (shootvals.select_delay);
 
       if (shootvals.shoot_type != SHOOT_ROOT && ! shootvals.window_id)
         {
@@ -360,12 +360,12 @@
   if (status == GIMP_PDB_SUCCESS)
     {
       if (run_mode == GIMP_RUN_INTERACTIVE)
-	{
-	  /* Store variable states for next run */
-	  gimp_set_data (PLUG_IN_PROC, &shootvals, sizeof (ScreenshotValues));
+        {
+          /* Store variable states for next run */
+          gimp_set_data (PLUG_IN_PROC, &shootvals, sizeof (ScreenshotValues));
 
-	  gimp_display_new (image_ID);
-	}
+          gimp_display_new (image_ID);
+        }
 
       /* set return values */
       *nreturn_vals = 2;
@@ -1059,11 +1059,11 @@
 
   dialog = gimp_dialog_new (_("Screenshot"), PLUG_IN_BINARY,
                             NULL, 0,
-			    gimp_standard_help_func, PLUG_IN_PROC,
+                            gimp_standard_help_func, PLUG_IN_PROC,
 
-			    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 
-			    NULL);
+                            NULL);
 
   button = gtk_dialog_add_button (GTK_DIALOG (dialog),
                                   _("S_nap"), GTK_RESPONSE_OK);
@@ -1118,7 +1118,7 @@
 
   /*  single window  */
   button = gtk_radio_button_new_with_mnemonic (radio_group,
-					       _("Take a screenshot of "
+                                               _("Take a screenshot of "
                                                  "a single _window"));
   radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
@@ -1155,7 +1155,7 @@
 
   /*  whole screen  */
   button = gtk_radio_button_new_with_mnemonic (radio_group,
-					       _("Take a screenshot of "
+                                               _("Take a screenshot of "
                                                  "the entire _screen"));
   radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
@@ -1194,7 +1194,7 @@
 
   /*  dragged region  */
   button = gtk_radio_button_new_with_mnemonic (radio_group,
-					       _("Select a _region to grab"));
+                                               _("Select a _region to grab"));
   radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
                                 shootvals.shoot_type == SHOOT_REGION);

Modified: trunk/plug-ins/common/semi-flatten.c
==============================================================================
--- trunk/plug-ins/common/semi-flatten.c	(original)
+++ trunk/plug-ins/common/semi-flatten.c	Mon Oct 20 06:04:39 2008
@@ -34,10 +34,10 @@
  */
 static void   query       (void);
 static void   run         (const gchar      *name,
-			   gint              nparams,
-			   const GimpParam  *param,
-			   gint             *nreturn_vals,
-			   GimpParam       **return_vals);
+                           gint              nparams,
+                           const GimpParam  *param,
+                           gint             *nreturn_vals,
+                           GimpParam       **return_vals);
 
 static void   semiflatten (GimpDrawable     *drawable);
 
@@ -65,18 +65,18 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Replace partial transparency with the current background color"),
-			  "This plugin flattens pixels in an RGBA image that "
-			  "aren't completely transparent against the current "
-			  "GIMP background color",
-			  "Adam D. Moss (adam foxbox org)",
-			  "Adam D. Moss (adam foxbox org)",
-			  "27th January 1998",
-			  N_("_Semi-Flatten"),
-			  "RGBA",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          N_("Replace partial transparency with the current background color"),
+                          "This plugin flattens pixels in an RGBA image that "
+                          "aren't completely transparent against the current "
+                          "GIMP background color",
+                          "Adam D. Moss (adam foxbox org)",
+                          "Adam D. Moss (adam foxbox org)",
+                          "27th January 1998",
+                          N_("_Semi-Flatten"),
+                          "RGBA",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Web");
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Layer/Transparency/Modify");
@@ -114,17 +114,17 @@
     {
       /*  Make sure that the drawable is indexed or RGB color  */
       if (gimp_drawable_is_rgb (drawable->drawable_id))
-	{
-	  gimp_progress_init (_("Semi-Flattening"));
-	  gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width ()
-				       + 1));
-	  semiflatten (drawable);
-	  gimp_displays_flush ();
-	}
+        {
+          gimp_progress_init (_("Semi-Flattening"));
+          gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width ()
+                                       + 1));
+          semiflatten (drawable);
+          gimp_displays_flush ();
+        }
       else
-	{
-	  status = GIMP_PDB_EXECUTION_ERROR;
-	}
+        {
+          status = GIMP_PDB_EXECUTION_ERROR;
+        }
     }
 
   values[0].data.d_status = status;
@@ -134,9 +134,9 @@
 
 static void
 semiflatten_func (const guchar *src,
-		  guchar       *dest,
-		  gint          bpp,
-		  gpointer      data)
+                  guchar       *dest,
+                  gint          bpp,
+                  gpointer      data)
 {
   dest[0] = (src[0] * src[3]) / 255 + (bgred * (255 - src[3])) / 255;
   dest[1] = (src[1] * src[3]) / 255 + (bggreen * (255 - src[3])) / 255;

Modified: trunk/plug-ins/common/tile-seamless.c
==============================================================================
--- trunk/plug-ins/common/tile-seamless.c	(original)
+++ trunk/plug-ins/common/tile-seamless.c	Mon Oct 20 06:04:39 2008
@@ -36,10 +36,10 @@
  */
 static void query (void);
 static void run   (const gchar      *name,
-		   gint              nparams,
-		   const GimpParam  *param,
-		   gint             *nreturn_vals,
-		   GimpParam       **return_vals);
+                   gint              nparams,
+                   const GimpParam  *param,
+                   gint             *nreturn_vals,
+                   GimpParam       **return_vals);
 
 static void tile  (GimpDrawable     *drawable);
 
@@ -64,17 +64,17 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Alters edges to make the image seamlessly tileable"),
-			  "This plugin creates a seamless tileable from "
+                          N_("Alters edges to make the image seamlessly tileable"),
+                          "This plugin creates a seamless tileable from "
                           "the input drawable",
-			  "Tim Rowley",
-			  "Tim Rowley",
-			  "1997",
-			  N_("_Make Seamless"),
-			  "RGB*, GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          "Tim Rowley",
+                          "Tim Rowley",
+                          "1997",
+                          N_("_Make Seamless"),
+                          "RGB*, GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Map");
 }
@@ -107,7 +107,7 @@
       tile(drawable);
 
       if (run_mode != GIMP_RUN_NONINTERACTIVE)
-	gimp_displays_flush ();
+        gimp_displays_flush ();
     }
   else
     {
@@ -192,7 +192,7 @@
 static void
 tile_region (GimpDrawable *drawable,
              gboolean      left,
-	     gint          x1,
+             gint          x1,
              gint          y1,
              gint          x2,
              gint          y2)
@@ -200,8 +200,8 @@
   glong         width, height;
   gint          bpp;
   gint          wodd, hodd;
-  gint	        w, h, x, y;
-  gint	        rgn1_x, rgn2_x, off_x;
+  gint          w, h, x, y;
+  gint          rgn1_x, rgn2_x, off_x;
   static gint   progress = 0;
   gint          max_progress;
   GimpPixelRgn  src1_rgn, src2_rgn, dest1_rgn, dest2_rgn;
@@ -239,14 +239,14 @@
   gimp_pixel_rgn_init (&src1_rgn, drawable, rgn1_x, y1, w, h, FALSE, FALSE);
   gimp_pixel_rgn_init (&dest1_rgn, drawable, rgn1_x, y1, w, h, TRUE, TRUE);
   gimp_pixel_rgn_init (&src2_rgn, drawable, rgn2_x, y1 + h + hodd,
-		       w, h, FALSE, FALSE);
+                       w, h, FALSE, FALSE);
   gimp_pixel_rgn_init (&dest2_rgn, drawable, rgn2_x, y1 + h + hodd,
-		       w, h, TRUE, TRUE);
+                       w, h, TRUE, TRUE);
 
   max_progress = width * height / 2;
 
   for (pr = gimp_pixel_rgns_register (4, &src1_rgn, &dest1_rgn, &src2_rgn,
-				      &dest2_rgn);
+                                      &dest2_rgn);
        pr != NULL;
        pr = gimp_pixel_rgns_process (pr))
     {
@@ -257,12 +257,12 @@
       gint   row    = src1_rgn.y - y1;
 
       for (y = 0; y < src1_rgn.h; y++, row++)
-	{
-	  guchar *s1 = src1;
-	  guchar *s2 = src2;
-	  guchar *d1 = dest1;
-	  guchar *d2 = dest2;
-	  gint col = src1_rgn.x - x1;
+        {
+          guchar *s1 = src1;
+          guchar *s2 = src2;
+          guchar *d1 = dest1;
+          guchar *d2 = dest2;
+          gint col = src1_rgn.x - x1;
 
           if (has_alpha)
             {
@@ -289,11 +289,11 @@
                 }
             }
 
-	  src1 += src1_rgn.rowstride;
-	  src2 += src2_rgn.rowstride;
-	  dest1 += dest1_rgn.rowstride;
-	  dest2 += dest2_rgn.rowstride;
-	}
+          src1 += src1_rgn.rowstride;
+          src2 += src2_rgn.rowstride;
+          dest1 += dest1_rgn.rowstride;
+          dest2 += dest2_rgn.rowstride;
+        }
 
       progress += src1_rgn.w * src1_rgn.h;
       gimp_progress_update ((gdouble) progress / (gdouble) max_progress);
@@ -320,11 +320,11 @@
       gint k;
 
       for (k = 0; k < src_rgn.h; k++)
-	{
-	  memcpy (dest_rgn.data + k * dest_rgn.rowstride,
-		  src_rgn.data + k * src_rgn.rowstride,
-		  src_rgn.w * src_rgn.bpp);
-	}
+        {
+          memcpy (dest_rgn.data + k * dest_rgn.rowstride,
+                  src_rgn.data + k * src_rgn.rowstride,
+                  src_rgn.w * src_rgn.bpp);
+        }
     }
 }
 

Modified: trunk/plug-ins/common/unit-editor.c
==============================================================================
--- trunk/plug-ins/common/unit-editor.c	(original)
+++ trunk/plug-ins/common/unit-editor.c	Mon Oct 20 06:04:39 2008
@@ -147,10 +147,10 @@
                           "Michael Natterer <mitch gimp org>",
                           "Michael Natterer <mitch gimp org>",
                           "2000",
-			  N_("U_nits"),
-			  "",
+                          N_("U_nits"),
+                          "",
                           GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
+                          G_N_ELEMENTS (args), 0,
                           args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Edit/Preferences");
@@ -207,7 +207,7 @@
 
   dialog = gimp_dialog_new (_("Add a New Unit"), PLUG_IN_BINARY,
                             main_dialog, GTK_DIALOG_MODAL,
-			    gimp_standard_help_func, PLUG_IN_PROC,
+                            gimp_standard_help_func, PLUG_IN_PROC,
 
                             GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                             GTK_STOCK_ADD,    GTK_RESPONSE_OK,
@@ -224,7 +224,7 @@
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_container_set_border_width (GTK_CONTAINER (table), 12);
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table,
-		      FALSE, FALSE, 0);
+                      FALSE, FALSE, 0);
   gtk_widget_show (table);
 
   entry = identifier_entry = gtk_entry_new ();
@@ -234,29 +234,29 @@
                           gimp_unit_get_identifier (template));
     }
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-			     _("_ID:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_ID:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   gimp_help_set_help_data (entry, gettext (columns[IDENTIFIER].help), NULL);
 
   spinbutton = gimp_spin_button_new (&factor_adj,
-				     (template != GIMP_UNIT_PIXEL) ?
-				     gimp_unit_get_factor (template) : 1.0,
-				     GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION,
-				     0.01, 0.1, 0.0, 0.01, 5);
+                                     (template != GIMP_UNIT_PIXEL) ?
+                                     gimp_unit_get_factor (template) : 1.0,
+                                     GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION,
+                                     0.01, 0.1, 0.0, 0.01, 5);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-			     _("_Factor:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("_Factor:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   gimp_help_set_help_data (spinbutton, gettext (columns[FACTOR].help), NULL);
 
   spinbutton = gimp_spin_button_new (&digits_adj,
-				     (template != GIMP_UNIT_PIXEL) ?
-				     gimp_unit_get_digits (template) : 2.0,
-				     0, 5, 1, 1, 0, 1, 0);
+                                     (template != GIMP_UNIT_PIXEL) ?
+                                     gimp_unit_get_digits (template) : 2.0,
+                                     0, 5, 1, 1, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
-			     _("_Digits:"), 0.0, 0.5,
-			     spinbutton, 1, TRUE);
+                             _("_Digits:"), 0.0, 0.5,
+                             spinbutton, 1, TRUE);
 
   gimp_help_set_help_data (spinbutton, gettext (columns[DIGITS].help), NULL);
 
@@ -267,8 +267,8 @@
                           gimp_unit_get_symbol (template));
     }
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
-			     _("_Symbol:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_Symbol:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   gimp_help_set_help_data (entry, gettext (columns[SYMBOL].help), NULL);
 
@@ -279,8 +279,8 @@
                           gimp_unit_get_abbreviation (template));
     }
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
-			     _("_Abbreviation:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_Abbreviation:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   gimp_help_set_help_data (entry, gettext (columns[ABBREVIATION].help), NULL);
 
@@ -291,8 +291,8 @@
                           gimp_unit_get_singular (template));
     }
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 5,
-			     _("Si_ngular:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("Si_ngular:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   gimp_help_set_help_data (entry, gettext (columns[SINGULAR].help), NULL);
 
@@ -303,8 +303,8 @@
                           gimp_unit_get_plural (template));
     }
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 6,
-			     _("_Plural:"), 0.0, 0.5,
-			     entry, 1, FALSE);
+                             _("_Plural:"), 0.0, 0.5,
+                             entry, 1, FALSE);
 
   gimp_help_set_help_data (entry, gettext (columns[PLURAL].help), NULL);
 
@@ -451,12 +451,12 @@
 
   toolbar = gtk_ui_manager_get_widget (ui_manager, "/unit-editor-toolbar");
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), toolbar,
-		      FALSE, FALSE, 0);
+                      FALSE, FALSE, 0);
   gtk_widget_show (toolbar);
 
   scrolled_win = gtk_scrolled_window_new (NULL, NULL);
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
-				       GTK_SHADOW_IN);
+                                       GTK_SHADOW_IN);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
                                   GTK_POLICY_NEVER,
                                   GTK_POLICY_ALWAYS);
@@ -481,7 +481,7 @@
   gtk_tree_view_append_column (GTK_TREE_VIEW (tv), col);
 
   gimp_help_set_help_data (col->button,
-			   gettext (columns[SAVE].help), NULL);
+                           gettext (columns[SAVE].help), NULL);
 
   g_signal_connect (rend, "toggled",
                     G_CALLBACK (saved_toggled_callback),
@@ -530,7 +530,7 @@
 
 static void
 new_callback (GtkAction   *action,
-	      GtkTreeView *tv)
+              GtkTreeView *tv)
 {
   GimpUnit  unit;
 
@@ -563,7 +563,7 @@
 
 static void
 duplicate_callback (GtkAction   *action,
-		    GtkTreeView *tv)
+                    GtkTreeView *tv)
 {
   GtkTreeModel     *model;
   GtkTreeSelection *sel;

Modified: trunk/plug-ins/common/unsharp-mask.c
==============================================================================
--- trunk/plug-ins/common/unsharp-mask.c	(original)
+++ trunk/plug-ins/common/unsharp-mask.c	Mon Oct 20 06:04:39 2008
@@ -174,7 +174,7 @@
    */
   drawable = gimp_drawable_get (param[2].data.d_drawable);
   gimp_tile_cache_ntiles (2 * MAX (drawable->width  / gimp_tile_width () + 1 ,
-			           drawable->height / gimp_tile_height () + 1));
+                                   drawable->height / gimp_tile_height () + 1));
 
   switch (run_mode)
     {

Modified: trunk/plug-ins/common/value-propagate.c
==============================================================================
--- trunk/plug-ins/common/value-propagate.c	(original)
+++ trunk/plug-ins/common/value-propagate.c	Mon Oct 20 06:04:39 2008
@@ -642,7 +642,7 @@
     case GIMP_RGB_IMAGE:
     case GIMP_RGBA_IMAGE:
       if (*tmp == NULL)
-	*tmp = (void *) g_new (gfloat, 1);
+        *tmp = (void *) g_new (gfloat, 1);
       **(float **)tmp = channel_mask[0] * here[0] * here[0]
                      + channel_mask[1] * here[1] * here[1]
                      + channel_mask[2] * here[2] * here[2];
@@ -700,7 +700,7 @@
     case GIMP_RGB_IMAGE:
     case GIMP_RGBA_IMAGE:
       if (*tmp == NULL)
-	*tmp = (void *) g_new (gfloat, 1);
+        *tmp = (void *) g_new (gfloat, 1);
       **(float **)tmp = (channel_mask[0] * here[0] * here[0]
                      + channel_mask[1] * here[1] * here[1]
                      + channel_mask[2] * here[2] * here[2]);

Modified: trunk/plug-ins/common/warp.c
==============================================================================
--- trunk/plug-ins/common/warp.c	(original)
+++ trunk/plug-ins/common/warp.c	Mon Oct 20 06:04:39 2008
@@ -49,7 +49,7 @@
  *
  * Version 0.34  10/30/97   'Fixed' drawable update problem
  *               Added 16-bit resolution to differential map
- *	         Added substep increments for finer control
+ *               Added substep increments for finer control
  *
  * Version 0.33  10/26/97   Added 'angle increment' to user interface
  *
@@ -113,54 +113,54 @@
 
 static void      query  (void);
 static void      run    (const gchar      *name,
-			 gint              nparams,
-			 const GimpParam  *param,
-			 gint             *nreturn_vals,
-			 GimpParam       **return_vals);
+                         gint              nparams,
+                         const GimpParam  *param,
+                         gint             *nreturn_vals,
+                         GimpParam       **return_vals);
 
 static void      blur16           (GimpDrawable *drawable);
 
 static void      diff             (GimpDrawable *drawable,
-				   gint32       *xl_id,
-				   gint32       *yl_id);
+                                   gint32       *xl_id,
+                                   gint32       *yl_id);
 
 static void      diff_prepare_row (GimpPixelRgn *pixel_rgn,
-				   guchar       *data,
-				   gint          x,
-				   gint          y,
-				   gint          w);
+                                   guchar       *data,
+                                   gint          x,
+                                   gint          y,
+                                   gint          w);
 
 static void      warp_one         (GimpDrawable *draw,
-				   GimpDrawable *new,
-				   GimpDrawable *map_x,
-				   GimpDrawable *map_y,
-				   GimpDrawable *mag_draw,
-				   gboolean      first_time,
-				   gint          step);
+                                   GimpDrawable *new,
+                                   GimpDrawable *map_x,
+                                   GimpDrawable *map_y,
+                                   GimpDrawable *mag_draw,
+                                   gboolean      first_time,
+                                   gint          step);
 
 static void      warp        (GimpDrawable *drawable);
 
 static gboolean  warp_dialog (GimpDrawable *drawable);
 static GimpTile *warp_pixel  (GimpDrawable *drawable,
-			      GimpTile     *tile,
-			      gint          width,
-			      gint          height,
-			      gint          x1,
-			      gint          y1,
-			      gint          x2,
-			      gint          y2,
-			      gint          x,
-			      gint          y,
-			      gint         *row,
-			      gint         *col,
-			      guchar       *pixel);
+                              GimpTile     *tile,
+                              gint          width,
+                              gint          height,
+                              gint          x1,
+                              gint          y1,
+                              gint          x2,
+                              gint          y2,
+                              gint          x,
+                              gint          y,
+                              gint         *row,
+                              gint         *col,
+                              guchar       *pixel);
 
 static gboolean  warp_map_constrain       (gint32     image_id,
-					   gint32     drawable_id,
-					   gpointer   data);
+                                           gint32     drawable_id,
+                                           gpointer   data);
 static gdouble   warp_map_mag_give_value  (guchar    *pt,
-					   gint       alpha,
-					   gint       bytes);
+                                           gint       alpha,
+                                           gint       bytes);
 
 /* -------------------------------------------------------------------------- */
 /*   Variables global over entire plug-in scope                               */
@@ -230,19 +230,19 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  N_("Twist or smear image in many different ways"),
-			  "Smears an image along vector paths calculated as "
-			  "the gradient of a separate control matrix. The "
-			  "effect can look like brushstrokes of acrylic or "
-			  "watercolor paint, in some cases.",
-			  "John P. Beale",
-			  "John P. Beale",
-			  "1997",
-			  N_("_Warp..."),
-			  "RGB*, GRAY*",
-			  GIMP_PLUGIN,
-			  G_N_ELEMENTS (args), 0,
-			  args, NULL);
+                          N_("Twist or smear image in many different ways"),
+                          "Smears an image along vector paths calculated as "
+                          "the gradient of a separate control matrix. The "
+                          "effect can look like brushstrokes of acrylic or "
+                          "watercolor paint, in some cases.",
+                          "John P. Beale",
+                          "John P. Beale",
+                          "1997",
+                          N_("_Warp..."),
+                          "RGB*, GRAY*",
+                          GIMP_PLUGIN,
+                          G_N_ELEMENTS (args), 0,
+                          args, NULL);
 
   gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Map");
 }
@@ -269,9 +269,9 @@
   /* get currently selected foreground pixel color */
   gimp_context_get_foreground (&color);
   gimp_rgb_get_uchar (&color,
-		      &color_pixel[0],
-		      &color_pixel[1],
-		      &color_pixel[2]);
+                      &color_pixel[0],
+                      &color_pixel[1],
+                      &color_pixel[2]);
 
   /*  Get the specified drawable  */
   drawable = gimp_drawable_get (param[2].data.d_drawable);
@@ -290,7 +290,7 @@
 
       /*  First acquire information with a dialog  */
       if (! warp_dialog (drawable))
-	return;
+        return;
       break;
 
     case GIMP_RUN_NONINTERACTIVE:
@@ -298,29 +298,29 @@
        *  (mode, image, draw, amount, warp_map, iter) are there
        */
       if (nparams < MIN_ARGS)
-	{
-	  status = GIMP_PDB_CALLING_ERROR;
-	}
+        {
+          status = GIMP_PDB_CALLING_ERROR;
+        }
       else
-	{
+        {
           gint  pcnt = MIN_ARGS;
 
-	  dvals.amount   = param[3].data.d_float;
-	  dvals.warp_map = param[4].data.d_int32;
-	  dvals.iter     = param[5].data.d_int32;
-
-	  if (nparams > pcnt++) dvals.dither       = param[6].data.d_float;
-	  if (nparams > pcnt++) dvals.angle        = param[7].data.d_float;
-	  if (nparams > pcnt++) dvals.wrap_type    = param[8].data.d_int32;
-	  if (nparams > pcnt++) dvals.mag_map      = param[9].data.d_int32;
-	  if (nparams > pcnt++) dvals.mag_use      = param[10].data.d_int32;
-	  if (nparams > pcnt++) dvals.substeps     = param[11].data.d_int32;
-	  if (nparams > pcnt++) dvals.grad_map     = param[12].data.d_int32;
-	  if (nparams > pcnt++) dvals.grad_scale   = param[13].data.d_float;
-	  if (nparams > pcnt++) dvals.vector_map   = param[14].data.d_int32;
-	  if (nparams > pcnt++) dvals.vector_scale = param[15].data.d_float;
-	  if (nparams > pcnt++) dvals.vector_angle = param[16].data.d_float;
-	}
+          dvals.amount   = param[3].data.d_float;
+          dvals.warp_map = param[4].data.d_int32;
+          dvals.iter     = param[5].data.d_int32;
+
+          if (nparams > pcnt++) dvals.dither       = param[6].data.d_float;
+          if (nparams > pcnt++) dvals.angle        = param[7].data.d_float;
+          if (nparams > pcnt++) dvals.wrap_type    = param[8].data.d_int32;
+          if (nparams > pcnt++) dvals.mag_map      = param[9].data.d_int32;
+          if (nparams > pcnt++) dvals.mag_use      = param[10].data.d_int32;
+          if (nparams > pcnt++) dvals.substeps     = param[11].data.d_int32;
+          if (nparams > pcnt++) dvals.grad_map     = param[12].data.d_int32;
+          if (nparams > pcnt++) dvals.grad_scale   = param[13].data.d_float;
+          if (nparams > pcnt++) dvals.vector_map   = param[14].data.d_int32;
+          if (nparams > pcnt++) dvals.vector_scale = param[15].data.d_float;
+          if (nparams > pcnt++) dvals.vector_angle = param[16].data.d_float;
+        }
       break;
 
     case GIMP_RUN_WITH_LAST_VALS:
@@ -342,7 +342,7 @@
 
       /*  Store data  */
       if (run_mode == GIMP_RUN_INTERACTIVE)
-	gimp_set_data (PLUG_IN_PROC, &dvals, sizeof (WarpVals));
+        gimp_set_data (PLUG_IN_PROC, &dvals, sizeof (WarpVals));
     }
 
   if (run_mode != GIMP_RUN_NONINTERACTIVE)
@@ -375,7 +375,7 @@
 
   dlg = gimp_dialog_new (_("Warp"), PLUG_IN_BINARY,
                          NULL, 0,
-			 gimp_standard_help_func, PLUG_IN_PROC,
+                         gimp_standard_help_func, PLUG_IN_PROC,
 
                          GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                          GTK_STOCK_OK,     GTK_RESPONSE_OK,
@@ -410,8 +410,8 @@
 
   /*  amount, iter */
   spinbutton = gimp_spin_button_new (&adj, dvals.amount,
-				     -1000, 1000, /* ??? */
-				     1, 10, 0, 1, 2);
+                                     -1000, 1000, /* ??? */
+                                     1, 10, 0, 1, 2);
   gtk_size_group_add_widget (spin_group, spinbutton);
   g_object_unref (spin_group);
 
@@ -426,7 +426,7 @@
                     &dvals.amount);
 
   spinbutton = gimp_spin_button_new (&adj, dvals.iter,
-				     1, 100, 1, 5, 0, 1, 0);
+                                     1, 100, 1, 5, 0, 1, 0);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
@@ -442,7 +442,7 @@
   label = gtk_label_new (_("Displacement map:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 1.0);
   gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
-		    GTK_FILL, GTK_FILL, 0, 0);
+                    GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
   combo = gimp_drawable_combo_box_new (warp_map_constrain, drawable);
@@ -451,7 +451,7 @@
                               &dvals.warp_map);
 
   gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 1, 2,
-		    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (combo);
 
   /* ======================================================================= */
@@ -460,12 +460,12 @@
   label = gtk_label_new (_("On edges:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
-		    GTK_FILL, GTK_FILL, 0, 0);
+                    GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
   toggle_hbox = gtk_hbox_new (FALSE, 6);
   gtk_table_attach (GTK_TABLE (table), toggle_hbox, 1, 3, 2, 3,
-		    GTK_FILL, GTK_FILL, 0, 0);
+                    GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (toggle_hbox);
 
   toggle = gtk_radio_button_new_with_label (group, _("Wrap"));
@@ -481,7 +481,7 @@
                     &dvals.wrap_type);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
-				dvals.wrap_type == WRAP);
+                                dvals.wrap_type == WRAP);
 
   toggle = gtk_radio_button_new_with_label (group, _("Smear"));
   group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
@@ -496,7 +496,7 @@
                     &dvals.wrap_type);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
-				dvals.wrap_type == SMEAR);
+                                dvals.wrap_type == SMEAR);
 
   toggle = gtk_radio_button_new_with_label (group, _("Black"));
   group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
@@ -511,7 +511,7 @@
                     &dvals.wrap_type);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
-				dvals.wrap_type == BLACK);
+                                dvals.wrap_type == BLACK);
 
   toggle = gtk_radio_button_new_with_label (group, _("Foreground color"));
   group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
@@ -526,7 +526,7 @@
                     &dvals.wrap_type);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
-				dvals.wrap_type == COLOR);
+                                dvals.wrap_type == COLOR);
 
 
 
@@ -545,7 +545,7 @@
   gtk_widget_show (table);
 
   spinbutton = gimp_spin_button_new (&adj, dvals.dither,
-				     0, 100, 1, 10, 0, 1, 2);
+                                     0, 100, 1, 10, 0, 1, 2);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
@@ -558,7 +558,7 @@
                     &dvals.dither);
 
   spinbutton = gimp_spin_button_new (&adj, dvals.angle,
-				     0, 360, 1, 15, 0, 1, 1);
+                                     0, 360, 1, 15, 0, 1, 1);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
@@ -571,7 +571,7 @@
                     &dvals.angle);
 
   spinbutton = gimp_spin_button_new (&adj, dvals.substeps,
-				     1, 100, 1, 5, 0, 1, 0);
+                                     1, 100, 1, 5, 0, 1, 0);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
@@ -587,7 +587,7 @@
   label = gtk_label_new (_("Magnitude map:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 1.0);
   gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
-		    GTK_FILL, GTK_FILL, 0, 0);
+                    GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
   combo = gimp_drawable_combo_box_new (warp_map_constrain, drawable);
@@ -596,14 +596,14 @@
                               &dvals.mag_map);
 
   gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 1, 2,
-		    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (combo);
 
   /*  Magnitude Usage  */
   toggle_hbox = gtk_hbox_new (FALSE, 4);
   gtk_container_set_border_width (GTK_CONTAINER (toggle_hbox), 1);
   gtk_table_attach (GTK_TABLE (table), toggle_hbox, 2, 3, 2, 3,
-		    GTK_FILL, GTK_FILL, 0, 0);
+                    GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (toggle_hbox);
 
   toggle = gtk_check_button_new_with_label (_("Use magnitude map"));
@@ -631,8 +631,8 @@
   gtk_widget_show (table);
 
   spinbutton = gimp_spin_button_new (&adj, dvals.grad_scale,
-				     -1000, 1000, /* ??? */
-				     0.01, 0.1, 0, 1, 3);
+                                     -1000, 1000, /* ??? */
+                                     0.01, 0.1, 0, 1, 3);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
@@ -648,7 +648,7 @@
 
   combo = gimp_drawable_combo_box_new (warp_map_constrain, drawable);
   gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 0, 1,
-		    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (combo);
 
   gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo), dvals.grad_map,
@@ -660,8 +660,8 @@
   /* ---------------------------------------------- */
 
   spinbutton = gimp_spin_button_new (&adj, dvals.vector_scale,
-				     -1000, 1000, /* ??? */
-				     0.01, 0.1, 0, 1, 3);
+                                     -1000, 1000, /* ??? */
+                                     0.01, 0.1, 0, 1, 3);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
@@ -676,7 +676,7 @@
   /* -------------------------------------------------------- */
 
   spinbutton = gimp_spin_button_new (&adj, dvals.vector_angle,
-				     0, 360, 1, 15, 0, 1, 1);
+                                     0, 360, 1, 15, 0, 1, 1);
   gtk_size_group_add_widget (spin_group, spinbutton);
 
   label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
@@ -691,7 +691,7 @@
   /* ---------  Vector map menu ----------------  */
   combo = gimp_drawable_combo_box_new (warp_map_constrain, drawable);
   gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 1, 2,
-		    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+                    GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (combo);
 
   gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo), dvals.vector_map,
@@ -699,8 +699,8 @@
                               &dvals.vector_map);
 
   gimp_help_set_help_data (combo,
-			   _("Fixed-direction-vector map selection menu"),
-			   NULL);
+                           _("Fixed-direction-vector map selection menu"),
+                           NULL);
 
   gtk_widget_show (dlg);
 
@@ -776,26 +776,26 @@
 
       d = dest;
       for (col = 0; col < (x2 - x1); col++) /* over columns of pixels */
-	{
-	  offb = col*src_bytes;    /* base of byte pointer offset */
-	  off1 = offb+1;                 /* offset into row arrays */
-
-	  pval = (256.0 * pr[offb - src_bytes] + pr[off1 - src_bytes] +
-		  256.0 * pr[offb] + pr[off1] +
-		  256.0 * pr[offb + src_bytes] + pr[off1 + src_bytes] +
-		  256.0 * cr[offb - src_bytes] + cr[off1 - src_bytes] +
-		  256.0 * cr[offb]  + cr[off1] +
-		  256.0 * cr[offb + src_bytes] + cr[off1 + src_bytes] +
-		  256.0 * nr[offb - src_bytes] + nr[off1 - src_bytes] +
-		  256.0 * nr[offb] + nr[off1] +
-		  256.0 * nr[offb + src_bytes]) + nr[off1 + src_bytes];
-
-	  pval /= 9.0;  /* take the average */
-	  *d++ = (guchar) (((gint) pval) >> 8);   /* high-order byte */
-	  *d++ = (guchar) (((gint) pval) % 256);  /* low-order byte  */
-	  d += dest_bytes_inc;       /* move data pointer on to next destination pixel */
+        {
+          offb = col*src_bytes;    /* base of byte pointer offset */
+          off1 = offb+1;                 /* offset into row arrays */
+
+          pval = (256.0 * pr[offb - src_bytes] + pr[off1 - src_bytes] +
+                  256.0 * pr[offb] + pr[off1] +
+                  256.0 * pr[offb + src_bytes] + pr[off1 + src_bytes] +
+                  256.0 * cr[offb - src_bytes] + cr[off1 - src_bytes] +
+                  256.0 * cr[offb]  + cr[off1] +
+                  256.0 * cr[offb + src_bytes] + cr[off1 + src_bytes] +
+                  256.0 * nr[offb - src_bytes] + nr[off1 - src_bytes] +
+                  256.0 * nr[offb] + nr[off1] +
+                  256.0 * nr[offb + src_bytes]) + nr[off1 + src_bytes];
+
+          pval /= 9.0;  /* take the average */
+          *d++ = (guchar) (((gint) pval) >> 8);   /* high-order byte */
+          *d++ = (guchar) (((gint) pval) % 256);  /* low-order byte  */
+          d += dest_bytes_inc;       /* move data pointer on to next destination pixel */
 
-	}
+        }
       /*  store the dest  */
       gimp_pixel_rgn_set_row (&destPR, dest, x1, row, (x2 - x1));
 
@@ -806,7 +806,7 @@
       nr = tmp;
 
       if ((row % 8) == 0)
-	gimp_progress_update ((double) row / (double) (y2 - y1));
+        gimp_progress_update ((double) row / (double) (y2 - y1));
     }
 
   /*  update the region  */
@@ -827,10 +827,10 @@
 
 static void
 diff_prepare_row (GimpPixelRgn *pixel_rgn,
-		  guchar       *data,
-		  gint          x,
-		  gint          y,
-		  gint          w)
+                  guchar       *data,
+                  gint          x,
+                  gint          y,
+                  gint          w)
 {
   gint b;
 
@@ -1088,14 +1088,14 @@
               offb = col*gbytes;     /* base of byte pointer offset into pixel values (R,G,B,Alpha, etc.) */
               for (bytes=0; bytes < src_bytes; bytes++) /* add all channels together */
                 {
- 		  off = offb+bytes;                 /* offset into row arrays */
-		  tx += ((gint) -prg[off - gbytes]   + (gint) prg[off + gbytes] +
+                  off = offb+bytes;                 /* offset into row arrays */
+                  tx += ((gint) -prg[off - gbytes]   + (gint) prg[off + gbytes] +
                          (gint) -2*crg[off - gbytes] + (gint) 2*crg[off + gbytes] +
                          (gint) -nrg[off - gbytes]   + (gint) nrg[off + gbytes]);
 
- 		  ty += ((gint) -prg[off - gbytes] - (gint)2*prg[off] - (gint) prg[off + gbytes] +
+                  ty += ((gint) -prg[off - gbytes] - (gint)2*prg[off] - (gint) prg[off + gbytes] +
                          (gint) nrg[off - gbytes] + (gint)2*nrg[off] + (gint) nrg[off + gbytes]);
-	        }
+                }
               tx *= gscalefac;
               ty *= gscalefac;
 
@@ -1162,7 +1162,7 @@
         }
 
       if ((row % 8) == 0)
-	gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
+        gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1));
 
     } /* for (row..) */
 
@@ -1280,12 +1280,12 @@
 
 static void
 warp_one (GimpDrawable *draw,
-	  GimpDrawable *new,
-	  GimpDrawable *map_x,
-	  GimpDrawable *map_y,
-	  GimpDrawable *mag_draw,
-	  gboolean      first_time,
-	  gint          step)
+          GimpDrawable *new,
+          GimpDrawable *map_x,
+          GimpDrawable *map_y,
+          GimpDrawable *mag_draw,
+          gboolean      first_time,
+          gint          step)
 {
   GimpPixelRgn src_rgn;
   GimpPixelRgn dest_rgn;
@@ -1460,7 +1460,7 @@
                    dy += g_rand_double_range (gr, -dvals.dither, dvals.dither);
                  }
 
-	      if (dvals.substeps != 1)
+              if (dvals.substeps != 1)
                 {   /* trace (substeps) iterations of displacement vector */
                   for (substep = 1; substep < dvals.substeps; substep++)
                     {
@@ -1511,59 +1511,59 @@
                     } /* for (substep) */
                 } /* if (substeps != 0) */
 
-	      /* --------------------------------------------------------- */
+              /* --------------------------------------------------------- */
 
-	      needx = x + dx;
-	      needy = y + dy;
+              needx = x + dx;
+              needy = y + dy;
 
-	      mx += xm_bytes;         /* pointers into x,y displacement maps */
-	      my += ym_bytes;
+              mx += xm_bytes;         /* pointers into x,y displacement maps */
+              my += ym_bytes;
 
-	      if (dvals.mag_use == TRUE)
-		mmag += mmag_bytes;
+              if (dvals.mag_use == TRUE)
+                mmag += mmag_bytes;
 
-	      /* Calculations complete; now copy the proper pixel */
+              /* Calculations complete; now copy the proper pixel */
 
-	      if (needx >= 0.0)
+              if (needx >= 0.0)
                 xi = (gint) needx;
-	      else
+              else
                 xi = -((gint) -needx + 1);
 
-	      if (needy >= 0.0)
+              if (needy >= 0.0)
                 yi = (gint) needy;
-	      else
+              else
                 yi = -((gint) -needy + 1);
 
-	      /* get 4 neighboring pixel values from source drawable for linear interpolation */
-	      tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi, yi, &row, &col, pixel[0]);
-	      tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi + 1, yi, &row, &col, pixel[1]);
-	      tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi, yi + 1, &row, &col, pixel[2]);
-	      tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi + 1, yi + 1, &row, &col, pixel[3]);
-
-	      for (k = 0; k < dest_bytes; k++)
-		{
-		  values[0] = pixel[0][k];
-		  values[1] = pixel[1][k];
-		  values[2] = pixel[2][k];
-		  values[3] = pixel[3][k];
+              /* get 4 neighboring pixel values from source drawable for linear interpolation */
+              tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi, yi, &row, &col, pixel[0]);
+              tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi + 1, yi, &row, &col, pixel[1]);
+              tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi, yi + 1, &row, &col, pixel[2]);
+              tile = warp_pixel (draw, tile, width, height, x1, y1, x2, y2, xi + 1, yi + 1, &row, &col, pixel[3]);
+
+              for (k = 0; k < dest_bytes; k++)
+                {
+                  values[0] = pixel[0][k];
+                  values[1] = pixel[1][k];
+                  values[2] = pixel[2][k];
+                  values[3] = pixel[3][k];
 
                   val = gimp_bilinear_8 (needx, needy, values);
 
-		  *dest++ = val;
-		} /* for k */
+                  *dest++ = val;
+                } /* for k */
 
-	    } /* for x */
+            } /* for x */
 
-	  /*	  srcrow += src_rgn.rowstride; */
-	  srcrow += src_rgn.rowstride;
-	  destrow += dest_rgn.rowstride;
-	  mxrow += map_x_rgn.rowstride;
-	  myrow += map_y_rgn.rowstride;
+          /*      srcrow += src_rgn.rowstride; */
+          srcrow += src_rgn.rowstride;
+          destrow += dest_rgn.rowstride;
+          mxrow += map_x_rgn.rowstride;
+          myrow += map_y_rgn.rowstride;
 
           if (dvals.mag_use == TRUE)
-	    mmagrow += mag_rgn.rowstride;
+            mmagrow += mag_rgn.rowstride;
 
-	} /* for y */
+        } /* for y */
 
       progress += (dest_rgn.w * dest_rgn.h);
       gimp_progress_update ((double) progress / (double) max_progress);
@@ -1592,8 +1592,8 @@
 
 static gdouble
 warp_map_mag_give_value (guchar *pt,
-			 gint    alpha,
-			 gint    bytes)
+                         gint    alpha,
+                         gint    bytes)
 {
   gdouble ret, val_alpha;
 
@@ -1614,18 +1614,18 @@
 
 static GimpTile *
 warp_pixel (GimpDrawable *drawable,
-	    GimpTile     *tile,
-	    gint       width,
-	    gint       height,
-	    gint       x1,
-	    gint       y1,
-	    gint       x2,
-	    gint       y2,
-	    gint       x,
-	    gint       y,
-	    gint      *row,
-	    gint      *col,
-	    guchar    *pixel)
+            GimpTile     *tile,
+            gint       width,
+            gint       height,
+            gint       x1,
+            gint       y1,
+            gint       x2,
+            gint       y2,
+            gint       x,
+            gint       y,
+            gint      *row,
+            gint      *col,
+            guchar    *pixel)
 {
   static guchar empty_pixel[4] = {0, 0, 0, 0};
   guchar *data;
@@ -1635,43 +1635,43 @@
   if (dvals.wrap_type == WRAP)
     {
       if (x < 0)
-	x = width - (-x % width);
+        x = width - (-x % width);
       else
-	x %= width;
+        x %= width;
 
       if (y < 0)
-	y = height - (-y % height);
+        y = height - (-y % height);
       else
-	y %= height;
+        y %= height;
     }
   /* Smear out the edges of the image by repeating pixels. */
   else if (dvals.wrap_type == SMEAR)
     {
       if (x < 0)
-	x = 0;
+        x = 0;
       else if (x > width - 1)
-	x = width - 1;
+        x = width - 1;
 
       if (y < 0)
-	y = 0;
+        y = 0;
       else if (y > height - 1)
-	y = height - 1;
+        y = height - 1;
     }
 
   if (x >= x1 && y >= y1 && x < x2 && y < y2)
     {
       if ((((guint) (x / tile_width)) != *col) ||
           (((guint) (y / tile_height)) != *row))
-	{
-	  *col = x / tile_width;
-	  *row = y / tile_height;
-
-	  if (tile)
-	    gimp_tile_unref (tile, FALSE);
-
-	  tile = gimp_drawable_get_tile (drawable, FALSE, *row, *col);
-	  gimp_tile_ref (tile);
-	}
+        {
+          *col = x / tile_width;
+          *row = y / tile_height;
+
+          if (tile)
+            gimp_tile_unref (tile, FALSE);
+
+          tile = gimp_drawable_get_tile (drawable, FALSE, *row, *col);
+          gimp_tile_ref (tile);
+        }
 
       data = (tile->data +
               tile->bpp * (tile->ewidth * (y % tile_height) + (x % tile_width)));
@@ -1694,11 +1694,11 @@
 
 static gboolean
 warp_map_constrain (gint32     image_id,
-		    gint32     drawable_id,
-		    gpointer   data)
+                    gint32     drawable_id,
+                    gpointer   data)
 {
   GimpDrawable *drawable = data;
 
   return (gimp_drawable_width (drawable_id)  == drawable->width &&
-	  gimp_drawable_height (drawable_id) == drawable->height);
+          gimp_drawable_height (drawable_id) == drawable->height);
 }

Modified: trunk/plug-ins/common/web-browser.c
==============================================================================
--- trunk/plug-ins/common/web-browser.c	(original)
+++ trunk/plug-ins/common/web-browser.c	Mon Oct 20 06:04:39 2008
@@ -54,7 +54,7 @@
 const GimpPlugInInfo PLUG_IN_INFO =
 {
   NULL,  /* init_proc  */
-  NULL,	 /* quit_proc  */
+  NULL,  /* quit_proc  */
   query, /* query_proc */
   run    /* run_proc   */
 };
@@ -71,11 +71,11 @@
   };
 
   gimp_install_procedure (PLUG_IN_PROC,
-			  "Open an URL in the user specified web browser",
+                          "Open an URL in the user specified web browser",
                           "Opens the given URL in the user specified web browser.",
-			  "Henrik Brix Andersen <brix gimp org>",
-			  "2003",
-			  "2003/09/16",
+                          "Henrik Brix Andersen <brix gimp org>",
+                          "2003",
+                          "2003/09/16",
                           NULL, NULL,
                           GIMP_PLUGIN,
                           G_N_ELEMENTS (args), 0,
@@ -138,48 +138,48 @@
       /* FIXME: should be translated when 2.6 got it's own branch */
       switch ((gint) hinst)
         {
-	  case 0 :
-	    err = ("The operating system is out of memory or resources.");
-	    break;
-	  case ERROR_FILE_NOT_FOUND :
-	    err = ("The specified file was not found.");
-	    break;
-	  case ERROR_PATH_NOT_FOUND :
-	    err = ("The specified path was not found.");
-	    break;
-	  case ERROR_BAD_FORMAT	:
-	    err = ("The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).");
-	    break;
-	  case SE_ERR_ACCESSDENIED :
-	    err = ("The operating system denied access to the specified file.");
-	    break;
-	  case SE_ERR_ASSOCINCOMPLETE :
-	    err = ("The file name association is incomplete or invalid.");
-	    break;
-	  case SE_ERR_DDEBUSY :
-	    err = ("DDE transaction busy");
-	    break;
-	  case SE_ERR_DDEFAIL :
-	    err = ("The DDE transaction failed.");
-	    break;
-	  case SE_ERR_DDETIMEOUT :
-	    err = ("The DDE transaction timed out.");
-	    break;
-	  case SE_ERR_DLLNOTFOUND :
-	    err = ("The specified DLL was not found.");
-	    break;
-	  case SE_ERR_NOASSOC :
-	    err = ("There is no application associated with the given file name extension.");
-	    break;
-	  case SE_ERR_OOM :
-	    err = ("There was not enough memory to complete the operation.");
-	    break;
-	  case SE_ERR_SHARE:
-	    err = ("A sharing violation occurred.");
-	    break;
-	  default :
-	    err = ("Unknown Windows error.");
-	}
+          case 0 :
+            err = ("The operating system is out of memory or resources.");
+            break;
+          case ERROR_FILE_NOT_FOUND :
+            err = ("The specified file was not found.");
+            break;
+          case ERROR_PATH_NOT_FOUND :
+            err = ("The specified path was not found.");
+            break;
+          case ERROR_BAD_FORMAT :
+            err = ("The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).");
+            break;
+          case SE_ERR_ACCESSDENIED :
+            err = ("The operating system denied access to the specified file.");
+            break;
+          case SE_ERR_ASSOCINCOMPLETE :
+            err = ("The file name association is incomplete or invalid.");
+            break;
+          case SE_ERR_DDEBUSY :
+            err = ("DDE transaction busy");
+            break;
+          case SE_ERR_DDEFAIL :
+            err = ("The DDE transaction failed.");
+            break;
+          case SE_ERR_DDETIMEOUT :
+            err = ("The DDE transaction timed out.");
+            break;
+          case SE_ERR_DLLNOTFOUND :
+            err = ("The specified DLL was not found.");
+            break;
+          case SE_ERR_NOASSOC :
+            err = ("There is no application associated with the given file name extension.");
+            break;
+          case SE_ERR_OOM :
+            err = ("There was not enough memory to complete the operation.");
+            break;
+          case SE_ERR_SHARE:
+            err = ("A sharing violation occurred.");
+            break;
+          default :
+            err = ("Unknown Windows error.");
+        }
 
       g_set_error (error, 0, 0, ("Failed to open '%s': %s"), url, err);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]