Commit 905cb7e3 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Implemented _getws.

parent 69e35009
...@@ -2236,6 +2236,26 @@ char *MSVCRT_gets(char *buf) ...@@ -2236,6 +2236,26 @@ char *MSVCRT_gets(char *buf)
} }
/********************************************************************* /*********************************************************************
* _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.@) * putc (MSVCRT.@)
*/ */
int MSVCRT_putc(int c, MSVCRT_FILE* file) int MSVCRT_putc(int c, MSVCRT_FILE* file)
......
...@@ -262,7 +262,7 @@ init MSVCRT_Init ...@@ -262,7 +262,7 @@ init MSVCRT_Init
@ forward _getpid kernel32.GetCurrentProcessId @ forward _getpid kernel32.GetCurrentProcessId
@ stub _getsystime #(ptr) @ stub _getsystime #(ptr)
@ cdecl _getw(ptr) _getw @ cdecl _getw(ptr) _getw
@ stub _getws #(wstr) @ cdecl _getws(ptr) MSVCRT__getws
@ cdecl _global_unwind2(ptr) _global_unwind2 @ cdecl _global_unwind2(ptr) _global_unwind2
@ cdecl _heapadd (ptr long) _heapadd @ cdecl _heapadd (ptr long) _heapadd
@ cdecl _heapchk() _heapchk @ cdecl _heapchk() _heapchk
......
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