Implement _getws

Francois Gouget fgouget at free.fr
Sat May 18 21:29:55 CDT 2002


Changelog:

 * dlls/msvcrt/msvcrt.spec,
   dlls/msvcrt/file.c

   Implement _getws


--
Francois Gouget         fgouget at 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(wstr) 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)




More information about the wine-patches mailing list