Added/modified documentation for function arguments.

This commit is contained in:
Patrik Stridvall 2000-12-02 23:44:59 +00:00 committed by Alexandre Julliard
parent da384ba225
commit 697bf65e3e
6 changed files with 181 additions and 58 deletions

View File

@ -1248,8 +1248,11 @@ LPVOID __cdecl CRTDLL__lsearch(LPVOID match,LPVOID start, LPUINT array_size,
* *
* Convert an integer to a wide char string. * Convert an integer to a wide char string.
*/ */
extern LPSTR __cdecl _itoa( long , LPSTR , INT); /* ntdll */ extern LPSTR __cdecl _itoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__itow(INT value,WCHAR* out,INT base) WCHAR* __cdecl CRTDLL__itow(INT value,WCHAR* out,INT base)
{ {
char buff[64]; /* FIXME: Whats the maximum buffer size for INT_MAX? */ char buff[64]; /* FIXME: Whats the maximum buffer size for INT_MAX? */
@ -1265,8 +1268,11 @@ WCHAR* __cdecl CRTDLL__itow(INT value,WCHAR* out,INT base)
* *
* Convert a long to a wide char string. * Convert a long to a wide char string.
*/ */
extern LPSTR __cdecl _ltoa( long , LPSTR , INT); /* ntdll */ extern LPSTR __cdecl _ltoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__ltow(LONG value,WCHAR* out,INT base) WCHAR* __cdecl CRTDLL__ltow(LONG value,WCHAR* out,INT base)
{ {
char buff[64]; /* FIXME: Whats the maximum buffer size for LONG_MAX? */ char buff[64]; /* FIXME: Whats the maximum buffer size for LONG_MAX? */
@ -1282,8 +1288,11 @@ WCHAR* __cdecl CRTDLL__ltow(LONG value,WCHAR* out,INT base)
* *
* Convert an unsigned long to a wide char string. * Convert an unsigned long to a wide char string.
*/ */
extern LPSTR __cdecl _ultoa( long , LPSTR , INT); /* ntdll */ extern LPSTR __cdecl _ultoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__ultow(ULONG value,WCHAR* out,INT base) WCHAR* __cdecl CRTDLL__ultow(ULONG value,WCHAR* out,INT base)
{ {
char buff[64]; /* FIXME: Whats the maximum buffer size for ULONG_MAX? */ char buff[64]; /* FIXME: Whats the maximum buffer size for ULONG_MAX? */
@ -1512,9 +1521,11 @@ VOID __cdecl CRTDLL__purecall(VOID)
* div (CRTDLL.358) * div (CRTDLL.358)
* *
* Return the quotient and remainder of long integer division. * Return the quotient and remainder of long integer division.
*
* VERSION
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/ */
#ifdef __i386__ #ifdef __i386__
/* Windows binary compatible - returns the struct in eax/edx. */
LONGLONG __cdecl CRTDLL_div(INT x, INT y) LONGLONG __cdecl CRTDLL_div(INT x, INT y)
{ {
LONGLONG retVal; LONGLONG retVal;
@ -1522,22 +1533,33 @@ LONGLONG __cdecl CRTDLL_div(INT x, INT y)
retVal = ((LONGLONG)dt.rem << 32) | dt.quot; retVal = ((LONGLONG)dt.rem << 32) | dt.quot;
return retVal; return retVal;
} }
#else #endif /* !defined(__i386__) */
/* Non-x86 cant run win32 apps so dont need binary compatibility */
/*********************************************************************
* div (CRTDLL.358)
*
* Return the quotient and remainder of long integer division.
*
* VERSION
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
*/
#ifndef __i386__
div_t __cdecl CRTDLL_div(INT x, INT y) div_t __cdecl CRTDLL_div(INT x, INT y)
{ {
return div(x,y); return div(x,y);
} }
#endif /* __i386__ */ #endif /* !defined(__i386__) */
/********************************************************************* /*********************************************************************
* ldiv (CRTDLL.249) * ldiv (CRTDLL.249)
* *
* Return the quotient and remainder of long integer division. * Return the quotient and remainder of long integer division.
* VERSION
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/ */
#ifdef __i386__ #ifdef __i386__
/* Windows binary compatible - returns the struct in eax/edx. */
LONGLONG __cdecl CRTDLL_ldiv(LONG x, LONG y) LONGLONG __cdecl CRTDLL_ldiv(LONG x, LONG y)
{ {
LONGLONG retVal; LONGLONG retVal;
@ -1545,13 +1567,23 @@ LONGLONG __cdecl CRTDLL_ldiv(LONG x, LONG y)
retVal = ((LONGLONG)ldt.rem << 32) | ldt.quot; retVal = ((LONGLONG)ldt.rem << 32) | ldt.quot;
return retVal; return retVal;
} }
#else #endif /* defined(__i386__) */
/* Non-x86 cant run win32 apps so dont need binary compatibility */
/*********************************************************************
* ldiv (CRTDLL.249)
*
* Return the quotient and remainder of long integer division.
*
* VERSION
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
*/
#ifndef __i386__
ldiv_t __cdecl CRTDLL_ldiv(LONG x, LONG y) ldiv_t __cdecl CRTDLL_ldiv(LONG x, LONG y)
{ {
return ldiv(x,y); return ldiv(x,y);
} }
#endif /* __i386__ */ #endif /* !defined(__i386__) */
/********************************************************************* /*********************************************************************

View File

@ -313,8 +313,10 @@ INT __cdecl CRTDLL__creat(LPCSTR path, INT flags)
* _eof (CRTDLL.076) * _eof (CRTDLL.076)
* *
* Determine if the file pointer is at the end of a file. * Determine if the file pointer is at the end of a file.
*
* FIXME
* Care for large files
*/ */
/* FIXME: Care for large files */
INT __cdecl CRTDLL__eof( INT fd ) INT __cdecl CRTDLL__eof( INT fd )
{ {
DWORD curpos,endpos; DWORD curpos,endpos;
@ -1655,9 +1657,12 @@ LPSTR __cdecl CRTDLL_tmpnam(LPSTR s)
* *
* Write formatted output to a file. * Write formatted output to a file.
*/ */
/* we have avoided libc stdio.h so far, lets not start now */ /* we have avoided libc stdio.h so far, lets not start now */
extern int vsprintf(void *, const void *, va_list); extern int vsprintf(void *, const void *, va_list);
/********************************************************************/
INT __cdecl CRTDLL_vfprintf( CRTDLL_FILE* file, LPCSTR format, va_list args ) INT __cdecl CRTDLL_vfprintf( CRTDLL_FILE* file, LPCSTR format, va_list args )
{ {
/* FIXME: We should parse the format string, calculate the maximum, /* FIXME: We should parse the format string, calculate the maximum,

View File

@ -85,7 +85,13 @@ BOOL VFWAPI ICInfo(
return FALSE; return FALSE;
} }
BOOL16 VFWAPI ICInfo16(DWORD fccType, DWORD fccHandler, ICINFO16* /*SEGPTR*/ lpicinfo) { /**********************************************************************/
BOOL16 VFWAPI ICInfo16(
DWORD fccType, /* [in] */
DWORD fccHandler, /* [in] */
ICINFO16 *lpicinfo) /* [in/out] NOTE: SEGPTR */
{
BOOL16 ret; BOOL16 ret;
LPVOID lpv; LPVOID lpv;
DWORD lParam = (DWORD)lpicinfo; DWORD lParam = (DWORD)lpicinfo;
@ -378,6 +384,8 @@ errout:
return 0; return 0;
} }
/**********************************************************************/
HIC16 VFWAPI ICGetDisplayFormat16(HIC16 hic, LPBITMAPINFOHEADER lpbiIn, HIC16 VFWAPI ICGetDisplayFormat16(HIC16 hic, LPBITMAPINFOHEADER lpbiIn,
LPBITMAPINFOHEADER lpbiOut, INT16 depth, INT16 dx, INT16 dy) { LPBITMAPINFOHEADER lpbiOut, INT16 depth, INT16 dx, INT16 dy) {
return (HIC16)ICGetDisplayFormat(hic,lpbiIn,lpbiOut,depth,dx,dy); return (HIC16)ICGetDisplayFormat(hic,lpbiIn,lpbiOut,depth,dx,dy);
@ -930,23 +938,24 @@ LRESULT VFWAPIV ICMessage16(void) {
/*********************************************************************** /***********************************************************************
* ICDrawBegin [MSVFW.28] * ICDrawBegin [MSVFW.28]
*/ */
DWORD VFWAPIV ICDrawBegin( DWORD VFWAPIV ICDrawBegin(
HIC hic, HIC hic, /* [in] */
DWORD dwFlags,/* flags */ DWORD dwFlags, /* [in] flags */
HPALETTE hpal, /* palette to draw with */ HPALETTE hpal, /* [in] palette to draw with */
HWND hwnd, /* window to draw to */ HWND hwnd, /* [in] window to draw to */
HDC hdc, /* HDC to draw to */ HDC hdc, /* [in] HDC to draw to */
INT xDst, /* destination rectangle */ INT xDst, /* [in] destination rectangle */
INT yDst, INT yDst, /* [in] */
INT dxDst, INT dxDst, /* [in] */
INT dyDst, INT dyDst, /* [in] */
LPBITMAPINFOHEADER lpbi, /* format of frame to draw */ LPBITMAPINFOHEADER lpbi, /* [in] format of frame to draw */
INT xSrc, /* source rectangle */ INT xSrc, /* [in] source rectangle */
INT ySrc, INT ySrc, /* [in] */
INT dxSrc, INT dxSrc, /* [in] */
INT dySrc, INT dySrc, /* [in] */
DWORD dwRate, /* frames/second = (dwRate/dwScale) */ DWORD dwRate, /* [in] frames/second = (dwRate/dwScale) */
DWORD dwScale) { DWORD dwScale) /* [in] */
{
ICDRAWBEGIN icdb; ICDRAWBEGIN icdb;
@ -976,23 +985,23 @@ DWORD VFWAPIV ICDrawBegin(
* _ICDrawBegin [MSVIDEO.232] * _ICDrawBegin [MSVIDEO.232]
*/ */
DWORD VFWAPIV ICDrawBegin16( DWORD VFWAPIV ICDrawBegin16(
HIC16 hic, HIC16 hic, /* [in] */
DWORD dwFlags,/* flags */ DWORD dwFlags, /* [in] flags */
HPALETTE16 hpal, /* palette to draw with */ HPALETTE16 hpal, /* [in] palette to draw with */
HWND16 hwnd, /* window to draw to */ HWND16 hwnd, /* [in] window to draw to */
HDC16 hdc, /* HDC to draw to */ HDC16 hdc, /* [in] HDC to draw to */
INT16 xDst, /* destination rectangle */ INT16 xDst, /* [in] destination rectangle */
INT16 yDst, INT16 yDst, /* [in] */
INT16 dxDst, INT16 dxDst, /* [in] */
INT16 dyDst, INT16 dyDst, /* [in] */
LPBITMAPINFOHEADER /*SEGPTR*/ lpbi, /* format of frame to draw */ LPBITMAPINFOHEADER lpbi, /* [in] format of frame to draw NOTE: SEGPTR */
INT16 xSrc, /* source rectangle */ INT16 xSrc, /* [in] source rectangle */
INT16 ySrc, INT16 ySrc, /* [in] */
INT16 dxSrc, INT16 dxSrc, /* [in] */
INT16 dySrc, INT16 dySrc, /* [in] */
DWORD dwRate, /* frames/second = (dwRate/dwScale) */ DWORD dwRate, /* [in] frames/second = (dwRate/dwScale) */
DWORD dwScale) { DWORD dwScale) /* [in] */
{
DWORD ret; DWORD ret;
ICDRAWBEGIN16* icdb = SEGPTR_NEW(ICDRAWBEGIN16); /* SEGPTR for mapper to deal with */ ICDRAWBEGIN16* icdb = SEGPTR_NEW(ICDRAWBEGIN16); /* SEGPTR for mapper to deal with */
@ -1041,9 +1050,14 @@ DWORD VFWAPIV ICDraw(HIC hic, DWORD dwFlags, LPVOID lpFormat, LPVOID lpData, DWO
/*********************************************************************** /***********************************************************************
* _ICDraw [MSVIDEO.234] * _ICDraw [MSVIDEO.234]
*/ */
DWORD VFWAPIV ICDraw16(HIC16 hic, DWORD dwFlags, LPVOID /*SEGPTR*/ lpFormat, DWORD VFWAPIV ICDraw16(
LPVOID /*SEGPTR*/ lpData, DWORD cbData, LONG lTime) { HIC16 hic,
DWORD dwFlags,
LPVOID lpFormat, /* [???] NOTE: SEGPTR */
LPVOID lpData, /* [???] NOTE: SEGPTR */
DWORD cbData,
LONG lTime)
{
ICDRAW* icd = SEGPTR_NEW(ICDRAW); /* SEGPTR for mapper to deal with */ ICDRAW* icd = SEGPTR_NEW(ICDRAW); /* SEGPTR for mapper to deal with */
TRACE("(0x%08lx,0x%08lx,%p,%p,%ld,%ld)\n",(DWORD)hic,dwFlags,lpFormat,lpData,cbData,lTime); TRACE("(0x%08lx,0x%08lx,%p,%p,%ld,%ld)\n",(DWORD)hic,dwFlags,lpFormat,lpData,cbData,lTime);

View File

@ -12,7 +12,6 @@
DEFAULT_DEBUG_CHANNEL(ntdll); DEFAULT_DEBUG_CHANNEL(ntdll);
#if defined(__GNUC__) && defined(__i386__) #if defined(__GNUC__) && defined(__i386__)
#define USING_REAL_FPU
#define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : ) #define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : )
#define POP_FPU(x) DO_FPU("fstpl",x) #define POP_FPU(x) DO_FPU("fstpl",x)
#endif #endif
@ -50,8 +49,11 @@ LPCSTR debugstr_us( const UNICODE_STRING *us )
/********************************************************************* /*********************************************************************
* _ftol (NTDLL) * _ftol (NTDLL)
*
* VERSION
* [GNUC && i386]
*/ */
#ifdef USING_REAL_FPU #if defined(__GNUC__) && defined(__i386__)
LONG __cdecl NTDLL__ftol(void) LONG __cdecl NTDLL__ftol(void)
{ {
/* don't just do DO_FPU("fistp",retval), because the rounding /* don't just do DO_FPU("fistp",retval), because the rounding
@ -60,18 +62,42 @@ LONG __cdecl NTDLL__ftol(void)
POP_FPU(fl); POP_FPU(fl);
return (LONG)fl; return (LONG)fl;
} }
#else #endif /* defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _ftol (NTDLL)
*
* FIXME
* Should be register function
* VERSION
* [!GNUC && i386]
*/
#if !defined(__GNUC__) & defined(__i386__)
LONG __cdecl NTDLL__ftol(double fl) LONG __cdecl NTDLL__ftol(double fl)
{ {
FIXME("should be register function\n"); FIXME("should be register function\n");
return (LONG)fl; return (LONG)fl;
} }
#endif #endif /* !defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _ftol (NTDLL)
* VERSION
* [!i386]
*/
#ifndef __i386__
LONG __cdecl NTDLL__ftol(double fl)
{
return (LONG) fl;
}
#endif /* !defined(__i386__) */
/********************************************************************* /*********************************************************************
* _CIpow (NTDLL) * _CIpow (NTDLL)
* VERSION
* [GNUC && i386]
*/ */
#ifdef USING_REAL_FPU #if defined(__GNUC__) && defined(__i386__)
double __cdecl NTDLL__CIpow(void) double __cdecl NTDLL__CIpow(void)
{ {
double x,y; double x,y;
@ -79,10 +105,36 @@ double __cdecl NTDLL__CIpow(void)
POP_FPU(x); POP_FPU(x);
return pow(x,y); return pow(x,y);
} }
#else #endif /* defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _CIpow (NTDLL)
*
* FIXME
* Should be register function
*
* VERSION
* [!GNUC && i386]
*/
#if !defined(__GNUC__) && defined(__i386__)
double __cdecl NTDLL__CIpow(double x,double y) double __cdecl NTDLL__CIpow(double x,double y)
{ {
FIXME("should be register function\n"); FIXME("should be register function\n");
return pow(x,y); return pow(x,y);
} }
#endif #endif /* !defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _CIpow (NTDLL)
* VERSION
* [!i386]
*/
#ifndef __i386__
double __cdecl NTDLL__CIpow(double x,double y)
{
return pow(x,y);
}
#endif /* !defined(__i386__) */

View File

@ -388,6 +388,10 @@ SEGPTR WINAPI WIN16_LockResource16( HGLOBAL16 handle )
/* May need to reload the resource if discarded */ /* May need to reload the resource if discarded */
return WIN16_GlobalLock16( handle ); return WIN16_GlobalLock16( handle );
} }
/**********************************************************************
* LockResource16 (KERNEL but also exported from KERNEL32 in Wine)
*/
LPVOID WINAPI LockResource16( HGLOBAL16 handle ) LPVOID WINAPI LockResource16( HGLOBAL16 handle )
{ {
return PTR_SEG_TO_LIN( WIN16_LockResource16(handle) ); return PTR_SEG_TO_LIN( WIN16_LockResource16(handle) );

View File

@ -511,8 +511,11 @@ BOOL WINAPI SetConsoleActiveScreenBuffer(
/*********************************************************************** /***********************************************************************
* GetLargestConsoleWindowSize (KERNEL32.226) * GetLargestConsoleWindowSize (KERNEL32.226)
* *
* Note: this should return a COORD, but calling convention for returning * NOTE
* structures is different between Windows and gcc on i386. * This should return a COORD, but calling convention for returning
* structures is different between Windows and gcc on i386.
*
* VERSION: [i386]
*/ */
#ifdef __i386__ #ifdef __i386__
#undef GetLargestConsoleWindowSize #undef GetLargestConsoleWindowSize
@ -523,7 +526,19 @@ DWORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
c.Y = 24; c.Y = 24;
return *(DWORD *)&c; return *(DWORD *)&c;
} }
#else /* __i386__ */ #endif /* defined(__i386__) */
/***********************************************************************
* GetLargestConsoleWindowSize (KERNEL32.226)
*
* NOTE
* This should return a COORD, but calling convention for returning
* structures is different between Windows and gcc on i386.
*
* VERSION: [!i386]
*/
#ifndef __i386__
COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput ) COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
{ {
COORD c; COORD c;
@ -531,7 +546,8 @@ COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
c.Y = 24; c.Y = 24;
return c; return c;
} }
#endif /* __i386__ */ #endif /* defined(__i386__) */
/*********************************************************************** /***********************************************************************
* FreeConsole (KERNEL32.267) * FreeConsole (KERNEL32.267)