[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : luke
Repository : xara
Revision : 845
Date : Thu Apr 20 10:17:11 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/localenv.cpp
Vasil's change to make locale access BSD friendly
Diff:
Index: Trunk/XaraLX/wxOil/localenv.cpp
===================================================================
--- Trunk/XaraLX/wxOil/localenv.cpp (revision 844)
+++ Trunk/XaraLX/wxOil/localenv.cpp (revision 845)
@@ -99,8 +99,10 @@
/*
*/
+#include "camtypes.h"
-#include "camtypes.h"
+#include <locale.h>
+
#include "localenv.h"
DECLARE_SOURCE("$Revision$");
@@ -147,8 +149,10 @@
PORTNOTE("other","Removed GetProfileString usage")
#if defined(__WXGTK__)
- TRACEUSER( "luke", _T("iDigits = %d
"), *nl_langinfo( FRAC_DIGITS ) );
- *DecimalPlaces = *nl_langinfo( FRAC_DIGITS );
+ struct lconv *lc;
+ lc = localeconv();
+ TRACEUSER( "luke", _T("iDigits = %d
"), lc->frac_digits );
+ *DecimalPlaces = (UINT32)lc->frac_digits;
return;
#elif !defined(EXCLUDE_FROM_XARALX)
GetProfileString("intl", "iDigits", "2", TS, sizeof(TS));
@@ -184,7 +188,9 @@
PORTNOTE("other","Removed GetProfileString usage")
#if defined(__WXGTK__)
- TS[0] = ToUnicode( *nl_langinfo( THOUSANDS_SEP ) );
+ struct lconv *lc;
+ lc = localeconv();
+ TS[0] = ToUnicode( lc->thousands_sep[0] );
TS[1] = 0;
TRACEUSER( "luke", _T("sThousand = %s
"), TS );
@@ -218,7 +224,9 @@
PORTNOTE("other","Removed GetProfileString usage")
#if defined(__WXGTK__)
- TS[0] = ToUnicode( *nl_langinfo( DECIMAL_POINT ) );
+ struct lconv *lc;
+ lc = localeconv();
+ TS[0] = ToUnicode( lc->decimal_point[0] );
TS[1] = 0;
TRACEUSER( "luke", _T("sDecimal = %s
"), TS );
Xara