summaryrefslogtreecommitdiff
path: root/regen/opcode.pl
diff options
context:
space:
mode:
Diffstat (limited to 'regen/opcode.pl')
-rwxr-xr-xregen/opcode.pl55
1 files changed, 9 insertions, 46 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl
index 4515424fb7..553a3faff2 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -141,25 +141,10 @@ foreach my $sock_func (qw(socket bind listen accept shutdown
# Emit defines.
-print <<"END";
-/* -*- buffer-read-only: t -*-
- *
- * opcode.h
- *
- * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- * 2001, 2002, 2003, 2004, 2005, 2006, 2007 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/opcode.pl from its data. Any changes made
- * here will be lost!
- */
-
-#ifndef PERL_GLOBAL_STRUCT_INIT
-
-END
+print read_only_top(lang => 'C', by => 'regen/opcode.pl', from => 'its data',
+ file => 'opcode.h', style => '*',
+ copyright => [1993 .. 2007]),
+ "#ifndef PERL_GLOBAL_STRUCT_INIT\n\n";
{
my $last_cond = '';
@@ -196,25 +181,10 @@ END
unimplemented();
}
-print $on <<"END";
-/* -*- buffer-read-only: t -*-
- *
- * opnames.h
- *
- * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- * 2007, 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/opcode.pl from its data. Any changes made
- * here will be lost!
- */
-
-typedef enum opcode {
-END
+print $on read_only_top(lang => 'C', by => 'regen/opcode.pl',
+ from => 'its data', style => '*',
+ file => 'opnames.h', copyright => [1999 .. 2008]),
+ "typedef enum opcode {\n";
my $i = 0;
for (@ops) {
@@ -499,14 +469,7 @@ my $pp_proto_new = 'pp_proto.h-new';
my $pp = safer_open($pp_proto_new);
-print $pp <<"END";
-/* -*- buffer-read-only: t -*-
- !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- This file is built by opcode.pl from its data. Any changes made here
- will be lost!
-*/
-
-END
+print $pp read_only_top(lang => 'C', by => 'opcode.pl', from => 'its data');
{
my %funcs;