added newlines.

2006-04-26  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c (depth_first_search): added newlines.

	* app/core/gimpimage-contiguous-region.c: added const qualifiers.
This commit is contained in:
Sven Neumann 2006-04-26 14:18:10 +00:00 committed by Sven Neumann
parent dd15c31d73
commit a779b9b302
3 changed files with 41 additions and 34 deletions

View File

@ -1,3 +1,9 @@
2006-04-26 Sven Neumann <sven@gimp.org>
* app/base/siox.c (depth_first_search): added newlines.
* app/core/gimpimage-contiguous-region.c: added const qualifiers.
2006-04-26 Sven Neumann <sven@gimp.org>
* plug-ins/common/unsharp.c: use gimp_progress_set_text() instead

View File

@ -511,10 +511,10 @@ struct blob
};
/* This method checks out the neighbourhood of the pixel at position
* (x,y) in the TileManager mask, it adds the sourrounding
* pixels to the queue to allow further processing it uses maskVal to
* determine if the sourounding pixels have already been visited x,y
* are passed from above.
* (x,y) in the TileManager mask, it adds the surrounding pixels to
* the queue to allow further processing it uses maskVal to determine
* if the surrounding pixels have already been visited x,y are passed
* from above.
*/
static void
depth_first_search (TileManager *mask,
@ -525,15 +525,15 @@ depth_first_search (TileManager *mask,
struct blob *b,
guchar mark)
{
gint oldx = -1;
gint xx = b->seedx;
gint yy = b->seedy;
guchar val;
gint xx = b->seedx;
gint yy = b->seedy;
gint oldx = -1;
GSList *stack = NULL;
while (TRUE)
{
guchar val;
if (oldx == xx)
{
if (stack == NULL)
@ -544,9 +544,11 @@ depth_first_search (TileManager *mask,
yy = GPOINTER_TO_INT (stack->data);
stack = g_slist_delete_link (stack, stack);
}
oldx = xx;
read_pixel_data_1 (mask, xx, yy, &val);
if (val && (val != mark))
{
if (mark == FIND_BLOB_VISITED)
@ -559,22 +561,21 @@ depth_first_search (TileManager *mask,
write_pixel_data_1 (mask, xx, yy, &mark);
if (yy > y)
stack =
g_slist_prepend (g_slist_prepend
(stack, GINT_TO_POINTER (yy - 1)),
GINT_TO_POINTER (xx));
stack = g_slist_prepend (g_slist_prepend
(stack, GINT_TO_POINTER (yy - 1)),
GINT_TO_POINTER (xx));
if (yy + 1 < yheight)
stack =
g_slist_prepend (g_slist_prepend
(stack, GINT_TO_POINTER (yy + 1)),
GINT_TO_POINTER (xx));
stack = g_slist_prepend (g_slist_prepend
(stack, GINT_TO_POINTER (yy + 1)),
GINT_TO_POINTER (xx));
if (xx + 1 < xwidth)
{
if (xx > x)
stack =
g_slist_prepend (g_slist_prepend (stack,
GINT_TO_POINTER (yy)),
GINT_TO_POINTER (xx - 1));
stack = g_slist_prepend (g_slist_prepend (stack,
GINT_TO_POINTER (yy)),
GINT_TO_POINTER (xx - 1));
++xx;
}
else if (xx > x)

View File

@ -56,8 +56,8 @@ static void contiguous_region_by_color (ContinuousRegionData *cont,
PixelRegion *imagePR,
PixelRegion *maskPR);
static gint pixel_difference (guchar *col1,
guchar *col2,
static gint pixel_difference (const guchar *col1,
const guchar *col2,
gboolean antialias,
gint threshold,
gint bytes,
@ -72,7 +72,7 @@ static void ref_tiles (TileManager *src,
guchar **s,
guchar **m);
static gint find_contiguous_segment (GimpImage *image,
guchar *col,
const guchar *col,
PixelRegion *src,
PixelRegion *mask,
gint width,
@ -95,7 +95,7 @@ static void find_contiguous_region_helper (GimpImage *image,
gint threshold,
gint x,
gint y,
guchar *col);
const guchar *col);
/* public functions */
@ -317,13 +317,13 @@ contiguous_region_by_color (ContinuousRegionData *cont,
}
static gint
pixel_difference (guchar *col1,
guchar *col2,
gboolean antialias,
gint threshold,
gint bytes,
gboolean has_alpha,
gboolean select_transparent)
pixel_difference (const guchar *col1,
const guchar *col2,
gboolean antialias,
gint threshold,
gint bytes,
gboolean has_alpha,
gboolean select_transparent)
{
gint max = 0;
@ -395,7 +395,7 @@ ref_tiles (TileManager *src,
static int
find_contiguous_segment (GimpImage *image,
guchar *col,
const guchar *col,
PixelRegion *src,
PixelRegion *mask,
gint width,
@ -523,7 +523,7 @@ find_contiguous_region_helper (GimpImage *image,
gint threshold,
gint x,
gint y,
guchar *col)
const guchar *col)
{
gint start, end;
gint new_start, new_end;