Module Name: src
Committed By: christos
Date: Thu Oct 29 00:56:20 UTC 2009
Modified Files:
src/external/bsd/byacc/dist: NOTES closure.c config_h.in defs.h error.c
graph.c lalr.c lr0.c main.c mkpar.c output.c reader.c skeleton.c
symtab.c verbose.c warshall.c yacc.1
src/external/bsd/byacc/dist/test: README error.tab.c error.tab.h
ftp.tab.c ftp.tab.h ftp.y
Log Message:
add our patches
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/byacc/dist/NOTES \
src/external/bsd/byacc/dist/closure.c \
src/external/bsd/byacc/dist/config_h.in \
src/external/bsd/byacc/dist/defs.h src/external/bsd/byacc/dist/error.c \
src/external/bsd/byacc/dist/graph.c src/external/bsd/byacc/dist/lalr.c \
src/external/bsd/byacc/dist/lr0.c src/external/bsd/byacc/dist/main.c \
src/external/bsd/byacc/dist/mkpar.c src/external/bsd/byacc/dist/output.c \
src/external/bsd/byacc/dist/reader.c \
src/external/bsd/byacc/dist/skeleton.c \
src/external/bsd/byacc/dist/symtab.c \
src/external/bsd/byacc/dist/verbose.c \
src/external/bsd/byacc/dist/warshall.c src/external/bsd/byacc/dist/yacc.1
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/byacc/dist/test/README \
src/external/bsd/byacc/dist/test/error.tab.c \
src/external/bsd/byacc/dist/test/error.tab.h \
src/external/bsd/byacc/dist/test/ftp.tab.c \
src/external/bsd/byacc/dist/test/ftp.tab.h \
src/external/bsd/byacc/dist/test/ftp.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/byacc/dist/NOTES
diff -u src/external/bsd/byacc/dist/NOTES:1.1.1.1 src/external/bsd/byacc/dist/NOTES:1.2
--- src/external/bsd/byacc/dist/NOTES:1.1.1.1 Wed Oct 28 20:46:51 2009
+++ src/external/bsd/byacc/dist/NOTES Wed Oct 28 20:56:19 2009
@@ -1,3 +1,5 @@
+$NetBSD: NOTES,v 1.2 2009/10/29 00:56:19 christos Exp $
+
Berkeley Yacc reflects its origins. The reason so many routines
use exactly six register variables is that Berkeley Yacc was
developed on a VAX using PCC. PCC placed at most six variables
@@ -5,5 +7,15 @@
variables most belonged in registers. Changes in machines and
compilers make that effort worthless, perhaps even harmful.
+[Given the previous paragraph, and the fact that GCC does not respect
+ register declarations, and the fact that much of the rest of the
+ 4.4lite2 release had "register" declarations extirpated, I've removed
+ most of the register declarations from the code. I left them in the
+ generated skeleton code "for the hell of it" but they probably should
+ go from there, too. -- pm, July 1997]
+
+[I totally removed the register stuff; we've deprecated it elsewhere
+ in the tree now -- lukem, October 1997]
+
The code contains many instances where address calculations are
performed in particular ways to optimize the code for the VAX.
Index: src/external/bsd/byacc/dist/closure.c
diff -u src/external/bsd/byacc/dist/closure.c:1.1.1.1 src/external/bsd/byacc/dist/closure.c:1.2
--- src/external/bsd/byacc/dist/closure.c:1.1.1.1 Wed Oct 28 20:46:52 2009
+++ src/external/bsd/byacc/dist/closure.c Wed Oct 28 20:56:19 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: closure.c,v 1.1.1.1 2009/10/29 00:46:52 christos Exp $ */
-
+/* $NetBSD: closure.c,v 1.2 2009/10/29 00:56:19 christos Exp $ */
/* Id: closure.c,v 1.7 2009/10/27 09:30:14 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: closure.c,v 1.2 2009/10/29 00:56:19 christos Exp $");
+
Value_t *itemset;
Value_t *itemsetend;
unsigned *ruleset;
Index: src/external/bsd/byacc/dist/config_h.in
diff -u src/external/bsd/byacc/dist/config_h.in:1.1.1.1 src/external/bsd/byacc/dist/config_h.in:1.2
--- src/external/bsd/byacc/dist/config_h.in:1.1.1.1 Wed Oct 28 20:46:52 2009
+++ src/external/bsd/byacc/dist/config_h.in Wed Oct 28 20:56:19 2009
@@ -1,3 +1,3 @@
/* @configure_input@ */
-/* Id: config_h.in,v 1.1 1995/01/01 19:34:59 tom Exp */
+/* $Id: config_h.in,v 1.2 2009/10/29 00:56:19 christos Exp $ */
@DEFS@
Index: src/external/bsd/byacc/dist/defs.h
diff -u src/external/bsd/byacc/dist/defs.h:1.1.1.1 src/external/bsd/byacc/dist/defs.h:1.2
--- src/external/bsd/byacc/dist/defs.h:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/defs.h Wed Oct 28 20:56:19 2009
@@ -1,7 +1,9 @@
-/* $NetBSD: defs.h,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
/* Id: defs.h,v 1.20 2009/10/27 10:47:43 tom Exp */
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -222,15 +224,15 @@
extern int outline;
extern int exit_code;
-extern const char *banner[];
-extern const char *tables[];
-extern const char *header[];
-extern const char *body[];
-extern const char *trailer[];
+extern const char * const banner[];
+extern const char * const tables[];
+extern const char * const header[];
+extern const char * const body[];
+extern const char * const trailer[];
extern char *code_file_name;
extern char *defines_file_name;
-extern char *input_file_name;
+extern const char *input_file_name;
extern char *output_file_name;
extern char *verbose_file_name;
extern char *graph_file_name;
@@ -340,7 +342,7 @@
extern void restarted_warning(void);
extern void retyped_warning(char *s);
extern void revalued_warning(char *s);
-extern void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
+extern __dead void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
extern void terminal_lhs(int s_lineno);
extern void terminal_start(char *s);
extern void tokenized_start(char *s);
@@ -391,7 +393,7 @@
extern void reader(void);
/* skeleton.c */
-extern void write_section(const char *section[]);
+extern void write_section(const char * const section[]);
/* verbose.c */
extern void verbose(void);
Index: src/external/bsd/byacc/dist/error.c
diff -u src/external/bsd/byacc/dist/error.c:1.1.1.1 src/external/bsd/byacc/dist/error.c:1.2
--- src/external/bsd/byacc/dist/error.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/error.c Wed Oct 28 20:56:19 2009
@@ -1,26 +1,28 @@
-/* $NetBSD: error.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: error.c,v 1.2 2009/10/29 00:56:19 christos Exp $ */
/* Id: error.c,v 1.6 2008/11/24 21:30:35 tom Exp */
-/* routines for printing error messages */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: error.c,v 1.2 2009/10/29 00:56:19 christos Exp $");
#include "defs.h"
-void
+/* routines for printing error messages */
+
+__dead void
fatal(const char *msg)
{
fprintf(stderr, "%s: f - %s\n", myname, msg);
done(2);
}
-void
+__dead void
no_space(void)
{
fprintf(stderr, "%s: f - out of space\n", myname);
done(2);
}
-void
+__dead void
open_error(const char *filename)
{
fprintf(stderr, "%s: f - cannot open \"%s\"\n", myname, filename);
@@ -44,7 +46,7 @@
return;
for (s = st_line; *s != '\n'; ++s)
{
- if (isprint(*s) || *s == '\t')
+ if (isprint((unsigned char)*s) || *s == '\t')
putc(*s, stderr);
else
putc('?', stderr);
@@ -61,7 +63,7 @@
putc('\n', stderr);
}
-void
+__dead void
syntax_error(int st_lineno, char *st_line, char *st_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", syntax error\n",
@@ -70,7 +72,7 @@
done(1);
}
-void
+__dead void
unterminated_comment(int c_lineno, char *c_line, char *c_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unmatched /*\n",
@@ -79,7 +81,7 @@
done(1);
}
-void
+__dead void
unterminated_string(int s_lineno, char *s_line, char *s_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unterminated string\n",
@@ -88,7 +90,7 @@
done(1);
}
-void
+__dead void
unterminated_text(int t_lineno, char *t_line, char *t_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unmatched %%{\n",
@@ -97,7 +99,7 @@
done(1);
}
-void
+__dead void
unterminated_union(int u_lineno, char *u_line, char *u_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unterminated %%union \
@@ -106,7 +108,7 @@
done(1);
}
-void
+__dead void
over_unionized(char *u_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", too many %%union \
@@ -115,7 +117,7 @@
done(1);
}
-void
+__dead void
illegal_tag(int t_lineno, char *t_line, char *t_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", illegal tag\n",
@@ -124,7 +126,7 @@
done(1);
}
-void
+__dead void
illegal_character(char *c_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", illegal character\n",
@@ -133,7 +135,7 @@
done(1);
}
-void
+__dead void
used_reserved(char *s)
{
fprintf(stderr,
@@ -142,7 +144,7 @@
done(1);
}
-void
+__dead void
tokenized_start(char *s)
{
fprintf(stderr,
@@ -227,7 +229,7 @@
end of the current rule\n", myname, a_lineno, input_file_name, i);
}
-void
+__dead void
dollar_error(int a_lineno, char *a_line, char *a_cptr)
{
fprintf(stderr, "%s: e - line %d of \"%s\", illegal $-name\n",
@@ -236,7 +238,7 @@
done(1);
}
-void
+__dead void
untyped_lhs(void)
{
fprintf(stderr, "%s: e - line %d of \"%s\", $$ is untyped\n",
@@ -244,7 +246,7 @@
done(1);
}
-void
+__dead void
untyped_rhs(int i, char *s)
{
fprintf(stderr, "%s: e - line %d of \"%s\", $%d (%s) is untyped\n",
@@ -252,7 +254,7 @@
done(1);
}
-void
+__dead void
unknown_rhs(int i)
{
fprintf(stderr, "%s: e - line %d of \"%s\", $%d is untyped\n",
Index: src/external/bsd/byacc/dist/graph.c
diff -u src/external/bsd/byacc/dist/graph.c:1.1.1.1 src/external/bsd/byacc/dist/graph.c:1.2
--- src/external/bsd/byacc/dist/graph.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/graph.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: graph.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: graph.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: graph.c,v 1.7 2009/10/27 09:25:20 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: graph.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static void graph_state(int stateno);
static void graph_LA(int ruleno);
Index: src/external/bsd/byacc/dist/lalr.c
diff -u src/external/bsd/byacc/dist/lalr.c:1.1.1.1 src/external/bsd/byacc/dist/lalr.c:1.2
--- src/external/bsd/byacc/dist/lalr.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/lalr.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: lalr.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: lalr.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: lalr.c,v 1.9 2009/10/27 09:49:27 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: lalr.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
typedef struct shorts
{
struct shorts *next;
Index: src/external/bsd/byacc/dist/lr0.c
diff -u src/external/bsd/byacc/dist/lr0.c:1.1.1.1 src/external/bsd/byacc/dist/lr0.c:1.2
--- src/external/bsd/byacc/dist/lr0.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/lr0.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: lr0.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: lr0.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: lr0.c,v 1.9 2009/10/27 09:20:39 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: lr0.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static core *new_state(int symbol);
static Value_t get_state(int symbol);
static void allocate_itemsets(void);
Index: src/external/bsd/byacc/dist/main.c
diff -u src/external/bsd/byacc/dist/main.c:1.1.1.1 src/external/bsd/byacc/dist/main.c:1.2
--- src/external/bsd/byacc/dist/main.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/main.c Wed Oct 28 20:56:20 2009
@@ -1,11 +1,14 @@
-/* $NetBSD: main.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: main.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: main.c,v 1.23 2009/10/27 09:06:44 tom Exp */
+#include "defs.h"
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: main.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
#include <signal.h>
#include <unistd.h> /* for _exit() */
-#include "defs.h"
char dflag;
char gflag;
@@ -22,16 +25,18 @@
int outline;
static char empty_string[] = "";
-static char default_file_prefix[] = "y";
+static const char default_file_prefix[] = "y";
+static int explicit_file_name;
-static char *file_prefix = default_file_prefix;
+static const char *file_prefix = default_file_prefix;
char *code_file_name;
char *defines_file_name;
-char *input_file_name = empty_string;
+const char *input_file_name = empty_string;
char *output_file_name = 0;
char *verbose_file_name;
char *graph_file_name;
+char *allocated_file_prefix;
FILE *action_file; /* a temp file, used to save actions associated */
/* with rules until the parser is written */
@@ -258,6 +263,7 @@
output_file_name = argv[i];
else
usage();
+ explicit_file_name = 1;
continue;
case 'p':
@@ -338,10 +344,10 @@
if (prefix != NULL)
{
len = (size_t) (prefix - output_file_name);
- file_prefix = (char *)MALLOC(len + 1);
+ file_prefix = allocated_file_prefix = MALLOC(len + 1);
if (file_prefix == 0)
no_space();
- strncpy(file_prefix, output_file_name, len)[len] = 0;
+ strlcpy(allocated_file_prefix, output_file_name, len + 1);
}
else
len = strlen(file_prefix);
@@ -362,6 +368,35 @@
if (dflag)
{
+ if (explicit_file_name)
+ {
+ char *suffix;
+ defines_file_name = strdup(output_file_name);
+ if (defines_file_name == 0)
+ no_space();
+ /* does the output_file_name have a known suffix */
+ suffix = strrchr(output_file_name, '.');
+ if (suffix != 0 &&
+ (!strcmp(suffix, ".c") || /* good, old-fashioned C */
+ !strcmp(suffix, ".C") || /* C++, or C on Windows */
+ !strcmp(suffix, ".cc") || /* C++ */
+ !strcmp(suffix, ".cxx") || /* C++ */
+ !strcmp(suffix, ".cpp"))) /* C++ (Windows) */
+ {
+ strncpy(defines_file_name, output_file_name,
+ suffix - output_file_name + 1);
+ defines_file_name[suffix - output_file_name + 1] = 'h';
+ defines_file_name[suffix - output_file_name + 2] = 0;
+ } else {
+ fprintf(stderr,"%s: suffix of output file name %s"
+ " not recognized, no -d file generated.\n",
+ myname, output_file_name);
+ dflag = 0;
+ free(defines_file_name);
+ defines_file_name = 0;
+ }
+ }
+ } else {
CREATE_FILE_NAME(defines_file_name, defines_suffix);
}
@@ -375,9 +410,9 @@
CREATE_FILE_NAME(graph_file_name, GRAPH_SUFFIX);
}
- if (prefix != NULL)
+ if (allocated_file_prefix != NULL)
{
- FREE(file_prefix);
+ FREE(allocated_file_prefix);
}
}
Index: src/external/bsd/byacc/dist/mkpar.c
diff -u src/external/bsd/byacc/dist/mkpar.c:1.1.1.1 src/external/bsd/byacc/dist/mkpar.c:1.2
--- src/external/bsd/byacc/dist/mkpar.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/mkpar.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: mkpar.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: mkpar.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: mkpar.c,v 1.10 2009/10/27 10:50:13 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: mkpar.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static action *add_reduce(action *actions, int ruleno, int symbol);
static action *add_reductions(int stateno, action *actions);
static action *get_shifts(int stateno);
Index: src/external/bsd/byacc/dist/output.c
diff -u src/external/bsd/byacc/dist/output.c:1.1.1.1 src/external/bsd/byacc/dist/output.c:1.2
--- src/external/bsd/byacc/dist/output.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/output.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: output.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: output.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: output.c,v 1.21 2009/10/27 10:55:05 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: output.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static int nvectors;
static int nentries;
static Value_t **froms;
Index: src/external/bsd/byacc/dist/reader.c
diff -u src/external/bsd/byacc/dist/reader.c:1.1.1.1 src/external/bsd/byacc/dist/reader.c:1.2
--- src/external/bsd/byacc/dist/reader.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/reader.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: reader.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: reader.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: reader.c,v 1.18 2009/10/27 09:04:07 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: reader.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
/* The line size must be a positive integer. One hundred was chosen */
/* because few lines in Yacc input grammars exceed 100 characters. */
/* Note that if a line exceeds LINESIZE characters, the line buffer */
@@ -816,10 +818,10 @@
strcmp(name, "$end") == 0)
return (1);
- if (name[0] == '$' && name[1] == '$' && isdigit(name[2]))
+ if (name[0] == '$' && name[1] == '$' && isdigit((unsigned char)name[2]))
{
s = name + 3;
- while (isdigit(*s))
+ while (isdigit((unsigned char)*s))
++s;
if (*s == NUL)
return (1);
@@ -1355,7 +1357,7 @@
static char *
after_blanks(char *s)
{
- while (*s != '\0' && isspace(*s))
+ while (*s != '\0' && isspace((unsigned char)*s))
++s;
return s;
}
@@ -1424,7 +1426,7 @@
FREE(d_line);
goto loop;
}
- else if (c == '-' && isdigit(cptr[1]))
+ else if (c == '-' && isdigit((unsigned char)cptr[1]))
{
++cptr;
i = -get_number() - n;
@@ -1449,7 +1451,7 @@
cptr += 2;
goto loop;
}
- else if (isdigit(cptr[1]))
+ else if (isdigit((unsigned char)cptr[1]))
{
++cptr;
i = get_number();
@@ -1712,8 +1714,8 @@
if (name_pool == 0)
no_space();
- strcpy(name_pool, "$accept");
- strcpy(name_pool + 8, "$end");
+ strlcpy(name_pool, "$accept", name_pool_size);
+ strlcpy(name_pool + 8, "$end", name_pool_size - 8);
t = name_pool + 13;
for (bp = first_symbol; bp; bp = bp->next)
{
Index: src/external/bsd/byacc/dist/skeleton.c
diff -u src/external/bsd/byacc/dist/skeleton.c:1.1.1.1 src/external/bsd/byacc/dist/skeleton.c:1.2
--- src/external/bsd/byacc/dist/skeleton.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/skeleton.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: skeleton.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: skeleton.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/* Id: skeleton.c,v 1.19 2008/12/24 14:52:28 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: skeleton.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
/* The definition of yysccsid in the banner should be replaced with */
/* a #pragma ident directive if the target C compiler supports */
/* #pragma ident directives. */
@@ -16,7 +18,7 @@
/* the body either are not useful outside of semantic actions or */
/* are conditional. */
-const char *banner[] =
+const char * const banner[] =
{
"#ifndef lint",
"static const char yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\";",
@@ -32,6 +34,7 @@
CONCAT1("#define YYPATCH ", YYPATCH),
#endif
"",
+ "#define YYLEX yylex()",
"#define YYEMPTY (-1)",
"#define yyclearin (yychar = YYEMPTY)",
"#define yyerrok (yyerrflag = 0)",
@@ -55,7 +58,7 @@
0
};
-const char *tables[] =
+const char * const tables[] =
{
"extern short yylhs[];",
"extern short yylen[];",
@@ -74,7 +77,7 @@
0
};
-const char *header[] =
+const char * const header[] =
{
"#if YYDEBUG",
"#include <stdio.h>",
@@ -112,7 +115,7 @@
0
};
-const char *body[] =
+const char * const body[] =
{
"/* allocate initial stack or double stack size, up to YYMAXDEPTH */",
"static int yygrowstack(void)",
@@ -303,7 +306,7 @@
0
};
-const char *trailer[] =
+const char * const trailer[] =
{
" }",
" yyssp -= yym;",
@@ -368,7 +371,7 @@
};
void
-write_section(const char *section[])
+write_section(const char * const section[])
{
int c;
int i;
Index: src/external/bsd/byacc/dist/symtab.c
diff -u src/external/bsd/byacc/dist/symtab.c:1.1.1.1 src/external/bsd/byacc/dist/symtab.c:1.2
--- src/external/bsd/byacc/dist/symtab.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/symtab.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: symtab.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
-/* Id: symtab.c,v 1.7 2008/11/24 21:30:35 tom Exp */
+/* $NetBSD: symtab.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
+/* $Id: symtab.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: symtab.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
/* TABLE_SIZE is the number of entries in the symbol table. */
/* TABLE_SIZE must be a power of two. */
Index: src/external/bsd/byacc/dist/verbose.c
diff -u src/external/bsd/byacc/dist/verbose.c:1.1.1.1 src/external/bsd/byacc/dist/verbose.c:1.2
--- src/external/bsd/byacc/dist/verbose.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/verbose.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: verbose.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
-/* Id: verbose.c,v 1.8 2009/10/27 09:12:43 tom Exp */
+/* $NetBSD: verbose.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
+/* Id: verbose.c,v 1.8 2009/10/27 09:12:43 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: verbose.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static void log_conflicts(void);
static void log_unused(void);
static void print_actions(int stateno);
Index: src/external/bsd/byacc/dist/warshall.c
diff -u src/external/bsd/byacc/dist/warshall.c:1.1.1.1 src/external/bsd/byacc/dist/warshall.c:1.2
--- src/external/bsd/byacc/dist/warshall.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/warshall.c Wed Oct 28 20:56:20 2009
@@ -1,9 +1,11 @@
-/* $NetBSD: warshall.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
-/* Id: warshall.c,v 1.6 2008/11/24 21:30:35 tom Exp */
+/* $NetBSD: warshall.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
+/* Id: warshall.c,v 1.6 2008/11/24 21:30:35 tom Exp */
#include "defs.h"
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: warshall.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
static void
transitive_closure(unsigned *R, int n)
{
Index: src/external/bsd/byacc/dist/yacc.1
diff -u src/external/bsd/byacc/dist/yacc.1:1.1.1.1 src/external/bsd/byacc/dist/yacc.1:1.2
--- src/external/bsd/byacc/dist/yacc.1:1.1.1.1 Wed Oct 28 20:46:51 2009
+++ src/external/bsd/byacc/dist/yacc.1 Wed Oct 28 20:56:20 2009
@@ -1,5 +1,4 @@
-.\" $NetBSD: yacc.1,v 1.1.1.1 2009/10/29 00:46:51 christos Exp $
-.\"
+.\" $NetBSD: yacc.1,v 1.2 2009/10/29 00:56:20 christos Exp $
.\" Id: yacc.1,v 1.6 2005/05/04 22:11:56 tom Exp
.\"
.TH YACC 1 "July\ 15,\ 1990"
Index: src/external/bsd/byacc/dist/test/README
diff -u src/external/bsd/byacc/dist/test/README:1.1.1.1 src/external/bsd/byacc/dist/test/README:1.2
--- src/external/bsd/byacc/dist/test/README:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/README Wed Oct 28 20:56:20 2009
@@ -1,4 +1,4 @@
--- Id: README,v 1.1 2004/03/28 19:10:48 tom Exp
+-- $Id: README,v 1.2 2009/10/29 00:56:20 christos Exp $
The files in this directory are input (.y) and output (.output, .tab.c, .tab.h)
examples.
Index: src/external/bsd/byacc/dist/test/error.tab.c
diff -u src/external/bsd/byacc/dist/test/error.tab.c:1.1.1.1 src/external/bsd/byacc/dist/test/error.tab.c:1.2
--- src/external/bsd/byacc/dist/test/error.tab.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/error.tab.c Wed Oct 28 20:56:20 2009
@@ -1,7 +1,7 @@
-/* $NetBSD: error.tab.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: error.tab.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
#ifndef lint
-static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+/* static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; */
+static char rcsid[] = "$NetBSD: error.tab.c,v 1.2 2009/10/29 00:56:20 christos Exp $";
#endif
#include <stdlib.h>
Index: src/external/bsd/byacc/dist/test/error.tab.h
diff -u src/external/bsd/byacc/dist/test/error.tab.h:1.1.1.1 src/external/bsd/byacc/dist/test/error.tab.h:1.2
--- src/external/bsd/byacc/dist/test/error.tab.h:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/error.tab.h Wed Oct 28 20:56:20 2009
@@ -1,2 +1,2 @@
-/* $NetBSD: error.tab.h,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
+/* $NetBSD: error.tab.h,v 1.2 2009/10/29 00:56:20 christos Exp $ */
Index: src/external/bsd/byacc/dist/test/ftp.tab.c
diff -u src/external/bsd/byacc/dist/test/ftp.tab.c:1.1.1.1 src/external/bsd/byacc/dist/test/ftp.tab.c:1.2
--- src/external/bsd/byacc/dist/test/ftp.tab.c:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/ftp.tab.c Wed Oct 28 20:56:20 2009
@@ -1,7 +1,7 @@
-/* $NetBSD: ftp.tab.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
-
+/* $NetBSD: ftp.tab.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
#ifndef lint
-static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+/* static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; */
+static char rcsid[] = "$NetBSD: ftp.tab.c,v 1.2 2009/10/29 00:56:20 christos Exp $";
#endif
#include <stdlib.h>
Index: src/external/bsd/byacc/dist/test/ftp.tab.h
diff -u src/external/bsd/byacc/dist/test/ftp.tab.h:1.1.1.1 src/external/bsd/byacc/dist/test/ftp.tab.h:1.2
--- src/external/bsd/byacc/dist/test/ftp.tab.h:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/ftp.tab.h Wed Oct 28 20:56:20 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.tab.h,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
+/* $NetBSD: ftp.tab.h,v 1.2 2009/10/29 00:56:20 christos Exp $ */
#define A 257
#define B 258
Index: src/external/bsd/byacc/dist/test/ftp.y
diff -u src/external/bsd/byacc/dist/test/ftp.y:1.1.1.1 src/external/bsd/byacc/dist/test/ftp.y:1.2
--- src/external/bsd/byacc/dist/test/ftp.y:1.1.1.1 Wed Oct 28 20:46:53 2009
+++ src/external/bsd/byacc/dist/test/ftp.y Wed Oct 28 20:56:20 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.y,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $ */
+/* $NetBSD: ftp.y,v 1.2 2009/10/29 00:56:20 christos Exp $ */
/*
* Copyright (c) 1985, 1988 Regents of the University of California.
@@ -16,7 +16,8 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89
+ * from: @(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89
+ * $NetBSD: ftp.y,v 1.2 2009/10/29 00:56:20 christos Exp $
*/
/*
@@ -28,6 +29,7 @@
#ifndef lint
static char sccsid[] = "@(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89";
+static char rcsid[] = "$NetBSD: ftp.y,v 1.2 2009/10/29 00:56:20 christos Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -457,8 +459,9 @@
struct tm *gmtime();
t = gmtime(&stbuf.st_mtime);
reply(213,
- "19%02d%02d%02d%02d%02d%02d",
- t->tm_year, t->tm_mon+1, t->tm_mday,
+ "%04d%02d%02d%02d%02d%02d",
+ 1900 + t->tm_year,
+ t->tm_mon+1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
}
}
@@ -1148,7 +1151,7 @@
(stbuf.st_mode&S_IFMT) != S_IFREG)
reply(550, "%s: not a plain file.", filename);
else
- reply(213, "%lu", stbuf.st_size);
+ reply(213, "%llu", (long long)stbuf.st_size);
break;}
case TYPE_A: {
FILE *fin;