summaryrefslogtreecommitdiff
path: root/regen/reentr.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-23 00:09:24 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-23 00:13:20 +0000
commit78102347e0341b1cd4795accd0ca5ff1f2621bb2 (patch)
treea8f150f8f20133aff3a38c5b8963326398a9879f /regen/reentr.pl
parent03f96b769ecd6ff2f839c64bd87c8d185f8ce3f5 (diff)
downloadperl-78102347e0341b1cd4795accd0ca5ff1f2621bb2.tar.gz
Move all the generated file header printing into read_only_top()
Previously all the scripts in regen/ had code to generate header comments (buffer-read-only, "do not edit this file", and optionally regeneration script, regeneration data, copyright years and filename). This change results in some minor reformatting of header blocks, and standardises the copyright line as "Larry Wall and others".
Diffstat (limited to 'regen/reentr.pl')
-rw-r--r--regen/reentr.pl41
1 files changed, 14 insertions, 27 deletions
diff --git a/regen/reentr.pl b/regen/reentr.pl
index ba0cfdf466..3586bc1348 100644
--- a/regen/reentr.pl
+++ b/regen/reentr.pl
@@ -54,20 +54,12 @@ my %map = (
# safer_unlink 'reentr.h';
my $h = safer_open("reentr.h-new");
select $h;
-print <<EOF;
-/* -*- buffer-read-only: t -*-
- *
- * reentr.h
- *
- * Copyright (C) 2002, 2003, 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/reentr.pl from data in regen/reentr.pl.
- */
+print read_only_top(lang => 'C', by => 'regen/reentr.pl',
+ from => 'data in regen/reentr.pl',
+ file => 'reentr.h', style => '*',
+ copyright => [2002, 2003, 2005 .. 2007]);
+print <<EOF;
#ifndef REENTR_H
#define REENTR_H
@@ -803,21 +795,14 @@ rename_if_different('reentr.h-new', 'reentr.h');
# safer_unlink 'reentr.c';
my $c = safer_open("reentr.c-new");
select $c;
-print <<EOF;
-/* -*- buffer-read-only: t -*-
- *
- * reentr.c
- *
- * Copyright (C) 2002, 2003, 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/reentr.pl from data in regen/reentr.pl.
- *
+my $top = read_only_top(lang => 'C', by => 'regen/reentr.pl',
+ from => 'data in regen/reentr.pl',
+ file => 'reentr.c', style => '*',
+ copyright => [2002, 2003, 2005 .. 2007]);
+
+$top =~ s! \*/\n! *
* "Saruman," I said, standing away from him, "only one hand at a time can
- * wield the One, and you know that well, so do not trouble to say we!"
+ * wield the One, and you know that well, so do not trouble to say we\!"
*
* This file contains a collection of automatically created wrappers
* (created by running reentr.pl) for reentrant (thread-safe) versions of
@@ -826,7 +811,9 @@ print <<EOF;
* care about the differences between various platforms' idiosyncrasies
* regarding these reentrant interfaces.
*/
+!s;
+print $top, <<EOF;
#include "EXTERN.h"
#define PERL_IN_REENTR_C
#include "perl.h"