diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-01-22 23:29:59 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-01-22 23:29:59 +0000 |
commit | 892eaa71eb6f1879742dd842ce9a392b8dfbb1a9 (patch) | |
tree | 7889693139d2ddf959035f1dec0b1f7c9ce762db /regen | |
parent | e0b44199a03c8f4b454c18ecbb337f4facfcdc8c (diff) | |
download | perl-892eaa71eb6f1879742dd842ce9a392b8dfbb1a9.tar.gz |
In embed.pl, move the logic for perlapi.c's Tolkien quote out from do_not_edit()
Previously do_not_edit() has a special case for this based on the filename
parameter. Now the code to add the comment is next to the relevant call to
do_not_edit().
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/embed.pl | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/regen/embed.pl b/regen/embed.pl index d6aef5a7c7..6c60ee1edc 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -67,17 +67,6 @@ Edit those files and run 'make regen_headers' to effect changes. EOW - $warning .= <<EOW if $file eq 'perlapi.c'; - -Up to the threshold of the door there mounted a flight of twenty-seven -broad stairs, hewn by some unknown art of the same black stone. This -was the only entrance to the tower; ... - - [p.577 of _The Lord of the Rings_, III/x: "The Voice of Saruman"] - - -EOW - if ($file =~ m:\.[ch]$:) { $warning =~ s:^: * :gm; $warning =~ s: +$::gm; @@ -814,7 +803,19 @@ EOT safer_close($capih); rename_if_different('perlapi.h-new', 'perlapi.h'); -print $capi do_not_edit ("perlapi.c"), <<'EOT'; +my $warning = do_not_edit ("perlapi.c"); +$warning =~ s! \*/\n! * + * + * Up to the threshold of the door there mounted a flight of twenty-seven + * broad stairs, hewn by some unknown art of the same black stone. This + * was the only entrance to the tower; ... + * + * [p.577 of _The Lord of the Rings_, III/x: "The Voice of Saruman"] + * + */ +!; + +print $capi $warning, <<'EOT'; #include "EXTERN.h" #include "perl.h" |