summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-10-24 14:32:06 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-10-24 14:35:06 -0700
commit4a083b0d36a8b2afe23447dbc357de3641140d4d (patch)
tree4a36c261a476fae4d8143e2692789e236e05fa08 /build-aux
parent57162dbc065a3b9f9b8dfd555ef628e639061839 (diff)
downloademacs-4a083b0d36a8b2afe23447dbc357de3641140d4d.tar.gz
Update from Gnulib
This incorporates: 2019-10-23 nstrftime: speed up integer overflow checking 2019-10-23 port better to GCC under macOS 2019-10-15 inttypes: use more-robust test for int range 2019-10-14 update-copyright: use en dashes in .texi ranges * build-aux/update-copyright, lib/intprops.h, lib/inttypes.in.h: * lib/nstrftime.c, lib/verify.h: Copy from Gnulib.
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/update-copyright16
1 files changed, 9 insertions, 7 deletions
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index b3f6b298056..e4809f620d6 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -98,7 +98,7 @@
# 6. Blank lines, even if preceded by the prefix, do not appear
# within the FSF copyright statement.
# 7. Each copyright year is 2 or 4 digits, and years are separated by
-# commas or dashes. Whitespace may appear after commas.
+# commas, "-", or "--". Whitespace may appear after commas.
#
# Environment variables:
#
@@ -192,7 +192,7 @@ while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
$holder_re =~ s/\s/$ws_re/g;
my $stmt_remainder_re =
"(?:$ws_re$circle_c_re)?"
- . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+ . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|--?))*"
. "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
if (/\G$stmt_remainder_re/)
{
@@ -231,26 +231,28 @@ if (defined $stmt_re)
# Make the use of intervals consistent.
if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
{
- $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+ $stmt =~ s/(\d{4})--?(\d{4})/join(', ', $1..$2)/eg;
}
else
{
+ my $ndash = $ARGV =~ /\.tex(i(nfo)?)?$/ ? "--" : "-";
+
$stmt =~
s/
(\d{4})
(?:
- (,\ |-)
+ (,\ |--?)
((??{
- if ($2 eq '-') { '\d{4}'; }
+ if ($2 ne ', ') { '\d{4}'; }
elsif (!$3) { $1 + 1; }
else { $3 + 1; }
}))
)+
- /$1-$3/gx;
+ /$1$ndash$3/gx;
# When it's 2, emit a single range encompassing all year numbers.
$ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
- and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
+ and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1$ndash$2/;
}
# Format within margin.