summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-01 14:47:41 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-01 14:47:41 +0900
commit0d711dfe38b7fc9148d9ac1fc12557c475b2dbf3 (patch)
tree8610e99c9266402374cedc7612034f56abdde789
parenta25a17f3465aacfcebf10cab4c26dd1405898faf (diff)
downloadbyacc-0d711dfe38b7fc9148d9ac1fc12557c475b2dbf3.tar.gz
byacc-0d711dfe38b7fc9148d9ac1fc12557c475b2dbf3.tar.bz2
byacc-0d711dfe38b7fc9148d9ac1fc12557c475b2dbf3.zip
Imported Upstream version 20160324upstream/20160324
-rw-r--r--CHANGES27
-rw-r--r--MANIFEST2
-rw-r--r--VERSION2
-rw-r--r--aclocal.m415
-rwxr-xr-xconfig.guess27
-rwxr-xr-xconfig.sub25
-rw-r--r--main.c30
-rw-r--r--package/byacc.spec4
-rw-r--r--package/debian/changelog6
-rw-r--r--package/debian/copyright4
-rw-r--r--package/mingw-byacc.spec4
-rw-r--r--package/pkgsrc/Makefile4
-rw-r--r--reader.c4
13 files changed, 107 insertions, 47 deletions
diff --git a/CHANGES b/CHANGES
index a61b2f2..1c3f442 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,28 @@
+2016-03-24 Thomas E. Dickey <tom@invisible-island.net>
+
+ * 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 <tom@invisible-island.net>
+
+ * 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 <tom@invisible-island.net>
+
+ * config.guess, config.sub: 2016-01-01
+
2015-07-10 Thomas E. Dickey <tom@invisible-island.net>
* lr0.c: fix a duplicate-free in the leak-checking
@@ -2275,7 +2300,7 @@
* vmsbuild.com: original version
-2000-02-23 Thomas E. Dickey <dickey@invisible-island.net>
+2000-02-23 dickey
* test/RCS, RCS: PERMIT FILE
diff --git a/MANIFEST b/MANIFEST
index 0ee8f35..7d7e534 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 58eff60..9be4062 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20150711
+20160324
diff --git a/aclocal.m4 b/aclocal.m4
index 41358a2..f98d089 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 <<CF_EOF
-#!/bin/sh
+#!$SHELL
# Temporary script generated by CF_WITH_MAN2HTML
# Convert inputs to html, sending result to standard output.
#
@@ -1184,7 +1184,7 @@ then
MAN2HTML_NOTE="$GROFF_NOTE"
MAN2HTML_PATH="$GROFF_PATH"
cat >>$MAN2HTML_TEMP <<CF_EOF
-/bin/sh -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
+$SHELL -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
CF_EOF
else
MAN2HTML_NOTE=""
@@ -1287,7 +1287,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
+dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -1357,6 +1357,9 @@ case $host_os in
(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
+(os2*)
+ cf_XOPEN_SOURCE=
+ ;;
(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;
diff --git a/config.guess b/config.guess
index f7eb141..dcd5149 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2015-03-04'
+timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ timestamp='2015-03-04'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@@ -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 <<EOF
@@ -1396,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/config.sub b/config.sub
index 8f1229c..da6d1b6 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2015-03-08'
+timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ timestamp='2015-03-08'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2015-03-08'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-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."
@@ -255,6 +254,7 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
@@ -305,7 +305,7 @@ case $basic_machine in
| riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -376,6 +376,7 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
@@ -428,12 +429,13 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -518,7 +520,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
- asmjs)
+ asmjs)
basic_machine=asmjs-unknown
;;
aux)
@@ -1376,7 +1378,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1396,7 +1398,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
diff --git a/main.c b/main.c
index 620ce3f..37889c3 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.55 2015/07/11 00:34:19 tom Exp $ */
+/* $Id: main.c,v 1.56 2016/03/25 00:16:28 Jung-uk.Kim Exp $ */
#include <signal.h>
#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 47fc25f..c18affa 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 4c01294..91b9c18 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,3 +1,9 @@
+byacc (20160324) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> 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 77e9447..77ab795 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 94071b4..6ec6649 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 473942b..bb568d1 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 807c528..812db44 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