1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0022898: IGES import fails in german environment

Added DRAW command dlocale to set and query current locale of the C subsystem
Equivalents of C functions working with conversions of strings to/from reals added in Standard_CString, providing locale-independent behavior (using always "C" locale)
In DRAW packages, calls to atof() and atoi() are replaced by direct calls to Draw::Atof() and Draw::Atoi(), respectively, instead of substituting by #define
Use of atof(), strtod(), and *scanf() involving floating point conversions in OCCT code replaced by locale-independent Atof() and Strtod()
Calls to sprintf() involving floating point in OCCT code are replaced by call to locale-independent Sprintf(), except a few places where converted strings are used immediately for display in the 3d viewer
Changes of global locale are eliminated throughout OCCT code
Proposed correction for GNU libC where v*printf_l functions are absent
Added test case (bugs xde bug22898) for data exchange operations with non-standard locale
Use xlocale on Mac OS X and within glibc
Corrected strtod_l wrapper
Generate error rather than warning
Introduce Standard_CLocaleSentry replacement for removed OSD_Localizer
Standard_CLocaleSentry - copy locale string
Standard_CLocaleSentry - use _configthreadlocale on Windows
Standard_CLocaleSentry::GetCLocale() - return locale_t rather than void*
Corrected misprint in ~Standard_CLocaleSentry()
Use French locale in bug22898 test case
Mark test case as skipped if locale is unavailable on tested system.
Use fr_FR locale for tests on Mac OS X
This commit is contained in:
abv
2013-02-01 18:41:16 +04:00
parent 3bea4c165c
commit 91322f44fd
203 changed files with 2707 additions and 2807 deletions

View File

@@ -242,7 +242,7 @@ void BOPTools_Checker::PerformVV()
if (!aFlag) {
char buf[512];
sprintf (buf, "VV: (%d, %d)", n1, n2);
Sprintf (buf, "VV: (%d, %d)", n1, n2);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aV1);
@@ -308,7 +308,7 @@ void BOPTools_Checker::PerformVE()
//
if (!aFlag) {
char buf[512];
sprintf (buf, "VE: (%d, %d)", aWhat, aWith);
Sprintf (buf, "VE: (%d, %d)", aWhat, aWith);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aV1);
@@ -369,7 +369,7 @@ void BOPTools_Checker::PerformVF()
//
if (!aFlag) {
char buf[512];
sprintf (buf, "VF: (%d, %d)", aWhat, aWith);
Sprintf (buf, "VF: (%d, %d)", aWhat, aWith);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aV1);
@@ -530,7 +530,7 @@ void BOPTools_Checker::PerformEE()
}
//
char buf[512];
sprintf (buf, "EE: (%d, %d), vertex at t1=%f, t2=%f", aWhat, aWith, aT1, aT2);
Sprintf (buf, "EE: (%d, %d), vertex at t1=%f, t2=%f", aWhat, aWith, aT1, aT2);
//
gp_Pnt aPnt;
BOPTools_Tools::PointOnEdge(aEWhat, aT1, aPnt);
@@ -570,7 +570,7 @@ void BOPTools_Checker::PerformEE()
}
//
char buf[512];
sprintf (buf, "EE: (%d, %d), common block ", aWhat, aWith);
Sprintf (buf, "EE: (%d, %d), common block ", aWhat, aWith);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aE1);
@@ -704,7 +704,7 @@ void BOPTools_Checker::PerformEF()
}
//
char buf[512];
sprintf (buf, "EF: (%d, %d), vertex at t=%f", nE, nF, aT);
Sprintf (buf, "EF: (%d, %d), vertex at t=%f", nE, nF, aT);
//
gp_Pnt aPnt;
BOPTools_Tools::PointOnEdge(aE, aT, aPnt);
@@ -734,7 +734,7 @@ void BOPTools_Checker::PerformEF()
}
//
char buf[512];
sprintf (buf, "EF: (%d, %d), common block ", nE, nF);
Sprintf (buf, "EF: (%d, %d), common block ", nE, nF);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aE);
@@ -846,7 +846,7 @@ void BOPTools_Checker::PerformEF()
if (aNbPoints) {
char buf[512];
sprintf (buf, "FF: (%d, %d) ", nF1, nF2);
Sprintf (buf, "FF: (%d, %d) ", nF1, nF2);
//
const IntTools_PntOn2Faces& aPntOn2Faces=aPnts(1);
const IntTools_PntOnFace& aPntOnFace=aPntOn2Faces.P1();
@@ -881,7 +881,7 @@ void BOPTools_Checker::PerformEF()
//
if (bValid) {
char buf[512];
sprintf (buf, "FF: (%d, %d) ", nF1, nF2);
Sprintf (buf, "FF: (%d, %d) ", nF1, nF2);
//
Handle (Geom_Curve) aC3D=aC.Curve();
Handle (Geom_TrimmedCurve) aTC3D=Handle (Geom_TrimmedCurve)::DownCast(aC3D);
@@ -1036,7 +1036,7 @@ void BOPTools_Checker::PerformEF()
char buf[512];
if (!aSR.IsDone()) {
sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE);
Sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE);
BOPTools_CheckResult aChRes;
aChRes.AddShape(aE);
@@ -1048,7 +1048,7 @@ void BOPTools_Checker::PerformEF()
}
//
if (anErrorStatus==6) {
sprintf(buf,
Sprintf(buf,
"Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE);
BOPTools_CheckResult aChRes;