bison-patches
[Top][All Lists]
Advanced

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

patches to remove K&R vestiges in Bison


From: Paul Eggert
Subject: patches to remove K&R vestiges in Bison
Date: Sun, 20 Oct 2002 22:33:04 -0700 (PDT)

Since we don't support building Bison with K&R C any more, I installed
the following patches to remove vestigial code.

2002-10-20  Paul Eggert  <address@hidden>

        Remove K&R vestiges.
        * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
        * src/complain.c (VA_START): Remove.  Assume prototypes.
        (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
        (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
        fatal): Assume prototypes.
        * src/complain.h: Assume prototypes.
        * src/system.h (PARAMS): Remove.
        Include <limits.h> unconditionally, since it's guaranteeed even
        for a freestanding C89 compiler.
        (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
        * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.

Index: configure.ac
===================================================================
RCS file: /cvsroot/bison/bison/configure.ac,v
retrieving revision 1.15
diff -p -u -r1.15 configure.ac
--- configure.ac        20 Oct 2002 06:29:09 -0000      1.15
+++ configure.ac        21 Oct 2002 05:19:23 -0000
@@ -73,9 +73,7 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([ctype.h locale.h memory.h stdlib.h string.h unistd.h])
 
 # Checks for compiler characteristics.
-AC_C_CONST
 AC_C_INLINE
-AM_C_PROTOTYPES
 
 # Checks for library functions.
 AC_FUNC_ALLOCA
Index: src/LR0.h
===================================================================
RCS file: /cvsroot/bison/bison/src/LR0.h,v
retrieving revision 1.9
diff -p -u -r1.9 LR0.h
--- src/LR0.h   30 Jun 2002 17:28:44 -0000      1.9
+++ src/LR0.h   21 Oct 2002 05:19:23 -0000
@@ -23,6 +23,6 @@
 
 # include "state.h"
 
-void generate_states PARAMS ((void));
+void generate_states (void);
 
 #endif /* !LR0_H_ */
Index: src/assoc.h
===================================================================
RCS file: /cvsroot/bison/bison/src/assoc.h,v
retrieving revision 1.1
diff -p -u -r1.1 assoc.h
--- src/assoc.h 16 Jul 2002 14:04:06 -0000      1.1
+++ src/assoc.h 21 Oct 2002 05:19:23 -0000
@@ -30,6 +30,6 @@ typedef enum
   non_assoc
 } assoc_t;
 
-const char *assoc_to_string PARAMS ((assoc_t assoc));
+const char *assoc_to_string (assoc_t assoc);
 
 #endif /* !ASSOC_H_ */
Index: src/closure.h
===================================================================
RCS file: /cvsroot/bison/bison/src/closure.h,v
retrieving revision 1.9
diff -p -u -r1.9 closure.h
--- src/closure.h       8 Apr 2002 11:45:59 -0000       1.9
+++ src/closure.h       21 Oct 2002 05:19:23 -0000
@@ -25,7 +25,7 @@
    data so that closure can be called.  n is the number of elements to
    allocate for itemset.  */
 
-void new_closure PARAMS ((int n));
+void new_closure (int n);
 
 
 /* Given the kernel (aka core) of a state (a vector of item numbers
@@ -42,12 +42,12 @@ void new_closure PARAMS ((int n));
    significant).  CLOSURE places there the indices of all items which
    represent units of input that could arrive next.  */
 
-void closure PARAMS ((item_number_t *items, int n));
+void closure (item_number_t *items, int n);
 
 
 /* Frees ITEMSET, RULESET and internal data.  */
 
-void free_closure PARAMS ((void));
+void free_closure (void);
 
 extern item_number_t *itemset;
 extern int nritemset;
Index: src/complain.c
===================================================================
RCS file: /cvsroot/bison/bison/src/complain.c,v
retrieving revision 1.13
diff -p -u -r1.13 complain.c
--- src/complain.c      12 Aug 2002 14:36:57 -0000      1.13
+++ src/complain.c      21 Oct 2002 05:19:23 -0000
@@ -21,17 +21,9 @@
 
 #include "system.h"
 
-#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
-# ifdef __STDC__
-#  include <stdarg.h>
-#  define VA_START(args, lastarg) va_start(args, lastarg)
-# else
-#  include <varargs.h>
-#  define VA_START(args, lastarg) va_start(args)
-# endif
-#else
-# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
-# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
+#include <stdarg.h>
+#if ! (HAVE_VPRINTF || defined vfprintf)
+# define vfprintf(stream, message, args) _doprnt (message, args, stream)
 #endif
 
 #if STDC_HEADERS || _LIBC
@@ -74,12 +66,11 @@ extern char *program_name;
 "this configure-time declaration test was not run"
 #  endif
 #  if !HAVE_DECL_STRERROR && !defined strerror
-char *strerror PARAMS ((int));
+char *strerror (int);
 #  endif
 # else
 static char *
-private_strerror (errnum)
-     int errnum;
+private_strerror (int errnum)
 {
   extern char *sys_errlist[];
   extern int sys_nerr;
@@ -104,31 +95,18 @@ unsigned int complain_message_count;
 `--------------------------------*/
 
 void
-#if defined VA_START && defined __STDC__
 warn_at (location_t location, const char *message, ...)
-#else
-warn_at (location, message, va_alist)
-  location_t location
-  char *message;
-  va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   LOCATION_PRINT (stderr, location);
   fputs (": ", stderr);
   fputs (_("warning: "), stderr);
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
 
   ++warn_message_count;
   putc ('\n', stderr);
@@ -136,28 +114,16 @@ warn_at (location, message, va_alist)
 }
 
 void
-#if defined VA_START && defined __STDC__
 warn (const char *message, ...)
-#else
-warn (message, va_alist)
-  char *message;
-  va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   fprintf (stderr, "%s: %s", infile ? infile : program_name, _("warning: "));
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
 
   ++warn_message_count;
   putc ('\n', stderr);
@@ -169,30 +135,17 @@ warn (message, va_alist)
 `-----------------------------------------------------------*/
 
 void
-#if defined VA_START && defined __STDC__
 complain_at (location_t location, const char *message, ...)
-#else
-complain_at (location, message, va_alist)
-  location_t location;
-  char *message;
-  va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   LOCATION_PRINT (stderr, location);
   fputs (": ", stderr);
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
 
   ++complain_message_count;
   putc ('\n', stderr);
@@ -200,28 +153,16 @@ complain_at (location, message, va_alist
 }
 
 void
-#if defined VA_START && defined __STDC__
 complain (const char *message, ...)
-#else
-complain (message, va_alist)
-     char *message;
-     va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   fprintf (stderr, "%s: ", infile ? infile : program_name);
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
 
   ++complain_message_count;
   putc ('\n', stderr);
@@ -233,61 +174,36 @@ complain (message, va_alist)
 `-------------------------------------------------*/
 
 void
-#if defined VA_START && defined __STDC__
 fatal_at (location_t location, const char *message, ...)
-#else
-fatal_at (location, message, va_alist)
-  location_t location;
-  char *message;
-  va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   LOCATION_PRINT (stderr, location);
   fputs (": ", stderr);
   fputs (_("fatal error: "), stderr);
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
   putc ('\n', stderr);
   fflush (stderr);
   exit (1);
 }
 
 void
-#if defined VA_START && defined __STDC__
 fatal (const char *message, ...)
-#else
-fatal (message, va_alist)
-     char *message;
-     va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   fflush (stdout);
   fprintf (stderr, "%s: ", infile ? infile : program_name);
 
   fputs (_("fatal error: "), stderr);
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   vfprintf (stderr, message, args);
   va_end (args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
   putc ('\n', stderr);
   fflush (stderr);
   exit (1);
Index: src/complain.h
===================================================================
RCS file: /cvsroot/bison/bison/src/complain.h,v
retrieving revision 1.9
diff -p -u -r1.9 complain.h
--- src/complain.h      30 Jul 2002 11:09:59 -0000      1.9
+++ src/complain.h      21 Oct 2002 05:19:23 -0000
@@ -25,8 +25,6 @@
 extern "C" {
 # endif
 
-# ifdef __STDC__
-
 /* Informative messages, but we proceed. */
 
 void warn (const char *format, ...)
@@ -50,15 +48,6 @@ void fatal (const char *format, ...)
 
 void fatal_at (location_t location, const char *format, ...)
   __attribute__ ((__format__ (__printf__, 2, 3)));
-
-# else
-void warn ();
-void warn_at ();
-void complain ();
-void complain_at ();
-void fatal ();
-void fatal_at ();
-# endif
 
 /* Position in the current input file. */
 extern char *infile;
Index: src/conflicts.h
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.h,v
retrieving revision 1.11
diff -p -u -r1.11 conflicts.h
--- src/conflicts.h     28 Jun 2002 02:26:43 -0000      1.11
+++ src/conflicts.h     21 Oct 2002 05:19:23 -0000
@@ -22,11 +22,11 @@
 # define CONFLICTS_H_
 # include "state.h"
 
-void conflicts_solve PARAMS ((void));
-void conflicts_print PARAMS ((void));
-int conflicts_total_count PARAMS ((void));
-void conflicts_output PARAMS ((FILE *out));
-void conflicts_free PARAMS ((void));
+void conflicts_solve (void);
+void conflicts_print (void);
+int conflicts_total_count (void);
+void conflicts_output (FILE *out);
+void conflicts_free (void);
 
 /* Were there conflicts? */
 extern int expected_conflicts;
Index: src/derives.h
===================================================================
RCS file: /cvsroot/bison/bison/src/derives.h,v
retrieving revision 1.6
diff -p -u -r1.6 derives.h
--- src/derives.h       1 Aug 2002 18:13:29 -0000       1.6
+++ src/derives.h       21 Oct 2002 05:19:23 -0000
@@ -27,7 +27,7 @@ extern rule_t ***derives;
 
 /* Compute DERIVES.  */
 
-void derives_compute PARAMS((void));
-void derives_free PARAMS((void));
+void derives_compute (void);
+void derives_free (void);
 
 #endif /* !DERIVES_H_ */
Index: src/files.c
===================================================================
RCS file: /cvsroot/bison/bison/src/files.c,v
retrieving revision 1.76
diff -p -u -r1.76 files.c
--- src/files.c 13 Sep 2002 16:12:21 -0000      1.76
+++ src/files.c 21 Oct 2002 05:19:23 -0000
@@ -28,7 +28,7 @@
 #include "complain.h"
 
 /* From basename.c.  Almost a lie, as it returns a char *. */
-const char *base_name PARAMS ((char const *name));
+const char *base_name (char const *name);
 
 FILE *finput = NULL;
 
Index: src/files.h
===================================================================
RCS file: /cvsroot/bison/bison/src/files.h,v
retrieving revision 1.33
diff -p -u -r1.33 files.h
--- src/files.h 13 Sep 2002 16:12:21 -0000      1.33
+++ src/files.h 21 Oct 2002 05:19:24 -0000
@@ -52,10 +52,10 @@ extern struct obstack post_prologue_obst
 
 extern char *infile;
 
-void compute_output_file_names PARAMS((void));
+void compute_output_file_names (void);
 
-FILE *xfopen PARAMS ((const char *name, const char *mode));
-int xfclose PARAMS ((FILE *ptr));
+FILE *xfopen (const char *name, const char *mode);
+int xfclose (FILE *ptr);
 
 /* Is SUFFIX ending STRING?  */
 int strsuffix (const char* string, const char* suffix);
Index: src/getargs.h
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.h,v
retrieving revision 1.20
diff -p -u -r1.20 getargs.h
--- src/getargs.h       17 Oct 2002 17:47:33 -0000      1.20
+++ src/getargs.h       21 Oct 2002 05:19:24 -0000
@@ -64,6 +64,6 @@ enum report_e
   };
 extern int report_flag;
 
-void getargs PARAMS ((int argc, char *argv[]));
+void getargs (int argc, char *argv[]);
 
 #endif /* !GETARGS_H_ */
Index: src/gram.h
===================================================================
RCS file: /cvsroot/bison/bison/src/gram.h,v
retrieving revision 1.48
diff -p -u -r1.48 gram.h
--- src/gram.h  5 Oct 2002 05:46:08 -0000       1.48
+++ src/gram.h  21 Oct 2002 05:19:24 -0000
@@ -176,31 +176,31 @@ typedef struct rule_s
 extern struct rule_s *rules;
 
 /* A function that selects a rule.  */
-typedef bool (*rule_filter_t) PARAMS ((rule_t *r));
+typedef bool (*rule_filter_t) (rule_t *r);
 
 /* Return true IFF the rule has a `number' smaller than NRULES.  */
-bool rule_useful_p PARAMS ((rule_t *r));
+bool rule_useful_p (rule_t *r);
 
 /* Return true IFF the rule has a `number' higher than NRULES.  */
-bool rule_useless_p PARAMS ((rule_t *r));
+bool rule_useless_p (rule_t *r);
 
 /* Return true IFF the rule is not flagged as useful *and* is useful.
    In other words, it was discarded because of conflicts.  */
-bool rule_never_reduced_p PARAMS ((rule_t *r));
+bool rule_never_reduced_p (rule_t *r);
 
 /* Print this RULE's number and lhs on OUT.  If a PREVIOUS_LHS was
    already displayed (by a previous call for another rule), avoid
    useless repetitions.  */
-void rule_lhs_print PARAMS ((rule_t *rule, symbol_t *previous_lhs, FILE *out));
+void rule_lhs_print (rule_t *rule, symbol_t *previous_lhs, FILE *out);
 
 /* Return the length of the RHS.  */
-int rule_rhs_length PARAMS ((rule_t *rule));
+int rule_rhs_length (rule_t *rule);
 
 /* Print this RULE's RHS on OUT.  */
-void rule_rhs_print PARAMS ((rule_t *rule, FILE *out));
+void rule_rhs_print (rule_t *rule, FILE *out);
 
 /* Print this RULE on OUT.  */
-void rule_print PARAMS ((rule_t *rule, FILE *out));
+void rule_print (rule_t *rule, FILE *out);
 
 
 
@@ -228,29 +228,29 @@ extern int glr_parser;
 extern int pure_parser;
 
 /* Dump RITEM for traces. */
-void ritem_print PARAMS ((FILE *out));
+void ritem_print (FILE *out);
 
 /* Return the size of the longest rule RHS.  */
-size_t ritem_longest_rhs PARAMS ((void));
+size_t ritem_longest_rhs (void);
 
 /* Print the grammar's rules numbers from BEGIN (inclusive) to END
    (exclusive) on OUT under TITLE.  */
-void grammar_rules_partial_print PARAMS ((FILE *out, const char *title,
-                                         rule_filter_t filter));
+void grammar_rules_partial_print (FILE *out, const char *title,
+                                 rule_filter_t filter);
 
 /* Print the grammar's rules on OUT.  */
-void grammar_rules_print PARAMS ((FILE *out));
+void grammar_rules_print (FILE *out);
 
 /* Dump the grammar. */
-void grammar_dump PARAMS ((FILE *out, const char *title));
+void grammar_dump (FILE *out, const char *title);
 
 /* Report on STDERR the rules that are not flagged USEFUL, using the
    MESSAGE (which can be `useless rule' when invoked after grammar
    reduction, or `never reduced' after conflicts were taken into
    account).  */
-void grammar_rules_never_reduced_report PARAMS ((const char *message));
+void grammar_rules_never_reduced_report (const char *message);
 
 /* Free the packed grammar. */
-void grammar_free PARAMS ((void));
+void grammar_free (void);
 
 #endif /* !GRAM_H_ */
Index: src/lalr.h
===================================================================
RCS file: /cvsroot/bison/bison/src/lalr.h,v
retrieving revision 1.24
diff -p -u -r1.24 lalr.h
--- src/lalr.h  5 Oct 2002 05:46:42 -0000       1.24
+++ src/lalr.h  21 Oct 2002 05:19:24 -0000
@@ -34,12 +34,12 @@
    which rules need lookahead in each state, and which lookahead
    tokens they accept.  */
 
-void lalr PARAMS ((void));
+void lalr (void);
 
 /* Release the information related to lookaheads.  Can be performed
    once the action tables are computed.  */
 
-void lalr_free PARAMS ((void));
+void lalr_free (void);
 
 
 /* lalr() builds these data structures. */
Index: src/muscle_tab.h
===================================================================
RCS file: /cvsroot/bison/bison/src/muscle_tab.h,v
retrieving revision 1.7
diff -p -u -r1.7 muscle_tab.h
--- src/muscle_tab.h    19 Oct 2002 14:38:06 -0000      1.7
+++ src/muscle_tab.h    21 Oct 2002 05:19:24 -0000
@@ -27,10 +27,10 @@ typedef struct muscle_entry_s
   char *value;
 } muscle_entry_t;
 
-void muscle_init PARAMS ((void));
-void muscle_insert PARAMS ((const char *key, char *value));
-char *muscle_find PARAMS ((const char *key));
-void muscle_free PARAMS ((void));
+void muscle_init (void);
+void muscle_insert (const char *key, char *value);
+char *muscle_find (const char *key);
+void muscle_free (void);
 
 
 /* An obstack dedicated to receive muscle keys and values.  */
@@ -68,17 +68,16 @@ extern struct obstack muscle_obstack;
    previous value.  Uses MUSCLE_OBSTACK.  De-allocates the previously
    associated value.  VALUE and SEPARATOR are copied.  */
 
-void muscle_grow PARAMS ((const char *key,
-                         const char *value, const char *separator));
+void muscle_grow (const char *key, const char *value, const char *separator);
 
 /* MUSCLE is an M4 list of pairs.  Create or extend it with the pair
    (A1, A2).  Note that because the muscle values are output *double*
    quoted, one needs to strip the first level of quotes to reach the
    list itself.  */
 
-void muscle_pair_list_grow PARAMS ((const char *muscle,
-                                   const char *a1, const char *a2));
+void muscle_pair_list_grow (const char *muscle,
+                           const char *a1, const char *a2);
 
-void muscles_m4_output PARAMS ((FILE *out));
+void muscles_m4_output (FILE *out);
 
 #endif /* not MUSCLE_TAB_H_ */
Index: src/nullable.h
===================================================================
RCS file: /cvsroot/bison/bison/src/nullable.h,v
retrieving revision 1.3
diff -p -u -r1.3 nullable.h
--- src/nullable.h      1 Aug 2002 18:13:29 -0000       1.3
+++ src/nullable.h      21 Oct 2002 05:19:24 -0000
@@ -26,8 +26,8 @@
 extern bool *nullable;
 
 /* Set up NULLABLE. */
-extern void nullable_compute PARAMS((void));
+extern void nullable_compute (void);
 
 /* Free NULLABLE. */
-extern void nullable_free PARAMS((void));
+extern void nullable_free (void);
 #endif /* !NULLABLE_H_ */
Index: src/output.h
===================================================================
RCS file: /cvsroot/bison/bison/src/output.h,v
retrieving revision 1.11
diff -p -u -r1.11 output.h
--- src/output.h        31 Jul 2002 21:52:00 -0000      1.11
+++ src/output.h        21 Oct 2002 05:19:24 -0000
@@ -24,6 +24,6 @@
 extern int error_verbose;
 
 /* Output the parsing tables and the parser code to FTABLE.  */
-void output PARAMS ((void));
+void output (void);
 
 #endif /* !OUTPUT_H_ */
Index: src/print.h
===================================================================
RCS file: /cvsroot/bison/bison/src/print.h,v
retrieving revision 1.2
diff -p -u -r1.2 print.h
--- src/print.h 7 Nov 2000 16:28:47 -0000       1.2
+++ src/print.h 21 Oct 2002 05:19:24 -0000
@@ -21,6 +21,6 @@
 #ifndef PRINT_H_
 # define PRINT_H_
 
-void print_results PARAMS ((void));
+void print_results (void);
 
 #endif /* !PRINT_H_ */
Index: src/print_graph.h
===================================================================
RCS file: /cvsroot/bison/bison/src/print_graph.h,v
retrieving revision 1.2
diff -p -u -r1.2 print_graph.h
--- src/print_graph.h   10 Aug 2001 10:44:44 -0000      1.2
+++ src/print_graph.h   21 Oct 2002 05:19:24 -0000
@@ -21,6 +21,6 @@
 #ifndef PRINT_GRAPH_H_
 # define PRINT_GRAPH_H_
 
-void print_graph PARAMS ((void));
+void print_graph (void);
 
 #endif /* !PRINT_GRAPH_H_ */
Index: src/reader.h
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.h,v
retrieving revision 1.27
diff -p -u -r1.27 reader.h
--- src/reader.h        26 Jul 2002 06:25:35 -0000      1.27
+++ src/reader.h        21 Oct 2002 05:19:24 -0000
@@ -40,9 +40,9 @@ typedef struct gram_control_s
 /* From the scanner.  */
 extern FILE *gram_in;
 extern int gram__flex_debug;
-void scanner_last_string_free PARAMS ((void));
-void scanner_initialize PARAMS ((void));
-void scanner_free PARAMS ((void));
+void scanner_last_string_free (void);
+void scanner_initialize (void);
+void scanner_free (void);
 
 # define YY_DECL \
   int gram_lex (yystype *yylval, location_t *yylloc, \
@@ -68,27 +68,22 @@ extern braced_code_t current_braced_code
 
 
 /* From reader.c. */
-void grammar_start_symbol_set PARAMS ((symbol_t *s, location_t l));
-void prologue_augment PARAMS ((const char *prologue, location_t location));
-void epilogue_set PARAMS ((const char *epilogue, location_t location));
-void grammar_symbol_append PARAMS ((symbol_t *s, location_t l));
-void grammar_rule_begin PARAMS ((symbol_t *lhs, location_t l));
-void grammar_rule_end PARAMS ((location_t l));
-void grammar_midrule_action PARAMS ((void));
-void grammar_current_rule_prec_set PARAMS ((symbol_t *precsym,
-                                           location_t l));
-void grammar_current_rule_dprec_set PARAMS ((int dprec,
-                                           location_t l));
-void grammar_current_rule_merge_set PARAMS ((const char* name,
-                                           location_t l));
-
-void grammar_current_rule_symbol_append PARAMS ((symbol_t *symbol,
-                                                location_t l));
-void grammar_current_rule_action_append PARAMS ((const char *action,
-                                                location_t l));
+void grammar_start_symbol_set (symbol_t *s, location_t l);
+void prologue_augment (const char *prologue, location_t location);
+void epilogue_set (const char *epilogue, location_t location);
+void grammar_symbol_append (symbol_t *s, location_t l);
+void grammar_rule_begin (symbol_t *lhs, location_t l);
+void grammar_rule_end (location_t l);
+void grammar_midrule_action (void);
+void grammar_current_rule_prec_set (symbol_t *precsym, location_t l);
+void grammar_current_rule_dprec_set (int dprec, location_t l);
+void grammar_current_rule_merge_set (const char* name, location_t l);
+
+void grammar_current_rule_symbol_append (symbol_t *symbol, location_t l);
+void grammar_current_rule_action_append (const char *action, location_t l);
 extern symbol_list_t *current_rule;
-void reader PARAMS ((void));
-void free_merger_functions PARAMS ((void));
+void reader (void);
+void free_merger_functions (void);
 
 extern merger_list *merge_functions;
 
Index: src/reduce.h
===================================================================
RCS file: /cvsroot/bison/bison/src/reduce.h,v
retrieving revision 1.6
diff -p -u -r1.6 reduce.h
--- src/reduce.h        30 Jun 2002 17:31:19 -0000      1.6
+++ src/reduce.h        21 Oct 2002 05:19:24 -0000
@@ -21,9 +21,9 @@
 #ifndef REDUCE_H_
 # define REDUCE_H_
 
-void reduce_grammar PARAMS ((void));
-void reduce_output PARAMS ((FILE *out));
-void reduce_free PARAMS ((void));
+void reduce_grammar (void);
+void reduce_output (FILE *out);
+void reduce_free (void);
 
 extern symbol_number_t nuseless_nonterminals;
 extern rule_number_t nuseless_productions;
Index: src/relation.h
===================================================================
RCS file: /cvsroot/bison/bison/src/relation.h,v
retrieving revision 1.1
diff -p -u -r1.1 relation.h
--- src/relation.h      30 Jun 2002 17:31:51 -0000      1.1
+++ src/relation.h      21 Oct 2002 05:19:24 -0000
@@ -33,18 +33,16 @@ typedef relation_nodes_t *relation_t;
 
 
 /* Report a RELATION that has SIZE vertices.  */
-void relation_print PARAMS ((relation_t relation, size_t size,
-                            FILE *out));
+void relation_print (relation_t relatio, size_t size, FILE *out);
 
 /* Compute the transitive closure of the FUNCTION on the RELATION with
    SIZE vertices.
 
    If RELATION (NODE-1, NODE-2) then on exit FUNCTION[NODE-1] was
    extended (unioned) with FUNCTION[NODE-2].  */
-void relation_digraph PARAMS ((relation_t relation, size_t size,
-                              bitsetv *function));
+void relation_digraph (relation_t relation, size_t size, bitsetv *function);
 
 /* Destructively transpose *R_ARG, of size N.  */
-void relation_transpose PARAMS ((relation_t *R_arg, int n));
+void relation_transpose (relation_t *R_arg, int n);
 
 #endif /* ! RELATION_H_ */
Index: src/scan-action.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-action.l,v
retrieving revision 1.1
diff -p -u -r1.1 scan-action.l
--- src/scan-action.l   11 Jun 2002 20:16:05 -0000      1.1
+++ src/scan-action.l   21 Oct 2002 05:19:24 -0000
@@ -24,7 +24,7 @@
 %{
 #include "system.h"
 #include "files.h"
-int skel_lex PARAMS ((void));
+int skel_lex (void);
 static int yylineno = 1;
 %}
 
Index: src/scan-gram.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-gram.l,v
retrieving revision 1.28
diff -p -u -r1.28 scan-gram.l
--- src/scan-gram.l     19 Oct 2002 14:38:06 -0000      1.28
+++ src/scan-gram.l     21 Oct 2002 05:19:25 -0000
@@ -87,10 +87,10 @@ static int percent_percent_count = 0;
    Outside of well-formed rules, RULE_LENGTH has an undefined value.  */
 static int rule_length;
 
-static void handle_dollar PARAMS ((braced_code_t code_kind,
-                                  char *cp, location_t location));
-static void handle_at PARAMS ((braced_code_t code_kind,
-                              char *cp, location_t location));
+static void handle_dollar (braced_code_t code_kind,
+                          char *cp, location_t location);
+static void handle_at (braced_code_t code_kind,
+                      char *cp, location_t location);
 
 %}
 %x SC_COMMENT
Index: src/scan-skel.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-skel.l,v
retrieving revision 1.14
diff -p -u -r1.14 scan-skel.l
--- src/scan-skel.l     20 Oct 2002 06:32:04 -0000      1.14
+++ src/scan-skel.l     21 Oct 2002 05:19:25 -0000
@@ -26,7 +26,7 @@
 #include "error.h"
 #include "getargs.h"
 #include "files.h"
-int skel_lex PARAMS ((void));
+int skel_lex (void);
 static int yylineno = 1;
 static char *yyoutname = NULL;
 %}
