Commit 99cfe6f5 authored by Sven Neumann's avatar Sven Neumann
Browse files

Removed the gimp_1.0.2 dir since CVS didn't get the links anyway and the

files were doubled.

Made the source use g_malloc/g_new/g_free/g_getenv and nothinh else.

Changed the README to reflect that GAP is now part of The GIMP.


--Sven
parent a129fc0d
......@@ -4,7 +4,7 @@ pluginlibdir = $(gimpplugindir)/plug-ins
scriptdatadir = $(gimpdatadir)/scripts
SUBDIRS = gimp_1.0.2_src iter_ALT
SUBDIRS = iter_ALT
scriptdata_DATA = sel-to-anim-img.scm
......
......@@ -447,7 +447,7 @@ radio_create_value(char *title, GtkTable *table, int row, t_arr_arg *arr_ptr)
for(l_idy=0; l_idy < arr_ptr->radio_argc; l_idy++)
{
radio_ptr = calloc(1, sizeof(t_radio_arg));
radio_ptr = g_malloc0(sizeof(t_radio_arg));
radio_ptr->arr_ptr = arr_ptr;
radio_ptr->radio_index = l_idy;
......@@ -553,7 +553,7 @@ optionmenu_create_value(char *title, GtkTable *table, int row, t_arr_arg *arr_pt
if (arr_ptr->radio_argv[l_idy] != NULL)
l_radio_txt = arr_ptr->radio_argv[l_idy];
}
l_menu_ptr = calloc(1, sizeof(t_radio_arg));
l_menu_ptr = g_malloc0(sizeof(t_radio_arg));
l_menu_ptr->radio_index = l_idy;
l_menu_ptr->arr_ptr = arr_ptr;
......
......@@ -68,7 +68,7 @@ gap_db_browser_dialog(char *title_txt,
gtk_init (&l_argsc, &l_argsv);
}
dbbrowser = (gpointer)malloc(sizeof(dbbrowser_t));
dbbrowser = (gpointer)g_malloc(sizeof(dbbrowser_t));
/* store pointers to gap constraint procedures */
dbbrowser->constraint_func = constraint_func;
......
......@@ -515,7 +515,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
}
if(l_plugin_iterator != NULL) free(l_plugin_iterator);
if(l_plugin_iterator != NULL) g_free(l_plugin_iterator);
return l_rc;
} /* end p_foreach_multilayer */
......
......@@ -137,7 +137,7 @@ run (char *name,
*return_vals = values;
l_rc = 0;
l_env = getenv("GAP_DEBUG");
l_env = g_getenv("GAP_DEBUG");
if(l_env != NULL)
{
if((*l_env != 'n') && (*l_env != 'N')) gap_debug = 1;
......
......@@ -376,7 +376,7 @@ char * p_get_iterator_proc(char *plugin_name)
char *l_plugin_iterator;
/* check for matching Iterator PluginProcedures */
l_plugin_iterator = malloc(strlen(plugin_name) + strlen("_Iterator_ALT") +2);
l_plugin_iterator = g_malloc(strlen(plugin_name) + strlen("_Iterator_ALT") +2);
if(l_plugin_iterator != NULL)
{
sprintf(l_plugin_iterator, "%s_Iterator", plugin_name);
......@@ -395,7 +395,7 @@ char * p_get_iterator_proc(char *plugin_name)
if(p_procedure_available(l_plugin_iterator, PTYP_ITERATOR) < 0)
{
/* both iterator names are not available */
free(l_plugin_iterator);
g_free(l_plugin_iterator);
l_plugin_iterator = NULL;
}
}
......@@ -452,7 +452,7 @@ int p_constraint_proc_sel2(gchar *proc_name)
l_plugin_iterator = p_get_iterator_proc(proc_name);
if(l_plugin_iterator != NULL)
{
free(l_plugin_iterator);
g_free(l_plugin_iterator);
return 1; /* 1 .. set "Apply Varying" Button sensitive */
}
}
......
......@@ -165,7 +165,7 @@ int p_file_copy(char *fname, char *fname_copy)
l_len = (long)l_stat_buf.st_size;
/* Buffer allocate */
l_buffer=(char *)calloc(1, (size_t)l_len+1);
l_buffer=(char *)g_malloc0((size_t)l_len+1);
if(l_buffer == NULL)
{
fprintf(stderr, "file_copy: calloc error (%ld Bytes not available)\n", l_len);
......@@ -177,7 +177,7 @@ int p_file_copy(char *fname, char *fname_copy)
if(l_fp == NULL)
{
fprintf (stderr, "open(read) error on '%s'\n", fname);
free(l_buffer);
g_free(l_buffer);
return -1;
}
fread(l_buffer, 1, (size_t)l_len, l_fp);
......@@ -187,7 +187,7 @@ int p_file_copy(char *fname, char *fname_copy)
if(l_fp == NULL)
{
fprintf (stderr, "file_copy: open(write) error on '%s' \n", fname_copy);
free(l_buffer);
g_free(l_buffer);
return -1;
}
......@@ -197,7 +197,7 @@ int p_file_copy(char *fname, char *fname_copy)
}
fclose(l_fp);
free(l_buffer);
g_free(l_buffer);
return 0; /* all done OK */
} /* end p_file_copy */
......@@ -217,7 +217,7 @@ int p_delete_frame(t_anim_info *ainfo_ptr, long nr)
if(gap_debug) fprintf(stderr, "\nDEBUG p_delete_frame: %s\n", l_fname);
l_rc = remove(l_fname);
free(l_fname);
g_free(l_fname);
return(l_rc);
......@@ -237,14 +237,14 @@ int p_rename_frame(t_anim_info *ainfo_ptr, long from_nr, long to_nr)
if(l_from_fname == NULL) { return(1); }
l_to_fname = p_alloc_fname(ainfo_ptr->basename, to_nr, ainfo_ptr->extension);
if(l_to_fname == NULL) { free(l_from_fname); return(1); }
if(l_to_fname == NULL) { g_free(l_from_fname); return(1); }
if(gap_debug) fprintf(stderr, "\nDEBUG p_rename_frame: %s ..to.. %s\n", l_from_fname, l_to_fname);
l_rc = rename(l_from_fname, l_to_fname);
free(l_from_fname);
free(l_to_fname);
g_free(l_from_fname);
g_free(l_to_fname);
return(l_rc);
......@@ -269,7 +269,7 @@ char* p_alloc_basename(char *imagename, long *number)
*number = 0;
if(imagename == NULL) return (NULL);
l_fname = (char *)malloc(strlen(imagename) + 1);
l_fname = (char *)g_malloc(strlen(imagename) + 1);
if(l_fname == NULL) return (NULL);
/* copy from imagename */
......@@ -342,7 +342,7 @@ char* p_alloc_extension(char *imagename)
l_ptr--;
}
l_ext = calloc(1, (size_t)(l_exlen + 1));
l_ext = g_malloc0((size_t)(l_exlen + 1));
if(l_ext == NULL)
return (NULL);
......@@ -366,7 +366,7 @@ char* p_alloc_fname(char *basename, long nr, char *extension)
char *l_fname;
if(basename == NULL) return (NULL);
l_fname = (char *)malloc(strlen(basename) + strlen(extension) + 8);
l_fname = (char *)g_malloc(strlen(basename) + strlen(extension) + 8);
if(l_fname != NULL)
{
sprintf(l_fname, "%s_%04ld%s", basename, nr, extension);
......@@ -387,7 +387,7 @@ t_anim_info *p_alloc_ainfo(gint32 image_id, GRunModeType run_mode)
{
t_anim_info *l_ainfo_ptr;
l_ainfo_ptr = (t_anim_info*)malloc(sizeof(t_anim_info));
l_ainfo_ptr = (t_anim_info*)g_malloc(sizeof(t_anim_info));
if(l_ainfo_ptr == NULL) return(NULL);
l_ainfo_ptr->basename = NULL;
......@@ -399,7 +399,7 @@ t_anim_info *p_alloc_ainfo(gint32 image_id, GRunModeType run_mode)
l_ainfo_ptr->old_filename = gimp_image_get_filename(image_id);
if(l_ainfo_ptr->old_filename == NULL)
{
l_ainfo_ptr->old_filename = malloc(30);
l_ainfo_ptr->old_filename = g_malloc(30);
sprintf(l_ainfo_ptr->old_filename, "frame_0001.xcf"); /* assign a defaultname */
gimp_image_set_filename (image_id, l_ainfo_ptr->old_filename);
}
......@@ -452,7 +452,7 @@ int p_dir_ainfo(t_anim_info *ainfo_ptr)
short l_dirflag;
char dirname_buff[1024];
l_dirname = malloc(strlen(ainfo_ptr->basename) +1);
l_dirname = g_malloc(strlen(ainfo_ptr->basename) +1);
if(l_dirname == NULL)
return -1;
......@@ -546,7 +546,7 @@ int p_dir_ainfo(t_anim_info *ainfo_ptr)
l_minnr = l_nr;
}
free(l_dummy);
g_free(l_dummy);
}
}
}
......@@ -554,7 +554,7 @@ int p_dir_ainfo(t_anim_info *ainfo_ptr)
closedir( l_dirp );
}
free(l_dirname);
g_free(l_dirname);
/* set first_frame_nr and last_frame_nr (found as "_0099" in diskfile namepart) */
ainfo_ptr->last_frame_nr = l_maxnr;
......@@ -579,18 +579,18 @@ void p_free_ainfo(t_anim_info **ainfo)
return;
if(aptr->basename)
free(aptr->basename);
g_free(aptr->basename);
if(aptr->extension)
free(aptr->extension);
g_free(aptr->extension);
if(aptr->new_filename)
free(aptr->new_filename);
g_free(aptr->new_filename);
if(aptr->old_filename)
free(aptr->old_filename);
g_free(aptr->old_filename);
free(aptr);
g_free(aptr);
}
......@@ -668,7 +668,7 @@ char * p_gzip (char *orig_name, char *new_name, char *zip)
l_cmd = NULL;
l_tmpname = new_name;
l_cmd = calloc(1, (strlen(l_tmpname) + strlen(orig_name) + 20));
l_cmd = g_malloc((strlen(l_tmpname) + strlen(orig_name) + 20));
if(l_cmd == NULL)
{
return NULL;
......@@ -702,7 +702,7 @@ char * p_gzip (char *orig_name, char *new_name, char *zip)
fprintf(stderr, "ERROR system: %s\nreturncodes %d %d", l_cmd, l_rc, l_rc2);
l_tmpname = NULL;
}
free(l_cmd);
g_free(l_cmd);
return l_tmpname;
} /* end p_gzip */
......@@ -873,7 +873,7 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
* that resides on the same filesystem as sav_name
* and has the same extension as the original sav_name
*/
l_tmpname = (char *)malloc(strlen(sav_name) + strlen(".gtmp") + strlen(l_ext) +2);
l_tmpname = (char *)g_malloc(strlen(sav_name) + strlen(".gtmp") + strlen(l_ext) +2);
if(l_tmpname == NULL)
{
return -1;
......@@ -895,16 +895,16 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
g_free(l_params);
}
free(l_ext);
g_free(l_ext);
if(gap_debug)
{
l_ext = getenv("GAP_NO_SAVE");
l_ext = g_getenv("GAP_NO_SAVE");
if(l_ext != NULL)
{
fprintf(stderr, "DEBUG: GAP_NO_SAVE is set: save is skipped: '%s'\n", l_tmpname);
free(l_tmpname); /* free if it was a temporary name */
g_free(l_tmpname); /* free if it was a temporary name */
return 0;
}
}
......@@ -953,7 +953,7 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
if(l_rc < 0)
{
remove(l_tmpname);
free(l_tmpname); /* free temporary name */
g_free(l_tmpname); /* free temporary name */
return l_rc;
}
......@@ -989,7 +989,7 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
}
}
free(l_tmpname); /* free temporary name */
g_free(l_tmpname); /* free temporary name */
return l_rc;
......@@ -1057,7 +1057,7 @@ gint32 p_load_image (char *lod_name)
g_free(l_params);
}
else l_tmpname = lod_name;
free(l_ext);
g_free(l_ext);
}
if(l_tmpname == NULL)
......@@ -1143,7 +1143,7 @@ int p_load_named_frame (gint32 image_id, char *lod_name)
*/
int p_replace_image(t_anim_info *ainfo_ptr)
{
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
ainfo_ptr->frame_nr,
ainfo_ptr->extension);
......@@ -1235,7 +1235,7 @@ int p_del(t_anim_info *ainfo_ptr, long cnt)
}
/* make filename, then load the new current frame */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
ainfo_ptr->frame_nr,
ainfo_ptr->extension);
......@@ -1275,7 +1275,7 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
/* use a new name (_0001.xcf Konvention) */
gimp_image_set_filename (ainfo_ptr->image_id, l_curr_name);
free(l_curr_name);
g_free(l_curr_name);
if((range_from <0 ) && (range_to < 0 ))
......@@ -1352,8 +1352,8 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
if((l_dup_name != NULL) && (l_curr_name != NULL))
{
p_file_copy(l_curr_name, l_dup_name);
free(l_dup_name);
free(l_curr_name);
g_free(l_dup_name);
g_free(l_curr_name);
}
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
{
......@@ -1374,7 +1374,7 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
ainfo_ptr->last_frame_nr = ainfo_ptr->first_frame_nr + ainfo_ptr->frame_cnt -1;
/* load from the "new" current frame */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
ainfo_ptr->curr_frame_nr,
ainfo_ptr->extension);
......@@ -1422,7 +1422,7 @@ int p_exchg(t_anim_info *ainfo_ptr, long dest)
}
/* load from the "new" current frame */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
ainfo_ptr->curr_frame_nr,
ainfo_ptr->extension);
......@@ -1479,7 +1479,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
l_curr_name = p_alloc_fname(ainfo_ptr->basename, ainfo_ptr->curr_frame_nr, ainfo_ptr->extension);
/* save current frame */
p_save_named_frame(ainfo_ptr->image_id, l_curr_name);
free(l_curr_name);
g_free(l_curr_name);
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
......@@ -1532,7 +1532,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
/* load from the "new" current frame */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
ainfo_ptr->curr_frame_nr,
ainfo_ptr->extension);
......
......@@ -622,7 +622,7 @@ run (char *name,
l_rc = 0;
l_env = getenv("GAP_DEBUG");
l_env = g_getenv("GAP_DEBUG");
if(l_env != NULL)
{
if((*l_env != 'n') && (*l_env != 'N')) gap_debug = 1;
......
......@@ -256,7 +256,7 @@ p_pitstop_dialog(gint text_flag, char *filter_procname)
l_argc = 0;
/* optional dialog between both calls (to see the effect of 1.call) */
l_env = getenv("GAP_FILTER_PITSTOP");
l_env = g_getenv("GAP_FILTER_PITSTOP");
if(l_env != NULL)
{
if((*l_env == 'N') || (*l_env == 'n'))
......@@ -331,7 +331,7 @@ p_alloc_layli(gint32 image_id, gint32 *l_sel_cnt, gint *nlayers,
return(NULL);
}
l_layli_ptr = calloc((*nlayers), sizeof(t_LayliElem));
l_layli_ptr = g_new0(t_LayliElem, (*nlayers));
if(l_layli_ptr == NULL)
{
g_free (l_layers_list);
......@@ -812,7 +812,7 @@ p_do_2nd_filter_dialogs(char *filter_procname,
cleanup:
if(l_dpy_id >= 0) gimp_display_delete(l_dpy_id);
if(l_last_image_id >= 0) gimp_image_delete(l_last_image_id);
if(l_layli_ptr != NULL) free(l_layli_ptr);
if(l_layli_ptr != NULL) g_free(l_layli_ptr);
return (l_rc);
......@@ -922,7 +922,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
if(gap_debug) fprintf(stderr, "p_frames_modify While l_cur_frame_nr = %d\n", (int)l_cur_frame_nr);
/* build the frame name */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
l_cur_frame_nr,
ainfo_ptr->extension);
......@@ -987,7 +987,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
);
}
free(l_last_frame_filename);
g_free(l_last_frame_filename);
l_last_frame_filename = NULL;
}
......@@ -1032,7 +1032,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
/* free layli info table for the current frame */
if(l_layli_ptr != NULL)
{
free(l_layli_ptr);
g_free(l_layli_ptr);
l_layli_ptr = NULL;
}
......@@ -1116,8 +1116,8 @@ error:
l_dpy_id = -1;
}
if(l_tmp_image_id >= 0) gimp_image_delete(l_tmp_image_id);
if(l_layli_ptr != NULL) free(l_layli_ptr);
if(l_plugin_iterator != NULL) free(l_plugin_iterator);
if(l_layli_ptr != NULL) g_free(l_layli_ptr);
if(l_plugin_iterator != NULL) g_free(l_plugin_iterator);
return -1;
} /* end p_frames_modify */
......@@ -1201,3 +1201,4 @@ gint gap_mod_layer(GRunModeType run_mode, gint32 image_id,
return(l_rc);
}
......@@ -693,7 +693,7 @@ mov_upvw_callback (GtkWidget *widget,
{
/* replace the temporary image */
l_new_tmp_image_id = p_load_image(l_filename);
free(l_filename);
g_free(l_filename);
if (l_new_tmp_image_id >= 0)
{
/* use the new loaded temporary image */
......
......@@ -70,7 +70,7 @@ int p_mov_call_render(t_mov_data *mov_ptr, t_mov_current *cur_ptr)
ainfo_ptr = mov_ptr->dst_ainfo_ptr;
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
cur_ptr->dst_frame_nr,
ainfo_ptr->extension);
......@@ -409,7 +409,7 @@ int gap_move(GRunModeType run_mode, gint32 image_id)
ainfo_ptr = p_alloc_ainfo(image_id, run_mode);
if(ainfo_ptr != NULL)
{
l_mov_data.val_ptr = malloc(sizeof(t_mov_values));
l_mov_data.val_ptr = g_malloc(sizeof(t_mov_values));
if(NULL != l_mov_data.val_ptr)
{
if (0 == p_dir_ainfo(ainfo_ptr))
......@@ -442,7 +442,7 @@ int gap_move(GRunModeType run_mode, gint32 image_id)
}
}
}
free(l_mov_data.val_ptr);
g_free(l_mov_data.val_ptr);
}
p_free_ainfo(&ainfo_ptr);
......
......@@ -614,7 +614,7 @@ p_frames_to_multilayer(t_anim_info *ainfo_ptr,
while(1)
{
/* build the frame name */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
l_cur_frame_nr,
ainfo_ptr->extension);
......@@ -651,7 +651,7 @@ p_frames_to_multilayer(t_anim_info *ainfo_ptr,
}
}
free(l_layli_ptr);
g_free(l_layli_ptr);
if((flatten_mode >= FLAM_MERG_EXPAND) && (flatten_mode <= FLAM_MERG_CLIP_BG))
{
......@@ -950,7 +950,7 @@ p_frames_convert(t_anim_info *ainfo_ptr,
while(l_rc >= 0)
{
/* build the frame name */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
l_cur_frame_nr,
ainfo_ptr->extension);
......@@ -1029,7 +1029,7 @@ p_frames_convert(t_anim_info *ainfo_ptr,
l_run_mode = RUN_NONINTERACTIVE; /* for all further calls */
free(l_sav_name);
g_free(l_sav_name);
}
}
......@@ -1157,7 +1157,7 @@ gint32 p_anim_sizechange(t_anim_info *ainfo_ptr,
while(1)
{
/* build the frame name */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
l_cur_frame_nr,
ainfo_ptr->extension);
......@@ -1315,7 +1315,7 @@ p_frames_layer_del(t_anim_info *ainfo_ptr,
while(1)
{
/* build the frame name */
if(ainfo_ptr->new_filename != NULL) free(ainfo_ptr->new_filename);
if(ainfo_ptr->new_filename != NULL) g_free(ainfo_ptr->new_filename);
ainfo_ptr->new_filename = p_alloc_fname(ainfo_ptr->basename,
l_cur_frame_nr,
ainfo_ptr->extension);
......@@ -1513,7 +1513,7 @@ gint32 gap_range_conv(GRunModeType run_mode, gint32 image_id,
l_dest_type,
l_dest_colors,
l_dest_dither);
free(l_basename_ptr);
g_free(l_basename_ptr);
}
}
}
......
......@@ -173,7 +173,7 @@ p_split_image(t_anim_info *ainfo_ptr,
/* prepare return value */
l_rc = l_new_image_id;
free(l_sav_name);
g_free(l_sav_name);
}
/* save as frame */
......
## Process this file with automake to produce Makefile.in
EXTRA_DIST = \
appenv.h \
resize.c \
resize.c
files:
@files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \
echo $$p; \
done
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __APPENV_H__
#define __APPENV_H__
#include "gdk/gdkx.h"
#include "gtk/gtk.h"
#define DISPLAY ((Display *) GDK_DISPLAY())
/* important macros */
#define BOUNDS(a,x,y) ((a < x) ? x : ((a > y) ? y : a))
#define MINIMUM(x,y) ((x < y) ? x : y)
#define MAXIMUM(x,y) ((x > y) ? x : y)
typedef enum {
MESSAGE_BOX,
CONSOLE
} MessageHandlerType;
extern int no_interface;
extern int no_splash;
extern int no_splash_image;
extern int no_data;
extern int be_verbose;
extern int use_debug_handler;
extern int console_messages;
extern MessageHandlerType message_handler