~ubuntu-branches/ubuntu/precise/graphviz/precise-security

« back to all changes in this revision

Viewing changes to lib/fdpgen/clusteredges.c

  • Committer: Bazaar Package Importer
  • Author(s): David Claughton
  • Date: 2010-03-24 22:45:18 UTC
  • mfrom: (1.2.7 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100324224518-do441tthbqjaqjzd
Tags: 2.26.3-4
Add patch to fix segfault in circo. Backported from upstream snapshot
release.  Thanks to Francis Russell for his work on this.
(Closes: #575255)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: clusteredges.c,v 1.3 2008/04/08 21:34:51 erg Exp $ $Revision: 1.3 $ */
 
1
/* $Id: clusteredges.c,v 1.10 2009/08/11 21:21:20 erg Exp $ $Revision: 1.10 $ */
2
2
/* vim:set shiftwidth=4 ts=8: */
3
3
 
4
4
/**********************************************************
51
51
    Ppoint_t pt;
52
52
    for (j = 0; j < p->pn; j++) {
53
53
        pt = p->ps[j];
54
 
        fprintf(stderr, " %.3g %.3g", pt.x, pt.y);
 
54
        fprintf(stderr, " %.5g %.5g", pt.x, pt.y);
55
55
    }
56
56
    fputs("\n", stderr);
57
57
}
105
105
static Ppoly_t *makeClustObs(graph_t * g, expand_t* pm)
106
106
{
107
107
    Ppoly_t *obs = NEW(Ppoly_t);
108
 
    box bb = GD_bb(g);
 
108
    boxf bb;
109
109
    boxf newbb;
110
110
    Ppoint_t ctr;
111
111
 
 
112
    bb = GD_bb(g);
112
113
    obs->pn = 4;
113
114
    obs->ps = N_NEW(4, Ppoint_t);
114
115
 
200
201
 */
201
202
static objlist *objectList(edge_t * ep, expand_t* pm)
202
203
{
203
 
    node_t *h = ep->head;
204
 
    node_t *t = ep->tail;
 
204
    node_t *h = aghead(ep);
 
205
    node_t *t = agtail(ep);
205
206
    graph_t *hg = PARENT(h);
206
207
    graph_t *tg = PARENT(t);
207
208
    int hlevel;
268
269
 
269
270
    for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
270
271
        for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
271
 
            head = e->head;
 
272
            head = aghead(e);
272
273
            if ((n == head) && ED_count(e)) {   /* self arc */
273
274
                if (!P) {
274
275
                    P = NEW(path);
275
 
                    P->boxes = N_NEW(agnnodes(g) + 20 * 2 * 9, box);
 
276
                    P->boxes = N_NEW(agnnodes(g) + 20 * 2 * 9, boxf);
276
277
                }
277
278
                makeSelfArcs(P, e, GD_nodesep(g));
278
279
            } else if (ED_count(e)) {
294
295
                for (e0 = e; e0; e0 = ED_to_virt(e0)) {
295
296
                    ED_path(e0) =
296
297
                        getPath(e0, vconfig, 0, objl->obs, objl->cnt);
297
 
                    makeSpline(e0, objl->obs, objl->cnt, FALSE);
 
298
                    makeSpline(g, e0, objl->obs, objl->cnt, FALSE);
298
299
                }
299
300
                resetObjlist(objl);
300
301
            }