mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
480 B
32 lines
480 B
$Header = shift(@ARGV);
|
|
$Source = shift(@ARGV);
|
|
|
|
if (!open(SOURCE, "<$Source"))
|
|
{
|
|
die "Can't open $Source\n";
|
|
}
|
|
if (!open(HEADER, ">$Header"))
|
|
{
|
|
die "Can't open $Header\n";
|
|
}
|
|
|
|
while (<SOURCE>)
|
|
{
|
|
if (/^FUNC /)
|
|
{
|
|
s/^FUNC //;
|
|
for (;;)
|
|
{
|
|
print HEADER $_;
|
|
if (/\)$/)
|
|
{
|
|
last;
|
|
}
|
|
$_ = <SOURCE>;
|
|
}
|
|
print HEADER ";\n";
|
|
}
|
|
}
|
|
|
|
close(SOURCE);
|
|
close(HEADER);
|