Index: src/state.h
===================================================================
RCS file: /cvsroot/bison/bison/src/state.h,v
retrieving revision 1.41
diff -p -u -r1.41 state.h
--- src/state.h 1 Aug 2002 18:14:30 -0000       1.41
+++ src/state.h 21 Oct 2002 05:19:25 -0000
@@ -154,8 +154,7 @@ typedef struct transtion_s
 /* Return the state such these TRANSITIONS contain a shift/goto to it on
    SYMBOL.  Aborts if none found.  */
 struct state_s;
-struct state_s *transitions_to PARAMS ((transitions_t *state,
-                                       symbol_number_t s));
+struct state_s *transitions_to (transitions_t *state, symbol_number_t s);
 
 
 /*-------.
@@ -168,7 +167,7 @@ typedef struct errs_s
   symbol_t *symbols[1];
 } errs_t;
 
-errs_t *errs_new PARAMS ((int num, symbol_t **tokens));
+errs_t *errs_new (int num, symbol_t **tokens);
 
 
 /*-------------.
@@ -213,42 +212,38 @@ extern state_number_t nstates;
 extern state_t *final_state;
 
 /* Create a new state with ACCESSING_SYMBOL for those items.  */
-state_t *state_new PARAMS ((symbol_number_t accessing_symbol,
-                           size_t core_size, item_number_t *core));
+state_t *state_new (symbol_number_t accessing_symbol,
+                   size_t core_size, item_number_t *core);
 
 /* Set the transitions of STATE.  */
