windows-nt/Source/XPSP1/NT/sdktools/debuggers/ia64tools/include/makehdr.pl

33 lines
480 B
Perl
Raw Normal View History

2020-09-26 03:20:57 -05:00
$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);