]> git.saurik.com Git - bison.git/commitdiff
* src/vcg.h (classname_s, infoname_s, node_s): Constify the
authorMarc Autret <autret_m@epita.fr>
Mon, 27 Aug 2001 22:16:23 +0000 (22:16 +0000)
committerMarc Autret <autret_m@epita.fr>
Mon, 27 Aug 2001 22:16:23 +0000 (22:16 +0000)
char * members.
Echo modifications to the functions prototypes.
* src/vcg.c (add_classname, add_infoname): Adjust arguments.

ChangeLog
src/vcg.c
src/vcg.h

index 00e5e40ec9b922a53dfc64994bdb91a84467e483..f59a70bde99db0706ea6493b2760dfc030a4dcd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-27  Marc Autret  <autret_m@epita.fr>
+
+       * src/vcg.h (classname_s, infoname_s, node_s): Constify the 
+       char * members.
+       Echo modifications to the functions prototypes.
+       * src/vcg.c (add_classname, add_infoname): Adjust arguments.
+
 2001-08-27  Marc Autret  <autret_m@epita.fr>
 
        * src/vcg.c: Include `xalloc.h'.
index aa3590469d425578e763dce23ef959d135bb5f8e..eeb6a43a7000801e14af2d17988ceec499d3f2dc 100644 (file)
--- a/src/vcg.c
+++ b/src/vcg.c
@@ -427,7 +427,7 @@ add_edge (graph_t *graph, edge_t *edge)
 }
 
 void
-add_classname (graph_t *g, int val, char *name)
+add_classname (graph_t *g, int val, const char *name)
 {
   struct classname_s *classname;
   
@@ -439,7 +439,7 @@ add_classname (graph_t *g, int val, char *name)
 }
 
 void
-add_infoname (graph_t *g, int integer, char *string)
+add_infoname (graph_t *g, int integer, const char *string)
 {
   struct infoname_s *infoname;
   
index 1a583a460c4925c7bebb7ed196e0bbb3ffcc47e7..14ba8625e81df92a8ec10e49a356f1c13fccd882 100644 (file)
--- a/src/vcg.h
+++ b/src/vcg.h
@@ -89,7 +89,7 @@ struct colorentry_s
 struct classname_s
 {
   int no; /* Class number */
-  char *name; /* Name associated to the class no. */
+  const char *name; /* Name associated to the class no. */
   struct classname_s *next; /* next name class association. */
 };
 
@@ -97,7 +97,7 @@ struct classname_s
 struct infoname_s
 {
   int integer;
-  char *string;
+  const char *string;
   struct infoname_s *next;
 };
 
@@ -179,13 +179,13 @@ struct node_s
 {
   /* Title the unique string identifying the node. This attribute is
      mandatory. */
-  char *title;
+  const char *title;
 
   /* Label the text displayed inside the node. If no label is specified
      then the title of the node will be used. Note that this text may
      contain control characters like NEWLINE that influences the size of
      the node. */
-  char *label;
+  const char *label;
 
   /* loc is the location as x, y position relatively to the system of
      coordinates of the graph. Locations are specified in the form
@@ -295,7 +295,7 @@ struct node_s
   /* info2, info3 can be selected from the menu. The corresponding text
      labels can be shown by mouse clicks on nodes.\f
      Default are null strings. */
-  char *infos[3];
+  const char *infos[3];
 
   /* Node border color.
      Default is textcolor. */
@@ -1001,8 +1001,8 @@ void add_edge PARAMS ((graph_t *graph, edge_t *edge));
 
 void add_colorentry PARAMS ((graph_t *g, int color_idx, int red_cp, 
                             int green_cp, int blue_cp));
-void add_classname PARAMS ((graph_t *g, int val, char *name));
-void add_infoname PARAMS ((graph_t *g, int val, char *name));
+void add_classname PARAMS ((graph_t *g, int val, const char *name));
+void add_infoname PARAMS ((graph_t *g, int val, const char *name));
 
 void open_node PARAMS ((struct obstack *os));
 void output_node PARAMS ((node_t *node, struct obstack *os));