Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000900graphvizDotpublic2005-05-24 13:112011-04-28 04:03
ReporterMassimo Cora' 
Assigned Tonorth 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Linux-2.6.10OS Version
Summary0000900: numer of fields in struct field_t is wrong
Description



I noticed a problem with the parsing of the rectangles in a node with shape=record.
I'm using libgraph as library to graph some data.



In particular even if I've got a label as in node "Accessor" [example provided below], which is supposed to draw the rects in a Top-Bottom fascion, the correct number of fields [field_t.n_flds] is missed: it always gives me 1.
If I remove the brackets "{" "}" from the label attribute [so expecting a left-right fascion] it returns the correct number of fields.



Seems like the parsing of the number of fields is wrong. Anyway if I try to paint the graph from command line it works good. The problem is that I must interface with a gnome-canvas so I need the sub-rects params.
Btw: in a text-output the rects="" param seems to display the corrects sub-rects of the node.



Any hint?



I'm using the following c code to display infos about the fields:
<CD>
if (strcmp("record", ND_shape(node)->name) == 0 ) {
   gint i;
   DEBUG_PRINT ("number of fields of %s: %d", ND_label (node)->text, ((field_t*)ND_shape_info (node))->n_flds);






   for (i=0; i < ((field_t*)ND_shape_info (node))->n_flds; i++ ) {
      DEBUG_PRINT ("box info [orizzontal %d]: LL(%d, %d) UR(%d, %d)",
                     ((field_t*)ND_shape_info (node))->fld[i]->LR,
                 ((point)((field_t*)ND_shape_info (node))->fld[i]->b.LL).x,
                         ((point)((field_t*)ND_shape_info (node))->fld[i]->b.LL).y,
                         ((point)((field_t*)ND_shape_info (node))->fld[i]->b.UR).x,
                         ((point)((field_t*)ND_shape_info (node))->fld[i]->b.UR).y
                   );
   }
}
</CD>
Steps To Reproduce

digraph "Anjuta Graph" {
        DocumentAccessor [shape=box, fontname="Courier new", fontsize=14, ratio=expand];
        Accessor [shape=box, fontname="Courier new", fontsize=14, ratio=expand];
        DocumentIndexer [shape=record, fontname="Courier new", fontsize=14,
                            ratio=expand,
                            label="{DocumentIndexer|CharAt|DocumentIndexer|end|pdoc}"];
        Accessor -> DocumentAccessor;
        Accessor -> DocumentIndexer;
}
Additional Information

[north] The field are recursive. So in the above example you have 1 top level field and it has 5 sub-fields.

[maxcvs] I misunderstood the "recursive" property of fields.. now it works!
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID717
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.2.1
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => Stephen North


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker