Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/byacc/dist merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/0f424dd68bc6
branches:  trunk
changeset: 342814:0f424dd68bc6
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 09 22:05:33 2016 +0000

description:
merge conflicts

diffstat:

 external/bsd/byacc/dist/closure.c  |   4 ++--
 external/bsd/byacc/dist/defs.h     |   2 +-
 external/bsd/byacc/dist/error.c    |   4 ++--
 external/bsd/byacc/dist/graph.c    |   4 ++--
 external/bsd/byacc/dist/lalr.c     |   4 ++--
 external/bsd/byacc/dist/lr0.c      |  11 +++++++----
 external/bsd/byacc/dist/main.c     |  16 +++++++++++-----
 external/bsd/byacc/dist/mkpar.c    |   4 ++--
 external/bsd/byacc/dist/mstring.c  |   4 ++--
 external/bsd/byacc/dist/output.c   |   4 ++--
 external/bsd/byacc/dist/reader.c   |  14 ++++++++------
 external/bsd/byacc/dist/symtab.c   |   4 ++--
 external/bsd/byacc/dist/verbose.c  |   4 ++--
 external/bsd/byacc/dist/warshall.c |   4 ++--
 external/bsd/byacc/dist/yacc.1     |   2 +-
 external/bsd/byacc/dist/yaccpar.c  |   2 +-
 16 files changed, 49 insertions(+), 38 deletions(-)

diffs (truncated from 332 to 300 lines):

diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/closure.c
--- a/external/bsd/byacc/dist/closure.c Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/closure.c Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: closure.c,v 1.8 2015/01/03 23:22:52 christos Exp $     */
+/*     $NetBSD: closure.c,v 1.9 2016/01/09 22:05:33 christos Exp $     */
 
 /* Id: closure.c,v 1.11 2014/09/18 00:40:07 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: closure.c,v 1.8 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: closure.c,v 1.9 2016/01/09 22:05:33 christos Exp $");
 
 Value_t *itemset;
 Value_t *itemsetend;
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/defs.h
--- a/external/bsd/byacc/dist/defs.h    Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/defs.h    Sat Jan 09 22:05:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.9 2015/01/04 01:34:20 christos Exp $        */
+/*     $NetBSD: defs.h,v 1.10 2016/01/09 22:05:33 christos Exp $       */
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/error.c
--- a/external/bsd/byacc/dist/error.c   Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/error.c   Sat Jan 09 22:05:33 2016 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: error.c,v 1.10 2015/01/04 01:34:20 christos Exp $      */
+/*     $NetBSD: error.c,v 1.11 2016/01/09 22:05:33 christos Exp $      */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: error.c,v 1.10 2015/01/04 01:34:20 christos Exp $");
+__RCSID("$NetBSD: error.c,v 1.11 2016/01/09 22:05:33 christos Exp $");
 /* Id: error.c,v 1.11 2014/04/07 22:22:49 tom Exp  */
 
 /* routines for printing error messages  */
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/graph.c
--- a/external/bsd/byacc/dist/graph.c   Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/graph.c   Sat Jan 09 22:05:33 2016 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: graph.c,v 1.5 2015/01/03 23:22:52 christos Exp $       */
+/*     $NetBSD: graph.c,v 1.6 2016/01/09 22:05:33 christos Exp $       */
 
 #include "defs.h"
 /* Id: graph.c,v 1.8 2014/02/19 00:46:57 Tom.Shields Exp  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: graph.c,v 1.5 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: graph.c,v 1.6 2016/01/09 22:05:33 christos Exp $");
 
 static void graph_state(int stateno);
 static void graph_LA(int ruleno);
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/lalr.c
--- a/external/bsd/byacc/dist/lalr.c    Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/lalr.c    Sat Jan 09 22:05:33 2016 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: lalr.c,v 1.6 2015/01/03 23:22:52 christos Exp $        */
+/*     $NetBSD: lalr.c,v 1.7 2016/01/09 22:05:33 christos Exp $        */
 
 #include "defs.h"
 /* Id: lalr.c,v 1.11 2014/09/18 00:26:39 tom Exp  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: lalr.c,v 1.6 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: lalr.c,v 1.7 2016/01/09 22:05:33 christos Exp $");
 
 typedef struct shorts
 {
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/lr0.c
--- a/external/bsd/byacc/dist/lr0.c     Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/lr0.c     Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: lr0.c,v 1.8 2015/01/03 23:22:52 christos Exp $ */
+/*     $NetBSD: lr0.c,v 1.9 2016/01/09 22:05:33 christos Exp $ */
 
