Implemented _getws.

This commit is contained in:
Francois Gouget 2002-05-19 22:21:17 +00:00 committed by Alexandre Julliard
parent 69e3500950
commit 905cb7e316
2 changed files with 21 additions and 1 deletions

View File

@ -2235,6 +2235,26 @@ char *MSVCRT_gets(char *buf)
return buf_start;
}
/*********************************************************************
* _getws (MSVCRT.@)
*/
WCHAR* MSVCRT__getws(WCHAR* buf)
{
MSVCRT_wint_t cc;
WCHAR* ws = buf;
for (cc = MSVCRT_fgetwc(MSVCRT_stdin); cc != MSVCRT_WEOF && cc != '\n';
cc = MSVCRT_fgetwc(MSVCRT_stdin))
{
if (cc != '\r')
*buf++ = (WCHAR)cc;
}
*buf = '\0';
TRACE("got '%s'\n", debugstr_w(ws));
return ws;
}
/*********************************************************************
* putc (MSVCRT.@)
*/

View File

@ -262,7 +262,7 @@ init MSVCRT_Init
@ forward _getpid kernel32.GetCurrentProcessId
@ stub _getsystime #(ptr)
@ cdecl _getw(ptr) _getw
@ stub _getws #(wstr)
@ cdecl _getws(ptr) MSVCRT__getws
@ cdecl _global_unwind2(ptr) _global_unwind2
@ cdecl _heapadd (ptr long) _heapadd
@ cdecl _heapchk() _heapchk