~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to cmd/tools/dot2gxl.c

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: dot2gxl.c,v 1.3 2006/10/05 21:49:15 erg Exp $ $Revision: 1.3 $ */
 
1
/* $Id: dot2gxl.c,v 1.4 2008/01/09 20:50:35 erg Exp $ $Revision: 1.4 $ */
2
2
/* vim:set shiftwidth=4 ts=8: */
3
3
 
4
4
/**********************************************************
16
16
 
17
17
 
18
18
#include <convert.h>
 
19
#ifndef USE_CGRAPH
19
20
#include <aghdr.h>
 
21
#endif
20
22
#include <ctype.h>
21
23
 
22
24
#define SMALLBUF    128
723
725
 
724
726
    writeSubgs(stp, g, gxlFile);
725
727
    dd = (Agdatadict_t *) agdatadict(g);
 
728
#ifdef USE_CGRAPH
 
729
    for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
 
730
#else
726
731
    for (n = agfstnode(g); n; n = agnxtnode(n)) {
 
732
#endif
727
733
        realn = agidnode(stp->root, AGID(n), 0);
728
734
        if (!writeval(realn)) {
729
735
            writeval(realn) = 1;
730
736
            writeNode(stp, n, gxlFile, dd->dict.n);
731
737
        }
732
738
 
 
739
#ifdef USE_CGRAPH
 
740
        for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
 
741
#else
733
742
        for (e = agfstout(n); e; e = agnxtout(e)) {
 
743
#endif
734
744
            if (writeEdgeTest(g, e))
735
745
                writeEdge(stp, e, gxlFile, dd->dict.e);
736
746
        }
771
781
    Agedge_t *e;
772
782
 
773
783
    iterate_subgs(stp, g);
 
784
#ifdef USE_CGRAPH
 
785
    for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
 
786
#else
774
787
    for (n = agfstnode(g); n; n = agnxtnode(n)) {
 
788
#endif
775
789
        char *gxlId;
776
790
        char *nodename = agnameof(n);
777
791
 
786
800
            addToMap(stp->nodeMap, nodename, gxlId);
787
801
        }
788
802
 
 
803
#ifdef USE_CGRAPH
 
804
        for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
 
805
#else
789
806
        for (e = agfstout(n); e; e = agnxtout(e)) {
 
807
#endif
790
808
            if (writeEdgeTest(g, e)) {
791
809
                char *edge_id = agget(e, GXL_ID);
792
810
                if (!EMPTY(edge_id))