-void state_transitions_set PARAMS ((state_t *state,
-                                   int num, state_t **transitions));
+void state_transitions_set (state_t *state, int num, state_t **transitions);
 
 /* Set the reductions of STATE.  */
-void state_reductions_set PARAMS ((state_t *state,
-                                  int num, rule_t **reductions));
+void state_reductions_set (state_t *state, int num, rule_t **reductions);
 
-int state_reduction_find PARAMS ((state_t *state, rule_t *rule));
+int state_reduction_find (state_t *state, rule_t *rule);
 
 /* Set the errs of STATE.  */
-void state_errs_set PARAMS ((state_t *state,
-                            int num, symbol_t **errs));
+void state_errs_set (state_t *state, int num, symbol_t **errs);
 
 /* Print on OUT all the lookaheads such that this STATE wants to
    reduce this RULE.  */
-void state_rule_lookaheads_print PARAMS ((state_t *state, rule_t *rule,
-                                         FILE *out));
+void state_rule_lookaheads_print (state_t *state, rule_t *rule, FILE *out);
 
 /* Create/destroy the states hash table.  */
-void state_hash_new PARAMS ((void));
-void state_hash_free PARAMS ((void));
+void state_hash_new (void);
+void state_hash_free (void);
 
 /* Find the state associated to the CORE, and return it.  If it does
    not exist yet, return NULL.  */
