bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: [bison-1_29-branch] vcg-add-const.patch


From: marc-alexandre autret
Subject: FYI: [bison-1_29-branch] vcg-add-const.patch
Date: Tue, 28 Aug 2001 00:17:29 +0000 (GMT)

Another little thing.

Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.173.2.14
diff -u -r1.173.2.14 ChangeLog
--- ChangeLog   2001/08/27 12:02:47     1.173.2.14
+++ ChangeLog   2001/08/27 21:55:12
@@ -1,5 +1,12 @@
 2001-08-27  Marc Autret  <address@hidden>
 
+       * src/vcg.h (classname_s, infoname_s, node_s): Constify the 
+       char * members.
+       Echo modification to the functions prototypes.
+       * src/vcg.c (add_classname, add_infoname): Adjust arguments.
+
+2001-08-27  Marc Autret  <address@hidden>
+
        * src/vcg.c: Include `xalloc.h'.
        (add_colorentry): New.
        (add_classname): New.
Index: src/vcg.c
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.c,v
retrieving revision 1.5.2.3
diff -u -r1.5.2.3 vcg.c
--- src/vcg.c   2001/08/27 12:02:47     1.5.2.3
+++ src/vcg.c   2001/08/27 21:55:16
@@ -427,7 +427,7 @@
 }
 
 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 @@
 }
 
 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: src/vcg.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.h,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 vcg.h
--- src/vcg.h   2001/08/27 12:02:47     1.3.2.2
+++ src/vcg.h   2001/08/27 21:55:21
@@ -89,7 +89,7 @@
 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 infoname_s
 {
   int integer;
-  char *string;
+  const char *string;
   struct infoname_s *next;
 };
 
@@ -179,13 +179,13 @@
 {
   /* 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 @@
   /* info2, info3 can be selected from the menu. The corresponding text
      labels can be shown by mouse clicks on nodes.
      Default are null strings. */
-  char *infos[3];
+  const char *infos[3];
 
   /* Node border color.
      Default is textcolor. */
@@ -1001,8 +1001,8 @@
 
 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));


-- 
Autret Marc (address@hidden)
Eleve Ingenieur en Informatique.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]