mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
* NEWS: Version 2.0b.
* data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on the user's name space. All uses changed to __attribute__ ((__unused__)). (yyFail, yyMemoryExhausted, yyreportAmbiguity): Add __attribute__ ((__noreturn__)). * etc/clcommit: Remove. We weren't using it, and it failed "make maintainer-distcheck". * Makefile.maint: Merge from coreutils. (CVS_LIST, CVS_LIST_EXCEPT): New macros. (syntax-check-rules): Change list of rules as described below. (sc_cast_of_alloca_return_value, sc_dd_max_sym_length): (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof): (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope): (sc_trailing_space): New rules. (sc_xalloc_h_in_src): Remove. (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value): (sc_space_tab, sc_error_exit_success, sc_changelog): (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics): (makefile-check, po-check, author_mark_check): (makefile_path_separator_check, copyright-check): Use grep -n, to make it easier to find violations. Use CVS_LIST and CVS_LIST_EXCEPT. (header_regexp, h_re): Remove. (dd_c): New macro. (sc_dd_max_sym_length, .re-list, news-date-check): New rules. (my-distcheck): Use more-modern GCC flags. (signatures, %.asc): Remove. (rel-files, announcement): Remove signatures. Restore old updating code, even though we don't use it, so that we're the same as coreutils. (alpha, beta, major): Depend on news-date-check. Make the upload commands. * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space. * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise. * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise. * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise. * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise. * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise. * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise. * tests/sets.at: Likewise. * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that we comment out the Autoconf version number. * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as it's error-prone and "make maintainer-distcheck" rejects it. * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H. Indent calls to "error" to pacify "make maintainer-distcheck", when the calls are not intended to be translated. * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h. * src/Makefile.am (DEFS): Use +=, to pacify "make maintainer-distcheck". (bison_SOURCES): Add scan-skel.h. (sc_tight_scope): New rule, from coreutils. * src/files.c (src_extension, header_extension): Now static, not extern. * src/getargs.c (short_options): Likewise. * src/muscle_tab.c (muscle_table): Likewise. * src/parse-gram.y (current_class, current_type, current_prec): Likewise. * src/reader.c (grammar_end, previous_rule_end): Likewise. * src/getargs.h: Redo comments to pacify "make maintainer-distcheck". * src/main.c (main): Cast bindtextdomain and textdomain calls to void, to avoid warning when NLS is disabled. * src/output.c: Include scan-skel.h. (scan_skel): Remove decl, since scan-skel.h does this. (output_skeleton): Indent calls to "error" to pacify "make maintainer-distcheck". * src/print_graph.c: Don't include <obstack.h>, as system.h does this. * src/reader.h (gram_end, gram_lineno): New decls to pacify "make maintainer-distcheck". * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in): (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno): (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug): (skel_lex_destroy, scan_skel): Move these decls to... * src/scan-skel.h: New file. * src/uniqstr.c (uniqstr_assert): Indent calls to "error" to pacify "make maintainer-distcheck". * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR), not @VAR@. * tests/torture.at: Revamp to avoid misuse of atoi that "make maintainer-distcheck" complained about.
This commit is contained in:
300
etc/clcommit
300
etc/clcommit
@@ -1,300 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# clcommit version 0.9.5
|
||||
|
||||
# Copyright (C) 1999, 2000, Free Software Foundation
|
||||
|
||||
# This script is Free Software, and it can be copied, distributed and
|
||||
# modified as defined in the GNU General Public License. A copy of
|
||||
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
# Originally by Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
|
||||
# Pretty much rewritten by Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
# This scripts eases checking in changes to CVS-maintained projects
|
||||
# with ChangeLog files. It will check that there have been no
|
||||
# conflicting commits in the CVS repository and print which files it
|
||||
# is going to commit to stderr. A list of files to compare and to
|
||||
# check in can be given in the command line. If it is not given, all
|
||||
# files in the current directory (and below, unless `-l' is given) are
|
||||
# considered for check in.
|
||||
|
||||
# The commit message will be extracted from the differences between a
|
||||
# file named ChangeLog* in the commit list, or named after -C, and the
|
||||
# one in the repository (unless a message was specified with `-m' or
|
||||
# `-F'). An empty message is not accepted (but a blank line is). If
|
||||
# the message is acceptable, it will be presented for verification
|
||||
# (and possible edition) using the $PAGER environment variable (or
|
||||
# `more', if it is not set, or `cat', if the `-f' switch is given).
|
||||
# If $PAGER exits successfully, the modified files (at that moment)
|
||||
# are checked in, unless `-n' was specified, in which case nothing is
|
||||
# checked in.
|
||||
|
||||
# usage: clcommit [-v] [-h] [-f] [-l] [-n] [-q] [-z N] [-C ChangeLog_file]
|
||||
# [-m msg|-F msg_file|-1] [--] [file|dir ...]
|
||||
|
||||
# -f --force don't check (unless *followed* by -n), and just
|
||||
# display commit message instead of running $PAGER
|
||||
# -l --local don't descend into subdirectories
|
||||
# -m msg --message=msg set commit message
|
||||
# --msg=msg same as -m
|
||||
# -F file --file=file read commit message from file
|
||||
# -1 --first extract first entry from ChangeLog, no cvs diff
|
||||
# -C file --changelog=file extract commit message from specified ChangeLog
|
||||
# --fast same as --force --first
|
||||
# -n --dry-run don't commit anything
|
||||
# -q --quiet run cvs in quiet mode
|
||||
# -zN --compress=N set compression level (0-9, 0=none, 9=max)
|
||||
# -v --version print version information
|
||||
# -h,-? --help print short or long help message
|
||||
|
||||
name=clcommit
|
||||
: ${CVS=cvs}
|
||||
cvsopt=
|
||||
updateopt=
|
||||
commitopt=
|
||||
dry_run=false
|
||||
commit=:
|
||||
update=:
|
||||
log_file="${TMPDIR-/tmp}/commitlog.$$"
|
||||
first=false
|
||||
|
||||
rm -f "$log_file"
|
||||
trap 'rm -f "$log_file"; exit 1' 1 2 15
|
||||
|
||||
# this just eases exit handling
|
||||
main_repeat=":"
|
||||
while $main_repeat; do
|
||||
|
||||
repeat="test $# -gt 0"
|
||||
while $repeat; do
|
||||
case "$1" in
|
||||
--fast)
|
||||
shift
|
||||
set fnord --force --first ${1+"$@"}
|
||||
shift
|
||||
;;
|
||||
-f|--force)
|
||||
update=false
|
||||
PAGER=cat
|
||||
shift
|
||||
;;
|
||||
-l|--local)
|
||||
updateopt="$updateopt -l"
|
||||
commitopt="$commitopt -l"
|
||||
shift
|
||||
;;
|
||||
-m|--message|--msg)
|
||||
if test $# = 1; then
|
||||
echo "$name: missing argument for $1" >&2
|
||||
break
|
||||
fi
|
||||
if $first || test -f "$log_file"; then
|
||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
||||
break
|
||||
fi
|
||||
shift
|
||||
echo "$1" > "$log_file"
|
||||
shift
|
||||
;;
|
||||
-F|--file)
|
||||
if $first || test -f "$log_file"; then
|
||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
||||
break
|
||||
fi
|
||||
if test $# = 1; then
|
||||
echo "$name: missing argument for $1" >&2
|
||||
break
|
||||
fi
|
||||
shift
|
||||
if cat < "$1" > "$log_file"; then :; else
|
||||
break
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-1|--first)
|
||||
if test -f "$log_File"; then
|
||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
||||
break
|
||||
fi
|
||||
first=:
|
||||
shift
|
||||
;;
|
||||
-C|--[cC]hange[lL]og)
|
||||
if test $# = 1; then
|
||||
echo "$name: missing argument for $1" >&2
|
||||
break
|
||||
fi
|
||||
shift
|
||||
if test ! -f "$1"; then
|
||||
echo "$name: ChangeLog file \`$1' does not exist" >&2
|
||||
break
|
||||
fi
|
||||
ChangeLog="$1"
|
||||
shift
|
||||
;;
|
||||
-n|--dry-run)
|
||||
commit=false
|
||||
update=true
|
||||
shift
|
||||
;;
|
||||
-q|--quiet)
|
||||
cvsopt="$cvsopt -q"
|
||||
shift
|
||||
;;
|
||||
-v|--verbose)
|
||||
cvsopt="$cvsopt -t"
|
||||
shift
|
||||
;;
|
||||
-z|--compress)
|
||||
if test $# = 1; then
|
||||
echo "$name: missing argument for $1" >&2
|
||||
break
|
||||
fi
|
||||
case "$2" in
|
||||
[0-9]) :;;
|
||||
*) echo "$name: invalid argument for $1" >&2
|
||||
break
|
||||
;;
|
||||
esac
|
||||
cvsopt="$cvsopt -z$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
|
||||
-m*|-F*|-C*|-z*)
|
||||
opt=`echo "$1" | sed '1s/^\(..\).*$/\1/;q'`
|
||||
arg=`echo "$1" | sed '1s/^-[a-zA-Z0-9]//'`
|
||||
shift
|
||||
set -- "$opt" "$arg" ${1+"$@"}
|
||||
;;
|
||||
--message=*|--msg=*|--file=*|--[Cc]hange[Ll]og=*|--compress=*)
|
||||
opt=`echo "$1" | sed '1s/^\(--[^=]*\)=.*/\1/;q'`
|
||||
arg=`echo "$1" | sed '1s/^--[^=]*=//'`
|
||||
shift
|
||||
set -- "$opt" "$arg" ${1+"$@"}
|
||||
;;
|
||||
|
||||
-v|--version)
|
||||
sed '/^# '$name' version /,/^# Heavily modified by/ { s/^# //; p; }; d' < $0
|
||||
exit 0
|
||||
;;
|
||||
-\?|-h)
|
||||
sed '/^# usage:/,/# -h/ { s/^# //; p; }; d' < $0 &&
|
||||
echo
|
||||
echo "run \`$name --help | more' for full usage"
|
||||
exit 0
|
||||
;;
|
||||
--help)
|
||||
sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
|
||||
exit 0
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
repeat=false
|
||||
;;
|
||||
-*)
|
||||
echo "$name: invalid flag $1" >&2
|
||||
break
|
||||
;;
|
||||
*)
|
||||
repeat=false
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# might have used break 2 within the previous loop, but so what
|
||||
$repeat && break
|
||||
|
||||
$update && \
|
||||
if echo "$name: checking for conflicts..." >&2
|
||||
($CVS $cvsopt -q -n update $updateopt ${1+"$@"} 2>/dev/null \
|
||||
| while read line; do
|
||||
echo "$line"
|
||||
echo "$line" >&3
|
||||
done | grep '^C') 3>&1 >/dev/null; then
|
||||
echo "$name: some conflicts were found, aborting..." >&2
|
||||
break
|
||||
fi
|
||||
|
||||
if test ! -f "$log_file"; then
|
||||
if test -z "$ChangeLog"; then
|
||||
for f in ${1+"$@"}; do
|
||||
case "$f" in
|
||||
ChangeLog* | */ChangeLog*)
|
||||
if test -z "$ChangeLog"; then
|
||||
ChangeLog="$f"
|
||||
else
|
||||
echo "$name: multiple ChangeLog files: $ChangeLog and $f" >&2
|
||||
break
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
echo "$name: checking commit message..." >&2
|
||||
if $first; then
|
||||
skipping=:
|
||||
sed 's,^,+,' < ${ChangeLog-ChangeLog} |
|
||||
while read line; do
|
||||
case "$line" in
|
||||
"+2"*) if $skipping; then skipping=false; else break; fi;;
|
||||
"+ "*)
|
||||
echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
|
||||
echo "$line" | sed 's/^.//' >&2;;
|
||||
"+ "*)
|
||||
$skipping || echo "$line" ;;
|
||||
esac
|
||||
done |
|
||||
sed 's,^\+ ,,' > "$log_file" || break
|
||||
else
|
||||
$CVS $cvsopt diff -u ${ChangeLog-ChangeLog} |
|
||||
while read line; do
|
||||
case $line in
|
||||
"--- "*) :;;
|
||||
"-"*)
|
||||
echo "$name: *** Warning: the following line in ChangeLog diff is suspicious:" >&2
|
||||
echo "$line" | sed 's/^.//' >&2;;
|
||||
"+ "*)
|
||||
echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
|
||||
echo "$line" | sed 's/^.//' >&2;;
|
||||
"+") echo;;
|
||||
"+ "*) echo "$line";;
|
||||
esac
|
||||
done |
|
||||
sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
|
||||
|| break
|
||||
fi
|
||||
# The sed script above removes "+TAB" from the beginning of a line, then
|
||||
# deletes the first and/or the last line, when they happen to be empty
|
||||
fi
|
||||
|
||||
if grep '[^ ]' < "$log_file" > /dev/null; then :; else
|
||||
echo "$name: empty commit message, aborting" >&2
|
||||
break
|
||||
fi
|
||||
|
||||
if grep '^$' < "$log_file" > /dev/null; then
|
||||
echo "$name: *** Warning: blank lines should not appear within commit messages." >&2
|
||||
echo "$name: *** They should be used to separate distinct commits." >&2
|
||||
fi
|
||||
|
||||
${PAGER-more} "$log_file" || break
|
||||
|
||||
sleep 1 # give the user some time for a ^C
|
||||
|
||||
# Do not check for empty $log_file again, even though the user might have
|
||||
# zeroed it out. If s/he did, it was probably intentional.
|
||||
|
||||
if $commit; then
|
||||
$CVS $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break
|
||||
fi
|
||||
|
||||
main_repeat=false
|
||||
done
|
||||
|
||||
rm -f "$log_file"
|
||||
|
||||
# if main_repeat was not set to `false', we failed
|
||||
$main_repeat && exit 1
|
||||
exit 0
|
||||
Reference in New Issue
Block a user