-state_t *state_hash_lookup PARAMS ((size_t core_size, item_number_t *core));
+state_t *state_hash_lookup (size_t core_size, item_number_t *core);
 
 /* Insert STATE in the state hash table.  */
-void state_hash_insert PARAMS ((state_t *state));
+void state_hash_insert (state_t *state);
 
 /* All the states, indexed by the state number.  */
 extern state_t **states;
 
 /* Free all the states.  */
-void states_free PARAMS ((void));
+void states_free (void);
 #endif /* !STATE_H_ */
Index: src/symlist.h
===================================================================
RCS file: /cvsroot/bison/bison/src/symlist.h,v
retrieving revision 1.4
diff -p -u -r1.4 symlist.h
--- src/symlist.h       30 Jun 2002 17:30:29 -0000      1.4
+++ src/symlist.h       21 Oct 2002 05:19:25 -0000
@@ -41,22 +41,22 @@ typedef struct symbol_list_s
 
 
 /* Create a list containing SYMBOL at LOCATION.  */
-symbol_list_t *symbol_list_new PARAMS ((symbol_t *sym, location_t location));
+symbol_list_t *symbol_list_new (symbol_t *sym, location_t location);
 
 /* Prepend SYMBOL at LOCATION to the LIST.  */
-symbol_list_t * symbol_list_prepend PARAMS ((symbol_list_t *list,
-                                            symbol_t *symbol,
-                                            location_t location));
+symbol_list_t * symbol_list_prepend (symbol_list_t *list,
+                                    symbol_t *symbol,
+                                    location_t location);
 
 /* Free the LIST, but not the symbols it contains.  */
