Graphviz 13.0.0~dev.20250121.0651
Loading...
Searching...
No Matches
utils.c
Go to the documentation of this file.
1
6/*************************************************************************
7 * Copyright (c) 2011 AT&T Intellectual Property
8 * All rights reserved. This program and the accompanying materials
9 * are made available under the terms of the Eclipse Public License v1.0
10 * which accompanies this distribution, and is available at
11 * https://www.eclipse.org/legal/epl-v10.html
12 *
13 * Contributors: Details at https://graphviz.org
14 *************************************************************************/
15
16#include <cgraph/cghdr.h>
17#include <stdlib.h>
18
20
22 return dtopen(disc, method);
23}
24
25int agdtdelete(Agraph_t * g, Dict_t * dict, void *obj)
26{
27 Ag_dictop_G = g;
28 return dtdelete(dict, obj) != NULL;
29}
30
31int agdtclose(Agraph_t * g, Dict_t * dict)
32{
33 dtdisc(dict, NULL);
34 Ag_dictop_G = g;
35 if (dtclose(dict))
36 return 1;
38 return 0;
39}
40
41void agdtdisc(Agraph_t * g, Dict_t * dict, Dtdisc_t * disc)
42{
43 (void)g; /* unused */
44 if (disc && dtdisc(dict, NULL) != disc) {
45 dtdisc(dict, disc);
46 }
47 /* else unchanged, disc is same as old disc */
48}
CDT_API int dtclose(Dt_t *)
Definition dtclose.c:8
#define dtdelete(d, o)
Definition cdt.h:186
CDT_API Dtdisc_t * dtdisc(Dt_t *dt, Dtdisc_t *)
Definition dtdisc.c:11
CDT_API Dt_t * dtopen(Dtdisc_t *, Dtmethod_t *)
Definition dtopen.c:9
cgraph.h additions
void agdtdisc(Agraph_t *g, Dict_t *dict, Dtdisc_t *disc)
Definition utils.c:41
Dict_t * agdtopen(Dtdisc_t *disc, Dtmethod_t *method)
Definition utils.c:21
int agdtdelete(Agraph_t *g, Dict_t *dict, void *obj)
Definition utils.c:25
static Agraph_t * Ag_dictop_G
Definition utils.c:19
int agdtclose(Agraph_t *g, Dict_t *dict)
Definition utils.c:31
static Dtdisc_t disc
Definition exparse.y:209
node NULL
Definition grammar.y:163
graph or subgraph
Definition cgraph.h:424
Definition cdt.h:100