From bc539b9a3a07c2b9da3545a577f8b8df15591c8a Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 26 May 1998 19:06:03 +0000 Subject: [PATCH] do "-" to "_" conversion after an failed pdb lookup, just to make sure * app/batch.c: do "-" to "_" conversion after an failed pdb lookup, just to make sure * app/paint_core.c: fix for some uninitialized vars -Yosh --- ChangeLog | 9 ++++++++- app/batch.c | 20 ++++++++++++++++++-- app/paint_core.c | 4 ++-- app/tools/paint_core.c | 4 ++-- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c34c44afe8..6bcc14bce3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue May 26 12:03:07 PDT 1998 Manish Singh + + * app/batch.c: do "-" to "_" conversion after an failed pdb + lookup, just to make sure + + * app/paint_core.c: fix for some uninitialized vars + Tue May 26 01:17:14 PDT 1998 Manish Singh * gimptool.in: added --install-script. Use @INSTALL@ stuff @@ -6,7 +13,7 @@ Tue May 26 01:17:14 PDT 1998 Manish Singh * libgimp/gimplayer.c: fixes for silly errors from Marc Lehmann * libgimp/gimpchannel.c: implemented gimp_channel_set_show_masked - and gimp_channel_get_show_masked (already in gimp.h> + and gimp_channel_get_show_masked (already in gimp.h) * plug-ins/blinds/blinds.c * plug-ins/bmp/bmp.h diff --git a/app/batch.c b/app/batch.c index 4c68b996dd..72441748a9 100644 --- a/app/batch.c +++ b/app/batch.c @@ -178,6 +178,7 @@ batch_run_cmd (char *cmd) Argument *vals; char *rest; char *cmdname; + char *tmpname; char *t; int i; @@ -194,8 +195,23 @@ batch_run_cmd (char *cmd) proc = procedural_db_lookup (cmdname); if (!proc) { - g_print ("could not find procedure: \"%s\"\n", cmdname); - return; + /* Lame hack for "-" to "_" conversion */ + t = tmpname = g_strdup (cmdname); + while (*t) + { + if (*t == '-') + *t = '_'; + t++; + } + + proc = procedural_db_lookup (tmpname); + if (!proc) + { + g_print ("could not find procedure: \"%s\"\n", cmdname); + return; + } + + g_free (tmpname); } /* (gimp-procedural-db-dump "/tmp/pdb_dump") */ diff --git a/app/paint_core.c b/app/paint_core.c index 06e1a75fff..0c1f4dd35b 100644 --- a/app/paint_core.c +++ b/app/paint_core.c @@ -913,8 +913,8 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci maskPR.bytes = 1; maskPR.x = 0; maskPR.y = 0; - maskPR.w = srcPR.w; - maskPR.h = srcPR.h; + maskPR.w = canvas_buf->width; + maskPR.h = canvas_buf->height; maskPR.rowstride = maskPR.bytes * brush_mask->width; maskPR.data = mask_buf_data (brush_mask); diff --git a/app/tools/paint_core.c b/app/tools/paint_core.c index 06e1a75fff..0c1f4dd35b 100644 --- a/app/tools/paint_core.c +++ b/app/tools/paint_core.c @@ -913,8 +913,8 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci maskPR.bytes = 1; maskPR.x = 0; maskPR.y = 0; - maskPR.w = srcPR.w; - maskPR.h = srcPR.h; + maskPR.w = canvas_buf->width; + maskPR.h = canvas_buf->height; maskPR.rowstride = maskPR.bytes * brush_mask->width; maskPR.data = mask_buf_data (brush_mask);