mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 22:07:36 +00:00
$HopeName$ -> $Id$ space -> arena mps_arena_create now takes three arguments /usr/local/perl -> /usr/bin/perl -w Missing #include <stdio.h> in several tests Bogus closedir(DIR); in script/clib Copied from Perforce Change: 182199 ServerID: perforce.ravenbrook.com
53 lines
771 B
Perl
53 lines
771 B
Perl
#!/usr/bin/perl -w
|
|
# $Id$
|
|
#
|
|
# convert to new-style test header format
|
|
#
|
|
foreach $file (@ARGV) {
|
|
unless (open(IN, $file)) {die $file." not found";}
|
|
open(OUT, ">new/$file");
|
|
print $file." --> new/".$file."\n";
|
|
|
|
print OUT "/* TEST_HEADER\n";
|
|
|
|
$_ = <IN>;
|
|
s+/\*\s*test + summary = +;
|
|
print OUT $_;
|
|
|
|
$_ = <IN>;
|
|
s/\s*language\s*c/ language = c/;
|
|
print OUT $_;
|
|
|
|
$_ = <IN>;
|
|
if (m/\s*link /) {
|
|
s/\s*link / link = /;
|
|
print OUT $_;
|
|
$_ = <IN>;
|
|
}
|
|
|
|
if (m+\*/+) {
|
|
print OUT "END_HEADER\n";
|
|
print OUT "*/\n";
|
|
} else {
|
|
print OUT "OUTPUT_SPEC\n";
|
|
print OUT $_;
|
|
$_ = <IN>;
|
|
while (!m+\*/+) {
|
|
s/\s*/ /;
|
|
print OUT $_;
|
|
$_ = <IN>;
|
|
}
|
|
print OUT "END_HEADER\n";
|
|
print OUT "*/\n";
|
|
|
|
}
|
|
|
|
while (<IN>) {
|
|
print OUT $_;
|
|
}
|
|
|
|
close(OUT);
|
|
close(IN);
|
|
|
|
}
|
|
|