]>
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\tstretch:\t%d\n", node
->stretch
);
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
)
583 /* FIXME: SOURCENAME and TARGETNAME are mandatory
584 so it has to be fatal not to give these informations. */
585 if (edge
->sourcename
!= E_SOURCENAME
)
586 obstack_fgrow1 (os
, "\t\tsourcename:\t\"%s\"\n", edge
->sourcename
);
587 if (edge
->targetname
!= E_TARGETNAME
)
588 obstack_fgrow1 (os
, "\t\ttargetname:\t\"%s\"\n", edge
->targetname
);
590 if (edge
->label
!= E_LABEL
)
591 obstack_fgrow1 (os
, "\t\tlabel:\t\"%s\"\n", edge
->label
);
593 if (edge
->linestyle
!= E_LINESTYLE
)
594 obstack_fgrow1 (os
, "\t\tlinestyle:\t\"%s\"\n",
595 get_linestyle_str(edge
->linestyle
));
597 if (edge
->thickness
!= E_THICKNESS
)
598 obstack_fgrow1 (os
, "\t\tthickness:\t%d\n", edge
->thickness
);
599 if (edge
->class != E_CLASS
)
600 obstack_fgrow1 (os
, "\t\tclass:\t%d\n", edge
->class);
602 if (edge
->color
!= E_COLOR
)
603 obstack_fgrow1 (os
, "\t\tcolor:\t%s\n", get_color_str (edge
->color
));
604 if (edge
->color
!= E_TEXTCOLOR
)
605 obstack_fgrow1 (os
, "\t\ttextcolor:\t%s\n",
606 get_color_str (edge
->textcolor
));
607 if (edge
->arrowcolor
!= E_ARROWCOLOR
)
608 obstack_fgrow1 (os
, "\t\tarrowcolor:\t%s\n",
609 get_color_str (edge
->arrowcolor
));
610 if (edge
->backarrowcolor
!= E_BACKARROWCOLOR
)
611 obstack_fgrow1 (os
, "\t\tbackarrowcolor:\t%s\n",
612 get_color_str (edge
->backarrowcolor
));
614 if (edge
->arrowsize
!= E_ARROWSIZE
)
615 obstack_fgrow1 (os
, "\t\tarrowsize:\t%d\n", edge
->arrowsize
);
616 if (edge
->backarrowsize
!= E_BACKARROWSIZE
)
617 obstack_fgrow1 (os
, "\t\tbackarrowsize:\t%d\n", edge
->backarrowsize
);
619 if (edge
->arrowstyle
!= E_ARROWSTYLE
)
620 obstack_fgrow1 (os
, "\t\tarrowstyle:\t%s\n",
621 get_arrowstyle_str(edge
->arrowstyle
));
622 if (edge
->backarrowstyle
!= E_BACKARROWSTYLE
)
623 obstack_fgrow1 (os
, "\t\tbackarrowstyle:\t%s\n",
624 get_arrowstyle_str(edge
->backarrowstyle
));
626 if (edge
->priority
!= E_PRIORITY
)
627 obstack_fgrow1 (os
, "\t\tpriority:\t%d\n", edge
->priority
);
628 if (edge
->anchor
!= E_ANCHOR
)
629 obstack_fgrow1 (os
, "\t\tanchor:\t%d\n", edge
->anchor
);
630 if (edge
->horizontal_order
!= E_HORIZONTAL_ORDER
)
631 obstack_fgrow1 (os
, "\t\thorizontal_order:\t%d\n", edge
->horizontal_order
);
635 output_graph (graph_t
*graph
, struct obstack
*os
)
638 obstack_fgrow1 (os
, "\ttitle:\t\"%s\"\n", graph
->title
);
640 obstack_fgrow1 (os
, "\tlabel:\t\"%s\"\n", graph
->label
);
643 obstack_fgrow1 (os
, "\tinfo1:\t\"%s\"\n", graph
->infos
[0]);
645 obstack_fgrow1 (os
, "\tinfo2:\t\"%s\"\n", graph
->infos
[1]);
647 obstack_fgrow1 (os
, "\tinfo3:\t\"%s\"\n", graph
->infos
[2]);
649 if (graph
->color
!= G_COLOR
)
650 obstack_fgrow1 (os
, "\tcolor:\t%s\n", get_color_str (graph
->color
));
651 if (graph
->textcolor
!= G_TEXTCOLOR
)
652 obstack_fgrow1 (os
, "\ttextcolor:\t%s\n", get_color_str (graph
->textcolor
));
653 if (graph
->bordercolor
!= G_BORDERCOLOR
)
654 obstack_fgrow1 (os
, "\tbordercolor:\t%s\n",
655 get_color_str (graph
->bordercolor
));
657 if (graph
->width
!= G_WIDTH
)
658 obstack_fgrow1 (os
, "\twidth:\t%d\n", graph
->width
);
659 if (graph
->height
!= G_HEIGHT
)
660 obstack_fgrow1 (os
, "\theight:\t%d\n", graph
->height
);
661 if (graph
->borderwidth
!= G_BORDERWIDTH
)
662 obstack_fgrow1 (os
, "\tborderwidth:\t%d\n", graph
->borderwidth
);
665 obstack_fgrow1 (os
, "\tx:\t%d\n", graph
->x
);
667 obstack_fgrow1 (os
, "\ty:\t%d\n", graph
->y
);
669 if (graph
->folding
!= G_FOLDING
)
670 obstack_fgrow1 (os
, "\tfolding:\t%d\n", graph
->folding
);
672 if (graph
->shrink
!= G_SHRINK
)
673 obstack_fgrow1 (os
, "\tshrink:\t%d\n", graph
->shrink
);
674 if (graph
->stretch
!= G_STRETCH
)
675 obstack_fgrow1 (os
, "\tstretch:\t%d\n", graph
->stretch
);
677 if (graph
->textmode
!= G_TEXTMODE
)
678 obstack_fgrow1 (os
, "\ttextmode:\t%s\n",
679 get_textmode_str (graph
->textmode
));
681 if (graph
->shape
!= G_SHAPE
)
682 obstack_fgrow1 (os
, "\tshape:\t%s\n", get_shape_str (graph
->shape
));
684 if (graph
->xmax
!= G_XMAX
)
685 obstack_fgrow1 (os
, "\txmax:\t%d\n", graph
->xmax
);
686 if (graph
->ymax
!= G_YMAX
)
687 obstack_fgrow1 (os
, "\tymax:\t%d\n", graph
->ymax
);
689 if (graph
->xbase
!= G_XBASE
)
690 obstack_fgrow1 (os
, "\txbase:\t%d\n", graph
->xbase
);
691 if (graph
->ybase
!= G_YBASE
)
692 obstack_fgrow1 (os
, "\tybase:\t%d\n", graph
->ybase
);
694 if (graph
->xspace
!= G_XSPACE
)
695 obstack_fgrow1 (os
, "\txspace:\t%d\n", graph
->xspace
);
696 if (graph
->yspace
!= G_YSPACE
)
697 obstack_fgrow1 (os
, "\tyspace:\t%d\n", graph
->yspace
);
698 if (graph
->xlspace
!= G_XLSPACE
)
699 obstack_fgrow1 (os
, "\txlspace:\t%d\n", graph
->xlspace
);
701 if (graph
->xraster
!= G_XRASTER
)
702 obstack_fgrow1 (os
, "\txraster:\t%d\n", graph
->xraster
);
703 if (graph
->yraster
!= G_YRASTER
)
704 obstack_fgrow1 (os
, "\tyraster:\t%d\n", graph
->yraster
);
705 if (graph
->xlraster
!= G_XLRASTER
)
706 obstack_fgrow1 (os
, "\txlraster:\t%d\n", graph
->xlraster
);
708 if (graph
->hidden
!= G_HIDDEN
)
709 obstack_fgrow1 (os
, "\thidden:\t%d\n", graph
->hidden
);
711 if (graph
->classname
!= G_CLASSNAME
)
713 struct classname_s
*ite
;
715 for (ite
= graph
->classname
; ite
; ite
= ite
->next
)
716 obstack_fgrow2 (os
, "\tclassname %d :\t%s\n", ite
->no
, ite
->name
);
719 if (graph
->layoutalgorithm
!= G_LAYOUTALGORITHM
)
720 obstack_fgrow1 (os
, "\tlayoutalgorithm:\t%s\n",
721 get_layoutalgorithm_str(graph
->layoutalgorithm
));
723 if (graph
->layout_downfactor
!= G_LAYOUT_DOWNFACTOR
)
724 obstack_fgrow1 (os
, "\tlayout_downfactor:\t%d\n", graph
->layout_downfactor
);
725 if (graph
->layout_upfactor
!= G_LAYOUT_UPFACTOR
)
726 obstack_fgrow1 (os
, "\tlayout_upfactor:\t%d\n", graph
->layout_upfactor
);
727 if (graph
->layout_nearfactor
!= G_LAYOUT_NEARFACTOR
)
728 obstack_fgrow1 (os
, "\tlayout_nearfactor:\t%d\n", graph
->layout_nearfactor
);
729 if (graph
->layout_splinefactor
!= G_LAYOUT_SPLINEFACTOR
)
730 obstack_fgrow1 (os
, "\tlayout_splinefactor:\t%d\n",
731 graph
->layout_splinefactor
);
733 if (graph
->late_edge_labels
!= G_LATE_EDGE_LABELS
)
734 obstack_fgrow1 (os
, "\tlate_edge_labels:\t%s\n",
735 get_decision_str(graph
->late_edge_labels
,
736 G_LATE_EDGE_LABELS
));
737 if (graph
->display_edge_labels
!= G_DISPLAY_EDGE_LABELS
)
738 obstack_fgrow1 (os
, "\tdisplay_edge_labels:\t%s\n",
739 get_decision_str(graph
->display_edge_labels
,
740 G_DISPLAY_EDGE_LABELS
));
741 if (graph
->dirty_edge_labels
!= G_DIRTY_EDGE_LABELS
)
742 obstack_fgrow1 (os
, "\tdirty_edge_labels:\t%s\n",
743 get_decision_str(graph
->dirty_edge_labels
,
744 G_DIRTY_EDGE_LABELS
));
745 if (graph
->finetuning
!= G_FINETUNING
)
746 obstack_fgrow1 (os
, "\tfinetuning:\t%s\n",
747 get_decision_str(graph
->finetuning
, G_FINETUNING
));
748 if (graph
->ignore_singles
!= G_IGNORE_SINGLES
)
749 obstack_fgrow1 (os
, "\tignore_singles:\t%s\n",
750 get_decision_str(graph
->ignore_singles
, G_IGNORE_SINGLES
));
751 if (graph
->straight_phase
!= G_STRAIGHT_PHASE
)
752 obstack_fgrow1 (os
, "\tstraight_phase:\t%s\n",
753 get_decision_str(graph
->straight_phase
, G_STRAIGHT_PHASE
));
754 if (graph
->priority_phase
!= G_PRIORITY_PHASE
)
755 obstack_fgrow1 (os
, "\tpriority_phase:\t%s\n",
756 get_decision_str(graph
->priority_phase
, G_PRIORITY_PHASE
));
757 if (graph
->manhattan_edges
!= G_MANHATTAN_EDGES
)
759 "\tmanhattan_edges:\t%s\n",
760 get_decision_str(graph
->manhattan_edges
,
762 if (graph
->smanhattan_edges
!= G_SMANHATTAN_EDGES
)
764 "\tsmanhattan_edges:\t%s\n",
765 get_decision_str(graph
->smanhattan_edges
,
766 G_SMANHATTAN_EDGES
));
767 if (graph
->near_edges
!= G_NEAR_EDGES
)
768 obstack_fgrow1 (os
, "\tnear_edges:\t%s\n",
769 get_decision_str(graph
->near_edges
, G_NEAR_EDGES
));
771 if (graph
->orientation
!= G_ORIENTATION
)
772 obstack_fgrow1 (os
, "\torientation:\t%s\n",
773 get_decision_str(graph
->orientation
, G_ORIENTATION
));
775 if (graph
->node_alignement
!= G_NODE_ALIGNEMENT
)
776 obstack_fgrow1 (os
, "\tnode_alignement:\t%s\n",
777 get_decision_str(graph
->node_alignement
,
780 if (graph
->port_sharing
!= G_PORT_SHARING
)
781 obstack_fgrow1 (os
, "\tport_sharing:\t%s\n",
782 get_decision_str(graph
->port_sharing
, G_PORT_SHARING
));
784 if (graph
->arrow_mode
!= G_ARROW_MODE
)
785 obstack_fgrow1 (os
, "\tarrow_mode:\t%s\n",
786 get_arrow_mode_str(graph
->arrow_mode
));
788 if (graph
->treefactor
!= G_TREEFACTOR
)
789 obstack_fgrow1 (os
, "\ttreefactor:\t%f\n", graph
->treefactor
);
790 if (graph
->spreadlevel
!= G_SPREADLEVEL
)
791 obstack_fgrow1 (os
, "\tspreadlevel:\t%d\n", graph
->spreadlevel
);
793 if (graph
->crossing_weight
!= G_CROSSING_WEIGHT
)
794 obstack_fgrow1 (os
, "\tcrossing_weight:\t%s\n",
795 get_crossing_type_str(graph
->crossing_weight
));
796 if (graph
->crossing_phase2
!= G_CROSSING_PHASE2
)
797 obstack_fgrow1 (os
, "\tcrossing_phase2:\t%s\n",
798 get_decision_str(graph
->crossing_phase2
,
800 if (graph
->crossing_optimization
!= G_CROSSING_OPTIMIZATION
)
801 obstack_fgrow1 (os
, "\tcrossing_optimization:\t%s\n",
802 get_decision_str(graph
->crossing_optimization
,
803 G_CROSSING_OPTIMIZATION
));
805 if (graph
->view
!= G_VIEW
)
806 obstack_fgrow1 (os
, "\tview:\t%s\n", get_view_str(graph
->view
));
808 if (graph
->edges
!= G_EDGES
)
809 obstack_fgrow1 (os
, "\tedges:\t%s\n", get_decision_str(graph
->edges
,
812 if (graph
->nodes
!= G_NODES
)
813 obstack_fgrow1 (os
,"\tnodes:\t%s\n",
814 get_decision_str(graph
->nodes
, G_NODES
));
816 if (graph
->splines
!= G_SPLINES
)
817 obstack_fgrow1 (os
, "\tsplines:\t%s\n",
818 get_decision_str(graph
->splines
, G_SPLINES
));
820 if (graph
->bmax
!= G_BMAX
)
821 obstack_fgrow1 (os
, "\tbmax:\t%d\n", graph
->bmax
);
822 if (graph
->cmin
!= G_CMIN
)
823 obstack_fgrow1 (os
, "\tcmin:\t%d\n", graph
->cmin
);
824 if (graph
->cmax
!= G_CMAX
)
825 obstack_fgrow1 (os
, "\tcmax:\t%d\n", graph
->cmax
);
826 if (graph
->pmin
!= G_PMIN
)
827 obstack_fgrow1 (os
, "\tpmin:\t%d\n", graph
->pmin
);
828 if (graph
->pmax
!= G_PMAX
)
829 obstack_fgrow1 (os
, "\tpmax:\t%d\n", graph
->pmax
);
830 if (graph
->rmin
!= G_RMIN
)
831 obstack_fgrow1 (os
, "\trmin:\t%d\n", graph
->rmin
);
832 if (graph
->rmax
!= G_RMAX
)
833 obstack_fgrow1 (os
, "\trmax:\t%d\n", graph
->rmax
);
834 if (graph
->smax
!= G_SMAX
)
835 obstack_fgrow1 (os
, "\tsmax:\t%d\n", graph
->smax
);