- Minor API files update.

- Minor bug fixes.
- Minor documentation check improvements.
This commit is contained in:
Patrik Stridvall 2001-01-20 02:16:31 +00:00 committed by Alexandre Julliard
parent 74f2b4b2ae
commit 9086d42d73
15 changed files with 252 additions and 119 deletions

View file

@ -26,8 +26,6 @@ dlls/commdlg
% dlls/crtdll/crtdll.spec
dlls/crtdll
% dlls/dciman32/dciman32.spec
dlls/dciman32
@ -85,8 +83,6 @@ dlls/imagehlp
% dlls/imm32/imm.spec
dlls/imm32
% dlls/imm32/imm32.spec
dlls/imm32
@ -118,6 +114,10 @@ ole
scheduler
win32
% dlls/msvcrt/msvcrt.spec
dlls/msvcrt
% dlls/kernel/stress.spec
dlls/kernel
@ -292,6 +292,10 @@ dlls/shell32
dlls/shell32
% dlls/shdocvw/shdocvw.spec
dlls/shdocvw
% dlls/shfolder/shfolder.spec
% dlls/shlwapi/shlwapi.spec
@ -376,6 +380,10 @@ dlls/winaspi
dlls/winaspi
% dlls/winedos/winedos.spec
dlls/winedos
% dlls/wineps/wineps.spec
% dlls/wineps/wineps16.spec
@ -436,12 +444,8 @@ dlls/winmm
% dlls/winnls/winnls.spec
dlls/winnls
% dlls/winnls/winnls32.spec
dlls/winnls
% dlls/winsock/winsock.spec
dlls/winsock

View file

@ -1,5 +1,6 @@
%long
BOOL
DWORD
LPARAM
LRESULT
@ -39,3 +40,4 @@ HACMSTREAM16
HINSTANCE16
MMRESULT16
UINT16
WORD

View file

@ -1,92 +0,0 @@
%double
double
%long
BOOL
CHAR
DWORD
HANDLE
INT
USHORT
LONG
ULONG
UINT
WCHAR
UCHAR
clock_t
size_t
time_t
%long # --forbidden
int
unsigned int
unsigned long
%longlong
LONGLONG
ULONGLONG
%ptr
CHAR *
CRTDLL_FILE *
LPCVOID
LPDWORD
LPDWORD *
LPINT
LPUINT
LPSTR *
LPSTR **
LPCSTR *
LPVOID
PCONTEXT
PEXCEPTION_FRAME
PEXCEPTION_FRAME *
PEXCEPTION_RECORD
VOID *
WCHAR *
_INITTERMFUN *
char *
jmp_buf
find_t *
struct _stat *
struct _timeb *
time_t *
struct _heapinfo *
struct _utimbuf *
struct _exception *
CRTDLL_fpos_t *
diskfree_t *
unsigned char *
va_list
void *
%str
LPSTR
LPCSTR
%void
void
VOID
%wstr
LPCWSTR
LPWSTR
%unknown
new_handler_type
sig_handler_type
comp_func
struct complex
atexit_function
div_t
ldiv_t

View file

@ -0,0 +1,96 @@
%double
double
%long
DWORD
HANDLE
INT
LONG
MSVCRT_complex
ULONG
WCHAR
clock_t
int
long
unsigned int
unsigned long
size_t
time_t
%longlong
LONGLONG
ULONGLONG
%ptr
CHAR *
DWORD *
LPCVOID
LPDWORD *
LPINT
LPTHREAD_START_ROUTINE
LPVOID
MSVCRT__INITTERMFUN *
MSVCRT_EXCEPTION_FRAME *
MSVCRT_FILE *
MSVCRT_HEAPINFO *
MSVCRT_atexit_func
MSVCRT_atexit_func **
MSVCRT_comp_func
MSVCRT_diskfree_t *
MSVCRT_finddata_t *
MSVCRT_fpos_t *
MSVCRT_matherr_func
MSVCRT_new_handler_func
MSVCRT_sig_handler_func
MSVCRT_timeb *
MSVCRT_wfinddata_t *
PCONTEXT
PEXCEPTION_FRAME
PEXCEPTION_FRAME *
PEXCEPTION_POINTERS
PEXCEPTION_RECORD
WCHAR *
WCHAR **
WCHAR ***
WORD **
__non_rtti_object *
bad_cast *
bad_typeid *
char *
char **
char ***
exception *
int *
jmp_buf
struct _stat *
struct _utimbuf *
time_t *
type_info *
unsigned char *
unsigned int *
va_list
void *
%str
LPSTR
LPCSTR
%unknown
div_t
ldiv_t
%void
void
VOID
%wstr
LPCWSTR
LPWSTR

