2
This software may only be used by you under license from AT&T Corp.
3
("AT&T"). A copy of AT&T's Source Code Agreement is available at
4
AT&T's Internet website having the URL:
5
<http://www.research.att.com/sw/tools/graphviz/license/source.html>
6
If you received this software without first entering into a license
7
with AT&T, you have an infringing copy of this software and cannot use
8
it without violating AT&T's intellectual property rights.
19
#include <sys/types.h>
25
typedef struct Agraph_t Agraph_t;
26
typedef struct Agnode_t Agnode_t;
27
typedef struct Agedge_t Agedge_t;
28
typedef struct Agdict_t Agdict_t;
29
typedef struct Agsym_t Agsym_t;
30
typedef struct Agdata_t Agdata_t;
31
typedef struct Agproto_t Agproto_t;
33
typedef char * (*gets_f)(char *ubuf, int n, FILE *fp);
35
#define AGFLAG_DIRECTED (1<<0)
36
#define AGFLAG_STRICT (1<<1)
37
#define AGFLAG_METAGRAPH (1<<2)
40
#define AGRAPHSTRICT (AGRAPH | AGFLAG_STRICT)
41
#define AGDIGRAPH AGFLAG_DIRECTED
42
#define AGDIGRAPHSTRICT (AGDIGRAPH | AGFLAG_STRICT)
43
#define AGMETAGRAPH (AGFLAG_DIRECTED | AGFLAG_STRICT | AGFLAG_METAGRAPH)
45
#define AG_IS_DIRECTED(g) ((g)->kind & AGFLAG_DIRECTED)
46
#define AG_IS_STRICT(g) ((g)->kind & AGFLAG_STRICT)
47
#define AG_IS_METAGRAPH(g) ((g)->kind & AGFLAG_METAGRAPH)
48
#define aginit() aginitlib(sizeof(Agraph_t),sizeof(Agnode_t),sizeof(Agedge_t))
57
Dict_t *nodes,*inedges,*outedges;
85
struct Agdata_t { /* for main graph */
90
int max_node_id, max_edge_id;
96
unsigned char printed;
112
_BEGIN_EXTERNS_ /* public data */
113
#if _BLD_graph && defined(__EXPORT__)
114
#define extern __EXPORT__
116
#if !_BLD_graph && defined(__IMPORT__)
117
#define extern __IMPORT__
121
extern char *agstrcanon(char *, char *);
122
extern char *agget(void*, char *);
123
extern char *agxget(void*, int);
124
extern void agset(void*, char *, char *);
125
extern void agxset(void*, int, char *);
126
extern int agindex(void*, char *);
128
extern void aginitlib(int, int, int);
129
extern Agraph_t *agopen(char *, int);
130
extern Agraph_t *agsubg(Agraph_t *, char *);
131
extern Agraph_t *agfindsubg(Agraph_t *, char *);
132
extern void agclose(Agraph_t *);
133
extern Agraph_t *agread(FILE *);
134
extern Agraph_t *agread_usergets(FILE *, gets_f);
135
extern Agraph_t *agmemread(char *);
136
extern int agwrite(Agraph_t *, FILE *);
137
extern int agerrors(void);
138
extern Agraph_t *agusergraph(Agnode_t *);
139
extern int agnnodes(Agraph_t *);
140
extern int agnedges(Agraph_t *);
142
extern void aginsert(Agraph_t *, void*);
143
extern void agdelete(Agraph_t *, void*);
144
extern int agcontains(Agraph_t *, void*);
146
extern Agnode_t *agnode(Agraph_t *, char *);
147
extern Agsym_t *agnodeattr(Agraph_t *, char *, char *);
148
extern Agnode_t *agfindnode(Agraph_t *, char *);
149
extern Agnode_t *agfstnode(Agraph_t *);
150
extern Agnode_t *agnxtnode(Agraph_t *, Agnode_t *);
152
extern Agedge_t *agedge(Agraph_t *, Agnode_t *, Agnode_t *);
153
extern Agsym_t *agedgeattr(Agraph_t *, char *, char *);
154
extern Agedge_t *agfindedge(Agraph_t *, Agnode_t *, Agnode_t *);
155
extern Agedge_t *agfstedge(Agraph_t *, Agnode_t *);
156
extern Agedge_t *agnxtedge(Agraph_t *, Agedge_t *, Agnode_t *);
157
extern Agedge_t *agfstin(Agraph_t *, Agnode_t *);
158
extern Agedge_t *agnxtin(Agraph_t *, Agedge_t *);
159
extern Agedge_t *agfstout(Agraph_t *, Agnode_t *);
160
extern Agedge_t *agnxtout(Agraph_t *, Agedge_t *);
162
extern Agsym_t *agraphattr(Agraph_t *, char *, char *);
163
extern Agsym_t *agnodeattr(Agraph_t *, char *, char *);
164
extern Agsym_t *agedgeattr(Agraph_t *, char *, char *);
165
extern Agsym_t *agfindattr(void*, char *);
172
#endif /* _GRAPH_H */