mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00: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:
@@ -95,22 +95,22 @@ hprj (Draw_Interpretor& , Standard_Integer n, const char** a)
|
||||
{
|
||||
Standard_Integer id = 1;
|
||||
if (n < 2) return 1;
|
||||
if (n > 2) id = atoi(a[2]);
|
||||
if (n > 2) id = Draw::Atoi(a[2]);
|
||||
//
|
||||
gp_Ax2 anAx2 = gp::XOY();
|
||||
if (n == 11)
|
||||
{
|
||||
Standard_Real x = atof(a[2]);
|
||||
Standard_Real y = atof(a[3]);
|
||||
Standard_Real z = atof(a[4]);
|
||||
Standard_Real x = Draw::Atof(a[2]);
|
||||
Standard_Real y = Draw::Atof(a[3]);
|
||||
Standard_Real z = Draw::Atof(a[4]);
|
||||
|
||||
Standard_Real dx = atof(a[5]);
|
||||
Standard_Real dy = atof(a[6]);
|
||||
Standard_Real dz = atof(a[7]);
|
||||
Standard_Real dx = Draw::Atof(a[5]);
|
||||
Standard_Real dy = Draw::Atof(a[6]);
|
||||
Standard_Real dz = Draw::Atof(a[7]);
|
||||
|
||||
Standard_Real dx1 = atof(a[8]);
|
||||
Standard_Real dy1 = atof(a[9]);
|
||||
Standard_Real dz1 = atof(a[10]);
|
||||
Standard_Real dx1 = Draw::Atof(a[8]);
|
||||
Standard_Real dy1 = Draw::Atof(a[9]);
|
||||
Standard_Real dz1 = Draw::Atof(a[10]);
|
||||
|
||||
gp_Pnt anOrigin (x, y, z);
|
||||
gp_Dir aNormal (dx, dy, dz);
|
||||
@@ -152,7 +152,7 @@ hfil (Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
Standard_Integer nbIso = 0;
|
||||
if (n < 3) return 1;
|
||||
if (n > 3) nbIso = atoi(a[3]);
|
||||
if (n > 3) nbIso = Draw::Atoi(a[3]);
|
||||
const char *name1 = a[1];
|
||||
Handle(HLRTopoBRep_OutLiner) HS = HLRTest::GetOutLiner(name1);
|
||||
if (HS.IsNull()) {
|
||||
|
Reference in New Issue
Block a user