Import byacc 20141006

This commit is contained in:
Baptiste Daroussin 2014-10-08 20:46:38 +00:00
commit 315e69cb63
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272769
12 changed files with 705 additions and 399 deletions

View File

@ -1,3 +1,23 @@
2014-10-06 Thomas E. Dickey <tom@invisible-island.net>
* package/debian/source/format:
change to native format to work around regression in Debian packaging.
* VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump
* configure: regen
* main.c:
correct parameter for umask - for very old mkstemp's - and use type mode_t
to quiet compiler warning
* configure.in: add configure check for mode_t
* reader.c:
better fix for get_line, by ensuring there is enough space to null-terminate
its result (prompted by discussion with Craig Rodrigues).
2014-10-05 Thomas E. Dickey <tom@invisible-island.net>
* main.c:

View File

@ -1,4 +1,4 @@
MANIFEST for byacc-20141005, version t20141005
MANIFEST for byacc-20141006, version t20141006
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20141005
20141006

1041
contrib/byacc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
dnl Process this file with 'autoconf' to produce a 'configure' script
dnl $Id: configure.in,v 1.19 2014/04/22 22:56:51 tom Exp $
dnl $Id: configure.in,v 1.20 2014/10/06 22:39:39 tom Exp $
AC_PREREQ(2.52.20011201)
AC_REVISION($Revision: 1.19 $)
AC_REVISION($Revision: 1.20 $)
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config_h.in)
@ -54,6 +54,8 @@ CF_WITH_WARNINGS(Wwrite-strings)
CF_DISABLE_ECHO
CF_DISABLE_LEAKS
AC_TYPE_MODE_T
### output makefile
AC_OUTPUT(makefile)
CF_MAKE_DOCS(yacc,1)

View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.53 2014/10/06 00:55:28 tom Exp $ */
/* $Id: main.c,v 1.54 2014/10/06 22:40:07 tom Exp $ */
#include <signal.h>
#ifndef _WIN32
@ -574,7 +574,7 @@ open_tmpfile(const char *label)
result = 0;
if (name != 0)
{
int save_umask = umask(0600);
mode_t save_umask = umask(0177);
if ((mark = strrchr(label, '_')) == 0)
mark = label + strlen(label);

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20141005
%define AppVersion 20141006
%define UseProgram yacc
# $XTermId: byacc.spec,v 1.24 2014/10/04 16:37:39 tom Exp $
# $XTermId: byacc.spec,v 1.25 2014/10/06 22:52:03 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,3 +1,9 @@
byacc (20141006) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 06 Oct 2014 18:52:03 -0400
byacc (20141005) unstable; urgency=low
* maintenance updates

View File

@ -1 +1 @@
3.0 (quilt)
3.0 (native)

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20141005
%define AppVersion 20141006
%define UseProgram yacc
# $XTermId: mingw-byacc.spec,v 1.6 2014/10/04 16:37:39 tom Exp $
# $XTermId: mingw-byacc.spec,v 1.7 2014/10/06 22:52:03 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
#
DISTNAME= byacc-20141005
DISTNAME= byacc-20141006
PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/byacc/

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.57 2014/10/06 00:52:44 tom Exp $ */
/* $Id: reader.c,v 1.58 2014/10/06 22:15:08 tom Exp $ */
#include "defs.h"
@ -127,7 +127,7 @@ get_line(void)
if (line)
FREE(line);
linesize = LINESIZE + 1;
line = TCMALLOC(char, linesize);
line = TMALLOC(char, linesize);
NO_SPACE(line);
}
@ -135,10 +135,10 @@ get_line(void)
++lineno;
for (;;)
{
line[i] = (char)c;
line[i++] = (char)c;
if (c == '\n')
break;
if (++i >= linesize)
if ((i + 3) >= linesize)
{
linesize += LINESIZE;
line = TREALLOC(char, line, linesize);
@ -147,11 +147,12 @@ get_line(void)
c = getc(f);
if (c == EOF)
{
line[i] = '\n';
line[i++] = '\n';
saw_eof = 1;
break;
}
}
line[i] = '\0';
cptr = line;
return;
}