Minor bug fixes.

This commit is contained in:
Patrik Stridvall 2000-05-18 00:07:31 +00:00 committed by Alexandre Julliard
parent 244ad84f50
commit 54e1552822
6 changed files with 85 additions and 5 deletions

View File

@ -193,6 +193,10 @@ dlls/olesvr
dlls/olesvr
% dlls/opengl32/opengl32.spec
dlls/opengl32
% dlls/psapi/psapi.spec
dlls/psapi

View File

@ -0,0 +1,50 @@
%long
BOOL
DWORD
FLOAT
GLbitfield
GLboolean
GLbyte
GLclampd
GLclampf
GLdouble
GLenum
GLfloat
GLint
GLshort
GLsizei
GLubyte
GLuint
GLushort
HDC
HGLRC
UINT
int
%ptr
COLORREF *
GLbyte *
GLboolean *
GLclampf *
GLdouble *
GLfloat *
GLint *
GLshort *
GLuint *
GLubyte *
GLushort *
GLvoid *
LPGLYPHMETRICSFLOAT
LPLAYERPLANEDESCRIPTOR
void *
void **
%str
LPCSTR
%void
void

View File

@ -197,7 +197,7 @@ sub read_all_spec_files {
my $win32api = shift;
my @files = map {
s/^.\/(.*)$/$1/;
s/^$wine_dir\/(.*)$/$1/;
if(&$file_type($_) eq "library") {
$_;
} else {
@ -264,7 +264,7 @@ sub parse_spec_file {
$$function_module{$internal_name} .= " & $module";
}
if($$options->spec_mismatch) {
if(0 && $$options->spec_mismatch) {
if($external_name eq "@") {
if($internal_name !~ /^\U$module\E_$ordinal$/) {
$$output->write("$file: $external_name: the internal name ($internal_name) mismatch\n");
@ -531,6 +531,23 @@ sub all_functions {
return sort(keys(%$function_calling_convention));
}
sub all_functions_in_module {
my $self = shift;
my $function_calling_convention = \%{$self->{FUNCTION_CALLING_CONVENTION}};
my $function_module = \%{$self->{FUNCTION_MODULE}};
my $module = shift;
my @names;
foreach my $name (keys(%$function_calling_convention)) {
if($$function_module{$name} eq $module) {
push @names, $name;
}
}
return sort(@names);
}
sub all_functions_stub {
my $self = shift;
my $function_stub = \%{$self->{FUNCTION_STUB}};

View File

@ -76,7 +76,7 @@ sub file_type {
$file_dir =~ s/^$wine_dir\///;
if($file_dir =~ /^(libtest|program|rc|tools)/ ||
if($file_dir =~ /^(libtest|program|rc|tests|tools)/ ||
$file =~ /dbgmain\.c$/ ||
$file =~ /wineclipsrv\.c$/) # FIXME: Kludge
{
@ -405,6 +405,7 @@ foreach my $file ($options->c_files) {
$name2 = s/^(.*?)16_fn(.*?)$/$116_$2/;
} elsif(!defined($module16) && defined($module32)) {
my @uc_modules32 = split(/\s*\&\s*/, uc($module32));
push @uc_modules32, "wine";
$name1 = $internal_name;
foreach my $uc_module32 (@uc_modules32) {

View File

@ -205,6 +205,10 @@ sub new {
}
}
if($self->help) {
return $self;
}
my $c_paths;
if($#$c_files == -1 || ($#$c_files == 0 && $$c_files[0] eq $wine_dir)) {
$c_paths = ".";

View File

@ -77,13 +77,17 @@ sub parse_c_file {
last;
}
# remove comments
if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) { push @comments, $2; $again = 1; next };
# remove C comments
if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) { push @comments, $2; $again = 1; next }
if(/^(.*?)\/\*/s) {
$lookahead = 1;
next;
}
# remove C++ comments
while(s/^(.*?)\/\/.*?$/$1\n/s) { $again = 1 }
if($again) { next; }
# remove empty rows
if(/^\s*$/) { next; }