1 /* VCG description handler for Bison.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 This file is part of Bison, the GNU Compiler Compiler.
7 Bison is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 Bison is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bison; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
27 #include "vcg_defaults.h"
29 /* Return an unambiguous printable representated, for NAME, suitable
30 for C strings. Use slot 2 since the user may use slots 0 and 1.
34 quote (char const *name
)
36 return quotearg_n_style (2, c_quoting_style
, name
);
40 /* Initialize a graph with the default values. */
47 g
->infos
[0] = G_INFOS1
;
48 g
->infos
[1] = G_INFOS2
;
49 g
->infos
[2] = G_INFOS3
;
52 g
->textcolor
= G_TEXTCOLOR
;
53 g
->bordercolor
= G_BORDERCOLOR
;
57 g
->borderwidth
= G_BORDERWIDTH
;
60 g
->folding
= G_FOLDING
;
62 g
->stretch
= G_STRETCH
;
64 g
->textmode
= G_TEXTMODE
;
67 g
->vertical_order
= G_VERTICAL_ORDER
;
68 g
->horizontal_order
= G_HORIZONTAL_ORDER
;
70 g
->xmax
= G_XMAX
; /* Not output. */
71 g
->ymax
= G_YMAX
; /* Not output. */
78 g
->xlspace
= G_XLSPACE
; /* Not output. */
80 g
->xraster
= G_XRASTER
;
81 g
->yraster
= G_YRASTER
;
82 g
->xlraster
= G_XLRASTER
;
84 g
->hidden
= G_HIDDEN
; /* No default value. */
86 g
->classname
= G_CLASSNAME
; /* No class name association. */
88 g
->layout_downfactor
= G_LAYOUT_DOWNFACTOR
;
89 g
->layout_upfactor
= G_LAYOUT_UPFACTOR
;
90 g
->layout_nearfactor
= G_LAYOUT_NEARFACTOR
;
91 g
->layout_splinefactor
= G_LAYOUT_SPLINEFACTOR
;
93 g
->late_edge_labels
= G_LATE_EDGE_LABELS
;
94 g
->display_edge_labels
= G_DISPLAY_EDGE_LABELS
;
95 g
->dirty_edge_labels
= G_DIRTY_EDGE_LABELS
;
96 g
->finetuning
= G_FINETUNING
;
97 g
->ignore_singles
= G_IGNORE_SINGLES
;
98 g
->priority_phase
= G_PRIORITY_PHASE
;
99 g
->manhattan_edges
= G_MANHATTAN_EDGES
;
100 g
->smanhattan_edges
= G_SMANHATTAN_EDGES
;
101 g
->near_edges
= G_NEAR_EDGES
;
103 g
->orientation
= G_ORIENTATION
;
104 g
->node_alignment
= G_NODE_ALIGNMENT
;
105 g
->port_sharing
= G_PORT_SHARING
;
106 g
->arrow_mode
= G_ARROW_MODE
;
107 g
->treefactor
= G_TREEFACTOR
;
108 g
->spreadlevel
= G_SPREADLEVEL
;
109 g
->crossing_weight
= G_CROSSING_WEIGHT
;
110 g
->crossing_phase2
= G_CROSSING_PHASE2
;
111 g
->crossing_optimization
= G_CROSSING_OPTIMIZATION
;
116 g
->splines
= G_SPLINES
;
127 g
->node_list
= G_NODE_LIST
;
128 g
->edge_list
= G_EDGE_LIST
;
134 /* Initialize a node with the default values. */
141 n
->locx
= N_LOCX
; /* Default unspcified. */
142 n
->locy
= N_LOCY
; /* Default unspcified. */
144 n
->vertical_order
= N_VERTICAL_ORDER
; /* Default unspcified. */
145 n
->horizontal_order
= N_HORIZONTAL_ORDER
; /* Default unspcified. */
147 n
->width
= N_WIDTH
; /* We assume that we can't define it now. */
148 n
->height
= N_HEIGHT
; /* Also. */
150 n
->shrink
= N_SHRINK
;
151 n
->stretch
= N_STRETCH
;
153 n
->folding
= N_FOLDING
; /* No explicit default value. */
156 n
->textmode
= N_TEXTMODE
;
157 n
->borderwidth
= N_BORDERWIDTH
;
160 n
->textcolor
= N_TEXTCOLOR
;
161 n
->bordercolor
= N_BORDERCOLOR
;
163 n
->infos
[0] = N_INFOS1
;
164 n
->infos
[1] = N_INFOS2
;
165 n
->infos
[2] = N_INFOS3
;
170 /* Initialize an edge with the default values. */
174 e
->type
= E_EDGE_TYPE
;
176 e
->sourcename
= E_SOURCENAME
;
177 e
->targetname
= E_TARGETNAME
;
180 e
->linestyle
= E_LINESTYLE
;
181 e
->thickness
= E_THICKNESS
;
186 e
->textcolor
= E_TEXTCOLOR
;
187 e
->arrowcolor
= E_ARROWCOLOR
;
188 e
->backarrowcolor
= E_BACKARROWCOLOR
;
190 e
->arrowsize
= E_ARROWSIZE
;
191 e
->backarrowsize
= E_BACKARROWSIZE
;
192 e
->arrowstyle
= E_ARROWSTYLE
;
194 e
->backarrowstyle
= E_BACKARROWSTYLE
;
196 e
->priority
= E_PRIORITY
;
198 e
->anchor
= E_ANCHOR
;
200 e
->horizontal_order
= E_HORIZONTAL_ORDER
;
205 /*----------------------------------------------.
207 | Return string corresponding to an enum value. |
208 `----------------------------------------------*/
211 get_color_str (enum color color
)
215 case white
: return "white";
216 case blue
: return "blue";
217 case red
: return "red";
218 case green
: return "green";
219 case yellow
: return "yellow";
220 case magenta
: return "magenta";
221 case cyan
: return "cyan";
222 case darkgrey
: return "darkgrey";
223 case darkblue
: return "darkblue";
224 case darkred
: return "darkred";
225 case darkgreen
: return "darkgreen";
226 case darkyellow
: return "darkyellow";
227 case darkmagenta
: return "darkmagenta";
228 case darkcyan
: return "darkcyan";
229 case gold
: return "gold";
230 case lightgrey
: return "lightgrey";
231 case lightblue
: return "lightblue";
232 case lightred
: return "lightred";
233 case lightgreen
: return "lightgreen";
234 case lightyellow
: return "lightyellow";
235 case lightmagenta
: return "lightmagenta";
236 case lightcyan
: return "lightcyan";
237 case lilac
: return "lilac";
238 case turquoise
: return "turquoise";
239 case aquamarine
: return "aquamarine";
240 case khaki
: return "khaki";
241 case purple
: return "purple";
242 case yellowgreen
: return "yellowgreen";
243 case pink
: return "pink";
244 case orange
: return "orange";
245 case orchid
: return "orchid";
246 case black
: return "black";
247 default: abort (); return NULL
;
252 get_textmode_str (enum textmode textmode
)
256 case centered
: return "center";
257 case left_justify
: return "left_justify";
258 case right_justify
: return "right_justify";
259 default: abort (); return NULL
;
264 get_shape_str (enum shape shape
)
268 case box
: return "box";
269 case rhomb
: return "rhomb";
270 case ellipse
: return "ellipse";
271 case triangle
: return "triangle";
272 default: abort (); return NULL
;
277 get_decision_str (enum decision decision
)
281 case no
: return "no";
282 case yes
: return "yes";
283 default: abort (); return NULL
;
288 get_orientation_str (enum orientation orientation
)
292 case top_to_bottom
: return "top_to_bottom";
293 case bottom_to_top
: return "bottom_to_top";
294 case left_to_right
: return "left_to_right";
295 case right_to_left
: return "right_to_left";
296 default: abort (); return NULL
;
301 get_node_alignment_str (enum alignment alignment
)
305 case center
: return "center";
306 case top
: return "top";
307 case bottom
: return "bottom";
308 default: abort (); return NULL
;
313 get_arrow_mode_str (enum arrow_mode arrow_mode
)
317 case fixed
: return "fixed";
318 case free_a
: return "free";
319 default: abort (); return NULL
;
324 get_crossing_type_str (enum crossing_type crossing_type
)
326 switch (crossing_type
)
328 case bary
: return "bary";
329 case median
: return "median";
330 case barymedian
: return "barymedian";
331 case medianbary
: return "medianbary";
332 default: abort (); return NULL
;
337 get_view_str (enum view view
)
339 /* There is no way with vcg 1.30 to specify a normal view explicitly,
340 so it is an error here if view == normal_view. */
343 case cfish
: return "cfish";
344 case pfish
: return "pfish";
345 case fcfish
: return "fcfish";
346 case fpfish
: return "fpfish";
347 default: abort (); return NULL
;
352 get_linestyle_str (enum linestyle linestyle
)
356 case continuous
: return "continuous";
357 case dashed
: return "dashed";
358 case dotted
: return "dotted";
359 case invisible
: return "invisible";
360 default: abort (); return NULL
;
365 get_arrowstyle_str (enum arrowstyle arrowstyle
)
369 case solid
: return "solid";
370 case line
: return "line";
371 case none
: return "none";
372 default: abort (); return NULL
;
376 /*------------------------------.
378 | Edge and nodes into a graph. |
379 `------------------------------*/
382 add_node (graph
*g
, node
*n
)
384 n
->next
= g
->node_list
;
389 add_edge (graph
*g
, edge
*e
)
391 e
->next
= g
->edge_list
;
396 add_classname (graph
*g
, int val
, const char *name
)
398 struct classname
*classname
= xmalloc (sizeof *classname
);
400 classname
->name
= name
;
401 classname
->next
= g
->classname
;
402 g
->classname
= classname
;
406 add_infoname (graph
*g
, int integer
, const char *str
)
408 struct infoname
*infoname
= xmalloc (sizeof *infoname
);
409 infoname
->integer
= integer
;
410 infoname
->chars
= str
;
411 infoname
->next
= g
->infoname
;
412 g
->infoname
= infoname
;
415 /* Build a colorentry struct and add it to the list. */
417 add_colorentry (graph
*g
, int color_idx
, int red_cp
,
418 int green_cp
, int blue_cp
)
420 struct colorentry
*ce
= xmalloc (sizeof *ce
);
421 ce
->color_index
= color_idx
;
423 ce
->green_cp
= green_cp
;
424 ce
->blue_cp
= blue_cp
;
425 ce
->next
= g
->colorentry
;
429 /*-------------------------------------.
430 | Open and close functions (formatted) |
431 `-------------------------------------*/
434 open_edge (edge
*e
, FILE *fout
)
439 fputs ("\tedge: {\n", fout
);
442 fputs ("\tbackedge: {\n", fout
);
445 fputs ("\tnearedge: {\n", fout
);
448 fputs ("\tbentnearedge: {\n", fout
);
451 fputs ("\tedge: {\n", fout
);
456 close_edge (FILE *fout
)
458 fputs ("\t}\n", fout
);
462 open_node (FILE *fout
)
464 fputs ("\tnode: {\n", fout
);
468 close_node (FILE *fout
)
470 fputs ("\t}\n", fout
);
474 open_graph (FILE *fout
)
476 fputs ("graph: {\n", fout
);
480 close_graph (graph
*g
, FILE *fout
)
484 /* FIXME: Unallocate nodes and edges if required. */
488 for (n
= g
->node_list
; n
; n
= n
->next
)
491 output_node (n
, fout
);
501 for (e
= g
->edge_list
; e
; e
= e
->next
)
504 output_edge (e
, fout
);
512 /*-------------------------------------------.
513 | Output functions (formatted) in file FOUT |
514 `-------------------------------------------*/
517 output_node (node
*n
, FILE *fout
)
519 if (n
->title
!= N_TITLE
)
520 fprintf (fout
, "\t\ttitle:\t%s\n", quote (n
->title
));
521 if (n
->label
!= N_LABEL
)
522 fprintf (fout
, "\t\tlabel:\t%s\n", quote (n
->label
));
524 if ((n
->locx
!= N_LOCX
) && (n
->locy
!= N_LOCY
))
525 fprintf (fout
, "\t\tloc { x: %d y: %d }\t\n", n
->locx
, n
->locy
);
527 if (n
->vertical_order
!= N_VERTICAL_ORDER
)
528 fprintf (fout
, "\t\tvertical_order:\t%d\n", n
->vertical_order
);
529 if (n
->horizontal_order
!= N_HORIZONTAL_ORDER
)
530 fprintf (fout
, "\t\thorizontal_order:\t%d\n", n
->horizontal_order
);
532 if (n
->width
!= N_WIDTH
)
533 fprintf (fout
, "\t\twidth:\t%d\n", n
->width
);
534 if (n
->height
!= N_HEIGHT
)
535 fprintf (fout
, "\t\theight:\t%d\n", n
->height
);
537 if (n
->shrink
!= N_SHRINK
)
538 fprintf (fout
, "\t\tshrink:\t%d\n", n
->shrink
);
539 if (n
->stretch
!= N_STRETCH
)
540 fprintf (fout
, "\t\tstretch:\t%d\n", n
->stretch
);
542 if (n
->folding
!= N_FOLDING
)
543 fprintf (fout
, "\t\tfolding:\t%d\n", n
->folding
);
545 if (n
->textmode
!= N_TEXTMODE
)
546 fprintf (fout
, "\t\ttextmode:\t%s\n",
547 get_textmode_str (n
->textmode
));
549 if (n
->shape
!= N_SHAPE
)
550 fprintf (fout
, "\t\tshape:\t%s\n", get_shape_str (n
->shape
));
552 if (n
->borderwidth
!= N_BORDERWIDTH
)
553 fprintf (fout
, "\t\tborderwidth:\t%d\n", n
->borderwidth
);
555 if (n
->color
!= N_COLOR
)
556 fprintf (fout
, "\t\tcolor:\t%s\n", get_color_str (n
->color
));
557 if (n
->textcolor
!= N_TEXTCOLOR
)
558 fprintf (fout
, "\t\ttextcolor:\t%s\n",
559 get_color_str (n
->textcolor
));
560 if (n
->bordercolor
!= N_BORDERCOLOR
)
561 fprintf (fout
, "\t\tbordercolor:\t%s\n",
562 get_color_str (n
->bordercolor
));
566 for (i
= 0; i
< 3; ++i
)
568 fprintf (fout
, "\t\tinfo%d:\t%s\n",
569 i
, quote (n
->infos
[i
]));
574 output_edge (edge
*e
, FILE *fout
)
576 /* FIXME: SOURCENAME and TARGETNAME are mandatory
577 so it has to be fatal not to give these informations. */
578 if (e
->sourcename
!= E_SOURCENAME
)
579 fprintf (fout
, "\t\tsourcename:\t%s\n", quote (e
->sourcename
));
580 if (e
->targetname
!= E_TARGETNAME
)
581 fprintf (fout
, "\t\ttargetname:\t%s\n", quote (e
->targetname
));
583 if (e
->label
!= E_LABEL
)
584 fprintf (fout
, "\t\tlabel:\t%s\n", quote (e
->label
));
586 if (e
->linestyle
!= E_LINESTYLE
)
587 fprintf (fout
, "\t\tlinestyle:\t%s\n", get_linestyle_str (e
->linestyle
));
589 if (e
->thickness
!= E_THICKNESS
)
590 fprintf (fout
, "\t\tthickness:\t%d\n", e
->thickness
);
591 if (e
->class != E_CLASS
)
592 fprintf (fout
, "\t\tclass:\t%d\n", e
->class);
594 if (e
->color
!= E_COLOR
)
595 fprintf (fout
, "\t\tcolor:\t%s\n", get_color_str (e
->color
));
596 if (e
->color
!= E_TEXTCOLOR
)
597 fprintf (fout
, "\t\ttextcolor:\t%s\n",
598 get_color_str (e
->textcolor
));
599 if (e
->arrowcolor
!= E_ARROWCOLOR
)
600 fprintf (fout
, "\t\tarrowcolor:\t%s\n",
601 get_color_str (e
->arrowcolor
));
602 if (e
->backarrowcolor
!= E_BACKARROWCOLOR
)
603 fprintf (fout
, "\t\tbackarrowcolor:\t%s\n",
604 get_color_str (e
->backarrowcolor
));
606 if (e
->arrowsize
!= E_ARROWSIZE
)
607 fprintf (fout
, "\t\tarrowsize:\t%d\n", e
->arrowsize
);
608 if (e
->backarrowsize
!= E_BACKARROWSIZE
)
609 fprintf (fout
, "\t\tbackarrowsize:\t%d\n", e
->backarrowsize
);
611 if (e
->arrowstyle
!= E_ARROWSTYLE
)
612 fprintf (fout
, "\t\tarrowstyle:\t%s\n",
613 get_arrowstyle_str (e
->arrowstyle
));
614 if (e
->backarrowstyle
!= E_BACKARROWSTYLE
)
615 fprintf (fout
, "\t\tbackarrowstyle:\t%s\n",
616 get_arrowstyle_str (e
->backarrowstyle
));
618 if (e
->priority
!= E_PRIORITY
)
619 fprintf (fout
, "\t\tpriority:\t%d\n", e
->priority
);
620 if (e
->anchor
!= E_ANCHOR
)
621 fprintf (fout
, "\t\tanchor:\t%d\n", e
->anchor
);
622 if (e
->horizontal_order
!= E_HORIZONTAL_ORDER
)
623 fprintf (fout
, "\t\thorizontal_order:\t%d\n", e
->horizontal_order
);
627 output_graph (graph
*g
, FILE *fout
)
630 fprintf (fout
, "\ttitle:\t%s\n", quote (g
->title
));
632 fprintf (fout
, "\tlabel:\t%s\n", quote (g
->label
));
636 for (i
= 0; i
< 3; ++i
)
638 fprintf (fout
, "\tinfo%d:\t%s\n", i
, quote (g
->infos
[i
]));
641 if (g
->color
!= G_COLOR
)
642 fprintf (fout
, "\tcolor:\t%s\n", get_color_str (g
->color
));
643 if (g
->textcolor
!= G_TEXTCOLOR
)
644 fprintf (fout
, "\ttextcolor:\t%s\n", get_color_str (g
->textcolor
));
645 if (g
->bordercolor
!= G_BORDERCOLOR
)
646 fprintf (fout
, "\tbordercolor:\t%s\n",
647 get_color_str (g
->bordercolor
));
649 if (g
->width
!= G_WIDTH
)
650 fprintf (fout
, "\twidth:\t%d\n", g
->width
);
651 if (g
->height
!= G_HEIGHT
)
652 fprintf (fout
, "\theight:\t%d\n", g
->height
);
653 if (g
->borderwidth
!= G_BORDERWIDTH
)
654 fprintf (fout
, "\tborderwidth:\t%d\n", g
->borderwidth
);
657 fprintf (fout
, "\tx:\t%d\n", g
->x
);
659 fprintf (fout
, "\ty:\t%d\n", g
->y
);
661 if (g
->folding
!= G_FOLDING
)
662 fprintf (fout
, "\tfolding:\t%d\n", g
->folding
);
664 if (g
->shrink
!= G_SHRINK
)
665 fprintf (fout
, "\tshrink:\t%d\n", g
->shrink
);
666 if (g
->stretch
!= G_STRETCH
)
667 fprintf (fout
, "\tstretch:\t%d\n", g
->stretch
);
669 if (g
->textmode
!= G_TEXTMODE
)
670 fprintf (fout
, "\ttextmode:\t%s\n",
671 get_textmode_str (g
->textmode
));
673 if (g
->shape
!= G_SHAPE
)
674 fprintf (fout
, "\tshape:\t%s\n", get_shape_str (g
->shape
));
676 if (g
->vertical_order
!= G_VERTICAL_ORDER
)
677 fprintf (fout
, "\tvertical_order:\t%d\n", g
->vertical_order
);
678 if (g
->horizontal_order
!= G_HORIZONTAL_ORDER
)
679 fprintf (fout
, "\thorizontal_order:\t%d\n", g
->horizontal_order
);
681 if (g
->xmax
!= G_XMAX
)
682 fprintf (fout
, "\txmax:\t%d\n", g
->xmax
);
683 if (g
->ymax
!= G_YMAX
)
684 fprintf (fout
, "\tymax:\t%d\n", g
->ymax
);
686 if (g
->xbase
!= G_XBASE
)
687 fprintf (fout
, "\txbase:\t%d\n", g
->xbase
);
688 if (g
->ybase
!= G_YBASE
)
689 fprintf (fout
, "\tybase:\t%d\n", g
->ybase
);
691 if (g
->xspace
!= G_XSPACE
)
692 fprintf (fout
, "\txspace:\t%d\n", g
->xspace
);
693 if (g
->yspace
!= G_YSPACE
)
694 fprintf (fout
, "\tyspace:\t%d\n", g
->yspace
);
695 if (g
->xlspace
!= G_XLSPACE
)
696 fprintf (fout
, "\txlspace:\t%d\n", g
->xlspace
);
698 if (g
->xraster
!= G_XRASTER
)
699 fprintf (fout
, "\txraster:\t%d\n", g
->xraster
);
700 if (g
->yraster
!= G_YRASTER
)
701 fprintf (fout
, "\tyraster:\t%d\n", g
->yraster
);
702 if (g
->xlraster
!= G_XLRASTER
)
703 fprintf (fout
, "\txlraster:\t%d\n", g
->xlraster
);
705 if (g
->hidden
!= G_HIDDEN
)
706 fprintf (fout
, "\thidden:\t%d\n", g
->hidden
);
708 /* FIXME: Unallocate struct list if required.
709 Maybe with a little function. */
710 if (g
->classname
!= G_CLASSNAME
)
712 struct classname
*ite
;
714 for (ite
= g
->classname
; ite
; ite
= ite
->next
)
715 fprintf (fout
, "\tclassname %d :\t%s\n", ite
->no
, ite
->name
);
718 if (g
->infoname
!= G_INFONAME
)
720 struct infoname
*ite
;
722 for (ite
= g
->infoname
; ite
; ite
= ite
->next
)
723 fprintf (fout
, "\tinfoname %d :\t%s\n", ite
->integer
, ite
->chars
);
726 if (g
->colorentry
!= G_COLORENTRY
)
728 struct colorentry
*ite
;
730 for (ite
= g
->colorentry
; ite
; ite
= ite
->next
)
732 fprintf (fout
, "\tcolorentry %d :\t%d %d %d\n",
740 if (g
->layout_downfactor
!= G_LAYOUT_DOWNFACTOR
)
741 fprintf (fout
, "\tlayout_downfactor:\t%d\n", g
->layout_downfactor
);
742 if (g
->layout_upfactor
!= G_LAYOUT_UPFACTOR
)
743 fprintf (fout
, "\tlayout_upfactor:\t%d\n", g
->layout_upfactor
);
744 if (g
->layout_nearfactor
!= G_LAYOUT_NEARFACTOR
)
745 fprintf (fout
, "\tlayout_nearfactor:\t%d\n", g
->layout_nearfactor
);
746 if (g
->layout_splinefactor
!= G_LAYOUT_SPLINEFACTOR
)
747 fprintf (fout
, "\tlayout_splinefactor:\t%d\n",
748 g
->layout_splinefactor
);
750 if (g
->late_edge_labels
!= G_LATE_EDGE_LABELS
)
751 fprintf (fout
, "\tlate_edge_labels:\t%s\n",
752 get_decision_str (g
->late_edge_labels
));
753 if (g
->display_edge_labels
!= G_DISPLAY_EDGE_LABELS
)
754 fprintf (fout
, "\tdisplay_edge_labels:\t%s\n",
755 get_decision_str (g
->display_edge_labels
));
756 if (g
->dirty_edge_labels
!= G_DIRTY_EDGE_LABELS
)
757 fprintf (fout
, "\tdirty_edge_labels:\t%s\n",
758 get_decision_str (g
->dirty_edge_labels
));
759 if (g
->finetuning
!= G_FINETUNING
)
760 fprintf (fout
, "\tfinetuning:\t%s\n",
761 get_decision_str (g
->finetuning
));
762 if (g
->ignore_singles
!= G_IGNORE_SINGLES
)
763 fprintf (fout
, "\tignore_singles:\t%s\n",
764 get_decision_str (g
->ignore_singles
));
765 if (g
->priority_phase
!= G_PRIORITY_PHASE
)
766 fprintf (fout
, "\tpriority_phase:\t%s\n",
767 get_decision_str (g
->priority_phase
));
768 if (g
->manhattan_edges
!= G_MANHATTAN_EDGES
)
770 "\tmanhattan_edges:\t%s\n",
771 get_decision_str (g
->manhattan_edges
));
772 if (g
->smanhattan_edges
!= G_SMANHATTAN_EDGES
)
774 "\tsmanhattan_edges:\t%s\n",
775 get_decision_str (g
->smanhattan_edges
));
776 if (g
->near_edges
!= G_NEAR_EDGES
)
777 fprintf (fout
, "\tnear_edges:\t%s\n",
778 get_decision_str (g
->near_edges
));
780 if (g
->orientation
!= G_ORIENTATION
)
781 fprintf (fout
, "\torientation:\t%s\n",
782 get_orientation_str (g
->orientation
));
784 if (g
->node_alignment
!= G_NODE_ALIGNMENT
)
785 fprintf (fout
, "\tnode_alignment:\t%s\n",
786 get_node_alignment_str (g
->node_alignment
));
788 if (g
->port_sharing
!= G_PORT_SHARING
)
789 fprintf (fout
, "\tport_sharing:\t%s\n",
790 get_decision_str (g
->port_sharing
));
792 if (g
->arrow_mode
!= G_ARROW_MODE
)
793 fprintf (fout
, "\tarrow_mode:\t%s\n",
794 get_arrow_mode_str (g
->arrow_mode
));
796 if (g
->treefactor
!= G_TREEFACTOR
)
797 fprintf (fout
, "\ttreefactor:\t%f\n", g
->treefactor
);
798 if (g
->spreadlevel
!= G_SPREADLEVEL
)
799 fprintf (fout
, "\tspreadlevel:\t%d\n", g
->spreadlevel
);
801 if (g
->crossing_weight
!= G_CROSSING_WEIGHT
)
802 fprintf (fout
, "\tcrossing_weight:\t%s\n",
803 get_crossing_type_str (g
->crossing_weight
));
804 if (g
->crossing_phase2
!= G_CROSSING_PHASE2
)
805 fprintf (fout
, "\tcrossing_phase2:\t%s\n",
806 get_decision_str (g
->crossing_phase2
));
807 if (g
->crossing_optimization
!= G_CROSSING_OPTIMIZATION
)
808 fprintf (fout
, "\tcrossing_optimization:\t%s\n",
809 get_decision_str (g
->crossing_optimization
));
811 if (g
->view
!= normal_view
)
812 fprintf (fout
, "\tview:\t%s\n", get_view_str (g
->view
));
814 if (g
->edges
!= G_EDGES
)
815 fprintf (fout
, "\tedges:\t%s\n", get_decision_str (g
->edges
));
817 if (g
->nodes
!= G_NODES
)
818 fprintf (fout
,"\tnodes:\t%s\n", get_decision_str (g
->nodes
));
820 if (g
->splines
!= G_SPLINES
)
821 fprintf (fout
, "\tsplines:\t%s\n", get_decision_str (g
->splines
));
823 if (g
->bmax
!= G_BMAX
)
824 fprintf (fout
, "\tbmax:\t%d\n", g
->bmax
);
825 if (g
->cmin
!= G_CMIN
)
826 fprintf (fout
, "\tcmin:\t%d\n", g
->cmin
);
827 if (g
->cmax
!= G_CMAX
)
828 fprintf (fout
, "\tcmax:\t%d\n", g
->cmax
);
829 if (g
->pmin
!= G_PMIN
)
830 fprintf (fout
, "\tpmin:\t%d\n", g
->pmin
);
831 if (g
->pmax
!= G_PMAX
)
832 fprintf (fout
, "\tpmax:\t%d\n", g
->pmax
);
833 if (g
->rmin
!= G_RMIN
)
834 fprintf (fout
, "\trmin:\t%d\n", g
->rmin
);
835 if (g
->rmax
!= G_RMAX
)
836 fprintf (fout
, "\trmax:\t%d\n", g
->rmax
);
837 if (g
->smax
!= G_SMAX
)
838 fprintf (fout
, "\tsmax:\t%d\n", g
->smax
);