Fixed some of the issues reported by winapi-check, by adding arguments

to varargs.
This commit is contained in:
Patrik Stridvall 1999-09-29 10:27:00 +00:00 committed by Alexandre Julliard
parent 385dc18cea
commit e216de9794
8 changed files with 21 additions and 60 deletions

View File

@ -375,7 +375,7 @@ init CRTDLL_Init
370 cdecl floor(double) floor
371 cdecl fmod(double double) fmod
372 cdecl fopen(str str) CRTDLL_fopen
373 varargs fprintf() CRTDLL_fprintf
373 varargs fprintf(ptr str) CRTDLL_fprintf
374 cdecl fputc(long ptr) CRTDLL_fputc
375 cdecl fputs(str ptr) CRTDLL_fputs
376 stub fputwc
@ -383,7 +383,7 @@ init CRTDLL_Init
378 cdecl free(ptr) CRTDLL_free
379 cdecl freopen(str str ptr) CRTDLL_freopen
380 cdecl frexp(double ptr) frexp
381 varargs fscanf() CRTDLL_fscanf
381 varargs fscanf(ptr str) CRTDLL_fscanf
382 cdecl fseek(ptr long long) CRTDLL_fseek
383 cdecl fsetpos(ptr ptr) CRTDLL_fsetpos
384 cdecl ftell(ptr) CRTDLL_ftell

View File

@ -25,7 +25,7 @@ type win32
017 stub CsrSetPriorityClass
018 stub CsrpProcessCallbackRequest
019 stub DbgBreakPoint
020 varargs DbgPrint() DbgPrint
020 varargs DbgPrint(str) DbgPrint
021 stub DbgPrompt
022 stub DbgSsHandleKmApiMsg
023 stub DbgSsInitialize

View File

@ -416,12 +416,13 @@ INT WINAPI RtlExtendedLargeIntegerDivide(
* Note: This even works, since gcc returns 64bit values in eax/edx just like
* the caller expects. However... The relay code won't grok this I think.
*/
long long WINAPI RtlExtendedIntegerMultiply(
LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(
LARGE_INTEGER factor1,
INT factor2)
{
#if SIZEOF_LONG_LONG==8
return (*(long long*)&factor1) * factor2;
long long result = (*(long long*)&factor1) * factor2;
return (*(LARGE_INTEGER*)&result);
#else
FIXME("((%ld<<32)+%ld,%d), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2);
return 0;

View File

@ -10,10 +10,10 @@ type win32
7 stdcall OleUIConvertA(ptr) OleUIConvertA
8 stdcall OleUIBusyA(ptr) OleUIBusyA
9 stdcall OleUIUpdateLinksA(ptr long str long) OleUIUpdateLinksA
10 varargs OleUIPromptUserA() OleUIPromptUserA
10 varargs OleUIPromptUserA(long long) OleUIPromptUserA
11 stdcall OleUIObjectPropertiesA(ptr) OleUIObjectPropertiesA
12 stdcall OleUIChangeSourceA(ptr) OleUIChangeSourceA
13 varargs OleUIPromptUserW() OleUIPromptUserW
13 varargs OleUIPromptUserW(long long) OleUIPromptUserW
14 stdcall OleUIAddVerbMenuW(ptr wstr long long long long long long ptr) OleUIAddVerbMenuW
15 stdcall OleUIBusyW(ptr) OleUIBusyW
16 stdcall OleUIChangeIconW(ptr) OleUIChangeIconW

View File

@ -601,7 +601,7 @@ LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x);
DWORD WINAPI RtlNtStatusToDosError(DWORD error);
BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type);
INT WINAPI RtlExtendedLargeIntegerDivide(LARGE_INTEGER dividend, DWORD divisor, LPDWORD rest);
long long WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,INT factor2);
LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,INT factor2);
DWORD WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING String);
DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2);
BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);

View File

@ -102,7 +102,7 @@ import ntdll.dll
85 stub K32RtlConvertUlongToLargeInteger
86 stdcall _KERNEL32_86(ptr) _KERNEL32_86
87 stdcall SSOnBigStack() SSOnBigStack
88 varargs SSCall() SSCall
88 varargs SSCall(long long ptr) SSCall
89 register FT_PrologPrime() FT_PrologPrime
90 register QT_ThunkPrime() QT_ThunkPrime
91 stdcall PK16FNF(ptr) PK16FNF

