Commit 2ca229de authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Improved _getmaxstdio and _setmaxstdio implementation.

parent 19c4c37a
...@@ -3766,20 +3766,19 @@ int CDECL MSVCRT_wprintf_s(const MSVCRT_wchar_t *format, ...) ...@@ -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;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment