| * This file has no copyright assigned and is placed in the Public Domain. |
| * This file is part of the mingw-w64 runtime package. |
| * No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| wchar_t *__cdecl fgetws(wchar_t * __restrict__ _Dst, int _SizeInWords, FILE * __restrict__ _File) |
| if (_Dst == NULL || _SizeInWords <= 0) |
| /* _SizeInWords-1 must be positive as it is maximum width for %l[ format */ |
| if (_swprintf(format, L"%%%dl[^\n]%%n", _SizeInWords-1) < 0) |
| ret = __ms_fwscanf(_File, format, _Dst, &count); |
| /* fwscanf() returns zero if the format "%l[^\n]" does not match any character |
| * which means that the first character in _File has to be new line */ |
| if (count < _SizeInWords-1) |
| if (__ms_fwscanf(_File, L"%1l[\n]", &_Dst[count]) == 1) |