~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to agraph/tester.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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.
 
9
*/
 
10
 
 
11
#include <assert.h>
 
12
#include <signal.h>
 
13
#include <stdio.h>
 
14
#include "agraph.h"
 
15
 
 
16
#ifdef DMALLOC
 
17
#include "dmalloc.h"
 
18
#endif
 
19
 
 
20
#define NILgraph                        NIL(Agraph_t*)
 
21
#define NILnode                         NIL(Agnode_t*)
 
22
#define NILedge                         NIL(Agedge_t*)
 
23
#define NILsym                          NIL(Agsym_t*)
 
24
#define NILstr                          NIL(char*)
 
25
 
 
26
main()
 
27
{
 
28
        Agraph_t        *g;
 
29
        Agnode_t        *n;
 
30
        Agedge_t        *e;
 
31
 
 
32
signal(SIGINT,exit);
 
33
        while (g = agread(stdin,NIL(Agdisc_t*))) {
 
34
                agsubg(g,"bla",TRUE);
 
35
#ifdef NOTDEF
 
36
                agconcat(g,stdin,NIL(Agdisc_t*));
 
37
                /*while (n = agfstnode(g)) agdelete(g,n);*/
 
38
                for (n = agfstnode(g); n; n = agnxtnode(n))
 
39
                        for (e = agfstout(n); e; e = agnxtout(e)) {
 
40
                                fprintf(stderr,"%d %d\n",AGID(agtail(e)),AGID(aghead(e)));
 
41
                        }
 
42
#endif
 
43
                /*agwrite(g,stdout);*/
 
44
                fprintf(stderr,"nodes %d edges %d\n",agnnodes(g), agnedges(g));
 
45
        }
 
46
}