mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +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:
@@ -125,7 +125,7 @@ void IGESGeom_ToolCircularArc::OwnCheck
|
||||
Standard_Real ratio = Abs(Rad1 - Rad2) / (Rad1+Rad2);
|
||||
if (ratio > eps) {
|
||||
char mess[80];
|
||||
sprintf(mess,"Radius at Start & End Points, relative gap over %f",
|
||||
Sprintf(mess,"Radius at Start & End Points, relative gap over %f",
|
||||
Interface_MSG::Intervalled (ratio));
|
||||
ach.AddFail(mess,"Radius at Start & End Points, relative gap over %f");
|
||||
}
|
||||
|
@@ -217,7 +217,7 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
|
||||
//Standard_Real eq = (A*x*x + B*x*y + C*y*y + D*x + E*y + F);
|
||||
// These messages are transfered in the translation procedure
|
||||
/* if (eq < -eps || eq > eps) {
|
||||
sprintf(mess,"Start point does not satisfy conic equation, gap over %f",
|
||||
Sprintf(mess,"Start point does not satisfy conic equation, gap over %f",
|
||||
Interface_MSG::Intervalled(eq));
|
||||
ach.AddFail(mess,"Start point does not satisfy conic equation, gap over %f");
|
||||
|
||||
@@ -228,7 +228,7 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
|
||||
//y = ent->EndPoint().Y();
|
||||
//eq = (A*x*x + B*x*y + C*y*y + D*x + E*y + F);
|
||||
/* if (eq < -eps || eq > eps) {
|
||||
sprintf(mess,"End point does not satisfy conic equation, gap over %f",
|
||||
Sprintf(mess,"End point does not satisfy conic equation, gap over %f",
|
||||
Interface_MSG::Intervalled(eq));
|
||||
ach.AddFail(mess,"End point does not satisfy conic equation, gap over %f");
|
||||
}
|
||||
|
@@ -244,7 +244,7 @@ void IGESGeom_ToolPlane::OwnCheck(const Handle(IGESGeom_Plane)& ent,
|
||||
C * ent->SymbolAttach().Z() - D;
|
||||
if ( ec > eps || ec < -eps) {
|
||||
char mess[80];
|
||||
sprintf(mess,"Symbol Attach not in the Plane, gap/equation over %f",
|
||||
Sprintf(mess,"Symbol Attach not in the Plane, gap/equation over %f",
|
||||
Interface_MSG::Intervalled(ec));
|
||||
ach.SendWarning(mess,"Symbol Attach not in the Plane");
|
||||
|
||||
|
Reference in New Issue
Block a user