Commit faf64aa9 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Minor API files update.

parent e3deda37
......@@ -58,7 +58,6 @@ dlls/gdi
graphics/metafiledrv
graphics/win16drv
graphics
memory
objects
% dlls/gdi/gdi32.spec
......@@ -91,7 +90,6 @@ dlls/imm32
dlls/kernel
files
if1632
loader/ne
loader
memory
......@@ -299,6 +297,8 @@ dlls/tapi32
% dlls/ttydrv/ttydrv.spec
dlls/ttydrv
% dlls/urlmon/urlmon.spec
dlls/urlmon
......@@ -314,7 +314,7 @@ objects
% dlls/user/keyboard.spec
memory
dlls/user
windows
% dlls/user/mouse.spec
......@@ -325,7 +325,6 @@ dlls/user
controls
dlls/user
if1632
memory
misc
windows
......@@ -335,7 +334,6 @@ windows
controls
dlls/user
loader
memory
misc
windows
......@@ -452,3 +450,6 @@ win32
% dlls/x11drv/x11drv.spec
dlls/x11drv
graphics/x11drv
windows/x11drv
......@@ -50,17 +50,32 @@ sub new {
while($again || (defined($_ = <IN>))) {
$again = 0;
chomp;
if(/(.*)\\$/) {
my $line = <IN>;
if(defined($line)) {
$_ = $1 . " " . $line;
if(/^(.*?)\\$/) {
my $current = $1;
my $next = <IN>;
if(defined($next)) {
# remove trailing whitespace
$current =~ s/\s+$//;
# remove leading whitespace
$next =~ s/^\s+//;
$_ = $current . " " . $next;
$again = 1;
next;
}
}
# remove leading and trailing whitespace
s/^\s*(.*?)\s*$/$1/;
# skip emty lines
if(/^$/) { next; }
# skip comments
if(/^dnl/) { next; }
if(/^AC_CHECK_HEADERS\(\s*(.*?)\)\s*$/) {
my @arguments = split(/,/,$1);
foreach my $name (split(/\s+/, $arguments[0])) {
......@@ -85,7 +100,13 @@ sub new {
open(IN, "< $config_h_in_file");
local $/ = "\n";
while(<IN>) {
if(/^\#undef\s+(\S+)\s*$/) {
# remove leading and trailing whitespace
s/^\s*(.*?)\s*$/$1/;
# skip emty lines
if(/^$/) { next; }
if(/^\#undef\s+(\S+)$/) {
$$conditionals{$1}++;
}
}
......@@ -112,6 +133,15 @@ sub is_conditional {
return $$conditionals{$name};
}
sub found_conditional {
my $self = shift;
my $conditional_found = \%{$self->{CONDITIONAL_FOUND}};
my $name = shift;
$$conditional_found{$name}++;
}
sub is_conditional_header {
my $self = shift;
my $conditional_headers = \%{$self->{CONDITIONAL_HEADERS}};
......@@ -130,4 +160,25 @@ sub is_conditional_function {
return $$conditional_functions{$name};
}
sub global_report {
my $self = shift;
my $output = \${$self->{OUTPUT}};
my $conditional_found = \%{$self->{CONDITIONAL_FOUND}};
my $conditionals = \%{$self->{CONDITIONALS}};
my @messages;
foreach my $name (sort(keys(%$conditionals))) {
if($name =~ /^const|inline|size_t$/) { next; }
if(0 && !$$conditional_found{$name}) {
push @messages, "config.h.in: conditional $name not used\n";
}
}
foreach my $message (sort(@messages)) {
$$output->write($message);
}
}
1;
......@@ -49,6 +49,5 @@ VOID
BOOL16
HINSTANCE16
HTASK16
OLESTATUS
INT16
WORD
......@@ -46,6 +46,7 @@ CONTEXT *
CONTEXT86 *
CRITICAL_SECTION *
DWORD *
EXCEPTION_FRAME *
EXCEPTION_RECORD *
HANDLE *
LPBYTE
......@@ -56,13 +57,12 @@ LPRTL_RWLOCK
LPVOID
LPVOID *
LPWSTR *
OBJECT_ATTRIBUTES *
PACE_HEADER
PACE_HEADER *
PACL
PACL *
PANSI_STRING
PBOOLEAN
PCHAR
PDWORD
PEXCEPTION_FRAME
PEXCEPTION_RECORD
......@@ -90,7 +90,8 @@ PULONG
PUNICODE_STRING
PVOID
PVOID *
PWCHAR
STRING *
UNICODE_STRING *
VOID *
struct _TEB *
void *
......
%long
BOOL
CHAR
DWORD
HANDLE
LONG
UINT
WORD
%long # --forbidden
INT16
UINT16
int
%ptr
BYTE *
KEYBOARD_CONFIG *
LPBYTE
LPDIDEVICEOBJECTDATA
LPDWORD
LPMOUSE_EVENT_PROC
LPVOID
struct tagCURSORICONINFO *
struct tagWND *
%str
LPCSTR
LPSTR
%void
void
%long
BOOL
CHAR
DWORD
HANDLE
LONG
UINT
WORD
%long # --forbidden
INT16
UINT16
int
%ptr
BYTE *
CURSORICONINFO *
KEYBOARD_CONFIG *
LPBYTE
LPDIDEVICEOBJECTDATA
LPDWORD
LPMOUSE_EVENT_PROC
LPVOID
WND *
%str
LPCSTR
LPSTR
%void
void
......@@ -509,6 +509,8 @@ foreach my $file ($options->c_files) {
my $found_conditional = sub {
local $_ = shift;
$nativeapi->found_conditional($_);
if($options->config) {
if($file_type ne "application") {
if(!$nativeapi->is_conditional($_)) {
......@@ -702,4 +704,5 @@ if($options->global) {
winapi_global::check $options, $output, $win32api, $nativeapi if $options->win32;
$modules->global_report;
$nativeapi->global_report;
}
......@@ -279,10 +279,20 @@ sub parse_c_file {
my @arguments = ("HDC16");
&$function_begin($documentation, "", $2, "WINAPI", $3, \@arguments);
&$function_end;
} elsif(/DC_(GET_VAL_32)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,.*?\)/s) {
} elsif(/DC_(GET_VAL)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,.*?\)/s) {
$_ = $'; $again = 1;
my @arguments = ("HDC");
&$function_begin($documentation, "", $2, "WINAPI", $3, \@arguments);
my $return16 = $3 . "16";
my $return32 = $3;
my $name16 = $2 . "16";
my $name32 = $2;
my @arguments16 = ("HDC16");
my @arguments32 = ("HDC");
if($name16 eq "COLORREF16") { $name16 = "COLORREF"; }
&$function_begin($documentation, "", $name16, "WINAPI", $return16, \@arguments16);
&$function_end;
&$function_begin($documentation, "", $name32, "WINAPI", $return32, \@arguments32);
&$function_end;
} elsif(/DC_(GET_VAL_EX)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
$_ = $'; $again = 1;
......
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