[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison misc
From: |
Paul Eggert |
Subject: |
Re: bison misc |
Date: |
Thu, 17 Mar 2005 11:25:40 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> in vcg_defaults.h this line is a 32/64bits
> dependacy.
As you mentioned, it's harmless; but it doesn't hurt to make the
code a bit clearer.
> calls to routine error(); namespace clashes risk with
> other libs. it could be printf()+exit(EXIT_FAILURE);
Let's leave that alone for now. Lots of GNU applications use this
approach and nobody has reported real namespace clashes. We can
deal with any problem when it arises.
> =================
> file parse-gram.c
> =================
> /* User initialization code. */
> #line 71 "parse-gram.y" <------------------------
I installed the following patch to fix the above glitches:
2005-03-17 Paul Eggert <address@hidden>
* src/vcg.h: Comment fix.
* src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
(G_CMAX): Change to -1 instead of INT_MAX.
* data/yacc.c (yyparse): Omit spaces before #line.
Problem reported by address@hidden
Index: src/vcg.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -p -u -r1.9 -r1.10
--- src/vcg.h 16 Dec 2004 00:09:08 -0000 1.9
+++ src/vcg.h 17 Mar 2005 19:20:15 -0000 1.10
@@ -1,6 +1,6 @@
/* VCG description handler for Bison.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -884,8 +884,8 @@ struct graph
int cmin;
/* Cmax set the maximal number of interactions for crossing reduction.
- This is helpful for speedup the layout process.
- Default is infinite. */
+ This is helpful for speeding up the layout process.
+ Default is -1, which represents infinity. */
int cmax;
/* Pmin set the minimal number of iterations that is done with the
Index: src/vcg_defaults.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg_defaults.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -p -u -r1.6 -r1.7
--- src/vcg_defaults.h 16 Dec 2004 00:09:08 -0000 1.6
+++ src/vcg_defaults.h 17 Mar 2005 19:20:15 -0000 1.7
@@ -1,6 +1,6 @@
/* VCG description handler for Bison.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -59,13 +59,13 @@
# define G_XSPACE 20
# define G_YSPACE 70
-# define G_XLSPACE G_XSPACE / 2 /* Not output */
+# define G_XLSPACE (G_XSPACE / 2) /* Not output */
# 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
@@ -105,7 +105,7 @@
# define G_BMAX 100
# define G_CMIN 0
-# define G_CMAX INT_MAX
+# define G_CMAX (-1) /* Infinity */
# define G_PMIN 0
# define G_PMAX 100
# define G_RMIN 0
@@ -119,19 +119,19 @@
# define N_TITLE NULL
# define N_LABEL NULL
-# define N_LOCX -1 /* Default unspcified */
-# define N_LOCY -1 /* Default unspcified */
+# define N_LOCX (-1) /* Default unspcified */
+# define N_LOCY (-1) /* Default unspcified */
-# define N_VERTICAL_ORDER -1 /* Default unspcified */
-# define N_HORIZONTAL_ORDER -1 /* Default unspcified */
+# define N_VERTICAL_ORDER (-1) /* Default unspcified */
+# define N_HORIZONTAL_ORDER (-1) /* Default unspcified */
-# define N_WIDTH -1 /* We assume that we can't define it
now. */
-# define N_HEIGHT -1 /* also. */
+# define N_WIDTH (-1) /* We assume that we can't define it
now. */
+# define N_HEIGHT (-1) /* also. */
# define N_SHRINK 1
# define N_STRETCH 1
-# define N_FOLDING -1 /* no explicit default value. */
+# define N_FOLDING (-1) /* no explicit default value. */
# define N_SHAPE box
# define N_TEXTMODE centered
@@ -172,9 +172,9 @@
# define E_PRIORITY 1
-# define E_ANCHOR -1
+# define E_ANCHOR (-1)
-# define E_HORIZONTAL_ORDER -1
+# define E_HORIZONTAL_ORDER (-1)
# define E_NEXT NULL
Index: data/yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -p -u -r1.82 -r1.83
--- data/yacc.c 21 Jan 2005 19:12:32 -0000 1.82
+++ data/yacc.c 17 Mar 2005 19:19:44 -0000 1.83
@@ -836,7 +836,7 @@ m4_ifdef([b4_initial_action], [
m4_pushdef([b4_at_dollar], [yylloc])dnl
m4_pushdef([b4_dollar_dollar], [yylval])dnl
/* User initialization code. */
- b4_initial_action
+b4_initial_action
m4_popdef([b4_dollar_dollar])dnl
m4_popdef([b4_at_dollar])dnl
/* Line __line__ of yacc.c. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: bison misc,
Paul Eggert <=