c2man: Correct extension for non-dlls (based on a patch by Vijay Kamuju).

This commit is contained in:
Jon Griffiths 2008-06-24 13:54:59 -07:00 committed by Alexandre Julliard
parent d1f1346f54
commit 3ef22e56f2
1 changed files with 5 additions and 3 deletions

View File

@ -90,14 +90,15 @@ sub process_extra_comment($);
sub process_spec_file($) sub process_spec_file($)
{ {
my $spec_name = shift; my $spec_name = shift;
my $dll_name = $spec_name; my ($dll_name, $dll_ext) = split(/\./, $spec_name);
$dll_name =~ s/\..*//; # Strip the file extension $dll_ext = "dll" if ( $dll_ext eq "spec" );
my $uc_dll_name = uc $dll_name; my $uc_dll_name = uc $dll_name;
my $spec_details = my $spec_details =
{ {
NAME => $spec_name, NAME => $spec_name,
DLL_NAME => $dll_name, DLL_NAME => $dll_name,
DLL_EXT => $dll_ext,
NUM_EXPORTS => 0, NUM_EXPORTS => 0,
NUM_STUBS => 0, NUM_STUBS => 0,
NUM_FUNCS => 0, NUM_FUNCS => 0,
@ -227,6 +228,7 @@ sub process_source_file($)
COMMENT_NAME => "", COMMENT_NAME => "",
ALT_NAME => "", ALT_NAME => "",
DLL_NAME => "", DLL_NAME => "",
DLL_EXT => "",
ORDINAL => "", ORDINAL => "",
RETURNS => "", RETURNS => "",
PROTOTYPE => [], PROTOTYPE => [],
@ -1095,7 +1097,7 @@ sub output_spec($)
my $comment = my $comment =
{ {
FILE => $spec_details->{DLL_NAME}, FILE => $spec_details->{DLL_NAME},
COMMENT_NAME => $spec_details->{DLL_NAME}.".dll", COMMENT_NAME => $spec_details->{DLL_NAME}.".".$spec_details->{DLL_EXT},
ALT_NAME => $spec_details->{DLL_NAME}, ALT_NAME => $spec_details->{DLL_NAME},
DLL_NAME => "", DLL_NAME => "",
ORDINAL => "", ORDINAL => "",