Graphviz 13.0.0~dev.20241220.2304
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{
23 return dtopen(disc, method);
24}
25
26int agdtdelete(Agraph_t * g, Dict_t * dict, void *obj)
27{
28 Ag_dictop_G = g;
29 return dtdelete(dict, obj) != NULL;
30}
31
32int agdtclose(Agraph_t * g, Dict_t * dict)
33{
34 dtdisc(dict, NULL);
35 Ag_dictop_G = g;
36 if (dtclose(dict))
37 return 1;
39 return 0;
40}
41
42void agdtdisc(Agraph_t * g, Dict_t * dict, Dtdisc_t * disc)
43{
44 (void)g; /* unused */
45 if (disc && dtdisc(dict, NULL) != disc) {
46 dtdisc(dict, disc);
47 }
48 /* else unchanged, disc is same as old disc */
49}
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:42
Dict_t * agdtopen(Agraph_t *g, Dtdisc_t *disc, Dtmethod_t *method)
Definition utils.c:21
int agdtdelete(Agraph_t *g, Dict_t *dict, void *obj)
Definition utils.c:26
static Agraph_t * Ag_dictop_G
Definition utils.c:19
int agdtclose(Agraph_t *g, Dict_t *dict)
Definition utils.c:32
static Dtdisc_t disc
Definition exparse.y:209
node NULL
Definition grammar.y:163
graph or subgraph
Definition cgraph.h:425
Definition cdt.h:100