* src/tools/update-copyright-year: Insert `(C)'.
This commit is contained in:
parent
b77826e139
commit
fd8fc64efb
|
@ -1,3 +1,7 @@
|
||||||
|
2019-02-23 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/tools/update-copyright-year: Insert `(C)'.
|
||||||
|
|
||||||
2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
|
2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
|
||||||
|
|
||||||
[truetype] Mask numeric overflows.
|
[truetype] Mask numeric overflows.
|
||||||
|
|
|
@ -67,7 +67,8 @@ while (<>)
|
||||||
s {
|
s {
|
||||||
(?<begin>.*)
|
(?<begin>.*)
|
||||||
Copyright
|
Copyright
|
||||||
(?<space1>\ +)
|
(?<space1>(\ +
|
||||||
|
| \ +\(C\)\ +))
|
||||||
(?<first>[12][0-9][0-9][0-9])
|
(?<first>[12][0-9][0-9][0-9])
|
||||||
(?<middle>.+)
|
(?<middle>.+)
|
||||||
(?<last>[12][0-9][0-9][0-9])
|
(?<last>[12][0-9][0-9][0-9])
|
||||||
|
@ -78,14 +79,15 @@ while (<>)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# Fill line to the same length (if appropriate); we skip the middle
|
# Fill line to the same length (if appropriate); we skip the middle
|
||||||
# part but insert two spaces and `-'.
|
# part but insert `(C)', three spaces, and `-'.
|
||||||
my $space = length($+{space1}) - 1
|
my $space = length($+{space1}) - 1
|
||||||
+ length($+{middle}) - 1
|
+ length($+{middle}) - 1
|
||||||
+ length($+{space2}) - 1
|
+ length($+{space2}) - 1
|
||||||
+ length($+{space3});
|
+ length($+{space3})
|
||||||
|
- (length("(C)") + 1);
|
||||||
|
|
||||||
print "$+{begin}";
|
print "$+{begin}";
|
||||||
print "Copyright\ $+{first}-$year\ by";
|
print "Copyright\ (C)\ $+{first}-$year\ by";
|
||||||
print ' ' x $space if length($+{end});
|
print ' ' x $space if length($+{end});
|
||||||
print "$+{end}\n";
|
print "$+{end}\n";
|
||||||
$replaced = 1;
|
$replaced = 1;
|
||||||
|
@ -95,7 +97,8 @@ while (<>)
|
||||||
s {
|
s {
|
||||||
(?<begin>.*)
|
(?<begin>.*)
|
||||||
Copyright
|
Copyright
|
||||||
(?<space1>\ +)
|
(?<space1>(\ +
|
||||||
|
| \ +\(C\)\ +))
|
||||||
(?<first>[12][0-9][0-9][0-9])
|
(?<first>[12][0-9][0-9][0-9])
|
||||||
(?<space2>\ +)
|
(?<space2>\ +)
|
||||||
by
|
by
|
||||||
|
@ -103,7 +106,7 @@ while (<>)
|
||||||
(?<end>.*)
|
(?<end>.*)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# Fill line to the same length (if appropriate); we insert two
|
# Fill line to the same length (if appropriate); we insert three
|
||||||
# spaces, a `-', and the current year.
|
# spaces, a `-', and the current year.
|
||||||
my $space = length($+{space1}) - 1
|
my $space = length($+{space1}) - 1
|
||||||
+ length($+{space2}) - 1
|
+ length($+{space2}) - 1
|
||||||
|
@ -111,7 +114,7 @@ while (<>)
|
||||||
- (length($year) + 1);
|
- (length($year) + 1);
|
||||||
|
|
||||||
print "$+{begin}";
|
print "$+{begin}";
|
||||||
print "Copyright $+{first}-$year by";
|
print "Copyright\ (C)\ $+{first}-$year\ by";
|
||||||
# If $space is negative this inserts nothing.
|
# If $space is negative this inserts nothing.
|
||||||
print ' ' x $space if length($+{end});
|
print ' ' x $space if length($+{end});
|
||||||
print "$+{end}\n";
|
print "$+{end}\n";
|
||||||
|
|
Loading…
Reference in New Issue