mirror of https://github.com/GNOME/gimp.git
plug-ins/imagemap/imap_cmd_move.c plug-ins/imagemap/imap_cmd_object_up.c
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. svn path=/trunk/; revision=25296
This commit is contained in:
parent
8216638667
commit
f87f2ba907
26
ChangeLog
26
ChangeLog
|
@ -1,3 +1,29 @@
|
|||
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.
|
||||
|
||||
2008-03-28 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/sinus.c
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -33,7 +33,7 @@ static void object_down_command_destruct(Command_t *parent);
|
|||
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,
|
||||
|
|
|
@ -33,7 +33,7 @@ static void object_move_command_destruct(Command_t *parent);
|
|||
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,
|
||||
|
|
|
@ -33,7 +33,7 @@ static void object_up_command_destruct(Command_t *parent);
|
|||
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,
|
||||
|
|
|
@ -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 @@ do_object_locked_dialog(void)
|
|||
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);
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -65,6 +65,9 @@ enum CellTypes {
|
|||
MASKED
|
||||
};
|
||||
|
||||
extern MazeValues mvals;
|
||||
extern guint sel_w, sel_h;
|
||||
extern GRand *gr;
|
||||
|
||||
void get_colors (GimpDrawable *drawable,
|
||||
guint8 *fg,
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef struct
|
|||
|
||||
/* one buffer fits all */
|
||||
#define BUFSIZE 128
|
||||
gchar buffer[BUFSIZE];
|
||||
static gchar buffer[BUFSIZE];
|
||||
|
||||
|
||||
gboolean maze_dialog (void);
|
||||
|
|
|
@ -1073,7 +1073,7 @@ text_handler (GMarkupParseContext *markup_context,
|
|||
(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;
|
||||
|
||||
|
|
|
@ -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 @@ print_cairo_surface_from_drawable (gint32 drawable_ID)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ print_settings_key_file_from_parasite (gint32 image_ID)
|
|||
if (key_file && ! print_settings_check_version (key_file))
|
||||
{
|
||||
g_key_file_free (key_file);
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return key_file;
|
||||
|
|
|
@ -199,7 +199,7 @@ next_unmarked_outline_edge (unsigned row, unsigned col,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ real filter_percent = .33;
|
|||
|
||||
/* 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) */
|
||||
|
|
|
@ -193,7 +193,7 @@ free_pixel_outline_list (pixel_outline_list_type *outline_list)
|
|||
/* 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 @@ append_outline_pixel (pixel_outline_type *o, coordinate_type c)
|
|||
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;
|
||||
|
|
|
@ -76,11 +76,11 @@ const GimpPlugInInfo PLUG_IN_INFO =
|
|||
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 ()
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ typedef int pid_t;
|
|||
#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 @@ typedef struct
|
|||
|
||||
|
||||
#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 } ,
|
||||
|
|
Loading…
Reference in New Issue