[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: [bison-1_29-branch] vcg-adds.patch
From: |
marc-alexandre autret |
Subject: |
FYI: [bison-1_29-branch] vcg-adds.patch |
Date: |
Mon, 27 Aug 2001 01:48:34 +0000 (GMT) |
Just VCG updates.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.173.2.9
diff -u -r1.173.2.9 ChangeLog
--- ChangeLog 2001/08/26 23:36:42 1.173.2.9
+++ ChangeLog 2001/08/26 23:41:54
@@ -1,5 +1,20 @@
2001-08-27 Marc Autret <address@hidden>
+ * src/vcg.h (struct infoname_s): New.
+ (struct colorentry_s): New.
+ (graph_s): New fields {vertical,horizontal}_order in structure.
+ Add `infoname' field.
+ Add `colorentry' field;
+ * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
+ (G_HORIZONTAL_ORDER): New.
+ (G_INFONAME): New.
+ (G_COLORENTRY): New.
+ * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
+ Add output of `infoname'.
+ Add output of `colorentry'.
+
+2001-08-27 Marc Autret <address@hidden>
+
* src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
This one shadowed a global parameter.
Index: src/vcg.c
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.c,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 vcg.c
--- src/vcg.c 2001/08/16 20:01:14 1.5.2.1
+++ src/vcg.c 2001/08/26 23:41:56
@@ -49,6 +49,9 @@
g->textmode = G_TEXTMODE;
g->shape = G_SHAPE;
+ g->vertical_order = G_VERTICAL_ORDER;
+ g->horizontal_order = G_HORIZONTAL_ORDER;
+
g->xmax = G_XMAX; /* Not output. */
g->ymax = G_YMAX; /* Not output. */
@@ -667,6 +670,11 @@
if (graph->shape != G_SHAPE)
obstack_fgrow1 (os, "\tshape:\t%s\n", get_shape_str (graph->shape));
+
+ if (graph->vertical_order != G_VERTICAL_ORDER)
+ obstack_fgrow1 (os, "\tvertical_order:\t%d\n", graph->vertical_order);
+ if (graph->horizontal_order != G_HORIZONTAL_ORDER)
+ obstack_fgrow1 (os, "\thorizontal_order:\t%d\n", graph->horizontal_order);
if (graph->xmax != G_XMAX)
obstack_fgrow1 (os, "\txmax:\t%d\n", graph->xmax);
@@ -701,6 +709,30 @@
for (ite = graph->classname; ite; ite = ite->next)
obstack_fgrow2 (os, "\tclassname %d :\t%s\n", ite->no, ite->name);
+ }
+
+ if (graph->infoname != G_INFONAME)
+ {
+ struct infoname_s *ite;
+
+ for (ite = graph->infoname; ite; ite = ite->next)
+ obstack_fgrow2 (os, "\tinfoname %d :\t%s\n", ite->integer, ite->string);
+ }
+
+ if (graph->colorentry != G_COLORENTRY)
+ {
+ struct colorentry_s *ite;
+ char buff[64];
+
+ for (ite = graph->colorentry; ite; ite = ite->next)
+ {
+ sprintf (buff, "\tcolorentry %d :\t%d %d %d\n",
+ ite->color_index,
+ ite->red_cp,
+ ite->green_cp,
+ ite->blue_cp);
+ obstack_sgrow (os, buff);
+ }
}
if (graph->layoutalgorithm != G_LAYOUTALGORITHM)
Index: src/vcg.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.h,v
retrieving revision 1.3
diff -u -r1.3 vcg.h
--- src/vcg.h 2001/08/08 20:31:21 1.3
+++ src/vcg.h 2001/08/26 23:41:59
@@ -75,6 +75,16 @@
triangle
};
+/* Structure for colorentries. */
+struct colorentry_s
+{
+ int color_index;
+ int red_cp;
+ int green_cp;
+ int blue_cp;
+ struct colorentry_s *next;
+};
+
/* Structure to construct lists of classnames. */
struct classname_s
{
@@ -83,6 +93,14 @@
struct classname_s *next; /* next name class association. */
};
+/* Structure is in infoname. */
+struct infoname_s
+{
+ int integer;
+ char *string;
+ struct infoname_s *next;
+};
+
/* Layout Algorithms which can be found in VCG.
Details about each algoithm can be found below. */
enum layoutalgorithm_e
@@ -558,8 +576,23 @@
order of the whole level.
Defalut is box, other: rhomb, ellipse, triangle. */
enum shape_e shape;
+
+ /* Vertical order is the level position (rank) of the summary node of an
+ inner subgraph, if this subgraph is folded. We can also specify
+ level: int. The level is only recognized, if an automatical layout is
+ calculated. */
+ int vertical_order;
- /* FIXME {vertival,horizontal}_order */
+ /* Horizontal order is the horizontal position of the summary node within
+ a level. The nodes which are specified with horizontal positions are
+ ordered according to these positions within the levels. The nodes which
+ do not have this attribute are inserted into this ordering by the
+ crossing reduction mechanism. Note that connected components are
+ handled separately, thus it is not possible to intermix such components
+ by specifying a horizontal order. If the algorithm for downward laid
+ out trees is used, the horizontal order influences only the order of
+ the child nodes at a node, but not the order of the whole level. */
+ int horizontal_order;
/* xmax, ymax specify the maximal size of the virtual window that is
used to display the graph. This is usually larger than the displayed
@@ -630,8 +663,19 @@
By default, no class names. */
struct classname_s *classname;
- /* FIXME : infoname. */
- /* FIXME : colorentry. */
+ /* Infoname allows to introduce names for the additional text labels.
+ The names are used in the menus.
+ Infoname is given by an integer and a string.
+ The default value is NULL. */
+ struct infoname_s *infoname;
+
+ /* Colorentry allows to fill the color map. A color is a triplet of integer
+ values for the red/green/blue-part. Each integer is between 0 (off) and
+ 255 (on), e.g., 0 0 0 is black and 255 255 255 is white. For instance
+ colorentry 75 : 70 130 180 sets the map entry 75 to steel blue. This
+ color can be used by specifying just the number 75.
+ Default id NULL. */
+ struct colorentry_s *colorentry;
/* layoutalgorithm chooses different graph layout algorithms
Possibilities are maxdepth, mindepth, maxdepthslow, mindepthslow,
Index: src/vcg_defaults.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg_defaults.h,v
retrieving revision 1.2
diff -u -r1.2 vcg_defaults.h
--- src/vcg_defaults.h 2001/08/08 20:31:21 1.2
+++ src/vcg_defaults.h 2001/08/26 23:41:59
@@ -47,9 +47,12 @@
# define G_TEXTMODE centered
# define G_SHAPE box
-# define G_XMAX 90 /* Not output */
-# define G_YMAX 90 /* Not output */
+# define G_VERTICAL_ORDER 0 /* Unspecified for subgraphs. */
+# define G_HORIZONTAL_ORDER 0 /* Unspecified for subgraphs. */
+# define G_XMAX 90 /* Not output */
+# define G_YMAX 90 /* Not output */
+
# define G_XBASE 5
# define G_YBASE 5
@@ -60,10 +63,13 @@
# define G_XRASTER 1
# define G_YRASTER 1
# define G_XLRASTER 1
+
+# define G_HIDDEN -1 /* No default value. */
-# define G_HIDDEN -1 /* No default value. */
+# define G_CLASSNAME NULL /* No class name association */
+# define G_INFONAME NULL
+# define G_COLORENTRY NULL
-# define G_CLASSNAME NULL /* No class name association */
# define G_LAYOUTALGORITHM normal
# define G_LAYOUT_DOWNFACTOR 1
# define G_LAYOUT_UPFACTOR 1
--
Autret Marc (address@hidden)
Eleve Ingenieur en Informatique.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: [bison-1_29-branch] vcg-adds.patch,
marc-alexandre autret <=