-void symbol_list_free PARAMS ((symbol_list_t *list));
+void symbol_list_free (symbol_list_t *list);
 
 /* Return its length. */
-unsigned int symbol_list_length PARAMS ((symbol_list_t *list));
+unsigned int symbol_list_length (symbol_list_t *list);
 
 /* Get the data type (alternative in the union) of the value for
    symbol N in rule RULE.  */
-char *symbol_list_n_type_name_get PARAMS ((symbol_list_t *rule,
-                                          location_t location, int n));
+char *symbol_list_n_type_name_get (symbol_list_t *rule,
+                                  location_t location, int n);
 
 #endif /* !SYMLIST_H_ */
Index: src/symtab.h
===================================================================
RCS file: /cvsroot/bison/bison/src/symtab.h,v
retrieving revision 1.45
diff -p -u -r1.45 symtab.h
--- src/symtab.h        5 Oct 2002 05:47:14 -0000       1.45
+++ src/symtab.h        21 Oct 2002 05:19:25 -0000
@@ -84,43 +84,41 @@ struct symbol_s
 
 
 /* Fetch (or create) the symbol associated to KEY.  */
-symbol_t *symbol_get PARAMS ((const char *key, location_t location));
+symbol_t *symbol_get (const char *key, location_t location);
 
 /* Generate a dummy nonterminal, whose name cannot conflict with the
    user's names.  */