-/* Id: lr0.c,v 1.17 2014/11/28 15:46:42 tom Exp  */
+/* Id: lr0.c,v 1.18 2015/07/11 00:53:38 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: lr0.c,v 1.8 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: lr0.c,v 1.9 2016/01/09 22:05:33 christos Exp $");
 
 static core *new_state(int symbol);
 static Value_t get_state(int symbol);
@@ -601,7 +601,10 @@
 {
     if (derives)
     {
-       DO_FREE(derives[start_symbol]);
+       if (derives[start_symbol] != rules)
+       {
+           DO_FREE(derives[start_symbol]);
+       }
        DO_FREE(derives);
        DO_FREE(rules);
     }
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/main.c
--- a/external/bsd/byacc/dist/main.c    Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/main.c    Sat Jan 09 22:05:33 2016 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: main.c,v 1.11 2015/01/04 01:34:20 christos Exp $       */
+/*     $NetBSD: main.c,v 1.12 2016/01/09 22:05:33 christos Exp $       */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.11 2015/01/04 01:34:20 christos Exp $");
-/* Id: main.c,v 1.54 2014/10/06 22:40:07 tom Exp  */
+__RCSID("$NetBSD: main.c,v 1.12 2016/01/09 22:05:33 christos Exp $");
+/* Id: main.c,v 1.55 2015/07/11 00:34:19 tom Exp  */
 
 #include <signal.h>
 #ifndef _WIN32
@@ -589,6 +589,7 @@
 static FILE *
 open_tmpfile(const char *label)
 {
+#define MY_FMT "%s/%.*sXXXXXX"
     FILE *result;
 #if USE_MKSTEMP
     int fd;
@@ -607,7 +608,11 @@
            tmpdir = ".";
     }
 
-    name = malloc(strlen(tmpdir) + 10 + strlen(label));
+    /* The size of the format is guaranteed to be longer than the result from
+     * printing empty strings with it; this calculation accounts for the
+     * string-lengths as well.
+     */
+    name = malloc(strlen(tmpdir) + sizeof(MY_FMT) + strlen(label));
 
     result = 0;
     if (name != 0)
@@ -617,7 +622,7 @@
        if ((mark = strrchr(label, '_')) == 0)
            mark = label + strlen(label);
 
-       sprintf(name, "%s/%.*sXXXXXX", tmpdir, (int)(mark - label), label);
+       sprintf(name, MY_FMT, tmpdir, (int)(mark - label), label);
        fd = mkstemp(name);
        if (fd >= 0)
        {
@@ -650,6 +655,7 @@
     if (result == 0)
        open_error(label);
     return result;
+#undef MY_FMT
 }
 
 static void
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/mkpar.c
--- a/external/bsd/byacc/dist/mkpar.c   Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/mkpar.c   Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: mkpar.c,v 1.8 2015/01/03 23:22:52 christos Exp $       */
+/*     $NetBSD: mkpar.c,v 1.9 2016/01/09 22:05:33 christos Exp $       */
 
 /* Id: mkpar.c,v 1.14 2014/04/01 23:05:37 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkpar.c,v 1.8 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: mkpar.c,v 1.9 2016/01/09 22:05:33 christos Exp $");
 
 #define NotSuppressed(p)       ((p)->suppressed == 0)
 
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/mstring.c
--- a/external/bsd/byacc/dist/mstring.c Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/mstring.c Sat Jan 09 22:05:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mstring.c,v 1.3 2015/01/04 01:34:20 christos Exp $     */
+/*     $NetBSD: mstring.c,v 1.4 2016/01/09 22:05:33 christos Exp $     */
 
 /* Id: mstring.c,v 1.6 2014/04/22 23:36:31 tom Exp  */
 #if HAVE_NBTOOL_CONFIG_H
