gimp r25296 - in trunk: . plug-ins/imagemap plug-ins/lighting plug-ins/map-object plug-ins/maze plug-ins/metadata plug-ins/print plug-ins/selection-to-path plug-ins/xjt



Author: muks
Date: Sat Mar 29 09:25:34 2008
New Revision: 25296
URL: http://svn.gnome.org/viewvc/gimp?rev=25296&view=rev

Log:
2008-03-29  Mukund Sivaraman  <muks mukund org>

        * plug-ins/imagemap/imap_cmd_move.c
        * plug-ins/imagemap/imap_cmd_object_up.c
        * plug-ins/imagemap/imap_cmd_move_up.c
        * plug-ins/imagemap/imap_cmd_move_selected.c
        * plug-ins/imagemap/imap_cmd_move_sash.c
        * plug-ins/imagemap/imap_cmd_object_move.c
        * plug-ins/imagemap/imap_cmd_object_down.c
        * plug-ins/imagemap/imap_object.c
        * plug-ins/imagemap/imap_cmd_move_down.c
        * plug-ins/map-object/map-object-shade.c
        * plug-ins/map-object/map-object-apply.c
        * plug-ins/maze/maze.h
        * plug-ins/maze/maze_face.c
        * plug-ins/selection-to-path/selection-to-path.c
        * plug-ins/selection-to-path/edge.c
        * plug-ins/selection-to-path/pxl-outline.c
        * plug-ins/selection-to-path/fit.c
        * plug-ins/xjt/xjt.c
        * plug-ins/metadata/xmp-parse.c
        * plug-ins/print/print-draw-page.c
        * plug-ins/print/print-settings.c
        * plug-ins/lighting/lighting-preview.c: Cleanups / fixes for
        issues reported by Sparse.



Modified:
   trunk/ChangeLog
   trunk/plug-ins/imagemap/imap_cmd_move.c
   trunk/plug-ins/imagemap/imap_cmd_move_down.c
   trunk/plug-ins/imagemap/imap_cmd_move_sash.c
   trunk/plug-ins/imagemap/imap_cmd_move_selected.c
   trunk/plug-ins/imagemap/imap_cmd_move_up.c
   trunk/plug-ins/imagemap/imap_cmd_object_down.c
   trunk/plug-ins/imagemap/imap_cmd_object_move.c
   trunk/plug-ins/imagemap/imap_cmd_object_up.c
   trunk/plug-ins/imagemap/imap_object.c
   trunk/plug-ins/lighting/lighting-preview.c
   trunk/plug-ins/map-object/map-object-apply.c
   trunk/plug-ins/map-object/map-object-shade.c
   trunk/plug-ins/maze/maze.h
   trunk/plug-ins/maze/maze_face.c
   trunk/plug-ins/metadata/xmp-parse.c
   trunk/plug-ins/print/print-draw-page.c
   trunk/plug-ins/print/print-settings.c
   trunk/plug-ins/selection-to-path/edge.c
   trunk/plug-ins/selection-to-path/fit.c
   trunk/plug-ins/selection-to-path/pxl-outline.c
   trunk/plug-ins/selection-to-path/selection-to-path.c
   trunk/plug-ins/xjt/xjt.c

Modified: trunk/plug-ins/imagemap/imap_cmd_move.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_move.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_move.c	Sat Mar 29 09:25:34 2008
@@ -35,7 +35,7 @@
 static void move_command_destruct(Command_t *parent);
 static CmdExecuteValue_t move_command_execute(Command_t *parent);
 
