From: Matthew Fernandez Date: Fri, 2 Sep 2022 01:14:51 +0000 (-0700) Subject: smyrna init_viewport: use cgraph wrapper for allocations X-Git-Tag: 6.0.1~13^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=226812b1306c1b3d461bfb11cdb0276611b9042f;p=graphviz smyrna init_viewport: use cgraph wrapper for allocations The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h wrappers except (1) they are header-only and (2) they live in a directory (cgraph) that is at the root of the dependency tree. The long term plan is to replace all use of lib/common/memory.h with lib/cgraph/alloc.h. --- diff --git a/cmd/smyrna/viewport.c b/cmd/smyrna/viewport.c index 7aed95dd4..96a227dd0 100644 --- a/cmd/smyrna/viewport.c +++ b/cmd/smyrna/viewport.c @@ -355,7 +355,7 @@ void init_viewport(ViewInfo * view) view->fmg.active = 0; view->mouse.down = 0; view->activeGraph = -1; - view->Topview = GNEW(topview); + view->Topview = gv_alloc(sizeof(topview)); view->Topview->fisheyeParams.fs = 0; view->Topview->xDot=NULL; @@ -388,7 +388,7 @@ void init_viewport(ViewInfo * view) set_viewport_settings_from_template(view, view->systemGraphs.def_attrs); view->Topview->Graphdata.GraphFileName = NULL; view->colschms = NULL; - view->arcball = NEW(ArcBall_t); + view->arcball = gv_alloc(sizeof(ArcBall_t)); view->keymap.down=0; load_mouse_actions (view); view->refresh.color=1;