- Fixed a bug concerning Win16 documentation.

- Fixed some bugs concerning argument documentation
- Minor API files update
This commit is contained in:
Patrik Stridvall 2000-12-01 23:51:33 +00:00 committed by Alexandre Julliard
parent ef57e18f99
commit 94a507781b
8 changed files with 57 additions and 15 deletions

View File

@ -31,6 +31,10 @@ REFCLSID
REFGUID REFGUID
REFIID REFIID
%segptr
SEGPTR
%str %str
LPCOLESTR16 LPCOLESTR16

View File

@ -24,9 +24,10 @@ LPARAM
UINT UINT
WORD WORD
%long --forbidden %long --extension
int HDC16
HMETAFILE16
%ptr %ptr
@ -62,6 +63,7 @@ LPABC
LPABCFLOAT LPABCFLOAT
LPBYTE LPBYTE
LPCOLORADJUSTMENT LPCOLORADJUSTMENT
LPCHARSETINFO
LPCVOID LPCVOID
LPDEVMODEA LPDEVMODEA
LPDWORD LPDWORD
@ -105,7 +107,7 @@ TEXTMETRICW *
XFORM * XFORM *
void * void *
%ptr # --forbidden %ptr --extension
FARPROC16 FARPROC16

View File

@ -31,12 +31,17 @@ ULONG_PTR
%long # --forbidden %long # --forbidden
int
%long --extension
BOOL16 BOOL16
HGLOBAL16 HGLOBAL16
HINSTANCE16 HINSTANCE16
HMODULE16 HMODULE16
HRSRC16
HTASK16
UINT16 UINT16
int
%ptr %ptr
@ -145,11 +150,8 @@ va_list *
%ptr --extension %ptr --extension
BUILTIN16_DESCRIPTOR *
%ptr # --forbidden
FARPROC16 FARPROC16
BUILTIN16_DESCRIPTOR *
SEGPTR SEGPTR
%str %str

View File

@ -107,11 +107,13 @@ void *
%ptr --extension %ptr --extension
EXCEPTION_FRAME **
GUID * GUID *
WCHAR * WCHAR *
char * char *
char *** char ***
enum __DEBUG_CLASS enum __DEBUG_CLASS
enum request
va_list va_list
%str %str

View File

@ -23,6 +23,7 @@ HHOOK
HICON HICON
HINSTANCE HINSTANCE
HKL HKL
HPEN
HMENU HMENU
HMONITOR HMONITOR
HRESULT HRESULT
@ -43,9 +44,18 @@ WPARAM
%long # --forbidden %long # --forbidden
HMODULE16
int int
%long --extension
INT16
HANDLE16
HMODULE16
HINSTANCE16
HWND16
UINT16
WPARAM16
%longlong %longlong
POINT POINT
@ -124,6 +134,11 @@ WNDENUMPROC
WNDPROC WNDPROC
va_list va_list
%ptr --extension
DLGPROC16
WNDPROC16
%str %str
LPSTR LPSTR

View File

@ -439,6 +439,7 @@ foreach my $file ($options->c_files) {
(defined($module16) || defined($module32)) && (defined($module16) || defined($module32)) &&
$linkage ne "extern" && $statements) $linkage ne "extern" && $statements)
{ {
my $external_name;
my $name1; my $name1;
my $name2; my $name2;
@ -451,9 +452,11 @@ foreach my $file ($options->c_files) {
if($name1 =~ s/^$uc_module16\_//) { last; } if($name1 =~ s/^$uc_module16\_//) { last; }
} }
# FIXME: This special case is becuase of a very ugly kludge that should be fixed IMHO
$name2 = $name1; $name2 = $name1;
$name2 = s/^(.*?)16_fn(.*?)$/$116_$2/; $name2 =~ s/(?:_)?16$//;
$name2 =~ s/16_fn/16_/;
$external_name = $external_name16;
} elsif(!defined($module16) && defined($module32)) { } elsif(!defined($module16) && defined($module32)) {
my @uc_modules32 = split(/\s*\&\s*/, uc($module32)); my @uc_modules32 = split(/\s*\&\s*/, uc($module32));
push @uc_modules32, "wine"; push @uc_modules32, "wine";
@ -471,6 +474,8 @@ foreach my $file ($options->c_files) {
$name2 = $name1; $name2 = $name1;
$name2 =~ s/AW$//; $name2 =~ s/AW$//;
$external_name = $external_name32;
} else { } else {
my @uc_modules = split(/\s*\&\s*/, uc($module16)); my @uc_modules = split(/\s*\&\s*/, uc($module16));
push @uc_modules, split(/\s*\&\s*/, uc($module32)); push @uc_modules, split(/\s*\&\s*/, uc($module32));
@ -481,9 +486,14 @@ foreach my $file ($options->c_files) {
} }
$name2 = $name1; $name2 = $name1;
$external_name = $external_name32;
} }
if($documentation !~ /\b($internal_name|$name1|$name2)\b/) { if(!defined($external_name)) {
$external_name = $internal_name;
}
if($documentation !~ /\b(\Q$external_name\E|$internal_name|$name1|$name2)\b/) {
$output->write("documentation: \\\n$documentation\n"); $output->write("documentation: \\\n$documentation\n");
} }
@ -503,7 +513,7 @@ foreach my $file ($options->c_files) {
for my $argument_documentation (@argument_documentations) { for my $argument_documentation (@argument_documentations) {
$n++; $n++;
if($argument_documentation ne "") { if($argument_documentation ne "") {
if($argument_documentation !~ /^\/\*\s+\[(?:in|out|in\/out)\].*?\*\/$/) { if($argument_documentation !~ /^\/\*\s+\[(?:in|out|in\/out|\?\?\?)\].*?\*\/$/s) {
$output->write("argument $n documentation: \\\n$argument_documentation\n"); $output->write("argument $n documentation: \\\n$argument_documentation\n");
} }
} }

View File

@ -289,6 +289,9 @@ sub new {
return $self; return $self;
} }
sub DESTROY {
}
sub options_set { sub options_set {
my $self = shift; my $self = shift;

View File

@ -123,11 +123,11 @@ sub parse_c_file {
} }
my $documentation; my $documentation;
my @argument_documentations; my @argument_documentations = ();
{ {
my $n = $#comments; my $n = $#comments;
while($n >= 0 && ($comments[$n] !~ /^\/\*\*/ || while($n >= 0 && ($comments[$n] !~ /^\/\*\*/ ||
$comments[$n] =~ /^\/\*\*+\//)) $comments[$n] =~ /^\/\*\*+\/$/))
{ {
$n--; $n--;
} }
@ -135,6 +135,10 @@ sub parse_c_file {
if(defined($comments[$n]) && $n >= 0) { if(defined($comments[$n]) && $n >= 0) {
$documentation = $comments[$n]; $documentation = $comments[$n];
for(my $m=$n+1; $m <= $#comments; $m++) { for(my $m=$n+1; $m <= $#comments; $m++) {
if($comments[$m] =~ /^\/\*\*+\/$/) {
@argument_documentations = ();
next;
}
push @argument_documentations, $comments[$m]; push @argument_documentations, $comments[$m];
} }
} else { } else {