diff --git a/ChangeLog b/ChangeLog index 55185e7543..cf9fc645ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon Apr 20 18:15:54 PDT 1998 Manish Singh + + * app/main.c + * app/errors.c: added --debug-handlers switch to get stack traces + on all signals again (not all sigabrts and sigpipes are normal + things) + + * plug-ins/animoptimize/animoptimze.c: updated + 1998-04-20 Marc Ewing * added RPM/* files and use them in gimp.spec diff --git a/app/errors.c b/app/errors.c index cccd2ccab3..a0737644b9 100644 --- a/app/errors.c +++ b/app/errors.c @@ -30,6 +30,7 @@ #include "errors.h" extern char *prog_name; +extern int use_debug_handler; void message (char *fmt, ...) @@ -81,5 +82,7 @@ terminate (char *fmt, ...) printf ("\n"); va_end (args); + if (use_debug_handler) + g_debug (prog_name); gdk_exit (1); } diff --git a/app/main.c b/app/main.c index a3d0997d47..54388139c3 100644 --- a/app/main.c +++ b/app/main.c @@ -46,6 +46,7 @@ int no_splash; int no_splash_image; int be_verbose; int use_shm; +int use_debug_handler; char *prog_name; /* The path name we are invoked with */ char **batch_cmds; @@ -104,6 +105,7 @@ main (int argc, char **argv) no_splash = FALSE; no_splash_image = FALSE; use_shm = TRUE; + use_debug_handler = FALSE; batch_cmds = g_new (char*, argc); batch_cmds[0] = NULL; @@ -159,6 +161,10 @@ main (int argc, char **argv) { use_shm = FALSE; } + else if (strcmp (argv[i], "--debug-handlers") == 0) + { + use_debug_handler = TRUE; + } /* * ANYTHING ELSE starting with a '-' is an error. */ @@ -185,6 +191,7 @@ main (int argc, char **argv) g_print (" --no-splash-image Do not add an image to the startup window.\n"); g_print (" --no-shm Do not use shared memory between GIMP and its plugins.\n"); g_print (" --no-xshm Do not use the X Shared Memory extension.\n"); + g_print (" --debug-handlers Enable debugging signal handlers.\n"); g_print (" --display Use the designated X display.\n\n"); } diff --git a/plug-ins/animoptimize/animoptimize.c b/plug-ins/animoptimize/animoptimize.c index da31daa8e2..6d8be799b2 100644 --- a/plug-ins/animoptimize/animoptimize.c +++ b/plug-ins/animoptimize/animoptimize.c @@ -1,5 +1,5 @@ /* - * Animation Optimizer plug-in version 0.61.0 + * Animation Optimizer plug-in version 0.70.0 * * by Adam D. Moss, 1997-98 * adam@gimp.org @@ -11,6 +11,10 @@ /* * REVISION HISTORY: * + * 98.04.19 : version 0.70.0 + * Plug-in doubles up as Animation UnOptimize too! (This + * is somewhat more useful than it sounds.) + * * 98.03.16 : version 0.61.0 * Support more rare opaque/transparent combinations. * @@ -101,7 +105,7 @@ GDrawableType drawabletype_alpha; guchar pixelstep; guchar* palette; gint ncolours; - +gboolean optimize; @@ -125,12 +129,28 @@ static void query() "", "Adam D. Moss ", "Adam D. Moss ", - "1997", + "1997-98", "/Filters/Animation/Animation Optimize", "RGB*, INDEXED*, GRAY*", PROC_PLUG_IN, nargs, nreturn_vals, args, return_vals); + + gimp_install_procedure("plug_in_animationunoptimize", + "This plugin 'simplifies' a GIMP layer-based" + " animation that has been AnimationOptimized. This" + " makes the animation much easier to work with if," + " for example, the optimized version is all you" + " have.", + "", + "Adam D. Moss ", + "Adam D. Moss ", + "1997-98", + "/Filters/Animation/Animation UnOptimize", + "RGB*, INDEXED*, GRAY*", + PROC_PLUG_IN, + nargs, nreturn_vals, + args, return_vals); } static void run(char *name, int n_params, GParam * param, int *nreturn_vals, @@ -153,6 +173,13 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals, } } + /* Check the procedure name we were called with, to decide + what needs to be done. */ + if (strcmp(name,"plug_in_animationoptimize")==0) + optimize = TRUE; + else + optimize = FALSE; /* UnOptimize */ + if (status == STATUS_SUCCESS) { image_id = param[1].data.d_image; @@ -255,7 +282,7 @@ build_dialog(GImageType basetype, argc = 1; argv = g_new (gchar *, 1); - argv[0] = g_strdup ("animationplay"); + argv[0] = g_strdup ("animationoptimize"); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); gdk_set_use_xshm (gimp_use_xshm ()); @@ -743,7 +770,10 @@ do_optimizations(void) * OPTIMIZE HERE! * */ - if (this_frame_num != 0) /* Can't delta bottom frame! */ + if ( + (this_frame_num != 0) /* Can't delta bottom frame! */ + && (optimize) + ) { int xit, yit, byteit; diff --git a/plug-ins/common/animoptimize.c b/plug-ins/common/animoptimize.c index da31daa8e2..6d8be799b2 100644 --- a/plug-ins/common/animoptimize.c +++ b/plug-ins/common/animoptimize.c @@ -1,5 +1,5 @@ /* - * Animation Optimizer plug-in version 0.61.0 + * Animation Optimizer plug-in version 0.70.0 * * by Adam D. Moss, 1997-98 * adam@gimp.org @@ -11,6 +11,10 @@ /* * REVISION HISTORY: * + * 98.04.19 : version 0.70.0 + * Plug-in doubles up as Animation UnOptimize too! (This + * is somewhat more useful than it sounds.) + * * 98.03.16 : version 0.61.0 * Support more rare opaque/transparent combinations. * @@ -101,7 +105,7 @@ GDrawableType drawabletype_alpha; guchar pixelstep; guchar* palette; gint ncolours; - +gboolean optimize; @@ -125,12 +129,28 @@ static void query() "", "Adam D. Moss ", "Adam D. Moss ", - "1997", + "1997-98", "/Filters/Animation/Animation Optimize", "RGB*, INDEXED*, GRAY*", PROC_PLUG_IN, nargs, nreturn_vals, args, return_vals); + + gimp_install_procedure("plug_in_animationunoptimize", + "This plugin 'simplifies' a GIMP layer-based" + " animation that has been AnimationOptimized. This" + " makes the animation much easier to work with if," + " for example, the optimized version is all you" + " have.", + "", + "Adam D. Moss ", + "Adam D. Moss ", + "1997-98", + "/Filters/Animation/Animation UnOptimize", + "RGB*, INDEXED*, GRAY*", + PROC_PLUG_IN, + nargs, nreturn_vals, + args, return_vals); } static void run(char *name, int n_params, GParam * param, int *nreturn_vals, @@ -153,6 +173,13 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals, } } + /* Check the procedure name we were called with, to decide + what needs to be done. */ + if (strcmp(name,"plug_in_animationoptimize")==0) + optimize = TRUE; + else + optimize = FALSE; /* UnOptimize */ + if (status == STATUS_SUCCESS) { image_id = param[1].data.d_image; @@ -255,7 +282,7 @@ build_dialog(GImageType basetype, argc = 1; argv = g_new (gchar *, 1); - argv[0] = g_strdup ("animationplay"); + argv[0] = g_strdup ("animationoptimize"); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); gdk_set_use_xshm (gimp_use_xshm ()); @@ -743,7 +770,10 @@ do_optimizations(void) * OPTIMIZE HERE! * */ - if (this_frame_num != 0) /* Can't delta bottom frame! */ + if ( + (this_frame_num != 0) /* Can't delta bottom frame! */ + && (optimize) + ) { int xit, yit, byteit;