Commit 41f99ba2 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

- Minor API files update.

- Minor bug fixes.
parent 9db72e3b
......@@ -75,6 +75,10 @@ objects
dlls/gdi
% dlls/glu32/glu32.spec
dlls/glu32
% dlls/icmp/icmp.spec
dlls/icmp
......
......@@ -8,7 +8,6 @@ ULONG
%ptr
IAVIFile *
LPCLSID
PAVIFILE
PAVIFILE *
......
......@@ -9,13 +9,12 @@ ULONG
%ptr
AVICOMPRESSOPTIONS *
AVIFILEINFOA *
AVIFILEINFOW *
AVISTREAMINFOA *
AVISTREAMINFOW *
CLSID *
IAVIFile *
LONG *
LPAVIFILEINFOA
LPAVIFILEINFOW
LPBITMAPINFOHEADER
LPCLSID
LPVOID
......
%double
double
%long
int
%ptr
char *
void *
......@@ -100,6 +100,7 @@ LPMEMORYSTATUS
LPMEMORY_BASIC_INFORMATION
LPMODULEENTRY32
LPOVERLAPPED
LPOVERLAPPED *
LPOVERLAPPED_COMPLETION_ROUTINE
LPPROCESSENTRY32
LPPROCESS_HEAP_ENTRY
......
......@@ -4,4 +4,4 @@ DWORD
HDRVR
LONG
UINT
WORD
......@@ -65,7 +65,9 @@ struct _stat *
struct _timeb *
struct _utimbuf *
struct _wfinddata_t *
terminate_function
type_info *
unexpected_function
unsigned char *
unsigned int *
va_list
......
......@@ -19,6 +19,7 @@ HWND
LPARAM
LRESULT
UCHAR
REGSAM
UINT
WCHAR
WORD
......
......@@ -21,12 +21,13 @@ int
%ptr
BYTE *
WINDOWPOS *
CREATESTRUCTA *
LPBYTE
LPDIDEVICEOBJECTDATA
LPDWORD
LPMOUSE_EVENT_PROC
LPVOID
WINDOWPOS *
struct tagCURSORICONINFO *
struct tagWND *
......
%long
BOOL
DWORD
HRESULT
long
%ptr
IBindCtx *
IBindStatusCallback *
IBindStatusCallback **
IMoniker *
IMoniker **
LPVOID *
......
......@@ -7,4 +7,4 @@ DWORD
LPDWORD
LPSRB
LPVOID
PASPI32BUFF
......@@ -11,6 +11,7 @@ HWND
INT
LONG
UINT
WPARAM
WORD
%long # --forbidden
......@@ -23,11 +24,15 @@ int
BYTE *
CURSORICONINFO *
CREATESTRUCTA *
HANDLE *
LPBYTE
LPDIDEVICEOBJECTDATA
LPDWORD
LPMOUSE_EVENT_PROC
LPRECT
LPVOID
RECT *
WINDOWPOS *
WND *
......
......@@ -15,21 +15,34 @@
use strict;
my $wine_dir;
my $winapi_dir;
my $winapi_check_dir;
my $tool;
BEGIN {
if($0 =~ /^((.*?)\/?tools\/winapi_check)\/winapi_check$/)
if($0 =~ m%^((.*?)/?tools/([^/]+))/winapi_check$%)
{
$winapi_check_dir = $1;
if($2 ne "")
{
$wine_dir = $2;
} else {
$wine_dir = ".";
}
$winapi_dir = $1;
$winapi_check_dir = $1;
$tool = $3;
if(defined($2) && $2 ne "")
{
$wine_dir = $2;
} else {
$wine_dir = ".";
}
$winapi_dir =~ s%^\./%%;
$winapi_dir =~ s/$tool/winapi/;
$winapi_check_dir =~ s%^\./%%;
} else {
print STDERR "$tool: You must run this tool in the main Wine directory or a sub directory\n";
exit 1;
}
@INC = ($winapi_check_dir);
@INC = ($winapi_check_dir, $winapi_dir);
require "modules.pm";
require "nativeapi.pm";
......@@ -63,7 +76,8 @@ if(length($wine_dir) != 1) {
$pwd =~ s/\/([^\/]*)$//;
$current_dir = "$1/$current_dir";
}
$current_dir =~ s/\/.$//;
$current_dir =~ s%/\.$%%;
$current_dir =~ s%^\./%%;
}
my $output = 'output'->new;
......@@ -88,12 +102,12 @@ sub file_type {
$file_dir =~ s/^$wine_dir\///;
if($file_dir =~ /^(libtest|program|rc|tests|tools)/ ||
if($file_dir =~ /^(libtest|programs|rc|server|tests|tools)/ ||
$file =~ /dbgmain\.c$/ ||
$file =~ /wineclipsrv\.c$/) # FIXME: Kludge
{
return "application";
} elsif($file_dir =~ /^(debug|miscemu)/) {
} elsif($file_dir =~ /^(debugger|miscemu)/) {
return "emulator";
} else {
return "library";
......@@ -102,14 +116,29 @@ sub file_type {
sub file_skip {
local $_ = shift;
if(/agl.c$/) {
return 1;
}
s%^\./%%;
m%^(?:libtest|programs|rc|server|tests|tools)/% && return 1;
m%^(?:debugger|miscemu|tsx11|unicode)/% && return 1;
m%^dlls/wineps/data/% && return 1;
m%^windows/x11drv/wineclipsrv.c% && return 1;
m%^dlls/winmm/wineoss/midipatch.c% && return 1;
return 0;
}
sub files_skip {
my @files;
foreach my $file (@_) {
if(!file_skip($file)) {
push @files, $file;
}
}
return @files;
}
my $modules = 'modules'->new($options, $output, $wine_dir, $current_dir, \&file_type, "$winapi_check_dir/modules.dat");
my $win16api = 'winapi'->new($options, $output, "win16", "$winapi_check_dir/win16");
......@@ -181,14 +210,17 @@ my %includes;
my %declared_functions;
my @c_files = files_skip($options->c_files);
my @h_files = files_skip($options->h_files);
my $progress_output;
my $progress_current=0;
my $progress_max=scalar($options->c_files);
my $progress_max=scalar(@c_files);
if($options->headers) {
$progress_max += scalar($options->h_files);
$progress_max += scalar(@h_files);
foreach my $file ($options->h_files) {
foreach my $file (@h_files) {
my %functions;
$progress_current++;
......@@ -197,6 +229,9 @@ if($options->headers) {
}
my $found_function = sub {
my $line = shift;
my $refdebug_channels = shift;
my @debug_channels = @$refdebug_channels;
my $documentation = shift;
my $linkage = shift;
my $return_type = shift;
......@@ -260,7 +295,7 @@ if($options->headers) {
my %module_pseudo_stub_count16;
my %module_pseudo_stub_count32;
foreach my $file ($options->c_files) {
foreach my $file (@c_files) {
my %functions = ();
my $file_module16 = $modules->allowed_modules_in_file("$current_dir/$file");
......@@ -278,11 +313,10 @@ foreach my $file ($options->c_files) {
my $file_type = file_type($file);
if(file_skip($file)) {
next;
}
my $found_function = sub {
my $line = shift;
my $refdebug_channels = shift;
my @debug_channels = @$refdebug_channels;
my $documentation = shift;
my $linkage = shift;
my $return_type = shift;
......
......@@ -9,6 +9,11 @@ sub parse_c_file {
my $function_found_callback = shift;
my $preprocessor_found_callback = shift;
# global
my $debug_channels = [];
# local
my $line_number = 0;
my $documentation;
my $linkage;
my $return_type;
......@@ -44,12 +49,11 @@ sub parse_c_file {
$statements = "";
};
my $function_end = sub {
&$function_found_callback($documentation,$linkage,$return_type,
&$function_found_callback($line_number,$debug_channels,$documentation,$linkage,$return_type,
$calling_convention,$function,$argument_types,
$argument_names,$argument_documentations,$statements);
$function = "";
};
my %regs_entrypoints;
my @comments = ();
my $level = 0;
......@@ -219,6 +223,8 @@ sub parse_c_file {
((__cdecl|__stdcall|CDECL|VFWAPIV|VFWAPI|WINAPIV|WINAPI|CALLBACK)\s+)?
(\w+(\(\w+\))?)\s*\(([^\)]*)\)\s*(\{|\;)/sx)
{
$line_number = $. - $lookahead_count;
$_ = $'; $again = 1;
if($11 eq "{") {
......@@ -380,6 +386,12 @@ sub parse_c_file {
} elsif(/DEFINE_REGS_ENTRYPOINT_\d+\(\s*(\S*)\s*,\s*([^\s,\)]*).*?\)/s) {
$_ = $'; $again = 1;
$regs_entrypoints{$2} = $1;
} elsif(/DEFAULT_DEBUG_CHANNEL\s*\((\S+)\)/s) {
$_ = $'; $again = 1;
unshift @$debug_channels, $1;
} elsif(/(DEFAULT|DECLARE)_DEBUG_CHANNEL\s*\((\S+)\)/s) {
$_ = $'; $again = 1;
push @$debug_channels, $1;
} elsif(/\'[^\']*\'/s) {
$_ = $'; $again = 1;
} elsif(/\"[^\"]*\"/s) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment