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:
@@ -17,16 +17,15 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
|
||||
#include <QANCollection.hxx>
|
||||
|
||||
#include <Draw.hxx>
|
||||
#include <Draw_Interpretor.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
// HashCode and IsEquel must be defined for key types of maps
|
||||
|
||||
Standard_Integer HashCode(const gp_Pnt thePnt,
|
||||
int theUpper)
|
||||
// HashCode and IsEquel must be defined for key types of maps
|
||||
Standard_Integer HashCode(const gp_Pnt thePnt, int theUpper)
|
||||
{
|
||||
return HashCode(thePnt.X(),theUpper);
|
||||
}
|
||||
@@ -57,8 +56,8 @@ Standard_Integer CheckArguments1(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
di << "Usage : " << argv[0] << " Lower Upper" << "\n";
|
||||
return 1;
|
||||
}
|
||||
Lower = atoi(argv[1]);
|
||||
Upper = atoi(argv[2]);
|
||||
Lower = Draw::Atoi(argv[1]);
|
||||
Upper = Draw::Atoi(argv[2]);
|
||||
if ( Lower > Upper ) {
|
||||
di << "Lower > Upper" << "\n";
|
||||
return 1;
|
||||
@@ -76,10 +75,10 @@ Standard_Integer CheckArguments2(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
di << "Usage : " << argv[0] << " LowerRow UpperRow LowerCol UpperCol" << "\n";
|
||||
return 1;
|
||||
}
|
||||
LowerRow = atoi(argv[1]);
|
||||
UpperRow = atoi(argv[2]);
|
||||
LowerCol = atoi(argv[3]);
|
||||
UpperCol = atoi(argv[4]);
|
||||
LowerRow = Draw::Atoi(argv[1]);
|
||||
UpperRow = Draw::Atoi(argv[2]);
|
||||
LowerCol = Draw::Atoi(argv[3]);
|
||||
UpperCol = Draw::Atoi(argv[4]);
|
||||
if ( LowerRow > UpperRow ) {
|
||||
di << "LowerRow > UpperRow" << "\n";
|
||||
return 1;
|
||||
|
@@ -17,9 +17,9 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
|
||||
#include <QANCollection.hxx>
|
||||
|
||||
#include <Draw.hxx>
|
||||
#include <Draw_Interpretor.hxx>
|
||||
|
||||
#define ItemType gp_Pnt
|
||||
@@ -45,8 +45,8 @@ Standard_Integer CheckArguments(Draw_Interpretor& di, Standard_Integer argc, con
|
||||
di << "Usage : " << argv[0] << " Repeat Size" << "\n";
|
||||
return 1;
|
||||
}
|
||||
Repeat = atoi(argv[1]);
|
||||
Size = atoi(argv[2]);
|
||||
Repeat = Draw::Atoi(argv[1]);
|
||||
Size = Draw::Atoi(argv[2]);
|
||||
if ( Repeat < 1 ) {
|
||||
di << "Repeat > 0" << "\n";
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user