-symbol_t *dummy_symbol_get PARAMS ((location_t location));
+symbol_t *dummy_symbol_get (location_t location);
 
 /* Declare the new SYMBOL.  Make it an alias of SYMVAL.  */
-void symbol_make_alias PARAMS ((symbol_t *symbol, symbol_t *symval,
-                               location_t location));
+void symbol_make_alias (symbol_t *symbol, symbol_t *symval,
+                       location_t location);
 
 /* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as
    TYPE_NAME.  */
-void symbol_type_set PARAMS ((symbol_t *symbol,
-                             char *type_name, location_t location));
+void symbol_type_set (symbol_t *symbol,
+                     char *type_name, location_t location);
 
 /* Set the DESTRUCTOR associated to SYMBOL.  */
-void symbol_destructor_set PARAMS ((symbol_t *symbol,
-                                   char *destructor, location_t location));
+void symbol_destructor_set (symbol_t *symbol,
+                           char *destructor, location_t location);
 
 /* Set the PRINTER associated to SYMBOL.  */
-void symbol_printer_set PARAMS ((symbol_t *symbol,
-                                char *printer, location_t location));
+void symbol_printer_set (symbol_t *symbol,
+                        char *printer, location_t location);
 
 /* Set the PRECEDENCE associated to SYMBOL.  Ensures that SYMBOL is a
    terminal.  Does nothing if invoked with UNDEF_ASSOC as ASSOC.  */
