msvcrt: Improved _getmaxstdio and _setmaxstdio implementation.

This commit is contained in:
Piotr Caban 2011-05-19 15:31:33 +02:00 committed by Alexandre Julliard
parent 19c4c37a1d
commit 2ca229dec1
1 changed files with 9 additions and 10 deletions

View File

@ -3766,20 +3766,19 @@ int CDECL MSVCRT_wprintf_s(const MSVCRT_wchar_t *format, ...)
*/ */
int CDECL _getmaxstdio(void) int CDECL _getmaxstdio(void)
{ {
FIXME("stub, always returns 512\n"); return MSVCRT_max_streams;
return 512;
} }
/********************************************************************* /*********************************************************************
* _setmaxstdio_ (MSVCRT.@) * _setmaxstdio (MSVCRT.@)
*/ */
int CDECL _setmaxstdio(int newmax) int CDECL _setmaxstdio(int newmax)
{ {
int res; TRACE("%d\n", newmax);
if( newmax > 2048)
res = -1; if(newmax<_IOB_ENTRIES || newmax>MSVCRT_MAX_FILES || newmax<MSVCRT_stream_idx)
else return -1;
res = newmax;
FIXME("stub: setting new maximum for number of simultaneously open files not implemented,returning %d\n",res); MSVCRT_max_streams = newmax;
return res; return MSVCRT_max_streams;
} }