* Contributors: Details at https://graphviz.org
*************************************************************************/
#include "topfisheyeview.h"
-
+#include <cgraph/alloc.h>
#include <math.h>
#include <common/memory.h>
#include "viewport.h"
int i;
int ne = agnedges(gg);
int nv = agnnodes(gg);
- v_data *graph = N_NEW(nv, v_data);
- int *edges = N_NEW(2 * ne + nv, int); /* reserve space for self loops */
- float *ewgts = N_NEW(2 * ne + nv, float);
+ v_data *graph = gv_calloc(nv, sizeof(v_data));
+ int *edges = gv_calloc(2 * ne + nv, sizeof(int)); /* reserve space for self loops */
+ float *ewgts = gv_calloc(2 * ne + nv, sizeof(float));
Agnode_t *np;
Agedge_t *ep;
Agraph_t *g = NULL;