# New Ticket Created by "Paul Cochrane"
# Please include the string: [perl #40371]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40371 >
Hi,
Attached is a patch for tools/dev/as2c.pl which adds a new subroutine
print_coda() which attaches the C coda to the autogenerated C files
and gets them to pass the code_coda.t test. This was patched against
revision 14669.
Regards,
Paul
Index: tools/dev/as2c.pl
===================================================================
--- tools/dev/as2c.pl (revision 14669)
+++ tools/dev/as2c.pl (working copy)
@@ -14,6 +14,7 @@
&create_s($cmd);
&parse_s("$src.s");
&add_glue("$src.c");
+$print_coda();
sub print_header {
my $s = shift;
@@ -27,6 +28,19 @@
EOT
}
+
+sub print_coda {
+ print <<EOT;
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+*/
+EOT
+}
+
sub create_s {
my $cmd = shift;
my $r = system($cmd);