-void symbol_precedence_set PARAMS ((symbol_t *symbol,
-                                   int prec, assoc_t assoc,
-                                   location_t location));
+void symbol_precedence_set (symbol_t *symbol,
+                           int prec, assoc_t assoc, location_t location);
 
 /* Set the CLASS associated to SYMBOL.  */
-void symbol_class_set PARAMS ((symbol_t *symbol,
-                              symbol_class class, location_t location));
+void symbol_class_set (symbol_t *symbol,
+                      symbol_class class, location_t location);
 
 /* Set the USER_TOKEN_NUMBER associated to SYMBOL.  */
-void symbol_user_token_number_set PARAMS ((symbol_t *symbol,
-                                          int user_number,
-                                          location_t location));
+void symbol_user_token_number_set (symbol_t *symbol,
+                                  int user_number, location_t location);
 
 
 /* Distinguished symbols.  AXIOM is the real start symbol, that used
@@ -140,24 +138,24 @@ extern location_t startsymbol_location;
 
 
 /* Create the symbol table.  */
-void symbols_new PARAMS ((void));
+void symbols_new (void);
 
 /* A function to apply to each symbol. */
-typedef bool (*symbol_processor) PARAMS ((symbol_t *));
+typedef bool (*symbol_processor) (symbol_t *);
 
 /* Apply PROCESSOR to all the symbols.  PROCESSOR must return TRUE: on
    FALSE, the processing stops.  */
-void symbols_do PARAMS ((symbol_processor processor, void *processor_data));
+void symbols_do (symbol_processor processor, void *processor_data);
 
 /* Free all the memory allocated for symbols.  */
-void symbols_free PARAMS ((void));
+void symbols_free (void);
 
 /* Check that all the symbols are defined.  Report any undefined
    symbols and consider them nonterminals.  */
-void symbols_check_defined PARAMS ((void));
+void symbols_check_defined (void);
 
 /* Perform various sanity checks, assign symbol numbers, and set up
    TOKEN_TRANSLATIONS.  */
-void symbols_pack PARAMS ((void));
+void symbols_pack (void);
 
 #endif /* !SYMTAB_H_ */
Index: src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.49
diff -p -u -r1.49 system.h
--- src/system.h        12 Aug 2002 14:54:27 -0000      1.49
+++ src/system.h        21 Oct 2002 05:19:25 -0000
@@ -79,28 +79,12 @@ char *alloca ();
 extern int errno;
 #endif
 
-#ifndef PARAMS
-# if defined PROTOTYPES || defined __STDC__
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifndef SHRT_MIN
-# define SHRT_MIN (-32768)
-#endif
-#ifndef SHRT_MAX
-# define SHRT_MAX 32767
-#endif
+#include <limits.h>
 
 # include "xalloc.h"
 
 /* From xstrndup.c.  */
