gEDA-dev: [PATCH 1/3] gattrib: remove unneeded globals
Ivan Stankovic
ivan.stankovic at fer.hr
Sat Jul 21 12:57:59 EDT 2007
---
gattrib/include/globals.h | 55 +-------------------------------------------
gattrib/src/g_rc.c | 4 +-
gattrib/src/gattrib.c | 2 +-
gattrib/src/globals.c | 22 +++--------------
4 files changed, 9 insertions(+), 74 deletions(-)
diff --git a/gattrib/include/globals.h b/gattrib/include/globals.h
index e7561d2..fb14198 100644
--- a/gattrib/include/globals.h
+++ b/gattrib/include/globals.h
@@ -85,68 +85,17 @@ SHEET_DATA *sheet_head;
GtkWidget *window; /* Main window */
GtkWidget *main_vbox; /* Container which vertically aligns children */
GtkWidget *menu_bar; /* Menu bar (holding file, edit, etc . . . */
-
GtkWidget *notebook;
+
GtkSheet **sheets; /* These are the spreadsheet widgets themselves */
GtkWidget **scrolled_windows;
-GtkWidget *show_hide_box;
-GtkWidget *status_box;
-GtkWidget *location;
GtkWidget *entry;
-GtkWidget *fgcolorcombo;
-GtkWidget *bgcolorcombo;
-GtkWidget *bordercombo;
-GdkPixmap *pixmap;
-GdkBitmap *mask;
-GtkWidget *bg_pixmap;
-GtkWidget *fg_pixmap;
-GtkWidget *toolbar;
+GtkWidget *location;
GtkWidget *left_button;
GtkWidget *center_button;
GtkWidget *right_button;
-GtkWidget *tpixmap;
-GtkWidget *bullet[10];
-GtkWidget *smile;
-GtkWidget *curve;
-GtkWidget *popup;
-
GtkWidget *label;
-GtkWidget *font_combo;
-GtkWidget *toggle_combo;
-
-/*------------------------------------------------------------------
- * This stuff copied over from gschem
- *------------------------------------------------------------------*/
-/* color stuff */
-extern GdkColormap *colormap;
-extern GdkVisual *visual;
-
-/* colors */
-extern GdkColor white;
-extern GdkColor black;
-extern GdkColor red;
-extern GdkColor green;
-extern GdkColor blue;
-extern GdkColor cyan;
-extern GdkColor yellow;
-extern GdkColor grey;
-extern GdkColor grey90;
-extern GdkColor darkgreen;
-extern GdkColor darkred;
-extern GdkColor darkyellow;
-extern GdkColor darkcyan;
-extern GdkColor darkblue;
-extern GdkColor darkgrey;
-
-extern char *rc_filename;
-
-extern int logfile_fd;
-extern int do_logging;
-extern int logging_dest;
-
-/* gattrib specific stuff */
-extern char *guile_proc; /* Needed for read-in of rc files */
/* command line switch settings */
extern int verbose_mode;
diff --git a/gattrib/src/g_rc.c b/gattrib/src/g_rc.c
index b8a5a57..2355d79 100644
--- a/gattrib/src/g_rc.c
+++ b/gattrib/src/g_rc.c
@@ -73,8 +73,8 @@ SCM g_rc_gattrib_version(SCM version)
"You are running gEDA/gaf version [%s%s.%s],\n",
PREPEND_VERSION_STRING, DOTTED_VERSION, DATE_VERSION);
fprintf(stderr,
- "but you have a version [%s] gattribrc file:\n[%s]\n",
- SCM_STRING_CHARS (version), rc_filename);
+ "but you have a version [%s] gattribrc file.\n",
+ SCM_STRING_CHARS (version));
fprintf(stderr,
"Please be sure that you have the latest rc file.\n");
return SCM_BOOL_F;
diff --git a/gattrib/src/gattrib.c b/gattrib/src/gattrib.c
index 6e98838..8226793 100644
--- a/gattrib/src/gattrib.c
+++ b/gattrib/src/gattrib.c
@@ -178,7 +178,7 @@ void gattrib_main(void *closure, int argc, char *argv[])
pr_current = s_toplevel_new();
/* ----- Read in RC files. ----- */
- g_rc_parse(pr_current, "gattribrc", rc_filename);
+ g_rc_parse(pr_current, "gattribrc", NULL);
i_window_vars_set(pr_current); /* The window vars are used in gschem,
but we need to set them here because
diff --git a/gattrib/src/globals.c b/gattrib/src/globals.c
index 84e6abc..390a60f 100644
--- a/gattrib/src/globals.c
+++ b/gattrib/src/globals.c
@@ -32,19 +32,11 @@
#include <dmalloc.h>
#endif
-char *rc_filename = NULL;
-
-/* color stuff */
-GdkColormap *colormap;
-GdkVisual *visual;
-
-/* colors */
-GdkColor white;
-GdkColor black;
-
-int logfile_fd=-1;
int do_logging=TRUE;
-int logging_dest=LOG_WINDOW;
+
+/* command line arguments */
+int verbose_mode=FALSE;
+int quiet_mode=FALSE;
/* these are required by libgeda */
/* I have made most of these NULL because they aren't needed
@@ -64,9 +56,3 @@ void (*x_log_update_func)() = NULL;
void (*variable_set_func)() = i_vars_set;
int (*load_newer_backup_func)() = NULL;
-/* command line arguments */
-int verbose_mode=FALSE;
-int quiet_mode=FALSE;
-
-
-
--
1.5.2.2
More information about the geda-dev
mailing list