View file

@ -9,6 +9,7 @@ double
BOOL
BYTE
CHAR
DISPID
DWORD
FLOAT
HCURSOR
@ -44,6 +45,9 @@ CHAR *
COLORREF *
CY *
DATE *
DISPID *
DISPPARAMS *
EXCEPINFO *
FLOAT *
ICreateTypeLib **
INTERFACEDATA *
@ -66,18 +70,21 @@ LPUNKNOWN *
LPVOID
LPVOID *
OLECHAR *
OLECHAR **
REFCLSID
REFGUID
REFIID
SAFEARRAY *
SAFEARRAY **
SAFEARRAYBOUND *
UINT *
ULONG *
USHORT *
VARIANT *
VARIANTARG *
VARIANT_BOOL *
VARTYPE *
VOID *
double *
short *
void *

View file

@ -8,9 +8,10 @@ HRASCONN
LPBOOL
LPDWORD
LPRASCONNA
LPRASDIALPARAMS
LPRASENTRYNAME
LPRASDIALPARAMSA
LPRASENTRYNAMEA
%str
LPSTR
LPCSTR

View file

@ -5,6 +5,7 @@ DWORD
HDEVINFO
HINF
HKEY
HSPFILEQ
HWND
UINT

View file

@ -0,0 +1,15 @@
%long
BOOL
HRESULT
%ptr
DLLVERSIONINFO *
LPVOID *
REFCLSID
REFIID
%wstr
LPCWSTR

View file

@ -48,8 +48,10 @@ int
%long --extension
BOOL16
INT16
HANDLE16
HDRVR16
HMODULE16
HINSTANCE16
HTASK16

View file

@ -0,0 +1,22 @@
%long
BOOL
BYTE
HANDLE
UINT
WORD
int
%ptr
CONTEXT86 *
LPDOSTASK
LPVOID
%str
LPCSTR
%void
void

View file

@ -21,6 +21,7 @@ long
FARPROC
INT *
LPDWORD
LPINT
LPVOID
LPWSADATA
ULONG *

View file