@@ -6,7 +6,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mstring.c,v 1.3 2015/01/04 01:34:20 christos Exp $");
+__RCSID("$NetBSD: mstring.c,v 1.4 2016/01/09 22:05:33 christos Exp $");
 
 #include <stdlib.h>
 #include <stdio.h>
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/output.c
--- a/external/bsd/byacc/dist/output.c  Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/output.c  Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: output.c,v 1.14 2015/01/04 20:32:03 christos Exp $     */
+/*     $NetBSD: output.c,v 1.15 2016/01/09 22:05:33 christos Exp $     */
 
 /* Id: output.c,v 1.74 2014/10/05 23:21:09 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: output.c,v 1.14 2015/01/04 20:32:03 christos Exp $");
+__RCSID("$NetBSD: output.c,v 1.15 2016/01/09 22:05:33 christos Exp $");
 
 #define StaticOrR      (rflag ? "" : "static ")
 #define CountLine(fp)   (!rflag || ((fp) == code_file))
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/reader.c
--- a/external/bsd/byacc/dist/reader.c  Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/reader.c  Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: reader.c,v 1.12 2015/01/04 19:30:26 joerg Exp $        */
-
-/* Id: reader.c,v 1.58 2014/10/06 22:15:08 tom Exp  */
+/*     $NetBSD: reader.c,v 1.13 2016/01/09 22:05:33 christos Exp $     */
+
+/* Id: reader.c,v 1.59 2015/07/11 00:39:03 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: reader.c,v 1.12 2015/01/04 19:30:26 joerg Exp $");
+__RCSID("$NetBSD: reader.c,v 1.13 2016/01/09 22:05:33 christos Exp $");
 
 /*  The line size must be a positive integer.  One hundred was chosen  */
 /*  because few lines in Yacc input grammars exceed 100 characters.    */
@@ -32,6 +32,7 @@
 static char *process_destructor_XX(char *code, char *tag);
 #endif
 
+#define CACHE_SIZE 256
 static char *cache;
 static int cinc, cache_size;
 
@@ -101,7 +102,7 @@
     assert(cinc >= 0);
     if (cinc >= cache_size)
     {
-       cache_size += 256;
+       cache_size += CACHE_SIZE;
        cache = TREALLOC(char, cache, cache_size);
        NO_SPACE(cache);
     }
@@ -1512,7 +1513,7 @@
 {
     int c, k;
 
-    cache_size = 256;
+    cache_size = CACHE_SIZE;
     cache = TMALLOC(char, cache_size);
     NO_SPACE(cache);
 
@@ -2111,6 +2112,7 @@
     bucket *bp, **bpp;
 
     assert(cache);
+    assert(cache_size >= CACHE_SIZE);
     sprintf(cache, "$$%d", ++gensym);
     bp = make_bucket(cache);
     last_symbol->next = bp;
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/symtab.c
--- a/external/bsd/byacc/dist/symtab.c  Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/symtab.c  Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: symtab.c,v 1.8 2015/01/03 23:22:52 christos Exp $      */
+/*     $NetBSD: symtab.c,v 1.9 2016/01/09 22:05:33 christos Exp $      */
 
 /* Id: symtab.c,v 1.11 2014/03/26 00:17:09 Tom.Shields Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: symtab.c,v 1.8 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: symtab.c,v 1.9 2016/01/09 22:05:33 christos Exp $");
 
 /* TABLE_SIZE is the number of entries in the symbol table. */
 /* TABLE_SIZE must be a power of two.                      */
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/verbose.c
--- a/external/bsd/byacc/dist/verbose.c Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/verbose.c Sat Jan 09 22:05:33 2016 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: verbose.c,v 1.8 2015/01/03 23:22:52 christos Exp $     */
+/*     $NetBSD: verbose.c,v 1.9 2016/01/09 22:05:33 christos Exp $     */
 
 /* Id: verbose.c,v 1.11 2014/04/01 23:15:59 Tom.Shields Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: verbose.c,v 1.8 2015/01/03 23:22:52 christos Exp $");
+__RCSID("$NetBSD: verbose.c,v 1.9 2016/01/09 22:05:33 christos Exp $");
 
 static void log_conflicts(void);
 static void log_unused(void);
diff -r 11a44b683cf5 -r 0f424dd68bc6 external/bsd/byacc/dist/warshall.c
--- a/external/bsd/byacc/dist/warshall.c        Sat Jan 09 21:59:44 2016 +0000
+++ b/external/bsd/byacc/dist/warshall.c        Sat Jan 09 22:05:33 2016 +0000



Home | Main Index | Thread Index | Old Index