-CommandClass_t move_command_class = {
+static CommandClass_t move_command_class = {
    move_command_destruct,
    move_command_execute,
    NULL,			/* move_command_undo */

Modified: trunk/plug-ins/imagemap/imap_cmd_move_down.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_move_down.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_move_down.c	Sat Mar 29 09:25:34 2008
@@ -31,7 +31,7 @@
 
 static CmdExecuteValue_t move_down_command_execute(Command_t *parent);
 
-CommandClass_t move_down_command_class = {
+static CommandClass_t move_down_command_class = {
    NULL,			/* move_down_command_destruct */
    move_down_command_execute,
    NULL,			/* move_down_command_undo */

Modified: trunk/plug-ins/imagemap/imap_cmd_move_sash.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_move_sash.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_move_sash.c	Sat Mar 29 09:25:34 2008
@@ -32,7 +32,7 @@
 
 COMMAND_PROTO(move_sash_command);
 
-CommandClass_t move_sash_command_class = {
+static CommandClass_t move_sash_command_class = {
    move_sash_command_destruct,
    move_sash_command_execute,
    NULL, 			/* move_sash_command_undo */

Modified: trunk/plug-ins/imagemap/imap_cmd_move_selected.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_move_selected.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_move_selected.c	Sat Mar 29 09:25:34 2008
@@ -32,7 +32,7 @@
 static CmdExecuteValue_t move_selected_command_execute(Command_t *parent);
 static void move_selected_command_undo(Command_t *parent);
 
-CommandClass_t move_selected_command_class = {
+static CommandClass_t move_selected_command_class = {
    NULL,			/* move_selected_command_destruct */
    move_selected_command_execute,
    move_selected_command_undo,

Modified: trunk/plug-ins/imagemap/imap_cmd_move_up.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_move_up.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_move_up.c	Sat Mar 29 09:25:34 2008
@@ -31,7 +31,7 @@
 
 static CmdExecuteValue_t move_up_command_execute(Command_t *parent);
 
-CommandClass_t move_up_command_class = {
+static CommandClass_t move_up_command_class = {
    NULL,			/* move_up_command_destruct */
    move_up_command_execute,
    NULL,			/* move_up_command_undo */

Modified: trunk/plug-ins/imagemap/imap_cmd_object_down.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_object_down.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_object_down.c	Sat Mar 29 09:25:34 2008
@@ -33,7 +33,7 @@
 static CmdExecuteValue_t object_down_command_execute(Command_t *parent);
 static void object_down_command_undo(Command_t *parent);
 
-CommandClass_t object_down_command_class = {
+static CommandClass_t object_down_command_class = {
    object_down_command_destruct,
    object_down_command_execute,
    object_down_command_undo,

Modified: trunk/plug-ins/imagemap/imap_cmd_object_move.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_object_move.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_object_move.c	Sat Mar 29 09:25:34 2008
@@ -33,7 +33,7 @@
 static CmdExecuteValue_t object_move_command_execute(Command_t *parent);
 static void object_move_command_undo(Command_t *parent);
 
-CommandClass_t object_move_command_class = {
+static CommandClass_t object_move_command_class = {
    object_move_command_destruct,
    object_move_command_execute,
    object_move_command_undo,

Modified: trunk/plug-ins/imagemap/imap_cmd_object_up.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_cmd_object_up.c	(original)
+++ trunk/plug-ins/imagemap/imap_cmd_object_up.c	Sat Mar 29 09:25:34 2008
@@ -33,7 +33,7 @@
 static CmdExecuteValue_t object_up_command_execute(Command_t *parent);
 static void object_up_command_undo(Command_t *parent);
 
-CommandClass_t object_up_command_class = {
+static CommandClass_t object_up_command_class = {
    object_up_command_destruct,
    object_up_command_execute,
    object_up_command_undo,

Modified: trunk/plug-ins/imagemap/imap_object.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_object.c	(original)
+++ trunk/plug-ins/imagemap/imap_object.c	Sat Mar 29 09:25:34 2008
@@ -32,10 +32,6 @@
 #include "imap_object.h"
 #include "imap_string.h"
 
-static Object_t* object_factory_create_object (ObjectFactory_t *factory,
-                                                gint x, gint y);
-
-
 typedef struct {
    ObjectListCallbackFunc_t func;
    gpointer data;
@@ -420,7 +416,7 @@
    default_dialog_show(dialog);
 }
 
-Object_t*
+static Object_t*
 object_factory_create_object(ObjectFactory_t *factory, gint x, gint y)
 {
    return factory->obj = factory->create_object(x, y);

Modified: trunk/plug-ins/lighting/lighting-preview.c
==============================================================================
--- trunk/plug-ins/lighting/lighting-preview.c	(original)
+++ trunk/plug-ins/lighting/lighting-preview.c	Sat Mar 29 09:25:34 2008
@@ -20,7 +20,7 @@
 
 #define LIGHT_SYMBOL_SIZE 8
 
-gint handle_xpos = 0, handle_ypos = 0;
+static gint handle_xpos = 0, handle_ypos = 0;
 
 BackBuffer backbuf = { 0, 0, 0, 0, NULL };
 

Modified: trunk/plug-ins/map-object/map-object-apply.c
==============================================================================
--- trunk/plug-ins/map-object/map-object-apply.c	(original)
+++ trunk/plug-ins/map-object/map-object-apply.c	Sat Mar 29 09:25:34 2008
@@ -23,8 +23,9 @@
 /* Main loop */
 /*************/
 
-gdouble imat[4][4];
-gfloat  rotmat[16], a[16], b[16];
+gdouble       imat[4][4];
+gfloat        rotmat[16];
+static gfloat a[16], b[16];
 
 void
 init_compute (void)

Modified: trunk/plug-ins/map-object/map-object-shade.c
==============================================================================
--- trunk/plug-ins/map-object/map-object-shade.c	(original)
+++ trunk/plug-ins/map-object/map-object-shade.c	Sat Mar 29 09:25:34 2008
@@ -15,7 +15,7 @@
 #include "map-object-shade.h"
 
 
-gdouble            bx1, by1, bx2, by2;
+static gdouble     bx1, by1, bx2, by2;
 get_ray_color_func get_ray_color;
 
 typedef struct

Modified: trunk/plug-ins/maze/maze.h
==============================================================================
--- trunk/plug-ins/maze/maze.h	(original)
+++ trunk/plug-ins/maze/maze.h	Sat Mar 29 09:25:34 2008
@@ -65,6 +65,9 @@
      MASKED
 };
 
+extern MazeValues mvals;
+extern guint      sel_w, sel_h;
+extern GRand     *gr;
 
 void  get_colors (GimpDrawable *drawable,
                   guint8       *fg,

Modified: trunk/plug-ins/maze/maze_face.c
==============================================================================
--- trunk/plug-ins/maze/maze_face.c	(original)
+++ trunk/plug-ins/maze/maze_face.c	Sat Mar 29 09:25:34 2008
@@ -66,7 +66,7 @@
 
 /* one buffer fits all */
 #define BUFSIZE 128
-gchar buffer[BUFSIZE];
+static gchar buffer[BUFSIZE];
 
 
 gboolean     maze_dialog         (void);

Modified: trunk/plug-ins/metadata/xmp-parse.c
==============================================================================
--- trunk/plug-ins/metadata/xmp-parse.c	(original)
+++ trunk/plug-ins/metadata/xmp-parse.c	Sat Mar 29 09:25:34 2008
@@ -1073,7 +1073,7 @@
                                 (char *) size_p, decoded);
           }
         else
-          add_property_value (context, XMP_PTYPE_ALT_THUMBS, 0, NULL);
+          add_property_value (context, XMP_PTYPE_ALT_THUMBS, NULL, NULL);
       }
       break;
 

Modified: trunk/plug-ins/print/print-draw-page.c
==============================================================================
--- trunk/plug-ins/print/print-draw-page.c	(original)
+++ trunk/plug-ins/print/print-draw-page.c	Sat Mar 29 09:25:34 2008
@@ -29,19 +29,61 @@
 
 static cairo_surface_t * print_cairo_surface_from_drawable (gint32 drawable_ID);
 
-static inline void       convert_from_gray  (const guchar *src,
-                                             guchar       *dest,
-                                             gint          pixels);
-static inline void       convert_from_graya (const guchar *src,
-                                             guchar       *dest,
-                                             gint          pixels);
-static inline void       convert_from_rgb   (const guchar *src,
-                                             guchar       *dest,
-                                             gint          pixels);
-static inline void       convert_from_rgba  (const guchar *src,
-                                             guchar       *dest,
-                                             gint          pixels);
+static inline void
+convert_from_gray (const guchar *src,
+                   guchar       *dest,
+                   gint          pixels)
+{
+  while (pixels--)
+    {
+      GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[0], src[0]);
+
+      src  += 1;
+      dest += 4;
+    }
+}
+
+static inline void
+convert_from_graya (const guchar *src,
+                    guchar       *dest,
+                    gint          pixels)
+{
+  while (pixels--)
+    {
+      GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[0], src[0], src[1]);
 
+      src  += 2;
+      dest += 4;
+    }
+}
+
+static inline void
+convert_from_rgb (const guchar *src,
+                  guchar       *dest,
+                  gint          pixels)
+{
+  while (pixels--)
+    {
+      GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[1], src[2]);
+
+      src  += 3;
+      dest += 4;
+    }
+}
+
+static inline void
+convert_from_rgba (const guchar *src,
+                   guchar       *dest,
+                   gint          pixels)
+{
+  while (pixels--)
+    {
+      GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[1], src[2], src[3]);
+
+      src  += 4;
+      dest += 4;
+    }
+}
 
 gboolean
 print_draw_page (GtkPrintContext *context,
@@ -148,58 +190,3 @@
   return surface;
 }
 
-static inline void
-convert_from_gray (const guchar *src,
-                   guchar       *dest,
-                   gint          pixels)
-{
-  while (pixels--)
-    {
-      GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[0], src[0]);
-
-      src  += 1;
-      dest += 4;
-    }
-}
-
-static inline void
-convert_from_graya (const guchar *src,
-                    guchar       *dest,
-                    gint          pixels)
-{
-  while (pixels--)
-    {
-      GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[0], src[0], src[1]);
-
-      src  += 2;
-      dest += 4;
-    }
-}
-
-static inline void
-convert_from_rgb (const guchar *src,
-                  guchar       *dest,
-                  gint          pixels)
-{
-  while (pixels--)
-    {
-      GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[1], src[2]);
-
-      src  += 3;
-      dest += 4;
-    }
-}
-
-static inline void
-convert_from_rgba (const guchar *src,
-                   guchar       *dest,
-                   gint          pixels)
-{
-  while (pixels--)
-    {
-      GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[1], src[2], src[3]);
-
-      src  += 4;
-      dest += 4;
-    }
-}

Modified: trunk/plug-ins/print/print-settings.c
==============================================================================
--- trunk/plug-ins/print/print-settings.c	(original)
+++ trunk/plug-ins/print/print-settings.c	Sat Mar 29 09:25:34 2008
@@ -180,7 +180,7 @@
   if (key_file && ! print_settings_check_version (key_file))
     {
       g_key_file_free (key_file);
-      return FALSE;
+      return NULL;
     }
 
   return key_file;

Modified: trunk/plug-ins/selection-to-path/edge.c
==============================================================================
--- trunk/plug-ins/selection-to-path/edge.c	(original)
+++ trunk/plug-ins/selection-to-path/edge.c	Sat Mar 29 09:25:34 2008
@@ -199,7 +199,7 @@
    edge with a white pixel.  The position ROW and COL should be inside
    the bitmap CHARACTER.  */
 
-boolean
+static boolean
 is_outline_edge (edge_type edge,
 		 unsigned row, unsigned col)
 {

Modified: trunk/plug-ins/selection-to-path/fit.c
==============================================================================
--- trunk/plug-ins/selection-to-path/fit.c	(original)
+++ trunk/plug-ins/selection-to-path/fit.c	Sat Mar 29 09:25:34 2008
@@ -82,7 +82,7 @@
 
 /* Number of adjacent points to consider if `filter_surround' points
    defines a straight line.  (-filter-secondary-surround)  */
-unsigned filter_secondary_surround = 3;
+static unsigned filter_secondary_surround = 3;
 
 /* Number of adjacent points to consider when filtering.
   (-filter-surround)  */

Modified: trunk/plug-ins/selection-to-path/pxl-outline.c
==============================================================================
--- trunk/plug-ins/selection-to-path/pxl-outline.c	(original)
+++ trunk/plug-ins/selection-to-path/pxl-outline.c	Sat Mar 29 09:25:34 2008
@@ -193,7 +193,7 @@
 /* Return an empty list of pixels.  */
 
 
-pixel_outline_type
+static pixel_outline_type
 new_pixel_outline (void)
 {
   pixel_outline_type pixel_outline;
@@ -221,7 +221,7 @@
    If we're on a top edge, we use the upper-left hand corner; right edge
    => upper right; bottom edge => lower right; left edge => lower left.  */
 
-void
+static void
 append_coordinate (pixel_outline_type *o, int x, int y, edge_type edge)
 {
   coordinate_type c;

Modified: trunk/plug-ins/selection-to-path/selection-to-path.c
==============================================================================
--- trunk/plug-ins/selection-to-path/selection-to-path.c	(original)
+++ trunk/plug-ins/selection-to-path/selection-to-path.c	Sat Mar 29 09:25:34 2008
@@ -76,11 +76,11 @@
   run,     /* run_proc */
 };
 
-static gint    sel_x1, sel_y1, sel_x2, sel_y2;
-static gint    has_sel, sel_width, sel_height;
-static SELVALS selVals;
-GimpPixelRgn   selection_rgn;
-gboolean       retVal = TRUE;  /* Toggle if cancle button clicked */
+static gint         sel_x1, sel_y1, sel_x2, sel_y2;
+static gint         has_sel, sel_width, sel_height;
+static SELVALS      selVals;
+static GimpPixelRgn selection_rgn;
+static gboolean     retVal = TRUE;  /* Toggle if cancle button clicked */
 
 MAIN ()
 

Modified: trunk/plug-ins/xjt/xjt.c
==============================================================================
--- trunk/plug-ins/xjt/xjt.c	(original)
+++ trunk/plug-ins/xjt/xjt.c	Sat Mar 29 09:25:34 2008
@@ -98,7 +98,7 @@
 #define XJT_ORIENTATION_HORIZONTAL 0
 #define XJT_ORIENTATION_VERTICAL   1
 
-       gint     xjt_debug = FALSE;
+static gint     xjt_debug = FALSE;
 static pid_t    g_pid;
 static gchar   *global_parasite_prop_lines = NULL;
 static gint     global_parasite_id = 0;
@@ -348,7 +348,7 @@
 
 
 #define PROP_TABLE_ENTRIES 35
-t_prop_table g_prop_table[PROP_TABLE_ENTRIES] = {
+static t_prop_table g_prop_table[PROP_TABLE_ENTRIES] = {
   /* t_proptype              mnemonic   t_paramtyp             default values */
   { PROP_END,                   "*",      PTYP_NOT_SUPPORTED,       0.0,  0.0,  0.0 } ,
   { PROP_COLORMAP,              "*",      PTYP_NOT_SUPPORTED,       0.0,  0.0,  0.0 } ,



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