@ -328,7 +328,7 @@ sub parse_spec_file {
}
}
}
} elsif(/^(\d+|@)\s+stub\s+(\S+)$/) {
} elsif(/^(\d+|@)\s+stub(?:\s+(?:-noimport|-norelay|-i386|-ret64))?\s+(\S+)$/) {
my $external_name = $2;
$ordinal = $1;

View file

@ -244,6 +244,8 @@ if($options->headers) {
}
my %comment_width;
my %comment_indent;
my %comment_spacing;
my %module_pseudo_stub_count16;
my %module_pseudo_stub_count32;
@ -493,9 +495,25 @@ foreach my $file ($options->c_files) {
$external_name = $internal_name;
}
if($documentation !~ /\b(\Q$external_name\E|$internal_name|$name1|$name2)\b/) {
if($options->documentation_pedantic) {
my $n = 0;
if((++$n && defined($module16) && defined($external_name16) &&
$external_name16 ne "@" && $documentation !~ /\b\Q$external_name16\E\b/) ||
(++$n && defined($module16) && defined($external_name16) &&
$external_name16 eq "@" && $documentation !~ /\@/) ||
(++$n && defined($module32) && defined($external_name32) &&
$external_name32 ne "@" && $documentation !~ /\b\Q$external_name32\E\b/) ||
(++$n && defined($module32) && defined($external_name32) &&
$external_name32 eq "@" && $documentation !~ /\@/))
{
my $external_name = ($external_name16, $external_name32)[($n-1)/2];
$output->write("documentation: wrong or missing name ($external_name) \\\n$documentation\n");
}
} else {
if($documentation !~ /\b(?:\Q$external_name\E|$internal_name|$name1|$name2)\b/) {
$output->write("documentation: wrong or missing name \\\n$documentation\n");
}
}
if($options->documentation_ordinal) {
if(defined($module16)) {
@ -531,13 +549,35 @@ foreach my $file ($options->c_files) {
}
if($options->documentation_pedantic) {
if($documentation !~ /^ \*\t\t\w+(?: \(\w+\.(?:\@|\d+)\))+/m) {
if($documentation !~ /^ \*\t\t(?:\@|\w+)(?: \(\w+\.(?:\@|\d+)\))+/m) {
$output->write("documentation: pedantic check failed \\\n$documentation\n");
}
}
if($options->documentation_width) {
if($documentation =~ /(\/\**)/) {
if($options->documentation_comment_indent) {
if($documentation =~ /^ \*(\s*)\w+(\s*)([\(\[])\s*\w+\.\s*(?:\@|\d+)\s*([\)\]])/m) {
my $indent = $1;
my $spacing = $2;
my $left = $3;
my $right = $4;
$indent =~ s/\t/ /g;
$indent = length($indent);
$spacing =~ s/\t/ /g;
$spacing = length($spacing);
$comment_indent{$indent}++;
if($indent >= 20) {
$output->write("documentation: comment indent is $indent\n");
}
$comment_spacing{$spacing}++;
}
}
if($options->documentation_comment_width) {
if($documentation =~ /(^\/\*\*+)/) {
my $width = length($1);
$comment_width{$width}++;
@ -689,7 +729,14 @@ foreach my $file ($options->c_files) {
$output->hide_progress;
if($options->global) {
if($options->documentation_width) {
if($options->documentation_comment_indent) {
foreach my $indent (sort(keys(%comment_indent))) {
my $count = $comment_indent{$indent};
$output->write("*.c: $count functions have comment that is indented $indent\n");
}
}
if($options->documentation_comment_width) {
foreach my $width (sort(keys(%comment_width))) {
my $count = $comment_width{$width};
$output->write("*.c: $count functions have comments of width $width\n");

View file

@ -71,13 +71,38 @@ my %options = (
default => 0, parent => "cross-call", description => "check for cross calls between Unicode and ASCII"
},
"debug-messages" => { default => 0, parent => "statements", description => "check for debug messages inconsistances" },
"documentation" => { default => 1, parent => "local", description => "check for documentation inconsistances\n" },
"documentation-pedantic" => { default => 0, parent => "documentation", description => "be pendantic when checking for documentation inconsistances\n" },
"documentation-width" => { default => 0, parent => "documentation", description => "check for documentation width inconsistances\n" },
"documentation-arguments" => { default => 1, parent => "documentation", description => "check for arguments documentation inconsistances\n" },
"documentation-ordinal" => { default => 0, parent => "documentation", description => "check for ordinal documentation inconsistances\n" },
"prototype" => { default => 0, parent => ["local", "headers"], description => "prototype checking" },
"documentation" => {
default => 1,
parent => "local",
description => "check for documentation inconsistances"
},
"documentation-pedantic" => {
default => 0,
parent => "documentation",
description => "be pendantic when checking for documentation inconsistances"
},
"documentation-arguments" => {
default => 1,
parent => "documentation",
description => "check for arguments documentation inconsistances\n"
},
"documentation-comment-indent" => {
default => 0,
parent => "documentation", description => "check for documentation comment indent inconsistances"
},
"documentation-comment-width" => {
default => 0,
parent => "documentation", description => "check for documentation comment width inconsistances"
},
"documentation-ordinal" => {
default => 0,
parent => "documentation",
description => "check for documentation ordinal inconsistances\n"
},
"prototype" => {default => 0, parent => ["local", "headers"], description => "prototype checking" },
"global" => { default => 1, description => "global checking" },
"declared" => { default => 1, parent => "global", description => "declared checking" },
"implemented" => { default => 0, parent => "local", description => "implemented checking" },

View file

@ -135,7 +135,9 @@ sub parse_c_file {
if(defined($comments[$n]) && $n >= 0) {
$documentation = $comments[$n];
for(my $m=$n+1; $m <= $#comments; $m++) {
if($comments[$m] =~ /^\/\*\*+\/$/) {
if($comments[$m] =~ /^\/\*\*+\/$/ ||
$comments[$m] =~ /^\/\*\s*(?:\!)?defined/) # FIXME: Kludge
{
@argument_documentations = ();
next;
}