On Sat, 18 May 2002, Francois Gouget wrote: > > Changelog: > > * dlls/msvcrt/msvcrt.spec, > dlls/msvcrt/file.c > > Implement _getws Hmm, use that patch instead, the parameter is an output parameter. -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ La terre est une bêta... Index: dlls/msvcrt/msvcrt.spec =================================================================== RCS file: /home/wine/wine/dlls/msvcrt/msvcrt.spec,v retrieving revision 1.38 diff -u -r1.38 msvcrt.spec --- dlls/msvcrt/msvcrt.spec 14 May 2002 20:55:00 -0000 1.38 +++ dlls/msvcrt/msvcrt.spec 19 May 2002 02:14:05 -0000 @@ -262,7 +262,7 @@ @ 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 Index: dlls/msvcrt/file.c =================================================================== RCS file: /home/wine/wine/dlls/msvcrt/file.c,v retrieving revision 1.24 diff -u -r1.24 file.c --- dlls/msvcrt/file.c 29 Apr 2002 18:48:56 -0000 1.24 +++ dlls/msvcrt/file.c 19 May 2002 02:14:04 -0000 @@ -2236,6 +2236,26 @@ } /********************************************************************* + * _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.@) */ int MSVCRT_putc(int c, MSVCRT_FILE* file)