Imported Upstream version 20101124 upstream/20101124
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 1 Oct 2021 05:46:29 +0000 (14:46 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 1 Oct 2021 05:46:29 +0000 (14:46 +0900)
CHANGES
VERSION
defs.h
error.c
main.c
package/byacc.spec
package/debian/changelog
reader.c
symtab.c

diff --git a/CHANGES b/CHANGES
index 0e5bbb6..aa6a185 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,13 @@
+2010-11-24  Thomas Dickey  <tom@crayon>
+
+       * main.c, defs.h, symtab.c, error.c: reduce global variables
+
+       * package/debian/changelog, package/byacc.spec, VERSION: bump
+
+       * reader.c:
+       amend fix for Redhat #112617 to still call default_action_warning() for
+       empty rules (report by Bruce Cran).
+
 2010-11-22  Thomas Dickey  <tom@crayon>
 
        * output.c:
diff --git a/VERSION b/VERSION
index 9981c77..c3033a0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20101122
+20101124
diff --git a/defs.h b/defs.h
index 18350aa..613fbf8 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -1,4 +1,4 @@
-/* $Id: defs.h,v 1.28 2010/06/10 00:09:42 tom Exp $ */
+/* $Id: defs.h,v 1.29 2010/11/24 15:13:25 tom Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -250,11 +250,7 @@ extern const char *body_2[];
 extern const char *trailer[];
 
 extern char *code_file_name;
-extern char *defines_file_name;
 extern char *input_file_name;
-extern char *output_file_name;
-extern char *verbose_file_name;
-extern char *graph_file_name;
 
 extern FILE *action_file;
 extern FILE *code_file;
@@ -360,7 +356,6 @@ extern void no_space(void);
 extern void open_error(const char *filename);
 extern void over_unionized(char *u_cptr);
 extern void prec_redeclared(void);
-extern void print_pos(char *st_line, char *st_cptr);
 extern void reprec_warning(char *s);
 extern void restarted_warning(void);
 extern void retyped_warning(char *s);
@@ -386,7 +381,6 @@ extern void used_reserved(char *s);
 extern void graph(void);
 
 /* lalr.c */
-extern int hash(const char *name);
 extern void create_symbol_table(void);
 extern void free_symbol_table(void);
 extern void free_symbols(void);
diff --git a/error.c b/error.c
index 71f959b..9cdbe77 100644 (file)
--- a/error.c
+++ b/error.c
@@ -1,4 +1,4 @@
-/* $Id: error.c,v 1.7 2010/06/06 23:13:17 tom Exp $ */
+/* $Id: error.c,v 1.8 2010/11/24 15:10:20 tom Exp $ */
 
 /* routines for printing error messages  */
 
@@ -33,7 +33,7 @@ unexpected_EOF(void)
     done(1);
 }
 
-void
+static void
 print_pos(char *st_line, char *st_cptr)
 {
     char *s;
diff --git a/main.c b/main.c
index f83d832..8ad0c77 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.29 2010/06/10 00:39:13 tom Exp $ */
+/* $Id: main.c,v 1.30 2010/11/24 15:13:39 tom Exp $ */
 
 #include <signal.h>
 #include <unistd.h>            /* for _exit() */
@@ -8,7 +8,7 @@
 char dflag;
 char gflag;
 char lflag;
-char oflag;
+static char oflag;
 char rflag;
 char tflag;
 char vflag;
@@ -25,11 +25,11 @@ static char default_file_prefix[] = "y";
 static char *file_prefix = default_file_prefix;
 
 char *code_file_name;
-char *defines_file_name;
 char *input_file_name = empty_string;
-char *output_file_name = 0;
-char *verbose_file_name;
-char *graph_file_name;
+static char *defines_file_name;
+static char *graph_file_name;
+static char *output_file_name;
+static char *verbose_file_name;
 
 FILE *action_file;     /*  a temp file, used to save actions associated    */
                        /*  with rules until the parser is written          */
index 44cf75b..0c0c03e 100644 (file)
@@ -1,8 +1,8 @@
 Summary: byacc - public domain Berkeley LALR Yacc parser generator
 %define AppProgram byacc
-%define AppVersion 20101122
+%define AppVersion 20101124
 %define UseProgram yacc
-# $XTermId: byacc.spec,v 1.3 2010/11/22 13:20:54 tom Exp $
+# $XTermId: byacc.spec,v 1.4 2010/11/24 14:55:39 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: 1
index 8fe1f34..46d65c7 100644 (file)
@@ -1,3 +1,9 @@
+byacc (20101124) unstable; urgency=low
+
+  * amend fix for Red Hat #112617 to restore warning message.
+
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 22 Nov 2010 08:21:23 -0500
+
 byacc (20101122) unstable; urgency=low
 
   * fix for generated header to avoid symbol conflict
index b0ac58b..8b084cc 100644 (file)
--- a/reader.c
+++ b/reader.c
@@ -1,4 +1,4 @@
-/* $Id: reader.c,v 1.27 2010/11/22 19:19:17 tom Exp $ */
+/* $Id: reader.c,v 1.28 2010/11/24 14:49:38 tom Exp $ */
 
 #include "defs.h"
 
@@ -1404,6 +1404,10 @@ end_rule(void)
            if (pitem[i + 1] == 0 || pitem[i + 1]->tag != plhs[nrules]->tag)
                default_action_warning();
        }
+       else
+       {
+           default_action_warning();
+       }
     }
 
     last_was_action = 0;
index acbc065..1327eaf 100644 (file)
--- a/symtab.c
+++ b/symtab.c
@@ -1,4 +1,4 @@
-/* $Id: symtab.c,v 1.8 2010/06/09 08:58:29 tom Exp $ */
+/* $Id: symtab.c,v 1.9 2010/11/24 15:12:29 tom Exp $ */
 
 #include "defs.h"
 
@@ -11,7 +11,7 @@ static bucket **symbol_table = 0;
 bucket *first_symbol;
 bucket *last_symbol;
 
-int
+static int
 hash(const char *name)
 {
     const char *s;