From 7118255f507c5b3f3ae663043547c6525b79a4d9 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Fri, 25 Mar 2016 21:33:11 +0000 Subject: [PATCH] Import byacc 20160324. --- CHANGES | 27 ++++++++++++++++++++++++++- MANIFEST | 2 +- VERSION | 2 +- aclocal.m4 | 15 +++++++++------ config.guess | 27 ++++++++++++++++++--------- config.sub | 25 ++++++++++++++----------- main.c | 30 ++++++++++++++++++++++-------- package/byacc.spec | 4 ++-- package/debian/changelog | 6 ++++++ package/debian/copyright | 4 ++-- package/mingw-byacc.spec | 4 ++-- package/pkgsrc/Makefile | 4 ++-- reader.c | 4 ++-- 13 files changed, 107 insertions(+), 47 deletions(-) diff --git a/CHANGES b/CHANGES index a61b2f22f7b1..1c3f44205558 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,28 @@ +2016-03-24 Thomas E. Dickey + + * reader.c: unused variable + + * package/pkgsrc/Makefile, package/debian/copyright: bump + +2016-03-24 Jung-uk.Kim + + * main.c: + correct logic for finding output suffix in the "-o" option, which matched + the first occurrence of ".c" in the name in 2005-08-13 changes rather than + at the end of the filename (patch by Jung-uk Kim) + +2016-03-24 Thomas E. Dickey + + * aclocal.m4: + update CF_WITH_MAN2HTML to use configured shell rather than /bin/sh + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-01-25 Thomas E. Dickey + + * config.guess, config.sub: 2016-01-01 + 2015-07-10 Thomas E. Dickey * lr0.c: fix a duplicate-free in the leak-checking @@ -2275,7 +2300,7 @@ * vmsbuild.com: original version -2000-02-23 Thomas E. Dickey +2000-02-23 dickey * test/RCS, RCS: PERMIT FILE diff --git a/MANIFEST b/MANIFEST index 0ee8f3537fbe..7d7e53484cd1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for byacc-20150711, version t20150711 +MANIFEST for byacc-20160324, version t20160324 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 diff --git a/VERSION b/VERSION index 58eff608229f..9be40626b9a0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -20150711 +20160324 diff --git a/aclocal.m4 b/aclocal.m4 index 41358a26c112..f98d0895249e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.38 2015/07/05 22:16:23 tom Exp $ +dnl $Id: aclocal.m4,v 1.39 2016/03/25 00:06:44 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2014,2015 Thomas E. Dickey +dnl Copyright 2004-2015,2016 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -1121,7 +1121,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_MAN2HTML version: 4 updated: 2015/05/03 19:10:48 +dnl CF_WITH_MAN2HTML version: 5 updated: 2015/08/20 04:51:36 dnl ---------------- dnl Check for man2html and groff. Optionally prefer man2html over groff. dnl Generate a shell script which hides the differences between the two. @@ -1157,7 +1157,7 @@ esac MAN2HTML_TEMP="man2html.tmp" cat >$MAN2HTML_TEMP <>$MAN2HTML_TEMP <. @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -221,7 +221,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -962,6 +965,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1038,7 +1044,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1117,7 +1123,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1387,6 +1393,9 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < #ifndef _WIN32 @@ -410,32 +410,46 @@ alloc_file_name(size_t len, const char *suffix) return result; } +static char * +find_suffix(char *name, const char *suffix) +{ + size_t len = strlen(name); + size_t slen = strlen(suffix); + if (len >= slen) + { + name += len - slen; + if (strcmp(name, suffix) == 0) + return name; + } + return NULL; +} + static void create_file_names(void) { size_t len; const char *defines_suffix; const char *externs_suffix; - char *prefix; + char *suffix; - prefix = NULL; + suffix = NULL; defines_suffix = DEFINES_SUFFIX; externs_suffix = EXTERNS_SUFFIX; /* compute the file_prefix from the user provided output_file_name */ if (output_file_name != 0) { - if (!(prefix = strstr(output_file_name, OUTPUT_SUFFIX)) - && (prefix = strstr(output_file_name, ".c"))) + if (!(suffix = find_suffix(output_file_name, OUTPUT_SUFFIX)) + && (suffix = find_suffix(output_file_name, ".c"))) { defines_suffix = ".h"; externs_suffix = ".i"; } } - if (prefix != NULL) + if (suffix != NULL) { - len = (size_t) (prefix - output_file_name); + len = (size_t) (suffix - output_file_name); file_prefix = TMALLOC(char, len + 1); NO_SPACE(file_prefix); strncpy(file_prefix, output_file_name, len)[len] = 0; @@ -477,7 +491,7 @@ create_file_names(void) CREATE_FILE_NAME(graph_file_name, GRAPH_SUFFIX); } - if (prefix != NULL) + if (suffix != NULL) { FREE(file_prefix); } diff --git a/package/byacc.spec b/package/byacc.spec index 47fc25f89bb9..c18affa6ef0f 100644 --- a/package/byacc.spec +++ b/package/byacc.spec @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20150711 +%define AppVersion 20160324 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.28 2015/07/11 00:53:15 tom Exp $ +# $XTermId: byacc.spec,v 1.29 2016/03/24 23:55:52 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 diff --git a/package/debian/changelog b/package/debian/changelog index 4c01294df121..91b9c182ca4d 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +byacc (20160324) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Thu, 24 Mar 2016 19:55:52 -0400 + byacc (20150711) unstable; urgency=low * maintenance updates diff --git a/package/debian/copyright b/package/debian/copyright index 77e94472a7a7..77ab7952e3db 100644 --- a/package/debian/copyright +++ b/package/debian/copyright @@ -1,4 +1,4 @@ -Upstream source http://dickey.his.com/byacc/byacc.html +Upstream source http://invisible-island.net/byacc/byacc.html Berkeley Yacc is in the public domain; changes made to it by the current maintainer are likewise unrestricted. That applies to most of the files. @@ -36,7 +36,7 @@ skeleton.c with the bug report. Do not expect rapid responses. Files: aclocal.m4 Licence: other-BSD -Copyright: 2004-2014,2015 by Thomas E. Dickey +Copyright: 2004-2015,2016 by Thomas E. Dickey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including diff --git a/package/mingw-byacc.spec b/package/mingw-byacc.spec index 94071b4faee2..6ec6649c5ba0 100644 --- a/package/mingw-byacc.spec +++ b/package/mingw-byacc.spec @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20150711 +%define AppVersion 20160324 %define UseProgram yacc -# $XTermId: mingw-byacc.spec,v 1.10 2015/07/11 00:53:15 tom Exp $ +# $XTermId: mingw-byacc.spec,v 1.11 2016/03/24 23:55:52 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 diff --git a/package/pkgsrc/Makefile b/package/pkgsrc/Makefile index 473942b15222..bb568d1946f3 100644 --- a/package/pkgsrc/Makefile +++ b/package/pkgsrc/Makefile @@ -1,14 +1,14 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20150711 +DISTNAME= byacc-20160324 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://invisible-island.net/byacc/ EXTRACT_SUFX= .tgz MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://dickey.his.com/byacc/byacc.html +HOMEPAGE= http://invisible-island.net/byacc/byacc.html COMMENT= Berkeley Yacc PKG_DESTDIR_SUPPORT= user-destdir diff --git a/reader.c b/reader.c index 807c528254ab..812db446ce85 100644 --- a/reader.c +++ b/reader.c @@ -1,4 +1,4 @@ -/* $Id: reader.c,v 1.59 2015/07/11 00:39:03 tom Exp $ */ +/* $Id: reader.c,v 1.60 2016/03/25 00:51:07 tom Exp $ */ #include "defs.h" @@ -894,7 +894,7 @@ copy_param(int k) } buf[i--] = '\0'; - i = trim_blanks(buf); + (void)trim_blanks(buf); comma = buf - 1; do