From: Matthew Fernandez Date: Wed, 21 Dec 2022 05:57:16 +0000 (-0800) Subject: smyrna: remove unused 'filtered_attr_list' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a854eaaccef1c2c91308fe1e24a49d887c28c143;p=graphviz smyrna: remove unused 'filtered_attr_list' --- diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index fca4c4fa2..5fa6c5b8d 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -51,15 +51,6 @@ static int get_object_type(void) return -1; } -static void free_attr(attr_t *at) { - free(at->defValG); - free(at->defValN); - free(at->defValE); - - free(at->name); - free(at); -} - static attr_t *new_attr(void) { return gv_alloc(sizeof(attr_t)); } @@ -109,24 +100,6 @@ static void reset_attr_list_widgets(attr_list * l) } } -static void free_attr_list_widgets(attr_list * l) -{ - int id; - for (id = 0; id < MAX_FILTERED_ATTR_COUNT; id++) { - gtk_object_destroy((GtkObject *) l->fLabels[id]); - } -} - -static void free_attr_list(attr_list *l) { - int id; - for (id = 0; id < l->attr_count; id++) { - free_attr(l->attributes[id]); - } - if (l->with_widgets) - free_attr_list_widgets(l); - free(l); -} - // creates a new attr_list // attr_list is a basic stack implementation // with alphanumeric sorting functions @@ -318,12 +291,9 @@ static void filter_attributes(const char *prefix, topview *t) { int tmp; attr_list *l = t->attributes; - attr_list *fl = t->filtered_attr_list; int objKind = get_object_type(); - if (fl) - free_attr_list(fl); - fl = attr_list_new(0); + attr_list *fl = attr_list_new(0); reset_attr_list_widgets(l); create_filtered_list(prefix, l, fl); for (ind = 0; ind < fl->attr_count; ind++) { diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index 83b137888..b01fc3816 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -269,7 +269,6 @@ typedef struct xdot* xDot; float global_z; attr_list* attributes;/*attribute list*/ - attr_list* filtered_attr_list; topviewcache cache; selection sel; diff --git a/cmd/smyrna/topviewfuncs.c b/cmd/smyrna/topviewfuncs.c index 75df1bf5b..8eda2813f 100644 --- a/cmd/smyrna/topviewfuncs.c +++ b/cmd/smyrna/topviewfuncs.c @@ -857,7 +857,6 @@ void initSmGraph(Agraph_t * g,topview* rv) { /*create attribute list*/ rv->attributes=load_attr_list(view->g[view->activeGraph]); - rv->filtered_attr_list=NULL; // set topological fisheye to NULL rv->fisheyeParams.h = NULL;