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.
*/
extern LPSTR __cdecl _itoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__itow(INT value,WCHAR* out,INT base)
{
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.
*/
extern LPSTR __cdecl _ltoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__ltow(LONG value,WCHAR* out,INT base)
{
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.
*/
extern LPSTR __cdecl _ultoa( long , LPSTR , INT); /* ntdll */
/********************************************************************/
WCHAR* __cdecl CRTDLL__ultow(ULONG value,WCHAR* out,INT base)
{
char buff[64]; /* FIXME: Whats the maximum buffer size for ULONG_MAX? */
@ -1512,9 +1521,11 @@ VOID __cdecl CRTDLL__purecall(VOID)
* div (CRTDLL.358)
*
* Return the quotient and remainder of long integer division.
*
* VERSION
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
#ifdef __i386__
/* Windows binary compatible - returns the struct in eax/edx. */
LONGLONG __cdecl CRTDLL_div(INT x, INT y)
{
LONGLONG retVal;
@ -1522,22 +1533,33 @@ LONGLONG __cdecl CRTDLL_div(INT x, INT y)
retVal = ((LONGLONG)dt.rem << 32) | dt.quot;
return retVal;
}
#else
/* Non-x86 cant run win32 apps so dont need binary compatibility */
#endif /* !defined(__i386__) */
/*********************************************************************
* 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)
{
return div(x,y);
}
#endif /* __i386__ */
#endif /* !defined(__i386__) */
/*********************************************************************
* ldiv (CRTDLL.249)
*
* Return the quotient and remainder of long integer division.
* VERSION
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
#ifdef __i386__
/* Windows binary compatible - returns the struct in eax/edx. */
LONGLONG __cdecl CRTDLL_ldiv(LONG x, LONG y)
{
LONGLONG retVal;
@ -1545,13 +1567,23 @@ LONGLONG __cdecl CRTDLL_ldiv(LONG x, LONG y)
retVal = ((LONGLONG)ldt.rem << 32) | ldt.quot;
return retVal;
}
#else
/* Non-x86 cant run win32 apps so dont need binary compatibility */
#endif /* defined(__i386__) */
/*********************************************************************
* 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)
{
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)
*
* 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 )
{
DWORD curpos,endpos;
@ -1655,9 +1657,12 @@ LPSTR __cdecl CRTDLL_tmpnam(LPSTR s)
*
* Write formatted output to a file.
*/
/* we have avoided libc stdio.h so far, lets not start now */
extern int vsprintf(void *, const void *, va_list);
/********************************************************************/
INT __cdecl CRTDLL_vfprintf( CRTDLL_FILE* file, LPCSTR format, va_list args )
{
/* FIXME: We should parse the format string, calculate the maximum,

View File

@ -85,7 +85,13 @@ BOOL VFWAPI ICInfo(
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;
LPVOID lpv;
DWORD lParam = (DWORD)lpicinfo;
@ -378,6 +384,8 @@ errout:
return 0;
}
/**********************************************************************/
HIC16 VFWAPI ICGetDisplayFormat16(HIC16 hic, LPBITMAPINFOHEADER lpbiIn,
LPBITMAPINFOHEADER lpbiOut, INT16 depth, INT16 dx, INT16 dy) {
return (HIC16)ICGetDisplayFormat(hic,lpbiIn,lpbiOut,depth,dx,dy);
@ -930,23 +938,24 @@ LRESULT VFWAPIV ICMessage16(void) {
/***********************************************************************
* ICDrawBegin [MSVFW.28]
*/
DWORD VFWAPIV ICDrawBegin(
HIC hic,
DWORD dwFlags,/* flags */
HPALETTE hpal, /* palette to draw with */
HWND hwnd, /* window to draw to */
HDC hdc, /* HDC to draw to */
INT xDst, /* destination rectangle */
INT yDst,
INT dxDst,
INT dyDst,
LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
INT xSrc, /* source rectangle */
INT ySrc,
INT dxSrc,
INT dySrc,
DWORD dwRate, /* frames/second = (dwRate/dwScale) */
DWORD dwScale) {
DWORD VFWAPIV ICDrawBegin(
HIC hic, /* [in] */
DWORD dwFlags, /* [in] flags */
HPALETTE hpal, /* [in] palette to draw with */
HWND hwnd, /* [in] window to draw to */
HDC hdc, /* [in] HDC to draw to */
INT xDst, /* [in] destination rectangle */
INT yDst, /* [in] */
INT dxDst, /* [in] */
INT dyDst, /* [in] */
LPBITMAPINFOHEADER lpbi, /* [in] format of frame to draw */
INT xSrc, /* [in] source rectangle */
INT ySrc, /* [in] */
INT dxSrc, /* [in] */
INT dySrc, /* [in] */
DWORD dwRate, /* [in] frames/second = (dwRate/dwScale) */
DWORD dwScale) /* [in] */
{
ICDRAWBEGIN icdb;
@ -976,23 +985,23 @@ DWORD VFWAPIV ICDrawBegin(
* _ICDrawBegin [MSVIDEO.232]
*/
DWORD VFWAPIV ICDrawBegin16(
HIC16 hic,
DWORD dwFlags,/* flags */
HPALETTE16 hpal, /* palette to draw with */
HWND16 hwnd, /* window to draw to */
HDC16 hdc, /* HDC to draw to */
INT16 xDst, /* destination rectangle */
INT16 yDst,
INT16 dxDst,
INT16 dyDst,
LPBITMAPINFOHEADER /*SEGPTR*/ lpbi, /* format of frame to draw */
INT16 xSrc, /* source rectangle */
INT16 ySrc,
INT16 dxSrc,
INT16 dySrc,
DWORD dwRate, /* frames/second = (dwRate/dwScale) */
DWORD dwScale) {
HIC16 hic, /* [in] */
DWORD dwFlags, /* [in] flags */
HPALETTE16 hpal, /* [in] palette to draw with */
HWND16 hwnd, /* [in] window to draw to */
HDC16 hdc, /* [in] HDC to draw to */
INT16 xDst, /* [in] destination rectangle */
INT16 yDst, /* [in] */
INT16 dxDst, /* [in] */
INT16 dyDst, /* [in] */
LPBITMAPINFOHEADER lpbi, /* [in] format of frame to draw NOTE: SEGPTR */
INT16 xSrc, /* [in] source rectangle */
INT16 ySrc, /* [in] */
INT16 dxSrc, /* [in] */
INT16 dySrc, /* [in] */
DWORD dwRate, /* [in] frames/second = (dwRate/dwScale) */
DWORD dwScale) /* [in] */
{
DWORD ret;
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]
*/
DWORD VFWAPIV ICDraw16(HIC16 hic, DWORD dwFlags, LPVOID /*SEGPTR*/ lpFormat,
LPVOID /*SEGPTR*/ lpData, DWORD cbData, LONG lTime) {
DWORD VFWAPIV ICDraw16(
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 */
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);
#if defined(__GNUC__) && defined(__i386__)
#define USING_REAL_FPU
#define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : )
#define POP_FPU(x) DO_FPU("fstpl",x)
#endif
@ -50,8 +49,11 @@ LPCSTR debugstr_us( const UNICODE_STRING *us )
/*********************************************************************
* _ftol (NTDLL)
*
* VERSION
* [GNUC && i386]
*/
#ifdef USING_REAL_FPU
#if defined(__GNUC__) && defined(__i386__)
LONG __cdecl NTDLL__ftol(void)
{
/* don't just do DO_FPU("fistp",retval), because the rounding
@ -60,18 +62,42 @@ LONG __cdecl NTDLL__ftol(void)
POP_FPU(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)
{
FIXME("should be register function\n");
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)
* VERSION
* [GNUC && i386]
*/
#ifdef USING_REAL_FPU
#if defined(__GNUC__) && defined(__i386__)
double __cdecl NTDLL__CIpow(void)
{
double x,y;
@ -79,10 +105,36 @@ double __cdecl NTDLL__CIpow(void)
POP_FPU(x);
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)
{
FIXME("should be register function\n");
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 */
return WIN16_GlobalLock16( handle );
}
/**********************************************************************
* LockResource16 (KERNEL but also exported from KERNEL32 in Wine)
*/
LPVOID WINAPI LockResource16( HGLOBAL16 handle )
{
return PTR_SEG_TO_LIN( WIN16_LockResource16(handle) );

View File

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