summaryrefslogtreecommitdiff
path: root/regen/overload.pl
diff options
context:
space:
mode:
Diffstat (limited to 'regen/overload.pl')
-rw-r--r--regen/overload.pl50
1 files changed, 10 insertions, 40 deletions
diff --git a/regen/overload.pl b/regen/overload.pl
index 1cd07dd954..343629f81c 100644
--- a/regen/overload.pl
+++ b/regen/overload.pl
@@ -39,22 +39,12 @@ my $p = safer_open('lib/overload/numbers.pm');
select $p;
+print read_only_top(lang => 'Perl', by => 'regen/overload.pl',
+ file => 'lib/overload/numbers.pm', copyright => [2008]);
+
{
local $" = "\n ";
print <<"EOF";
-# -*- buffer-read-only: t -*-
-#
-# lib/overload/numbers.pm
-#
-# Copyright (C) 2008 by Larry Wall and others
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the README file.
-#
-# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by regen/overload.pl
-#
-
package overload::numbers;
our \@names = qw#
@@ -72,35 +62,16 @@ our \@enums = qw#
EOF
}
-
-sub print_header {
- my $file = shift;
- print <<"EOF";
-/* -*- buffer-read-only: t -*-
- *
- * $file
- *
- * Copyright (C) 1997, 1998, 2000, 2001, 2005, 2006, 2007, 2011
- * by Larry Wall and others
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Artistic License, as specified in the README file.
- *
- * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- * This file is built by regen/overload.pl
- */
-EOF
+for ([$c, 'overload.c'], [$h, 'overload.h']) {
+ my ($handle, $file) = @$_;
+ print $handle read_only_top(lang => 'C', by => 'regen/overload.pl',
+ file => $file, style => '*',
+ copyright => [1997, 1998, 2000, 2001,
+ 2005 .. 2007, 2011]);
}
-select $c;
-print_header('overload.c');
-
select $h;
-print_header('overload.h');
-print <<'EOF';
-
-enum {
-EOF
+print "enum {\n";
for (0..$#enums) {
my $op = $names[$_];
@@ -123,7 +94,6 @@ print <<'EOF';
EOF
print $c <<'EOF';
-
#define AMG_id2name(id) (PL_AMG_names[id]+1)
#define AMG_id2namelen(id) (PL_AMG_namelens[id]-1)