View File

@ -586,8 +586,8 @@ init MAIN_UserInit
582 stdcall WindowFromPoint(long long) WindowFromPoint
583 stdcall keybd_event(long long long long) keybd_event
584 stdcall mouse_event(long long long long long) mouse_event
585 varargs wsprintfA() wsprintfA
586 varargs wsprintfW() wsprintfW
585 varargs wsprintfA(str str) wsprintfA
586 varargs wsprintfW(wstr wstr) wsprintfW
587 stdcall wvsprintfA(ptr str ptr) wvsprintfA
588 stdcall wvsprintfW(ptr wstr ptr) wvsprintfW
#late additions

View File

@ -117,11 +117,6 @@ typedef struct
int value;
} ORD_ABS;
typedef struct
{
char link_name[80];
} ORD_VARARGS;
typedef struct
{
char link_name[80];
@ -144,7 +139,6 @@ typedef struct
ORD_FUNCTION func;
ORD_RETURN ret;
ORD_ABS abs;
ORD_VARARGS vargs;
ORD_EXTERN ext;
ORD_FORWARD fwd;
} u;
@ -395,6 +389,12 @@ static int ParseExportFunction( ORDDEF *odp )
SpecName, Line );
return -1;
}
else if (odp->type == TYPE_VARARGS)
{
fprintf( stderr, "%s:%d: 'varargs' not supported for Win16\n",
SpecName, Line );
return -1;
}
break;
case SPEC_WIN32:
if ((odp->type == TYPE_PASCAL) || (odp->type == TYPE_PASCAL_16))
@ -517,41 +517,6 @@ static int ParseStub( ORDDEF *odp )
}
/*******************************************************************
* ParseVarargs
*
* Parse an 'varargs' definition.
*/
static int ParseVarargs( ORDDEF *odp )
{
char *token;
if (SpecType == SPEC_WIN16)
{
fprintf( stderr, "%s:%d: 'varargs' not supported for Win16\n",
SpecName, Line );
return -1;
}
token = GetToken();
if (*token != '(')
{
fprintf(stderr, "%s:%d: Expected '(' got '%s'\n",
SpecName, Line, token);
return -1;
}
token = GetToken();
if (*token != ')')
{
fprintf(stderr, "%s:%d: Expected ')' got '%s'\n",
SpecName, Line, token);
return -1;
}
strcpy( odp->u.vargs.link_name, GetToken() );
return 0;
}
/*******************************************************************
* ParseInterrupt
*
@ -680,6 +645,7 @@ static int ParseOrdinal(int ordinal)
case TYPE_PASCAL:
case TYPE_REGISTER:
case TYPE_STDCALL:
case TYPE_VARARGS:
case TYPE_CDECL:
return ParseExportFunction( odp );
case TYPE_INTERRUPT:
@ -688,8 +654,6 @@ static int ParseOrdinal(int ordinal)
return ParseEquate( odp );
case TYPE_STUB:
return ParseStub( odp );
case TYPE_VARARGS:
return ParseVarargs( odp );
case TYPE_EXTERN:
return ParseExtern( odp );
case TYPE_FORWARD:
@ -1108,14 +1072,12 @@ static int BuildSpec32File( char * specfile, FILE *outfile )
{
switch(odp->type)
{
case TYPE_VARARGS:
fprintf( outfile, "extern void %s();\n", odp->u.vargs.link_name );
break;
case TYPE_EXTERN:
fprintf( outfile, "extern void %s();\n", odp->u.ext.link_name );
break;
case TYPE_REGISTER:
case TYPE_STDCALL:
case TYPE_VARARGS:
case TYPE_CDECL:
fprintf( outfile, "extern void %s();\n", odp->u.func.link_name );
break;
@ -1147,14 +1109,12 @@ static int BuildSpec32File( char * specfile, FILE *outfile )
case TYPE_INVALID:
fprintf( outfile, " 0" );
break;
case TYPE_VARARGS:
fprintf( outfile, " %s", odp->u.vargs.link_name );
break;
case TYPE_EXTERN:
fprintf( outfile, " %s", odp->u.ext.link_name );
break;
case TYPE_REGISTER:
case TYPE_STDCALL:
case TYPE_VARARGS:
case TYPE_CDECL:
fprintf( outfile, " %s", odp->u.func.link_name);
break;