[PATCH] mscvrt - dummy implementation of _set_error_mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to get Anarchy Online to work through Wine; this helps it a
bit further.

I've tried to implement and comment it in the style in the file,
please correct me if I'm wrong!


Change-log:
Added a dummy implementation of the _set_error_mode() function in the
msvcrt library.


Index: dlls/msvcrt/errno.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/errno.c,v
retrieving revision 1.9
diff -u -w -p -r1.9 errno.c
--- dlls/msvcrt/errno.c	17 Sep 2002 18:32:53 -0000	1.9
+++ dlls/msvcrt/errno.c	12 Jul 2003 22:09:53 -0000
@@ -135,3 +135,32 @@ void MSVCRT_perror(const char* str)
 {
   _cprintf("%s: %s\n",str,MSVCRT_strerror(msvcrt_get_thread_data()->errno));
 }
+
+/******************************************************************************
+ *		_set_error_mode (MSVCRT.@)
+ *
+ * Set the error mode, which describes where the C run-time writes error
+ * messages.
+ *
+ * PARAMS
+ *   mode - the new error mode
+ *
+ * RETURNS
+ *   The old error mode.
+ *
+ * TODO
+ *  This function does not have a proper implementation; the error mode is
+ *  never used.
+ */
+int _set_error_mode(int mode)
+{
+  static int current_mode = _OUT_TO_DEFAULT;
+
+  const int old = current_mode;
+  if ( _REPORT_ERRMODE != mode ) {
+    current_mode = mode;
+    FIXME("dummy implementation (old mode: %d, new mode: %d)\n",
+          old, mode);
+  }
+  return old;
+}
Index: dlls/msvcrt/msvcrt.spec
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/msvcrt.spec,v
retrieving revision 1.75
diff -u -w -p -r1.75 msvcrt.spec
--- dlls/msvcrt/msvcrt.spec	17 Jun 2003 03:59:24 -0000	1.75
+++ dlls/msvcrt/msvcrt.spec	12 Jul 2003 22:09:55 -0000
@@ -423,7 +423,7 @@
 @ cdecl _scalb( double long)
 @ cdecl _searchenv(str str ptr)
 @ stdcall -i386 _seh_longjmp_unwind(ptr)
-@ stub _set_error_mode #(long)
+@ stdcall _set_error_mode(long)
 @ stub _set_sbh_threshold #(long)
 @ stub _seterrormode #(long)
 @ cdecl -register -i386 _setjmp(ptr) _MSVCRT__setjmp


-- 
Try Anarchy Online      http://www.anarchy-online.com/content/downloads/tryout/
Netiquette guidelines   ftp://ftp.rfc-editor.org/in-notes/rfc1855.txt
How to quote properly   http://www.i-hate-computers.demon.co.uk/
Hvordan sitere riktig   http://home.online.no/~vidaandr/news/OBSquoting.html


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux