1 /* VCG description handler for Bison.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
6 This file is part of Bison, the GNU Compiler Compiler.
8 Bison is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 Bison is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with Bison; see the file COPYING. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
29 #include "vcg_defaults.h"
31 /* Return an unambiguous printable representated, for NAME, suitable
32 for C strings. Use slot 2 since the user may use slots 0 and 1.
36 quote (char const *name
)
38 return quotearg_n_style (2, c_quoting_style
, name
);
42 /* Initialize a graph with the default values. */
49 g
->infos
[0] = G_INFOS1
;
50 g
->infos
[1] = G_INFOS2
;
51 g
->infos
[2] = G_INFOS3
;
54 g
->textcolor
= G_TEXTCOLOR
;
55 g
->bordercolor
= G_BORDERCOLOR
;
59 g
->borderwidth
= G_BORDERWIDTH
;
62 g
->folding
= G_FOLDING
;
64 g
->stretch
= G_STRETCH
;
66 g
->textmode
= G_TEXTMODE
;
69 g
->vertical_order
= G_VERTICAL_ORDER
;
70 g
->horizontal_order
= G_HORIZONTAL_ORDER
;
72 g
->xmax
= G_XMAX
; /* Not output. */
73 g
->ymax
= G_YMAX
; /* Not output. */
80 g
->xlspace
= G_XLSPACE
; /* Not output. */
82 g
->xraster
= G_XRASTER
;
83 g
->yraster
= G_YRASTER
;
84 g
->xlraster
= G_XLRASTER
;
86 g
->hidden
= G_HIDDEN
; /* No default value. */
88 g
->classname
= G_CLASSNAME
; /* No class name association. */
90 g
->layout_downfactor
= G_LAYOUT_DOWNFACTOR
;
91 g
->layout_upfactor
= G_LAYOUT_UPFACTOR
;
92 g
->layout_nearfactor
= G_LAYOUT_NEARFACTOR
;
93 g
->layout_splinefactor
= G_LAYOUT_SPLINEFACTOR
;
95 g
->late_edge_labels
= G_LATE_EDGE_LABELS
;
96 g
->display_edge_labels
= G_DISPLAY_EDGE_LABELS
;
97 g
->dirty_edge_labels
= G_DIRTY_EDGE_LABELS
;
98 g
->finetuning
= G_FINETUNING
;
99 g
->ignore_singles
= G_IGNORE_SINGLES
;
100 g
->priority_phase
= G_PRIORITY_PHASE
;
101 g
->manhattan_edges
= G_MANHATTAN_EDGES
;
102 g
->smanhattan_edges
= G_SMANHATTAN_EDGES
;
103 g
->near_edges
= G_NEAR_EDGES
;
105 g
->orientation
= G_ORIENTATION
;
106 g
->node_alignment
= G_NODE_ALIGNMENT
;
107 g
->port_sharing
= G_PORT_SHARING
;
108 g
->arrow_mode
= G_ARROW_MODE
;
109 g
->treefactor
= G_TREEFACTOR
;
110 g
->spreadlevel
= G_SPREADLEVEL
;
111 g
->crossing_weight
= G_CROSSING_WEIGHT
;
112 g
->crossing_phase2
= G_CROSSING_PHASE2
;
113 g
->crossing_optimization
= G_CROSSING_OPTIMIZATION
;
118 g
->splines
= G_SPLINES
;
129 g
->node_list
= G_NODE_LIST
;
130 g
->edge_list
= G_EDGE_LIST
;
136 /* Initialize a node with the default values. */
143 n
->locx
= N_LOCX
; /* Default unspcified. */
144 n
->locy
= N_LOCY
; /* Default unspcified. */
146 n
->vertical_order
= N_VERTICAL_ORDER
; /* Default unspcified. */
147 n
->horizontal_order
= N_HORIZONTAL_ORDER
; /* Default unspcified. */
149 n
->width
= N_WIDTH
; /* We assume that we can't define it now. */
150 n
->height
= N_HEIGHT
; /* Also. */
152 n
->shrink
= N_SHRINK
;
153 n
->stretch
= N_STRETCH
;
155 n
->folding
= N_FOLDING
; /* No explicit default value. */
158 n
->textmode
= N_TEXTMODE
;
159 n
->borderwidth
= N_BORDERWIDTH
;
162 n
->textcolor
= N_TEXTCOLOR
;
163 n
->bordercolor
= N_BORDERCOLOR
;
165 n
->infos
[0] = N_INFOS1
;
166 n
->infos
[1] = N_INFOS2
;
167 n
->infos
[2] = N_INFOS3
;
172 /* Initialize an edge with the default values. */
176 e
->type
= E_EDGE_TYPE
;
178 e
->sourcename
= E_SOURCENAME
;
179 e
->targetname
= E_TARGETNAME
;
182 e
->linestyle
= E_LINESTYLE
;
183 e
->thickness
= E_THICKNESS
;
188 e
->textcolor
= E_TEXTCOLOR
;
189 e
->arrowcolor
= E_ARROWCOLOR
;
190 e
->backarrowcolor
= E_BACKARROWCOLOR
;
192 e
->arrowsize
= E_ARROWSIZE
;
193 e
->backarrowsize
= E_BACKARROWSIZE
;
194 e
->arrowstyle
= E_ARROWSTYLE
;
196 e
->backarrowstyle
= E_BACKARROWSTYLE
;
198 e
->priority
= E_PRIORITY
;
200 e
->anchor
= E_ANCHOR
;
202 e
->horizontal_order
= E_HORIZONTAL_ORDER
;
207 /*----------------------------------------------.
209 | Return string corresponding to an enum value. |
210 `----------------------------------------------*/
213 get_color_str (enum color color
)
218 case white
: return "white";
219 case blue
: return "blue";
220 case red
: return "red";
221 case green
: return "green";
222 case yellow
: return "yellow";
223 case magenta
: return "magenta";
224 case cyan
: return "cyan";
225 case darkgrey
: return "darkgrey";
226 case darkblue
: return "darkblue";
227 case darkred
: return "darkred";
228 case darkgreen
: return "darkgreen";
229 case darkyellow
: return "darkyellow";
230 case darkmagenta
: return "darkmagenta";
231 case darkcyan
: return "darkcyan";
232 case gold
: return "gold";
233 case lightgrey
: return "lightgrey";
234 case lightblue
: return "lightblue";
235 case lightred
: return "lightred";
236 case lightgreen
: return "lightgreen";
237 case lightyellow
: return "lightyellow";
238 case lightmagenta
: return "lightmagenta";
239 case lightcyan
: return "lightcyan";
240 case lilac
: return "lilac";
241 case turquoise
: return "turquoise";
242 case aquamarine
: return "aquamarine";
243 case khaki
: return "khaki";
244 case purple
: return "purple";
245 case yellowgreen
: return "yellowgreen";
246 case pink
: return "pink";
247 case orange
: return "orange";
248 case orchid
: return "orchid";
249 case black
: return "black";
254 get_textmode_str (enum textmode textmode
)
259 case centered
: return "center";
260 case left_justify
: return "left_justify";
261 case right_justify
: return "right_justify";
266 get_shape_str (enum shape shape
)
271 case box
: return "box";
272 case rhomb
: return "rhomb";
273 case ellipse
: return "ellipse";
274 case triangle
: return "triangle";
279 get_decision_str (enum decision decision
)
284 case no
: return "no";
285 case yes
: return "yes";
290 get_orientation_str (enum orientation orientation
)
295 case top_to_bottom
: return "top_to_bottom";
296 case bottom_to_top
: return "bottom_to_top";
297 case left_to_right
: return "left_to_right";
298 case right_to_left
: return "right_to_left";
303 get_node_alignment_str (enum alignment alignment
)
308 case center
: return "center";
309 case top
: return "top";
310 case bottom
: return "bottom";
315 get_arrow_mode_str (enum arrow_mode arrow_mode
)
320 case fixed
: return "fixed";
321 case free_a
: return "free";
326 get_crossing_type_str (enum crossing_type crossing_type
)
328 switch (crossing_type
)
331 case bary
: return "bary";
332 case median
: return "median";
333 case barymedian
: return "barymedian";
334 case medianbary
: return "medianbary";
339 get_view_str (enum view view
)
341 /* There is no way with vcg 1.30 to specify a normal view explicitly,
342 so it is an error here if view == normal_view. */
346 case cfish
: return "cfish";
347 case pfish
: return "pfish";
348 case fcfish
: return "fcfish";
349 case fpfish
: return "fpfish";
354 get_linestyle_str (enum linestyle linestyle
)
359 case continuous
: return "continuous";
360 case dashed
: return "dashed";
361 case dotted
: return "dotted";
362 case invisible
: return "invisible";
367 get_arrowstyle_str (enum arrowstyle arrowstyle
)
372 case solid
: return "solid";
373 case line
: return "line";
374 case none
: return "none";
378 /*------------------------------.
380 | Edge and nodes into a graph. |
381 `------------------------------*/
384 add_node (graph
*g
, node
*n
)
386 n
->next
= g
->node_list
;
391 add_edge (graph
*g
, edge
*e
)
393 e
->next
= g
->edge_list
;
398 add_classname (graph
*g
, int val
, const char *name
)
400 struct classname
*classname
= xmalloc (sizeof *classname
);
402 classname
->name
= name
;
403 classname
->next
= g
->classname
;
404 g
->classname
= classname
;
408 add_infoname (graph
*g
, int integer
, const char *str
)
410 struct infoname
*infoname
= xmalloc (sizeof *infoname
);
411 infoname
->integer
= integer
;
412 infoname
->chars
= str
;
413 infoname
->next
= g
->infoname
;
414 g
->infoname
= infoname
;
417 /* Build a colorentry struct and add it to the list. */
419 add_colorentry (graph
*g
, int color_idx
, int red_cp
,
420 int green_cp
, int blue_cp
)
422 struct colorentry
*ce
= xmalloc (sizeof *ce
);
423 ce
->color_index
= color_idx
;
425 ce
->green_cp
= green_cp
;
426 ce
->blue_cp
= blue_cp
;
427 ce
->next
= g
->colorentry
;
431 /*-------------------------------------.
432 | Open and close functions (formatted) |
433 `-------------------------------------*/
436 open_edge (edge
*e
, FILE *fout
)
441 fputs ("\tedge: {\n", fout
);
444 fputs ("\tbackedge: {\n", fout
);
447 fputs ("\tnearedge: {\n", fout
);
450 fputs ("\tbentnearedge: {\n", fout
);
453 fputs ("\tedge: {\n", fout
);
458 close_edge (FILE *fout
)
460 fputs ("\t}\n", fout
);
464 open_node (FILE *fout
)
466 fputs ("\tnode: {\n", fout
);
470 close_node (FILE *fout
)
472 fputs ("\t}\n", fout
);
476 open_graph (FILE *fout
)
478 fputs ("graph: {\n", fout
);
482 close_graph (graph
*g
, FILE *fout
)
486 /* FIXME: Unallocate nodes and edges if required. */
490 for (n
= g
->node_list
; n
; n
= n
->next
)
493 output_node (n
, fout
);
503 for (e
= g
->edge_list
; e
; e
= e
->next
)
506 output_edge (e
, fout
);
514 /*-------------------------------------------.
515 | Output functions (formatted) in file FOUT |
516 `-------------------------------------------*/
519 output_node (node
*n
, FILE *fout
)
521 if (n
->title
!= N_TITLE
)
522 fprintf (fout
, "\t\ttitle:\t%s\n", quote (n
->title
));
523 if (n
->label
!= N_LABEL
)
524 fprintf (fout
, "\t\tlabel:\t%s\n", quote (n
->label
));
526 if ((n
->locx
!= N_LOCX
) && (n
->locy
!= N_LOCY
))
527 fprintf (fout
, "\t\tloc { x: %d y: %d }\t\n", n
->locx
, n
->locy
);
529 if (n
->vertical_order
!= N_VERTICAL_ORDER
)
530 fprintf (fout
, "\t\tvertical_order:\t%d\n", n
->vertical_order
);
531 if (n
->horizontal_order
!= N_HORIZONTAL_ORDER
)
532 fprintf (fout
, "\t\thorizontal_order:\t%d\n", n
->horizontal_order
);
534 if (n
->width
!= N_WIDTH
)
535 fprintf (fout
, "\t\twidth:\t%d\n", n
->width
);
536 if (n
->height
!= N_HEIGHT
)
537 fprintf (fout
, "\t\theight:\t%d\n", n
->height
);
539 if (n
->shrink
!= N_SHRINK
)
540 fprintf (fout
, "\t\tshrink:\t%d\n", n
->shrink
);
541 if (n
->stretch
!= N_STRETCH
)
542 fprintf (fout
, "\t\tstretch:\t%d\n", n
->stretch
);
544 if (n
->folding
!= N_FOLDING
)
545 fprintf (fout
, "\t\tfolding:\t%d\n", n
->folding
);
547 if (n
->textmode
!= N_TEXTMODE
)
548 fprintf (fout
, "\t\ttextmode:\t%s\n",
549 get_textmode_str (n
->textmode
));
551 if (n
->shape
!= N_SHAPE
)
552 fprintf (fout
, "\t\tshape:\t%s\n", get_shape_str (n
->shape
));
554 if (n
->borderwidth
!= N_BORDERWIDTH
)
555 fprintf (fout
, "\t\tborderwidth:\t%d\n", n
->borderwidth
);
557 if (n
->color
!= N_COLOR
)
558 fprintf (fout
, "\t\tcolor:\t%s\n", get_color_str (n
->color
));
559 if (n
->textcolor
!= N_TEXTCOLOR
)
560 fprintf (fout
, "\t\ttextcolor:\t%s\n",
561 get_color_str (n
->textcolor
));
562 if (n
->bordercolor
!= N_BORDERCOLOR
)
563 fprintf (fout
, "\t\tbordercolor:\t%s\n",
564 get_color_str (n
->bordercolor
));
568 for (i
= 0; i
< 3; ++i
)
570 fprintf (fout
, "\t\tinfo%d:\t%s\n",
571 i
, quote (n
->infos
[i
]));
576 output_edge (edge
*e
, FILE *fout
)
578 /* FIXME: SOURCENAME and TARGETNAME are mandatory
579 so it has to be fatal not to give these informations. */
580 if (e
->sourcename
!= E_SOURCENAME
)
581 fprintf (fout
, "\t\tsourcename:\t%s\n", quote (e
->sourcename
));
582 if (e
->targetname
!= E_TARGETNAME
)
583 fprintf (fout
, "\t\ttargetname:\t%s\n", quote (e
->targetname
));
585 if (e
->label
!= E_LABEL
)
586 fprintf (fout
, "\t\tlabel:\t%s\n", quote (e
->label
));
588 if (e
->linestyle
!= E_LINESTYLE
)
589 fprintf (fout
, "\t\tlinestyle:\t%s\n", get_linestyle_str (e
->linestyle
));
591 if (e
->thickness
!= E_THICKNESS
)
592 fprintf (fout
, "\t\tthickness:\t%d\n", e
->thickness
);
593 if (e
->class != E_CLASS
)
594 fprintf (fout
, "\t\tclass:\t%d\n", e
->class);
596 if (e
->color
!= E_COLOR
)
597 fprintf (fout
, "\t\tcolor:\t%s\n", get_color_str (e
->color
));
598 if (e
->color
!= E_TEXTCOLOR
)
599 fprintf (fout
, "\t\ttextcolor:\t%s\n",
600 get_color_str (e
->textcolor
));
601 if (e
->arrowcolor
!= E_ARROWCOLOR
)
602 fprintf (fout
, "\t\tarrowcolor:\t%s\n",
603 get_color_str (e
->arrowcolor
));
604 if (e
->backarrowcolor
!= E_BACKARROWCOLOR
)
605 fprintf (fout
, "\t\tbackarrowcolor:\t%s\n",
606 get_color_str (e
->backarrowcolor
));
608 if (e
->arrowsize
!= E_ARROWSIZE
)
609 fprintf (fout
, "\t\tarrowsize:\t%d\n", e
->arrowsize
);
610 if (e
->backarrowsize
!= E_BACKARROWSIZE
)
611 fprintf (fout
, "\t\tbackarrowsize:\t%d\n", e
->backarrowsize
);
613 if (e
->arrowstyle
!= E_ARROWSTYLE
)
614 fprintf (fout
, "\t\tarrowstyle:\t%s\n",
615 get_arrowstyle_str (e
->arrowstyle
));
616 if (e
->backarrowstyle
!= E_BACKARROWSTYLE
)
617 fprintf (fout
, "\t\tbackarrowstyle:\t%s\n",
618 get_arrowstyle_str (e
->backarrowstyle
));
620 if (e
->priority
!= E_PRIORITY
)
621 fprintf (fout
, "\t\tpriority:\t%d\n", e
->priority
);
622 if (e
->anchor
!= E_ANCHOR
)
623 fprintf (fout
, "\t\tanchor:\t%d\n", e
->anchor
);
624 if (e
->horizontal_order
!= E_HORIZONTAL_ORDER
)
625 fprintf (fout
, "\t\thorizontal_order:\t%d\n", e
->horizontal_order
);
629 output_graph (graph
*g
, FILE *fout
)
632 fprintf (fout
, "\ttitle:\t%s\n", quote (g
->title
));
634 fprintf (fout
, "\tlabel:\t%s\n", quote (g
->label
));
638 for (i
= 0; i
< 3; ++i
)
640 fprintf (fout
, "\tinfo%d:\t%s\n", i
, quote (g
->infos
[i
]));
643 if (g
->color
!= G_COLOR
)
644 fprintf (fout
, "\tcolor:\t%s\n", get_color_str (g
->color
));
645 if (g
->textcolor
!= G_TEXTCOLOR
)
646 fprintf (fout
, "\ttextcolor:\t%s\n", get_color_str (g
->textcolor
));
647 if (g
->bordercolor
!= G_BORDERCOLOR
)
648 fprintf (fout
, "\tbordercolor:\t%s\n",
649 get_color_str (g
->bordercolor
));
651 if (g
->width
!= G_WIDTH
)
652 fprintf (fout
, "\twidth:\t%d\n", g
->width
);
653 if (g
->height
!= G_HEIGHT
)
654 fprintf (fout
, "\theight:\t%d\n", g
->height
);
655 if (g
->borderwidth
!= G_BORDERWIDTH
)
656 fprintf (fout
, "\tborderwidth:\t%d\n", g
->borderwidth
);
659 fprintf (fout
, "\tx:\t%d\n", g
->x
);
661 fprintf (fout
, "\ty:\t%d\n", g
->y
);
663 if (g
->folding
!= G_FOLDING
)
664 fprintf (fout
, "\tfolding:\t%d\n", g
->folding
);
666 if (g
->shrink
!= G_SHRINK
)
667 fprintf (fout
, "\tshrink:\t%d\n", g
->shrink
);
668 if (g
->stretch
!= G_STRETCH
)
669 fprintf (fout
, "\tstretch:\t%d\n", g
->stretch
);
671 if (g
->textmode
!= G_TEXTMODE
)
672 fprintf (fout
, "\ttextmode:\t%s\n",
673 get_textmode_str (g
->textmode
));
675 if (g
->shape
!= G_SHAPE
)
676 fprintf (fout
, "\tshape:\t%s\n", get_shape_str (g
->shape
));
678 if (g
->vertical_order
!= G_VERTICAL_ORDER
)
679 fprintf (fout
, "\tvertical_order:\t%d\n", g
->vertical_order
);
680 if (g
->horizontal_order
!= G_HORIZONTAL_ORDER
)
681 fprintf (fout
, "\thorizontal_order:\t%d\n", g
->horizontal_order
);
683 if (g
->xmax
!= G_XMAX
)
684 fprintf (fout
, "\txmax:\t%d\n", g
->xmax
);
685 if (g
->ymax
!= G_YMAX
)
686 fprintf (fout
, "\tymax:\t%d\n", g
->ymax
);
688 if (g
->xbase
!= G_XBASE
)
689 fprintf (fout
, "\txbase:\t%d\n", g
->xbase
);
690 if (g
->ybase
!= G_YBASE
)
691 fprintf (fout
, "\tybase:\t%d\n", g
->ybase
);
693 if (g
->xspace
!= G_XSPACE
)
694 fprintf (fout
, "\txspace:\t%d\n", g
->xspace
);
695 if (g
->yspace
!= G_YSPACE
)
696 fprintf (fout
, "\tyspace:\t%d\n", g
->yspace
);
697 if (g
->xlspace
!= G_XLSPACE
)
698 fprintf (fout
, "\txlspace:\t%d\n", g
->xlspace
);
700 if (g
->xraster
!= G_XRASTER
)
701 fprintf (fout
, "\txraster:\t%d\n", g
->xraster
);
702 if (g
->yraster
!= G_YRASTER
)
703 fprintf (fout
, "\tyraster:\t%d\n", g
->yraster
);
704 if (g
->xlraster
!= G_XLRASTER
)
705 fprintf (fout
, "\txlraster:\t%d\n", g
->xlraster
);
707 if (g
->hidden
!= G_HIDDEN
)
708 fprintf (fout
, "\thidden:\t%d\n", g
->hidden
);
710 /* FIXME: Unallocate struct list if required.
711 Maybe with a little function. */
712 if (g
->classname
!= G_CLASSNAME
)
714 struct classname
*ite
;
716 for (ite
= g
->classname
; ite
; ite
= ite
->next
)
717 fprintf (fout
, "\tclassname %d :\t%s\n", ite
->no
, ite
->name
);
720 if (g
->infoname
!= G_INFONAME
)
722 struct infoname
*ite
;
724 for (ite
= g
->infoname
; ite
; ite
= ite
->next
)
725 fprintf (fout
, "\tinfoname %d :\t%s\n", ite
->integer
, ite
->chars
);
728 if (g
->colorentry
!= G_COLORENTRY
)
730 struct colorentry
*ite
;
732 for (ite
= g
->colorentry
; ite
; ite
= ite
->next
)
734 fprintf (fout
, "\tcolorentry %d :\t%d %d %d\n",
742 if (g
->layout_downfactor
!= G_LAYOUT_DOWNFACTOR
)
743 fprintf (fout
, "\tlayout_downfactor:\t%d\n", g
->layout_downfactor
);
744 if (g
->layout_upfactor
!= G_LAYOUT_UPFACTOR
)
745 fprintf (fout
, "\tlayout_upfactor:\t%d\n", g
->layout_upfactor
);
746 if (g
->layout_nearfactor
!= G_LAYOUT_NEARFACTOR
)
747 fprintf (fout
, "\tlayout_nearfactor:\t%d\n", g
->layout_nearfactor
);
748 if (g
->layout_splinefactor
!= G_LAYOUT_SPLINEFACTOR
)
749 fprintf (fout
, "\tlayout_splinefactor:\t%d\n",
750 g
->layout_splinefactor
);
752 if (g
->late_edge_labels
!= G_LATE_EDGE_LABELS
)
753 fprintf (fout
, "\tlate_edge_labels:\t%s\n",
754 get_decision_str (g
->late_edge_labels
));
755 if (g
->display_edge_labels
!= G_DISPLAY_EDGE_LABELS
)
756 fprintf (fout
, "\tdisplay_edge_labels:\t%s\n",
757 get_decision_str (g
->display_edge_labels
));
758 if (g
->dirty_edge_labels
!= G_DIRTY_EDGE_LABELS
)
759 fprintf (fout
, "\tdirty_edge_labels:\t%s\n",
760 get_decision_str (g
->dirty_edge_labels
));
761 if (g
->finetuning
!= G_FINETUNING
)
762 fprintf (fout
, "\tfinetuning:\t%s\n",
763 get_decision_str (g
->finetuning
));
764 if (g
->ignore_singles
!= G_IGNORE_SINGLES
)
765 fprintf (fout
, "\tignore_singles:\t%s\n",
766 get_decision_str (g
->ignore_singles
));
767 if (g
->priority_phase
!= G_PRIORITY_PHASE
)
768 fprintf (fout
, "\tpriority_phase:\t%s\n",
769 get_decision_str (g
->priority_phase
));
770 if (g
->manhattan_edges
!= G_MANHATTAN_EDGES
)
772 "\tmanhattan_edges:\t%s\n",
773 get_decision_str (g
->manhattan_edges
));
774 if (g
->smanhattan_edges
!= G_SMANHATTAN_EDGES
)
776 "\tsmanhattan_edges:\t%s\n",
777 get_decision_str (g
->smanhattan_edges
));
778 if (g
->near_edges
!= G_NEAR_EDGES
)
779 fprintf (fout
, "\tnear_edges:\t%s\n",
780 get_decision_str (g
->near_edges
));
782 if (g
->orientation
!= G_ORIENTATION
)
783 fprintf (fout
, "\torientation:\t%s\n",
784 get_orientation_str (g
->orientation
));
786 if (g
->node_alignment
!= G_NODE_ALIGNMENT
)
787 fprintf (fout
, "\tnode_alignment:\t%s\n",
788 get_node_alignment_str (g
->node_alignment
));
790 if (g
->port_sharing
!= G_PORT_SHARING
)
791 fprintf (fout
, "\tport_sharing:\t%s\n",
792 get_decision_str (g
->port_sharing
));
794 if (g
->arrow_mode
!= G_ARROW_MODE
)
795 fprintf (fout
, "\tarrow_mode:\t%s\n",
796 get_arrow_mode_str (g
->arrow_mode
));
798 if (g
->treefactor
!= G_TREEFACTOR
)
799 fprintf (fout
, "\ttreefactor:\t%f\n", g
->treefactor
);
800 if (g
->spreadlevel
!= G_SPREADLEVEL
)
801 fprintf (fout
, "\tspreadlevel:\t%d\n", g
->spreadlevel
);
803 if (g
->crossing_weight
!= G_CROSSING_WEIGHT
)
804 fprintf (fout
, "\tcrossing_weight:\t%s\n",
805 get_crossing_type_str (g
->crossing_weight
));
806 if (g
->crossing_phase2
!= G_CROSSING_PHASE2
)
807 fprintf (fout
, "\tcrossing_phase2:\t%s\n",
808 get_decision_str (g
->crossing_phase2
));
809 if (g
->crossing_optimization
!= G_CROSSING_OPTIMIZATION
)
810 fprintf (fout
, "\tcrossing_optimization:\t%s\n",
811 get_decision_str (g
->crossing_optimization
));
813 if (g
->view
!= normal_view
)
814 fprintf (fout
, "\tview:\t%s\n", get_view_str (g
->view
));
816 if (g
->edges
!= G_EDGES
)
817 fprintf (fout
, "\tedges:\t%s\n", get_decision_str (g
->edges
));
819 if (g
->nodes
!= G_NODES
)
820 fprintf (fout
,"\tnodes:\t%s\n", get_decision_str (g
->nodes
));
822 if (g
->splines
!= G_SPLINES
)
823 fprintf (fout
, "\tsplines:\t%s\n", get_decision_str (g
->splines
));
825 if (g
->bmax
!= G_BMAX
)
826 fprintf (fout
, "\tbmax:\t%d\n", g
->bmax
);
827 if (g
->cmin
!= G_CMIN
)
828 fprintf (fout
, "\tcmin:\t%d\n", g
->cmin
);
829 if (g
->cmax
!= G_CMAX
)
830 fprintf (fout
, "\tcmax:\t%d\n", g
->cmax
);
831 if (g
->pmin
!= G_PMIN
)
832 fprintf (fout
, "\tpmin:\t%d\n", g
->pmin
);
833 if (g
->pmax
!= G_PMAX
)
834 fprintf (fout
, "\tpmax:\t%d\n", g
->pmax
);
835 if (g
->rmin
!= G_RMIN
)
836 fprintf (fout
, "\trmin:\t%d\n", g
->rmin
);
837 if (g
->rmax
!= G_RMAX
)
838 fprintf (fout
, "\trmax:\t%d\n", g
->rmax
);
839 if (g
->smax
!= G_SMAX
)
840 fprintf (fout
, "\tsmax:\t%d\n", g
->smax
);