Graphviz  2.41.20170921.2350
main3.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include "cgraph.h"
3 
4 int main(int argc, char **argv)
5 {
6  Agraph_t *g;
7  Agnode_t *u, *v;
8  int rv;
9 
10  g = agread(stdin,0);
11  if (argc >= 3) {
12  u = agnode(g,argv[1],FALSE);
13  v = agnode(g,argv[2],FALSE);
14  rv = agnodebefore(u,v);
15  fprintf(stderr,"agnodebefore returns %d\n",rv);
16  fprintf(stderr,"dtsize %d\n",dtsize(g->n_seq));
17  }
18  agwrite(g,stdout);
19 }
CGRAPH_API Agnode_t * agnode(Agraph_t *g, char *name, int createflag)
Definition: node.c:142
Dict_t * n_seq
Definition: cgraph.h:243
CGRAPH_API Agraph_t * agread(void *chan, Agdisc_t *disc)
Definition: grammar.c:2349
CGRAPH_API int agwrite(Agraph_t *g, void *chan)
Definition: write.c:678
CDT_API int dtsize(Dt_t *)
Definition: dtsize.c:12
CGRAPH_API int agnodebefore(Agnode_t *u, Agnode_t *v)
Definition: node.c:353
#define FALSE
Definition: cgraph.h:35
int main(int argc, char **argv)
Definition: dot.c:95