1/* $Id$Revision: */
2/* vim:set shiftwidth=4 ts=8: */
3
4#include <stdio.h>
5#include <cgraph.h>
6
7#ifdef _WIN32
8#define strdup(x) _strdup(x)
9#endif
10
11typedef struct {
12 Dtlink_t link;
13 unsigned short kind;
14 unsigned short sort;
15 char* name;
16 union {
17 char* value;
18 Dt_t* lp;
19 }u;
20} gmlattr;
21
22typedef struct {
23 Dtlink_t link;
24 char* id;
25 Dt_t* attrlist;
26} gmlnode;
27
28typedef struct {
29 Dtlink_t link;
30 char* source;
31 char* target;
32 Dt_t* attrlist;
33} gmledge;
34
35typedef struct gmlgraph {
36 Dtlink_t link;
37 struct gmlgraph* parent;
38 int directed;
39 Dt_t* attrlist;
40 Dt_t* nodelist;
41 Dt_t* edgelist;
42 Dt_t* graphlist;
43} gmlgraph;
44
45extern int gmllex(void);
46extern void gmllexeof(void);
47extern void gmlerror(char *);
48extern int gmlerrors(void);
49extern void initgmlscan (FILE*);
50extern Agraph_t* gml_to_gv (char*, FILE*, int, int*);
51