]>
git.saurik.com Git - bison.git/blob - src/vcg.c
1 /* VCG description handler for Bison.
2 Copyright 2001 Free Software Foundation, Inc.
4 This file is part of Bison, the GNU Compiler Compiler.
6 Bison is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 Bison is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Bison; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
23 #include "vcg_defaults.h"
27 /* Initialize a graph with the default values. */
29 new_graph (graph_t
*g
)
34 g
->infos
[0] = G_INFOS1
;
35 g
->infos
[1] = G_INFOS2
;
36 g
->infos
[2] = G_INFOS3
;
39 g
->textcolor
= G_TEXTCOLOR
;
40 g
->bordercolor
= G_BORDERCOLOR
;
44 g
->borderwidth
= G_BORDERWIDTH
;
47 g
->folding
= G_FOLDING
;
49 g
->stretch
= G_STRETCH
;
51 g
->textmode
= G_TEXTMODE
;
54 g
->xmax
= G_XMAX
; /* Not output. */
55 g
->ymax
= G_YMAX
; /* Not output. */
62 g
->xlspace
= G_XLSPACE
; /* Not output. */
64 g
->xraster
= G_XRASTER
;
65 g
->yraster
= G_YRASTER
;
66 g
->xlraster
= G_XLRASTER
;
68 g
->hidden
= G_HIDDEN
; /* No default value. */
70 g
->classname
= G_CLASSNAME
; /* No class name association. */
72 g
->layoutalgorithm
= G_LAYOUTALGORITHM
;
73 g
->layout_downfactor
= G_LAYOUT_DOWNFACTOR
;
74 g
->layout_upfactor
= G_LAYOUT_UPFACTOR
;
75 g
->layout_nearfactor
= G_LAYOUT_NEARFACTOR
;
76 g
->layout_splinefactor
= G_LAYOUT_SPLINEFACTOR
;
78 g
->late_edge_labels
= G_LATE_EDGE_LABELS
;
79 g
->display_edge_labels
= G_DISPLAY_EDGE_LABELS
;
80 g
->dirty_edge_labels
= G_DIRTY_EDGE_LABELS
;
81 g
->finetuning
= G_FINETUNING
;
82 g
->ignore_singles
= G_IGNORE_SINGLES
;
83 g
->straight_phase
= G_STRAIGHT_PHASE
;
84 g
->priority_phase
= G_PRIORITY_PHASE
;
85 g
->manhattan_edges
= G_MANHATTAN_EDGES
;
86 g
->smanhattan_edges
= G_SMANHATTAN_EDGES
;
87 g
->near_edges
= G_NEAR_EDGES
;
89 g
->orientation
= G_ORIENTATION
;
90 g
->node_alignement
= G_NODE_ALIGNEMENT
;
91 g
->port_sharing
= G_PORT_SHARING
;
92 g
->arrow_mode
= G_ARROW_MODE
;
93 g
->treefactor
= G_TREEFACTOR
;
94 g
->spreadlevel
= G_SPREADLEVEL
;
95 g
->crossing_weight
= G_CROSSING_WEIGHT
;
96 g
->crossing_phase2
= G_CROSSING_PHASE2
;
97 g
->crossing_optimization
= G_CROSSING_OPTIMIZATION
;
102 g
->splines
= G_SPLINES
;
113 g
->node_list
= G_NODE_LIST
;
114 g
->edge_list
= G_EDGE_LIST
;
120 /* Initialize a node with the defalut values. */
122 new_node (node_t
*node
)
124 node
->title
= N_TITLE
;
125 node
->label
= N_LABEL
;
127 node
->locx
= N_LOCX
; /* Default unspcified. */
128 node
->locy
= N_LOCY
; /* Default unspcified. */
130 node
->vertical_order
= N_VERTICAL_ORDER
; /* Default unspcified. */
131 node
->horizontal_order
= N_HORIZONTAL_ORDER
; /* Default unspcified. */
133 node
->width
= N_WIDTH
; /* We assume that we can't define it now. */
134 node
->height
= N_HEIGHT
; /* Also. */
136 node
->shrink
= N_SHRINK
;
137 node
->stretch
= N_STRETCH
;
139 node
->folding
= N_FOLDING
; /* No explicit default value. */
141 node
->shape
= N_SHAPE
;
142 node
->textmode
= N_TEXTMODE
;
143 node
->borderwidth
= N_BORDERWIDTH
;
145 node
->color
= N_COLOR
;
146 node
->textcolor
= N_TEXTCOLOR
;
147 node
->bordercolor
= N_BORDERCOLOR
;
149 node
->infos
[0] = N_INFOS1
;
150 node
->infos
[1] = N_INFOS2
;
151 node
->infos
[2] = N_INFOS3
;
156 /* Initialize a edge with the defalut values. */
158 new_edge (edge_t
*edge
)
160 edge
->type
= E_EDGE_TYPE
;
162 edge
->sourcename
= E_SOURCENAME
;
163 edge
->targetname
= E_TARGETNAME
;
164 edge
->label
= E_LABEL
;
166 edge
->linestyle
= E_LINESTYLE
;
167 edge
->thickness
= E_THICKNESS
;
169 edge
->class = E_CLASS
;
171 edge
->color
= E_COLOR
;
172 edge
->textcolor
= E_TEXTCOLOR
;
173 edge
->arrowcolor
= E_ARROWCOLOR
;
174 edge
->backarrowcolor
= E_BACKARROWCOLOR
;
176 edge
->arrowsize
= E_ARROWSIZE
;
177 edge
->backarrowsize
= E_BACKARROWSIZE
;
178 edge
->arrowstyle
= E_ARROWSTYLE
;
180 edge
->backarrowstyle
= E_BACKARROWSTYLE
;
182 edge
->priority
= E_PRIORITY
;
184 edge
->anchor
= E_ANCHOR
;
186 edge
->horizontal_order
= E_HORIZONTAL_ORDER
;
191 /*----------------------------------------------.
193 | Return string corresponding to an enum value. |
194 `----------------------------------------------*/
197 get_color_str (enum color_e c
)
201 case white
: return "white";
202 case blue
: return "blue";
203 case red
: return "red";
204 case green
: return "green";
205 case yellow
: return "yellow";
206 case magenta
: return "magenta";
207 case cyan
: return "cyan";
208 case darkgrey
: return "darkgrey";
209 case darkblue
: return "darkblue";
210 case darkred
: return "darkred";
211 case darkgreen
: return "darkgreen";
212 case darkyellow
: return "darkyellow";
213 case darkmagenta
: return "darkmagenta";
214 case darkcyan
: return "darkcyan";
215 case gold
: return "gold";
216 case lightgrey
: return "lightgrey";
217 case lightblue
: return "lightblue";
218 case lightred
: return "lightred";
219 case lightgreen
: return "lightgreen";
220 case lightyellow
: return "lightyellow";
221 case lightmagenta
: return "lightmagenta";
222 case lightcyan
: return "lightcyan";
223 case lilac
: return "lilac";
224 case turquoise
: return "turquoise";
225 case aquamarine
: return "aquamarine";
226 case khaki
: return "khaki";
227 case purple
: return "purple";
228 case yellowgreen
: return "yellowgreen";
229 case pink
: return "pink";
230 case orange
: return "orange";
231 case orchid
: return "orchid";
232 case black
: return "black";
234 complain (_("vcg graph: no such a color."));
235 return get_color_str(G_COLOR
);
241 get_textmode_str (enum textmode_e t
)
245 case centered
: return "center";
246 case left_justify
: return "left_justify";
247 case right_justify
: return "right_justify";
249 complain (_("vcg graph: no such a text mode.."));
250 return get_textmode_str(G_TEXTMODE
);
256 get_shape_str (enum shape_e s
)
260 case box
: return "box";
261 case rhomb
: return "rhomb";
262 case ellipse
: return "ellipse";
263 case triangle
: return "triangle";
265 complain (_("vcg graph: no such a shape.."));
266 return get_shape_str(G_SHAPE
);
272 get_layoutalgorithm_str (enum layoutalgorithm_e l
)
276 case normal
: return "normal";
277 case maxdepth
: return "maxdepth";
278 case mindepth
: return "mindepth";
279 case maxdepthslow
: return "maxdepthslow";
280 case mindepthslow
: return "mindepthslow";
281 case maxdegree
: return "maxdegree";
282 case mindegree
: return "mindegree";
283 case maxindegree
: return "maxindegree";
284 case minindegree
: return "minindegree";
285 case maxoutdegree
: return "maxoutdegree";
286 case minoutdegree
: return "minoutdegree";
287 case minbackward
: return "minbackward";
288 case dfs
: return "dfs";
289 case tree
: return "tree";
297 get_decision_str (enum decision_e d
, enum decision_e defaults
)
301 case no
: return "no";
302 case yes
: return "yes";
304 complain (_("vcg graph: no such a decision.."));
305 return get_decision_str(defaults
, 0);
311 get_orientation_str (enum orientation_e o
)
315 case top_to_bottom
: return "top_to_bottom";
316 case bottom_to_top
: return "bottom_to_top";
317 case left_to_right
: return "left_to_right";
318 case right_to_left
: return "right_to_left";
320 complain (_("vcg graph: no such an orientation.."));
321 return get_orientation_str(G_ORIENTATION
);
327 get_node_alignement_str (enum alignement_e a
)
331 case center
: return "center";
332 case top
: return "top";
333 case bottom
: return "bottom";
335 complain (_("vcg graph: no such an alignement.."));
336 return get_node_alignement_str(G_NODE_ALIGNEMENT
);
342 get_arrow_mode_str (enum arrow_mode_e a
)
346 case fixed
: return "fixed";
347 case free_a
: return "free";
349 complain (_("vcg graph: no such an arrow mode.."));
350 return get_arrow_mode_str(G_ARROW_MODE
);
356 get_crossing_type_str (enum crossing_type_e c
)
360 case bary
: return "bary";
361 case median
: return "median";
362 case barymedian
: return "barymedian";
363 case medianbary
: return "medianbary";
365 complain (_("vcg graph: no such a crossing_type.."));
366 return get_crossing_type_str(G_CROSSING_WEIGHT
);
372 get_view_str (enum view_e v
)
376 case normal_view
: return "normal_view";
377 case cfish
: return "cfish";
378 case pfish
: return "pfish";
379 case fcfish
: return "fcfish";
380 case fpfish
: return "fpfish";
382 complain (_("vcg graph: no such a view.."));
383 return get_view_str(G_VIEW
);
389 get_linestyle_str (enum linestyle_e l
)
393 case continuous
: return "continuous";
394 case dashed
: return "dashed";
395 case dotted
: return "dotted";
396 case invisible
: return "invisible";
398 complain (_("vcg graph: no such a linestyle.."));
399 return get_linestyle_str(E_LINESTYLE
);
405 get_arrowstyle_str (enum arrowstyle_e a
)
409 case solid
: return "solid";
410 case line
: return "line";
411 case none
: return "none";
413 complain (_("vcg graph: no such an arrowstyle.."));
414 return get_arrowstyle_str(E_ARROWSTYLE
);
419 /*----------------------------.
421 | Edge and Nodes int a graph. |
422 `----------------------------*/
425 add_node (graph_t
*graph
, node_t
*node
)
427 node
->next
= graph
->node_list
;
428 graph
->node_list
= node
;
432 add_edge (graph_t
*graph
, edge_t
*edge
)
434 edge
->next
= graph
->edge_list
;
435 graph
->edge_list
= edge
;
438 /*-------------------------------------.
439 | Open and close functions (formatted) |
440 `-------------------------------------*/
443 open_edge(edge_t
*edge
, struct obstack
*os
)
448 obstack_sgrow (os
, "\tedge: {\n");
451 obstack_sgrow (os
, "\tbackedge: {\n");
454 obstack_sgrow (os
, "\tnearedge: {\n");
457 obstack_sgrow (os
, "\tbentnearedge: {\n");
460 obstack_sgrow (os
, "\tedge: {\n");
465 close_edge(struct obstack
*os
)
467 obstack_sgrow (os
, "\t}\n");
471 open_node(struct obstack
*os
)
473 obstack_sgrow (os
, "\tnode: {\n");
477 close_node(struct obstack
*os
)
479 obstack_sgrow (os
, "\t}\n");
483 open_graph(struct obstack
*os
)
485 obstack_sgrow (os
, "graph: {\n");
489 close_graph(graph_t
*graph
, struct obstack
*os
)
491 obstack_1grow (os
, '\n');
496 for (node
= graph
->node_list
; node
; node
= node
->next
)
499 output_node (node
, os
);
504 obstack_1grow (os
, '\n');
509 for (edge
= graph
->edge_list
; edge
; edge
= edge
->next
)
511 open_edge (edge
, os
);
512 output_edge (edge
, os
);
517 obstack_sgrow (os
, "}\n");
520 /*-------------------------------------------.
521 | Output functions (formatted) in obstack os |
522 `-------------------------------------------*/
525 output_node (node_t
*node
, struct obstack
*os
)
527 if (node
->title
!= N_TITLE
)
528 obstack_fgrow1 (os
, "\t\ttitle:\t\"%s\"\n", node
->title
);
529 if (node
->label
!= N_LABEL
)
530 obstack_fgrow1 (os
, "\t\tlabel:\t\"%s\"\n", node
->label
);
532 if ((node
->locx
!= N_LOCX
) && (node
->locy
!= N_LOCY
))
533 obstack_fgrow2 (os
, "\t\tloc { x: %d y: %d }\t\n", node
->locx
, node
->locy
);
535 if (node
->vertical_order
!= N_VERTICAL_ORDER
)
536 obstack_fgrow1 (os
, "\t\tvertical_order:\t%d\n", node
->vertical_order
);
537 if (node
->horizontal_order
!= N_HORIZONTAL_ORDER
)
538 obstack_fgrow1 (os
, "\t\thorizontal_order:\t%d\n", node
->horizontal_order
);
540 if (node
->width
!= N_WIDTH
)
541 obstack_fgrow1 (os
, "\t\twidth:\t%d\n", node
->width
);
542 if (node
->height
!= N_HEIGHT
)
543 obstack_fgrow1 (os
, "\t\theight:\t%d\n", node
->height
);
545 if (node
->shrink
!= N_SHRINK
)
546 obstack_fgrow1 (os
, "\t\tshrink:\t%d\n", node
->shrink
);
547 if (node
->stretch
!= N_STRETCH
)
548 obstack_fgrow1 (os
, "\t\tshrink:\t%d\n", node
->shrink
);
550 if (node
->folding
!= N_FOLDING
)
551 obstack_fgrow1 (os
, "\t\tfolding:\t%d\n", node
->folding
);
553 if (node
->textmode
!= N_TEXTMODE
)
554 obstack_fgrow1 (os
, "\t\ttextmode:\t%s\n",
555 get_textmode_str (node
->textmode
));
557 if (node
->shape
!= N_SHAPE
)
558 obstack_fgrow1 (os
, "\t\tshape:\t%s\n", get_shape_str (node
->shape
));
560 if (node
->borderwidth
!= N_BORDERWIDTH
)
561 obstack_fgrow1 (os
, "\t\tborderwidth:\t%d\n", node
->borderwidth
);
563 if (node
->color
!= N_COLOR
)
564 obstack_fgrow1 (os
, "\t\tcolor:\t%s\n", get_color_str (node
->color
));
565 if (node
->textcolor
!= N_TEXTCOLOR
)
566 obstack_fgrow1 (os
, "\t\ttextcolor:\t%s\n",
567 get_color_str (node
->textcolor
));
568 if (node
->bordercolor
!= N_BORDERCOLOR
)
569 obstack_fgrow1 (os
, "\t\tbordercolor:\t%s\n",
570 get_color_str (node
->bordercolor
));
573 obstack_fgrow1 (os
, "\t\tinfo1:\t\"%s\"\n", node
->infos
[0]);
575 obstack_fgrow1 (os
, "\t\tinfo2:\t\"%s\"\n", node
->infos
[1]);
577 obstack_fgrow1 (os
, "\t\tinfo3:\t\"%s\"\n", node
->infos
[2]);
581 output_edge (edge_t
*edge
, struct obstack
*os
)
584 if (edge
->sourcename
!= E_SOURCENAME
)
585 obstack_fgrow1 (os
, "\t\tsourcename:\t\"%s\"\n", edge
->sourcename
);
586 if (edge
->targetname
!= E_TARGETNAME
)
587 obstack_fgrow1 (os
, "\t\ttargetname:\t\"%s\"\n", edge
->targetname
);
589 if (edge
->label
!= E_LABEL
)
590 obstack_fgrow1 (os
, "\t\tlabel:\t\"%s\"\n", edge
->label
);
592 if (edge
->linestyle
!= E_LINESTYLE
)
593 obstack_fgrow1 (os
, "\t\tlinestyle:\t\"%s\"\n",
594 get_linestyle_str(edge
->linestyle
));
596 if (edge
->thickness
!= E_THICKNESS
)
597 obstack_fgrow1 (os
, "\t\tthickness:\t%d\n", edge
->thickness
);
598 if (edge
->class != E_CLASS
)
599 obstack_fgrow1 (os
, "\t\tclass:\t%d\n", edge
->class);
601 if (edge
->color
!= E_COLOR
)
602 obstack_fgrow1 (os
, "\t\tcolor:\t%s\n", get_color_str (edge
->color
));
603 if (edge
->color
!= E_TEXTCOLOR
)
604 obstack_fgrow1 (os
, "\t\ttextcolor:\t%s\n",
605 get_color_str (edge
->textcolor
));
606 if (edge
->arrowcolor
!= E_ARROWCOLOR
)
607 obstack_fgrow1 (os
, "\t\tarrowcolor:\t%s\n",
608 get_color_str (edge
->arrowcolor
));
609 if (edge
->backarrowcolor
!= E_BACKARROWCOLOR
)
610 obstack_fgrow1 (os
, "\t\tbackarrowcolor:\t%s\n",
611 get_color_str (edge
->backarrowcolor
));
613 if (edge
->arrowsize
!= E_ARROWSIZE
)
614 obstack_fgrow1 (os
, "\t\tarrowsize:\t%d\n", edge
->arrowsize
);
615 if (edge
->backarrowsize
!= E_BACKARROWSIZE
)
616 obstack_fgrow1 (os
, "\t\tbackarrowsize:\t%d\n", edge
->backarrowsize
);
618 if (edge
->arrowstyle
!= E_ARROWSTYLE
)
619 obstack_fgrow1 (os
, "\t\tarrowstyle:\t%s\n",
620 get_arrowstyle_str(edge
->arrowstyle
));
621 if (edge
->backarrowstyle
!= E_BACKARROWSTYLE
)
622 obstack_fgrow1 (os
, "\t\tbackarrowstyle:\t%s\n",
623 get_arrowstyle_str(edge
->backarrowstyle
));
625 if (edge
->priority
!= E_PRIORITY
)
626 obstack_fgrow1 (os
, "\t\tpriority:\t%d\n", edge
->priority
);
627 if (edge
->anchor
!= E_ANCHOR
)
628 obstack_fgrow1 (os
, "\t\tanchor:\t%d\n", edge
->anchor
);
629 if (edge
->horizontal_order
!= E_HORIZONTAL_ORDER
)
630 obstack_fgrow1 (os
, "\t\thorizontal_order:\t%d\n", edge
->horizontal_order
);
634 output_graph (graph_t
*graph
, struct obstack
*os
)
637 obstack_fgrow1 (os
, "\ttitle:\t\"%s\"\n", graph
->title
);
639 obstack_fgrow1 (os
, "\tlabel:\t\"%s\"\n", graph
->label
);
642 obstack_fgrow1 (os
, "\tinfo1:\t\"%s\"\n", graph
->infos
[0]);
644 obstack_fgrow1 (os
, "\tinfo2:\t\"%s\"\n", graph
->infos
[1]);
646 obstack_fgrow1 (os
, "\tinfo3:\t\"%s\"\n", graph
->infos
[2]);
648 if (graph
->color
!= G_COLOR
)
649 obstack_fgrow1 (os
, "\tcolor:\t%s\n", get_color_str (graph
->color
));
650 if (graph
->textcolor
!= G_TEXTCOLOR
)
651 obstack_fgrow1 (os
, "\ttextcolor:\t%s\n", get_color_str (graph
->textcolor
));
652 if (graph
->bordercolor
!= G_BORDERCOLOR
)
653 obstack_fgrow1 (os
, "\tbordercolor:\t%s\n",
654 get_color_str (graph
->bordercolor
));
656 if (graph
->width
!= G_WIDTH
)
657 obstack_fgrow1 (os
, "\twidth:\t%d\n", graph
->width
);
658 if (graph
->height
!= G_HEIGHT
)
659 obstack_fgrow1 (os
, "\theight:\t%d\n", graph
->height
);
660 if (graph
->borderwidth
!= G_BORDERWIDTH
)
661 obstack_fgrow1 (os
, "\tborderwidth:\t%d\n", graph
->borderwidth
);
664 obstack_fgrow1 (os
, "\tx:\t%d\n", graph
->x
);
666 obstack_fgrow1 (os
, "\ty:\t%d\n", graph
->y
);
668 if (graph
->folding
!= G_FOLDING
)
669 obstack_fgrow1 (os
, "\tfolding:\t%d\n", graph
->folding
);
671 if (graph
->shrink
!= G_SHRINK
)
672 obstack_fgrow1 (os
, "\tshrink:\t%d\n", graph
->shrink
);
673 if (graph
->stretch
!= G_STRETCH
)
674 obstack_fgrow1 (os
, "\tstretch:\t%d\n", graph
->stretch
);
676 if (graph
->textmode
!= G_TEXTMODE
)
677 obstack_fgrow1 (os
, "\ttextmode:\t%s\n",
678 get_textmode_str (graph
->textmode
));
680 if (graph
->shape
!= G_SHAPE
)
681 obstack_fgrow1 (os
, "\tshape:\t%s\n", get_shape_str (graph
->shape
));
683 if (graph
->xmax
!= G_XMAX
)
684 obstack_fgrow1 (os
, "\txmax:\t%d\n", graph
->xmax
);
685 if (graph
->ymax
!= G_YMAX
)
686 obstack_fgrow1 (os
, "\tymax:\t%d\n", graph
->ymax
);
688 if (graph
->xbase
!= G_XBASE
)
689 obstack_fgrow1 (os
, "\txbase:\t%d\n", graph
->xbase
);
690 if (graph
->ybase
!= G_YBASE
)
691 obstack_fgrow1 (os
, "\tybase:\t%d\n", graph
->ybase
);
693 if (graph
->xspace
!= G_XSPACE
)
694 obstack_fgrow1 (os
, "\txspace:\t%d\n", graph
->xspace
);
695 if (graph
->yspace
!= G_YSPACE
)
696 obstack_fgrow1 (os
, "\tyspace:\t%d\n", graph
->yspace
);
697 if (graph
->xlspace
!= G_XLSPACE
)
698 obstack_fgrow1 (os
, "\txlspace:\t%d\n", graph
->xlspace
);
700 if (graph
->xraster
!= G_XRASTER
)
701 obstack_fgrow1 (os
, "\txraster:\t%d\n", graph
->xraster
);
702 if (graph
->yraster
!= G_YRASTER
)
703 obstack_fgrow1 (os
, "\tyraster:\t%d\n", graph
->yraster
);
704 if (graph
->xlraster
!= G_XLRASTER
)
705 obstack_fgrow1 (os
, "\txlraster:\t%d\n", graph
->xlraster
);
707 if (graph
->hidden
!= G_HIDDEN
)
708 obstack_fgrow1 (os
, "\thidden:\t%d\n", graph
->hidden
);
710 if (graph
->classname
!= G_CLASSNAME
)
712 struct classname_s
*ite
;
714 for (ite
= graph
->classname
; ite
; ite
= ite
->next
)
715 obstack_fgrow2 (os
, "\tclassname %d :\t%s\n", ite
->no
, ite
->name
);
718 if (graph
->layoutalgorithm
!= G_LAYOUTALGORITHM
)
719 obstack_fgrow1 (os
, "\tlayoutalgorithm:\t%s\n",
720 get_layoutalgorithm_str(graph
->layoutalgorithm
));
722 if (graph
->layout_downfactor
!= G_LAYOUT_DOWNFACTOR
)
723 obstack_fgrow1 (os
, "\tlayout_downfactor:\t%d\n", graph
->layout_downfactor
);
724 if (graph
->layout_upfactor
!= G_LAYOUT_UPFACTOR
)
725 obstack_fgrow1 (os
, "\tlayout_upfactor:\t%d\n", graph
->layout_upfactor
);
726 if (graph
->layout_nearfactor
!= G_LAYOUT_NEARFACTOR
)
727 obstack_fgrow1 (os
, "\tlayout_nearfactor:\t%d\n", graph
->layout_nearfactor
);
728 if (graph
->layout_splinefactor
!= G_LAYOUT_SPLINEFACTOR
)
729 obstack_fgrow1 (os
, "\tlayout_splinefactor:\t%d\n",
730 graph
->layout_splinefactor
);
732 if (graph
->late_edge_labels
!= G_LATE_EDGE_LABELS
)
733 obstack_fgrow1 (os
, "\tlate_edge_labels:\t%s\n",
734 get_decision_str(graph
->late_edge_labels
,
735 G_LATE_EDGE_LABELS
));
736 if (graph
->display_edge_labels
!= G_DISPLAY_EDGE_LABELS
)
737 obstack_fgrow1 (os
, "\tdisplay_edge_labels:\t%s\n",
738 get_decision_str(graph
->display_edge_labels
,
739 G_DISPLAY_EDGE_LABELS
));
740 if (graph
->dirty_edge_labels
!= G_DIRTY_EDGE_LABELS
)
741 obstack_fgrow1 (os
, "\tdirty_edge_labels:\t%s\n",
742 get_decision_str(graph
->dirty_edge_labels
,
743 G_DIRTY_EDGE_LABELS
));
744 if (graph
->finetuning
!= G_FINETUNING
)
745 obstack_fgrow1 (os
, "\tfinetuning:\t%s\n",
746 get_decision_str(graph
->finetuning
, G_FINETUNING
));
747 if (graph
->ignore_singles
!= G_IGNORE_SINGLES
)
748 obstack_fgrow1 (os
, "\tignore_singles:\t%s\n",
749 get_decision_str(graph
->ignore_singles
, G_IGNORE_SINGLES
));
750 if (graph
->straight_phase
!= G_STRAIGHT_PHASE
)
751 obstack_fgrow1 (os
, "\tstraight_phase:\t%s\n",
752 get_decision_str(graph
->straight_phase
, G_STRAIGHT_PHASE
));
753 if (graph
->priority_phase
!= G_PRIORITY_PHASE
)
754 obstack_fgrow1 (os
, "\tpriority_phase:\t%s\n",
755 get_decision_str(graph
->priority_phase
, G_PRIORITY_PHASE
));
756 if (graph
->manhattan_edges
!= G_MANHATTAN_EDGES
)
758 "\tmanhattan_edges:\t%s\n",
759 get_decision_str(graph
->manhattan_edges
,
761 if (graph
->smanhattan_edges
!= G_SMANHATTAN_EDGES
)
763 "\tsmanhattan_edges:\t%s\n",
764 get_decision_str(graph
->smanhattan_edges
,
765 G_SMANHATTAN_EDGES
));
766 if (graph
->near_edges
!= G_NEAR_EDGES
)
767 obstack_fgrow1 (os
, "\tnear_edges:\t%s\n",
768 get_decision_str(graph
->near_edges
, G_NEAR_EDGES
));
770 if (graph
->orientation
!= G_ORIENTATION
)
771 obstack_fgrow1 (os
, "\torientation:\t%s\n",
772 get_decision_str(graph
->orientation
, G_ORIENTATION
));
774 if (graph
->node_alignement
!= G_NODE_ALIGNEMENT
)
775 obstack_fgrow1 (os
, "\tnode_alignement:\t%s\n",
776 get_decision_str(graph
->node_alignement
,
779 if (graph
->port_sharing
!= G_PORT_SHARING
)
780 obstack_fgrow1 (os
, "\tport_sharing:\t%s\n",
781 get_decision_str(graph
->port_sharing
, G_PORT_SHARING
));
783 if (graph
->arrow_mode
!= G_ARROW_MODE
)
784 obstack_fgrow1 (os
, "\tarrow_mode:\t%s\n",
785 get_arrow_mode_str(graph
->arrow_mode
));
787 if (graph
->treefactor
!= G_TREEFACTOR
)
788 obstack_fgrow1 (os
, "\ttreefactor:\t%f\n", graph
->treefactor
);
789 if (graph
->spreadlevel
!= G_SPREADLEVEL
)
790 obstack_fgrow1 (os
, "\tspreadlevel:\t%d\n", graph
->spreadlevel
);
792 if (graph
->crossing_weight
!= G_CROSSING_WEIGHT
)
793 obstack_fgrow1 (os
, "\tcrossing_weight:\t%s\n",
794 get_crossing_type_str(graph
->crossing_weight
));
795 if (graph
->crossing_phase2
!= G_CROSSING_PHASE2
)
796 obstack_fgrow1 (os
, "\tcrossing_phase2:\t%s\n",
797 get_decision_str(graph
->crossing_phase2
,
799 if (graph
->crossing_optimization
!= G_CROSSING_OPTIMIZATION
)
800 obstack_fgrow1 (os
, "\tcrossing_optimization:\t%s\n",
801 get_decision_str(graph
->crossing_optimization
,
802 G_CROSSING_OPTIMIZATION
));
804 if (graph
->view
!= G_VIEW
)
805 obstack_fgrow1 (os
, "\tview:\t%s\n", get_view_str(graph
->view
));
807 if (graph
->edges
!= G_EDGES
)
808 obstack_fgrow1 (os
, "\tedges:\t%s\n", get_decision_str(graph
->edges
,
811 if (graph
->nodes
!= G_NODES
)
812 obstack_fgrow1 (os
,"\tnodes:\t%s\n",
813 get_decision_str(graph
->nodes
, G_NODES
));
815 if (graph
->splines
!= G_SPLINES
)
816 obstack_fgrow1 (os
, "\tsplines:\t%s\n",
817 get_decision_str(graph
->splines
, G_SPLINES
));
819 if (graph
->bmax
!= G_BMAX
)
820 obstack_fgrow1 (os
, "\tbmax:\t%d\n", graph
->bmax
);
821 if (graph
->cmin
!= G_CMIN
)
822 obstack_fgrow1 (os
, "\tcmin:\t%d\n", graph
->cmin
);
823 if (graph
->cmax
!= G_CMAX
)
824 obstack_fgrow1 (os
, "\tcmax:\t%d\n", graph
->cmax
);
825 if (graph
->pmin
!= G_PMIN
)
826 obstack_fgrow1 (os
, "\tpmin:\t%d\n", graph
->pmin
);
827 if (graph
->pmax
!= G_PMAX
)
828 obstack_fgrow1 (os
, "\tpmax:\t%d\n", graph
->pmax
);
829 if (graph
->rmin
!= G_RMIN
)
830 obstack_fgrow1 (os
, "\trmin:\t%d\n", graph
->rmin
);
831 if (graph
->rmax
!= G_RMAX
)
832 obstack_fgrow1 (os
, "\trmax:\t%d\n", graph
->rmax
);
833 if (graph
->smax
!= G_SMAX
)
834 obstack_fgrow1 (os
, "\tsmax:\t%d\n", graph
->smax
);