Commit b9212d84 authored by Manish Singh's avatar Manish Singh

Added --debug-handlers to get debiugging options on all signals

updated animoptimize plugin

-Yosh
parent 52f292d1
Mon Apr 20 18:15:54 PDT 1998 Manish Singh <yosh@gimp.org>
* 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 <marc@redhat.com>
* added RPM/* files and use them in gimp.spec
......
......@@ -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);
}
......@@ -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 <display> Use the designated X display.\n\n");
}
......
/*
* 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@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
"1997",
"1997-98",
"<Image>/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@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
"1997-98",
"<Image>/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;
......
/*
* 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@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
"1997",
"1997-98",
"<Image>/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@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
"1997-98",
"<Image>/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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment