mirror of https://github.com/GNOME/gimp.git
plug-ins/common/nlfilt.c plug-ins/common/pat.c plug-ins/common/svg.c
2005-07-17 Sven Neumann <sven@gimp.org> * plug-ins/common/nlfilt.c * plug-ins/common/pat.c * plug-ins/common/svg.c * plug-ins/common/tiff.c * plug-ins/common/tile.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c: fixed signedness warnings.
This commit is contained in:
parent
2c544f73bd
commit
712ce5c8f9
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-07-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/nlfilt.c
|
||||
* plug-ins/common/pat.c
|
||||
* plug-ins/common/svg.c
|
||||
* plug-ins/common/tiff.c
|
||||
* plug-ins/common/tile.c
|
||||
* plug-ins/common/uniteditor.c
|
||||
* plug-ins/common/wmf.c: fixed signedness warnings.
|
||||
|
||||
2005-07-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpdnd-xds.c: added missing casts.
|
||||
|
|
|
@ -904,7 +904,7 @@ nlfilter (GimpDrawable *drawable,
|
|||
guchar *srcbuf, *dstbuf;
|
||||
guchar *lastrow, *thisrow, *nextrow, *temprow;
|
||||
gint x1, x2, y1, y2;
|
||||
guint width, height, bpp;
|
||||
gint width, height, bpp;
|
||||
gint filtno, y, rowsize, exrowsize, p_update;
|
||||
|
||||
if (preview)
|
||||
|
@ -920,6 +920,7 @@ nlfilter (GimpDrawable *drawable,
|
|||
width = x2 - x1;
|
||||
height = y2 - y1;
|
||||
}
|
||||
|
||||
bpp = drawable->bpp;
|
||||
|
||||
rowsize = width * bpp;
|
||||
|
|
|
@ -125,7 +125,8 @@ query (void)
|
|||
load_args, load_return_vals);
|
||||
|
||||
gimp_plugin_icon_register ("file_pat_load",
|
||||
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_PATTERN);
|
||||
GIMP_ICON_TYPE_STOCK_ID,
|
||||
(const guchar *) GIMP_STOCK_PATTERN);
|
||||
gimp_register_file_handler_mime ("file_pat_load", "image/x-gimp-pat");
|
||||
gimp_register_magic_load_handler ("file_pat_load",
|
||||
"pat",
|
||||
|
@ -146,7 +147,8 @@ query (void)
|
|||
save_args, NULL);
|
||||
|
||||
gimp_plugin_icon_register ("file_pat_save",
|
||||
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_PATTERN);
|
||||
GIMP_ICON_TYPE_STOCK_ID,
|
||||
(const guchar *) GIMP_STOCK_PATTERN);
|
||||
gimp_register_file_handler_mime ("file_pat_save", "image/x-gimp-pat");
|
||||
gimp_register_save_handler ("file_pat_save", "pat", "");
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ load_image (const gchar *filename)
|
|||
GimpDrawable *drawable;
|
||||
GimpPixelRgn rgn;
|
||||
GdkPixbuf *pixbuf;
|
||||
gchar *pixels;
|
||||
guchar *pixels;
|
||||
gint width;
|
||||
gint height;
|
||||
gint rowstride;
|
||||
|
@ -439,7 +439,7 @@ load_rsvg_pixbuf (const gchar *filename,
|
|||
|
||||
while (success && status != G_IO_STATUS_EOF)
|
||||
{
|
||||
guchar buf[8192];
|
||||
gchar buf[8192];
|
||||
gsize len;
|
||||
|
||||
status = g_io_channel_read_chars (io, buf, sizeof (buf), &len, error);
|
||||
|
@ -453,7 +453,8 @@ load_rsvg_pixbuf (const gchar *filename,
|
|||
success = rsvg_handle_close (handle, error);
|
||||
break;
|
||||
case G_IO_STATUS_NORMAL:
|
||||
success = rsvg_handle_write (handle, buf, len, error);
|
||||
success = rsvg_handle_write (handle,
|
||||
(const guchar *) buf, len, error);
|
||||
break;
|
||||
case G_IO_STATUS_AGAIN:
|
||||
break;
|
||||
|
@ -535,7 +536,7 @@ load_rsvg_size (const gchar *filename,
|
|||
|
||||
while (success && status != G_IO_STATUS_EOF && vals->resolution > 0.0)
|
||||
{
|
||||
guchar buf[1024];
|
||||
gchar buf[1024];
|
||||
gsize len;
|
||||
|
||||
status = g_io_channel_read_chars (io, buf, sizeof (buf), &len, error);
|
||||
|
@ -549,7 +550,8 @@ load_rsvg_size (const gchar *filename,
|
|||
success = rsvg_handle_close (handle, error);
|
||||
break;
|
||||
case G_IO_STATUS_NORMAL:
|
||||
success = rsvg_handle_write (handle, buf, len, error);
|
||||
success = rsvg_handle_write (handle,
|
||||
(const guchar *) buf, len, error);
|
||||
break;
|
||||
case G_IO_STATUS_AGAIN:
|
||||
break;
|
||||
|
|
|
@ -502,6 +502,8 @@ load_image (const gchar *filename)
|
|||
GimpParasite *parasite;
|
||||
guint16 tmp;
|
||||
|
||||
gchar *name;
|
||||
|
||||
gboolean flip_horizontal = FALSE;
|
||||
gboolean flip_vertical = FALSE;
|
||||
|
||||
|
@ -510,10 +512,6 @@ load_image (const gchar *filename)
|
|||
guchar *icc_profile;
|
||||
#endif
|
||||
|
||||
gboolean uselayername = FALSE;
|
||||
guchar *tmp_name;
|
||||
gchar *name;
|
||||
|
||||
|
||||
gimp_rgb_set (&color, 0.0, 0.0, 0.0);
|
||||
|
||||
|
@ -865,29 +863,17 @@ load_image (const gchar *filename)
|
|||
channel = g_new0 (channel_data, extra + 1);
|
||||
|
||||
/* try and use layer name from tiff file */
|
||||
name = NULL;
|
||||
uselayername = FALSE;
|
||||
|
||||
if (TIFFGetField (tif, TIFFTAG_PAGENAME, &name))
|
||||
if (! TIFFGetField (tif, TIFFTAG_PAGENAME, &name) ||
|
||||
! g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
tmp_name = name;
|
||||
uselayername = TRUE;
|
||||
for (tmp_name = name ; *tmp_name ; tmp_name++)
|
||||
{
|
||||
if (*tmp_name > 127)
|
||||
{
|
||||
uselayername = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
if (uselayername)
|
||||
if (name)
|
||||
{
|
||||
layer = gimp_layer_new (image, name,
|
||||
cols, rows,
|
||||
layer_type, 100, GIMP_NORMAL_MODE);
|
||||
name = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -124,8 +124,8 @@ run (const gchar *name,
|
|||
{
|
||||
static GimpParam values[3];
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gint32 new_layer;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gint32 new_layer = -1;
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
|
|
|
@ -155,7 +155,8 @@ query (void)
|
|||
gimp_plugin_menu_register ("plug_in_unit_editor",
|
||||
"<Toolbox>/Xtns/Extensions");
|
||||
gimp_plugin_icon_register ("plug_in_unit_editor",
|
||||
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_TOOL_MEASURE);
|
||||
GIMP_ICON_TYPE_STOCK_ID,
|
||||
(const guchar *) GIMP_STOCK_TOOL_MEASURE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -66,8 +66,8 @@ static guchar *wmf_get_pixbuf (const gchar *filename,
|
|||
gint *width,
|
||||
gint *height);
|
||||
static guchar *wmf_load_file (const gchar *filename,
|
||||
gint *width,
|
||||
gint *height);
|
||||
guint *width,
|
||||
guint *height);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -291,8 +291,8 @@ load_wmf_size (const gchar *filename,
|
|||
wmfAPI *API = NULL;
|
||||
wmfAPI_Options api_options;
|
||||
wmfD_Rect bbox;
|
||||
gint width;
|
||||
gint height;
|
||||
guint width;
|
||||
guint height;
|
||||
gboolean success = TRUE;
|
||||
|
||||
width = height = -1;
|
||||
|
@ -757,8 +757,8 @@ wmf_get_pixbuf (const gchar *filename,
|
|||
wmf_gd_t *ddata = NULL;
|
||||
wmfAPI *API = NULL;
|
||||
wmfAPI_Options api_options;
|
||||
gint file_width;
|
||||
gint file_height;
|
||||
guint file_width;
|
||||
guint file_height;
|
||||
wmfD_Rect bbox;
|
||||
gint *gd_pixels = NULL;
|
||||
|
||||
|
@ -847,8 +847,8 @@ wmf_get_pixbuf (const gchar *filename,
|
|||
|
||||
static guchar *
|
||||
wmf_load_file (const gchar *filename,
|
||||
gint *width,
|
||||
gint *height)
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
guchar *pixels = NULL;
|
||||
|
||||
|
@ -935,7 +935,7 @@ load_image (const gchar *filename)
|
|||
gint i, rowstride;
|
||||
|
||||
guchar *pixels, *buf;
|
||||
gint width, height;
|
||||
guint width, height;
|
||||
|
||||
pixels = buf = wmf_load_file (filename, &width, &height);
|
||||
rowstride = width * 4;
|
||||
|
|
Loading…
Reference in New Issue