wine exception handling
Marcus Meissner
marcus at jet.franken.de
Sun Jun 1 09:50:45 CDT 2003
On Sun, Jun 01, 2003 at 03:26:40PM +0200, Martin Fuchs wrote:
> Hi,
>
> I have problems running an application with wine. At startup it tries to read
> its config file. But it catches up in an endless loop of exceptions.
> The attached trace is generated using --debugmsg +msvcrt,+seh,+file,+dosfs.
> I send only the interesting part of the full trace.
>
> However there is a:
> fixme:seh:EXC_RtlRaiseException call to unimplemented function
> msvcrt.dll.localeconv
>
> But why does there happen an excpeption anyways?
The missing function is passed up using a standard Win32 exception,
which is handled by the program here.
Oh, and please try this patch:
Ciao, Marcus
Changelog:
Implemented localeconv() by just calling to Linux localeconv().
Index: locale.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/locale.c,v
retrieving revision 1.16
diff -u -r1.16 locale.c
--- locale.c 12 Feb 2003 21:28:47 -0000 1.16
+++ locale.c 1 Jun 2003 14:49:31 -0000
@@ -30,6 +30,8 @@
#include "wine/debug.h"
+#include <locale.h>
+
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
/* FIXME: Need to hold locale for each LC_* type and aggregate
@@ -546,4 +548,36 @@
* arguments to wide strings and then calls LCMapStringW
*/
return LCMapStringA(lcid,mapflags,src,srclen,dst,dstlen);
+}
+
+/*********************************************************************
+ * localeconv (MSVCRT.@)
+ */
+struct MSVCRT_lconv *MSVCRT_localeconv(void) {
+
+ struct lconv *ylconv;
+ static struct MSVCRT_lconv xlconv;
+
+ ylconv = localeconv();
+
+#define X(x) xlconv.x = ylconv->x;
+ X(decimal_point);
+ X(thousands_sep);
+ X(grouping);
+ X(int_curr_symbol);
+ X(currency_symbol);
+ X(mon_decimal_point);
+ X(mon_thousands_sep);
+ X(mon_grouping);
+ X(positive_sign);
+ X(negative_sign);
+ X(int_frac_digits);
+ X(frac_digits);
+ X(p_cs_precedes);
+ X(p_sep_by_space);
+ X(n_cs_precedes);
+ X(n_sep_by_space);
+ X(p_sign_posn);
+ X(n_sign_posn);
+ return &xlconv;
}
Index: msvcrt.spec
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/msvcrt.spec,v
retrieving revision 1.72
diff -u -r1.72 msvcrt.spec
--- msvcrt.spec 12 May 2003 03:31:16 -0000 1.72
+++ msvcrt.spec 1 Jun 2003 14:49:32 -0000
@@ -655,7 +655,7 @@
@ cdecl labs(long)
@ cdecl ldexp( double long) MSVCRT_ldexp
@ cdecl ldiv(long long) MSVCRT_ldiv
-@ stub localeconv #()
+@ cdecl localeconv() MSVCRT_localeconv
@ cdecl localtime(ptr)
@ cdecl log(double)
@ cdecl log10(double)
More information about the wine-devel
mailing list