-char *xstrndup PARAMS ((const char *s, size_t n));
+char *xstrndup (const char *s, size_t n);
 
 
 /*----------------.
@@ -116,27 +100,27 @@ extern int time_report;
 `---------------------*/
 
 #if !HAVE_DECL_STPCPY
-char *stpcpy PARAMS ((char *dest, const char *src));
+char *stpcpy (char *dest, const char *src);
 #endif
 
 #if !HAVE_DECL_STRCHR
-char *strchr(const char *s, int c);
+char *strchr (const char *s, int c);
 #endif
 
 #if !HAVE_DECL_STRSPN
-size_t strspn(const char *s, const char *accept);
+size_t strspn (const char *s, const char *accept);
 #endif
 
 #if !HAVE_DECL_STRNLEN
-size_t strnlen PARAMS ((const char *s, size_t maxlen));
+size_t strnlen (const char *s, size_t maxlen);
 #endif
 
 #if !HAVE_DECL_MEMCHR
-void *memchr PARAMS ((const void *s, int c, size_t n));
+void *memchr (const void *s, int c, size_t n);
 #endif
 
 #if !HAVE_DECL_MEMRCHR
-void *memrchr PARAMS ((const void *s, int c, size_t n));
+void *memrchr (const void *s, int c, size_t n);
 #endif
 
 
Index: src/tables.h
===================================================================
RCS file: /cvsroot/bison/bison/src/tables.h,v
retrieving revision 1.3
diff -p -u -r1.3 tables.h
--- src/tables.h        20 Oct 2002 11:20:15 -0000      1.3
+++ src/tables.h        21 Oct 2002 05:19:25 -0000
@@ -113,7 +113,7 @@ extern state_number_t *yydefgoto;
 extern rule_number_t *yydefact;
 extern int high;
 
-void tables_generate PARAMS ((void));
-void tables_free PARAMS ((void));
+void tables_generate (void);
+void tables_free (void);
 
 #endif /* !TABLES_H_ */
Index: src/vcg.h
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.h,v
retrieving revision 1.4
diff -p -u -r1.4 vcg.h
--- src/vcg.h   4 Oct 2001 14:55:21 -0000       1.4
+++ src/vcg.h   21 Oct 2002 05:19:26 -0000
@@ -992,28 +992,28 @@ struct    graph_s
 /* Graph typedefs. */
 typedef struct graph_s graph_t;
 
-void new_graph PARAMS ((graph_t *g));
-void new_node PARAMS ((node_t *node));
-void new_edge PARAMS ((edge_t *edge));
+void new_graph (graph_t *g);
+void new_node (node_t *node);
+void new_edge (edge_t *edge);
 
-void add_node PARAMS ((graph_t *graph, node_t *node));
-void add_edge PARAMS ((graph_t *graph, edge_t *edge));
+void add_node (graph_t *graph, node_t *node);
+void add_edge (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, const char *name));
-void add_infoname PARAMS ((graph_t *g, int val, const char *name));
+void add_colorentry (graph_t *g, int color_idx, int red_cp, 
+                    int green_cp, int blue_cp);
+void add_classname (graph_t *g, int val, const char *name);
+void add_infoname (graph_t *g, int val, const char *name);
 
-void open_node PARAMS ((FILE *fout));
-void output_node PARAMS ((node_t *node, FILE *fout));
-void close_node PARAMS ((FILE *fout));
+void open_node (FILE *fout);
+void output_node (node_t *node, FILE *fout);
+void close_node (FILE *fout);
 
-void open_edge PARAMS ((edge_t *edge, FILE *fout));
-void output_edge PARAMS ((edge_t *edge, FILE *fout));
-void close_edge PARAMS ((FILE *fout));
+void open_edge (edge_t *edge, FILE *fout);
+void output_edge (edge_t *edge, FILE *fout);
+void close_edge (FILE *fout);
 
-void open_graph PARAMS ((FILE *fout));
-void output_graph PARAMS ((graph_t *graph, FILE *fout));
-void close_graph PARAMS ((graph_t *graph, FILE *fout));
+void open_graph (FILE *fout);
+void output_graph (graph_t *graph, FILE *fout);
+void close_graph (graph_t *graph, FILE *fout);
 
 #endif /* VCG_H_ */
Index: src/vmsgetargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/vmsgetargs.c,v
retrieving revision 1.8
diff -p -u -r1.8 vmsgetargs.c
--- src/vmsgetargs.c    10 Dec 2001 09:07:41 -0000      1.8
+++ src/vmsgetargs.c    21 Oct 2002 05:19:26 -0000
@@ -37,9 +37,7 @@ extern int raw_flag;
 extern int yacc_flag;
 extern char * version_string;
 
-getargs(argc,argv)
-     int argc;
-     char *argv[];
+getargs (int argc, char *argv[])
 {
   register char *cp;
   static char Input_File[256];
@@ -145,8 +143,7 @@ getargs(argc,argv)
  *     See if "NAME" is present
  */
 int
-cli_present(Name)
-     char *Name;
+cli_present (char *Name)
 {
   struct {int Size; char *Ptr;} Descr;
 
@@ -159,9 +156,7 @@ cli_present(Name)
  *     Get value of "NAME"
  */
 int
-cli_get_value(Name,Buffer,Size)
-     char *Name;
-     char *Buffer;
+cli_get_value (char *Name, char *Buffer, int Size)
 {
   struct {int Size; char *Ptr;} Descr1,Descr2;
 




reply via email to

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