From 7dd45bc30acb869d20fe7c07b207f22a44b12ad6 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 24 Nov 2006 11:10:10 +0000 Subject: [PATCH] plug-ins/flame/libifs.[ch] plug-ins/flame/rect.c 2006-11-24 Sven Neumann * plug-ins/flame/libifs.[ch] * plug-ins/flame/rect.c * plug-ins/maze/algorithms.c * plug-ins/maze/handy.c * plug-ins/maze/maze.h * plug-ins/sel2path/fit.c * plug-ins/sel2path/pxl-outline.h: fixed prototypes. --- ChangeLog | 10 ++++++++++ plug-ins/flame/libifs.c | 6 +++--- plug-ins/flame/libifs.h | 6 +++--- plug-ins/flame/rect.c | 2 +- plug-ins/maze/algorithms.c | 8 +++++--- plug-ins/maze/handy.c | 12 ++++++++++++ plug-ins/maze/maze.h | 34 +++++++++++++++++++++++++++++++++ plug-ins/sel2path/fit.c | 2 +- plug-ins/sel2path/pxl-outline.h | 6 ++---- 9 files changed, 71 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64c707166f..8d3601ac0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-11-24 Sven Neumann + + * plug-ins/flame/libifs.[ch] + * plug-ins/flame/rect.c + * plug-ins/maze/algorithms.c + * plug-ins/maze/handy.c + * plug-ins/maze/maze.h + * plug-ins/sel2path/fit.c + * plug-ins/sel2path/pxl-outline.h: fixed prototypes. + 2006-11-24 Manish Singh * plug-ins/pygimp/pygimp-vectors.c: bezier_stroke_new_moveto and diff --git a/plug-ins/flame/libifs.c b/plug-ins/flame/libifs.c index d20d6dda46..a2446b9e63 100644 --- a/plug-ins/flame/libifs.c +++ b/plug-ins/flame/libifs.c @@ -873,17 +873,17 @@ void print_control_point(f, cp, quote) } /* returns a uniform variable from 0 to 1 */ -double random_uniform01() { +double random_uniform01(void) { return g_random_double (); } -double random_uniform11() { +double random_uniform11(void) { return g_random_double_range (-1, 1); } /* returns a mean 0 variance 1 random variable see numerical recipies p 217 */ -double random_gaussian() { +double random_gaussian(void) { static int iset = 0; static double gset; double fac, r, v1, v2; diff --git a/plug-ins/flame/libifs.h b/plug-ins/flame/libifs.h index 5b81048b87..41aa728625 100644 --- a/plug-ins/flame/libifs.h +++ b/plug-ins/flame/libifs.h @@ -81,9 +81,9 @@ extern void parse_control_point(char **ss, control_point *cp); extern void estimate_bounding_box(control_point *cp, double eps, double *bmin, double *bmax); extern void sort_control_points(control_point *cps, int ncps, double (*metric)()); extern double standard_metric(control_point *cp1, control_point *cp2); -extern double random_uniform01(); -extern double random_uniform11(); -extern double random_gaussian(); +extern double random_uniform01(void); +extern double random_uniform11(void); +extern double random_gaussian(void); extern void mult_matrix(double s1[2][2], double s2[2][2], double d[2][2]); void copy_variation(control_point *cp0, control_point *cp1); #endif diff --git a/plug-ins/flame/rect.c b/plug-ins/flame/rect.c index a0fafc4d17..86d7d42a50 100644 --- a/plug-ins/flame/rect.c +++ b/plug-ins/flame/rect.c @@ -68,7 +68,7 @@ typedef accum_t abucket[4]; } /* sum of entries of vector to 1 */ -void normalize_vector(v, n) +static void normalize_vector(v, n) double *v; int n; { diff --git a/plug-ins/maze/algorithms.c b/plug-ins/maze/algorithms.c index e729e8b512..9d0b56fdbd 100644 --- a/plug-ins/maze/algorithms.c +++ b/plug-ins/maze/algorithms.c @@ -37,16 +37,18 @@ * */ -#ifndef SOLO_COMPILE #include "config.h" -#endif #include -#include "maze.h" + #include "libgimp/gimp.h" #include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" +#include "maze.h" + + extern MazeValues mvals; extern GRand *gr; diff --git a/plug-ins/maze/handy.c b/plug-ins/maze/handy.c index 8b796484ff..68fe771787 100644 --- a/plug-ins/maze/handy.c +++ b/plug-ins/maze/handy.c @@ -29,6 +29,9 @@ #include "libgimp/gimp.h" +#include "maze.h" + + /* get_colors Returns the current foreground and background colors in nice little arrays. It works nicely for RGB and grayscale images, however handling of indexed images is somewhat broken. Patches @@ -103,6 +106,15 @@ get_colors (GimpDrawable *drawable, * We could keep a row of each color on hand so we wouldn't have to * re-fill it every time... */ +#include "config.h" + +#include + +#include "libgimp/gimp.h" + +#include "maze.h" + + void drawbox( GimpPixelRgn *dest_rgn, guint x, guint y, guint w, guint h, diff --git a/plug-ins/maze/maze.h b/plug-ins/maze/maze.h index 8f7993a2ef..3a321496a9 100644 --- a/plug-ins/maze/maze.h +++ b/plug-ins/maze/maze.h @@ -1,3 +1,23 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef __MAZE_H__ +#define __MAZE_H__ + #define MAZE_TITLE N_("Maze") @@ -44,3 +64,17 @@ enum CellTypes { FRONTIER, MASKED }; + + +void get_colors (GimpDrawable *drawable, + guint8 *fg, + guint8 *bg); +void drawbox (GimpPixelRgn *dest_rgn, + guint x, + guint y, + guint w, + guint h, + guint8 clr[4]); + + +#endif /* __MAZE_H__ */ diff --git a/plug-ins/sel2path/fit.c b/plug-ins/sel2path/fit.c index a7567f12a0..1afc99683e 100644 --- a/plug-ins/sel2path/fit.c +++ b/plug-ins/sel2path/fit.c @@ -147,7 +147,7 @@ typedef struct index_list static void append_index (index_list_type *, unsigned); static void free_index_list (index_list_type *); -static index_list_type new_index_list (); +static index_list_type new_index_list (void); static void remove_adjacent_corners (index_list_type *, unsigned); static void align (spline_list_type *); diff --git a/plug-ins/sel2path/pxl-outline.h b/plug-ins/sel2path/pxl-outline.h index e292377ead..55f9d9454c 100644 --- a/plug-ins/sel2path/pxl-outline.h +++ b/plug-ins/sel2path/pxl-outline.h @@ -43,9 +43,7 @@ typedef struct after the last is the first, and the previous coordinate before the first is the last. */ #define O_NEXT(p_o, n) (((n) + 1) % O_LENGTH (p_o)) -#define O_PREV(p_o, n) ((n) == 0 \ - ? O_LENGTH (p_o) - 1 \ - : (n) - 1) +#define O_PREV(p_o, n) ((n) == 0 ? O_LENGTH (p_o) - 1 : (n) - 1) /* And the character turns into a list of such lists. */ typedef struct @@ -62,7 +60,7 @@ typedef struct /* Find all pixels on the outline in the character C. */ -extern pixel_outline_list_type find_outline_pixels (); +extern pixel_outline_list_type find_outline_pixels (void); /* Free the memory in the list. */ extern void free_pixel_outline_list (pixel_outline_list_type *);