1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -113,7 +113,7 @@ static Standard_Integer DDataStd_SetInteger (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label L;
DDF::AddLabel(DF, arg[2], L);
TDataStd_Integer::Set(L,atoi(arg[3]));
TDataStd_Integer::Set(L,Draw::Atoi(arg[3]));
return 0;
}
di << "DDataStd_SetInteger : Error" << "\n";
@@ -134,7 +134,7 @@ static Standard_Integer DDataStd_SetReal (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label L;
DDF::AddLabel(DF, arg[2], L);
TDataStd_Real::Set(L,atof(arg[3]));
TDataStd_Real::Set(L,Draw::Atof(arg[3]));
return 0;
}
di << "DDataStd_SetReal : Error" << "\n";
@@ -441,14 +441,14 @@ static Standard_Integer DDataStd_SetIntArray (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer From = atoi(arg[4]), To = atoi( arg[5] ), j;
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << "Array of Standard_Integer with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_IntegerArray) A = TDataStd_IntegerArray::Set(label, From, To, isDelta);
j = 6;
for(Standard_Integer i = From; i<=To; i++) {
A->SetValue(i, atoi(arg[j]) );
A->SetValue(i, Draw::Atoi(arg[j]) );
j++;
}
@@ -510,8 +510,8 @@ static Standard_Integer DDataStd_ChangeIntArray (Draw_Interpretor& di,
di << "There is no TDataStd_IntegerArray at label" << "\n";
return 1;
}
Standard_Integer indx = atoi(arg[3]);
Standard_Integer val = atoi(arg[4]);
Standard_Integer indx = Draw::Atoi(arg[3]);
Standard_Integer val = Draw::Atoi(arg[4]);
Standard_Integer low = A->Lower(), up = A->Upper();
if(low <= indx && indx <= up)
A->SetValue(indx, val);
@@ -559,8 +559,8 @@ static Standard_Integer DDataStd_SetIntArrayTest (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer From = atoi(arg[4]), To = atoi( arg[5] ), j;
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << "Array of Standard_Integer with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_IntegerArray) A = TDataStd_IntegerArray::Set(label, From, To, isDelta);
@@ -587,15 +587,15 @@ static Standard_Integer DDataStd_SetRealArray (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = atoi(arg[4]), To = atoi( arg[5] ), j;
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << " Array of Standard_Real with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_RealArray) A = TDataStd_RealArray::Set(label, From, To, isDelta);
j = 6;
for(Standard_Integer i = From; i<=To; i++) {
A->SetValue(i, atof(arg[j]) );
A->SetValue(i, Draw::Atof(arg[j]) );
j++;
}
@@ -658,8 +658,8 @@ static Standard_Integer DDataStd_ChangeRealArray (Draw_Interpretor& di,
di << "There is no TDataStd_RealArray at label" << "\n";
return 1;
}
Standard_Integer indx = atoi(arg[3]);
Standard_Real val = atof(arg[4]);
Standard_Integer indx = Draw::Atoi(arg[3]);
Standard_Real val = Draw::Atof(arg[4]);
Standard_Integer low = A->Lower(), up = A->Upper();
if(low <= indx && indx <= up)
A->SetValue(indx, val);
@@ -712,7 +712,7 @@ static Standard_Integer DDataStd_SetVariable (Draw_Interpretor& di,
const char* aUnits = arg[4];
aV->Unit(Standard_CString(aUnits));
aV->Constant(Standard_Boolean(atoi(arg[3])));
aV->Constant(Standard_Boolean(Draw::Atoi(arg[3])));
return 0;
}
@@ -854,7 +854,7 @@ static Standard_Integer DDataStd_SetFunction (Draw_Interpretor& di,
Standard_GUID guid (arg[3]);
Handle(TFunction_Function) aF = TFunction_Function::Set(label, guid);
int fail = atoi(arg[4]);
int fail = Draw::Atoi(arg[4]);
aF->SetFailure(fail);
return 0;
@@ -914,9 +914,9 @@ static Standard_Integer DDataStd_SetExtStringArray (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = atoi(arg[4]), To = atoi( arg[5] ), j;
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << "Array of ExtString with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_ExtStringArray) A = TDataStd_ExtStringArray::Set(label, From, To, isDelta);
@@ -988,7 +988,7 @@ static Standard_Integer DDataStd_ChangeExtStrArray (Draw_Interpretor& di,
di << "There is no TDataStd_ExtStringArray at label" << "\n";
return 1;
}
Standard_Integer indx = atoi(arg[3]);
Standard_Integer indx = Draw::Atoi(arg[3]);
TCollection_ExtendedString val(arg[4]);
Standard_Integer low = A->Lower(), up = A->Upper();
if(low <= indx && indx <= up)
@@ -1122,7 +1122,7 @@ static Standard_Integer DDataStd_GetUTFtoFile (Draw_Interpretor& di,
cout << "Error: problem with the file stream, rdstate = " <<anOS.rdstate() <<endl;
#endif
}
char prefix[4] = {0xEF,0xBB,0xBF, 0x00};
unsigned char prefix[4] = {0xEF,0xBB,0xBF, 0x00};
anOS.write( (char*)&prefix[0], 3);
Standard_Integer n = aES.LengthOfCString();
Standard_PCharacter aCstr = (Standard_PCharacter) Standard::Allocate(ROUNDMEM(n+1));
@@ -1148,14 +1148,14 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer From = atoi(arg[4]), To = atoi( arg[5] ), j;
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << "Array of Standard_Integer with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_ByteArray) A = TDataStd_ByteArray::Set(label, From, To, isDelta);
j = 6;
for(Standard_Integer i = From; i<=To; i++) {
Standard_Integer ival = atoi(arg[j]);
Standard_Integer ival = Draw::Atoi(arg[j]);
if(ival > 255) {
cout << "Bad value = " << ival<< endl;
return 1;
@@ -1224,8 +1224,8 @@ static Standard_Integer DDataStd_ChangeByteArray (Draw_Interpretor& di,
di << "There is no TDataStd_ByteArray at label" << "\n";
return 1;
}
Standard_Integer indx = atoi(arg[3]);
Standard_Integer ival = atoi(arg[4]);
Standard_Integer indx = Draw::Atoi(arg[3]);
Standard_Integer ival = Draw::Atoi(arg[4]);
if (ival > 255 || ival < 0) {
di << "DDataStd_ChangeByteArray: Bad value = " <<ival << "\n";
return 1;
@@ -1276,7 +1276,7 @@ static Standard_Integer DDataStd_SetIntPackedMap (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer aNum = nb - 4;
Handle(TDataStd_IntPackedMap) anAtt;
if(!aLabel.FindAttribute(TDataStd_IntPackedMap::GetID(), anAtt))
@@ -1288,7 +1288,7 @@ static Standard_Integer DDataStd_SetIntPackedMap (Draw_Interpretor& di,
Standard_Integer j = 4;
TColStd_PackedMapOfInteger aMap;
for(Standard_Integer i = 1; i<=aNum; i++) {
aMap.Add (atoi(arg[j]));
aMap.Add (Draw::Atoi(arg[j]));
j++;
}
const Handle(TColStd_HPackedMapOfInteger)& aHMap = new TColStd_HPackedMapOfInteger(aMap);
@@ -1361,7 +1361,7 @@ static Standard_Integer DDataStd_ChangeIntPackedMap_Add (Draw_Interpretor& di,
if(!aHMap.IsNull()) {
ahMap->ChangeMap().Assign(aHMap->Map());
for(i=1; i<=aNum;i++) {
Standard_Integer val = atoi(arg[i+2]);
Standard_Integer val = Draw::Atoi(arg[i+2]);
if(!ahMap->Map().Contains(val))
ahMap->ChangeMap().Add(val);
}
@@ -1404,7 +1404,7 @@ static Standard_Integer DDataStd_ChangeIntPackedMap_Rem (Draw_Interpretor& di,
if(!aHMap.IsNull()) {
ahMap->ChangeMap().Assign(aHMap->Map());
for(i=1; i<=aNum;i++) {
Standard_Integer val = atoi(arg[i+2]);
Standard_Integer val = Draw::Atoi(arg[i+2]);
if(ahMap->Map().Contains(val))
ahMap->ChangeMap().Remove(val);
}
@@ -1447,7 +1447,7 @@ static Standard_Integer DDataStd_ChangeIntPackedMap_AddRem (Draw_Interpretor& di
if(!aHMap.IsNull()) {
ahMap->ChangeMap().Assign(aHMap->Map());
for(i=1; i<=aNum;i++) {
Standard_Integer val = atoi(arg[i+2]);
Standard_Integer val = Draw::Atoi(arg[i+2]);
if(!ahMap->Map().Contains(val))
ahMap->ChangeMap().Add(val);
else
@@ -1476,8 +1476,8 @@ static Standard_Integer DDataStd_SetIntPHugeMap (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer isDelta = atoi(arg[3]);
Standard_Integer aNum = atoi(arg[4]);
Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer aNum = Draw::Atoi(arg[4]);
Handle(TDataStd_IntPackedMap) anAtt;
if(!aLabel.FindAttribute(TDataStd_IntPackedMap::GetID(), anAtt))
anAtt = TDataStd_IntPackedMap::Set(aLabel, isDelta);
@@ -1512,7 +1512,7 @@ static Standard_Integer DDataStd_SetNDataIntegers2 (Draw_Interpretor& di,
if (!DDF::GetDF(arg[1],DF)) return 1;
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer aNumP = atoi(arg[3]), j;
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
@@ -1551,7 +1551,7 @@ static Standard_Integer DDataStd_SetNDataIntAr2 (Draw_Interpretor& di,
Standard_Integer j;
TCollection_ExtendedString aKey(arg[3]);
Standard_Integer aNum = atoi(arg[4]);
Standard_Integer aNum = Draw::Atoi(arg[4]);
if (aNum <= 0) return 1;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
@@ -1655,7 +1655,7 @@ static Standard_Integer DDataStd_SetNDataIntegers (Draw_Interpretor& di,
// cout << "Value = |"<<aValue<<endl;
// cout << "aKey = " << aString << "|"<<endl;
//
Standard_Integer aNumP = atoi(arg[3]), j;
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
@@ -1666,7 +1666,7 @@ static Standard_Integer DDataStd_SetNDataIntegers (Draw_Interpretor& di,
j = 4;
for(Standard_Integer i = 1; i<=aNumP; i++) {
TCollection_ExtendedString aKey(arg[j]);
Standard_Integer aVal = atoi(arg[j+1]);
Standard_Integer aVal = Draw::Atoi(arg[j+1]);
anAtt->SetInteger(aKey, aVal);
j +=2;
}
@@ -1765,7 +1765,7 @@ static Standard_Integer DDataStd_SetNDataReals (Draw_Interpretor& di,
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer aNumP = atoi(arg[3]), j;
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
@@ -1776,7 +1776,7 @@ static Standard_Integer DDataStd_SetNDataReals (Draw_Interpretor& di,
j = 4;
for(Standard_Integer i = 1; i<=aNumP; i++) {
TCollection_ExtendedString aKey(arg[j]);
Standard_Real aVal = atof(arg[j+1]);
Standard_Real aVal = Draw::Atof(arg[j+1]);
anAtt->SetReal(aKey, aVal);
j +=2;
}
@@ -1873,7 +1873,7 @@ static Standard_Integer DDataStd_SetNDataStrings (Draw_Interpretor& di,
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer aNumP = atoi(arg[3]), j;
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
@@ -1983,7 +1983,7 @@ static Standard_Integer DDataStd_SetNDataBytes (Draw_Interpretor& di,
TDF_Label aLabel;
DDF::AddLabel(DF, arg[2], aLabel);
Standard_Integer aNumP = atoi(arg[3]), j;
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
@@ -1994,7 +1994,7 @@ static Standard_Integer DDataStd_SetNDataBytes (Draw_Interpretor& di,
j = 4;
for(Standard_Integer i = 1; i<=aNumP; i++) {
TCollection_ExtendedString aKey(arg[j]);
Standard_Byte aVal = (Standard_Byte)atoi(arg[j+1]);
Standard_Byte aVal = (Standard_Byte)Draw::Atoi(arg[j+1]);
anAtt->SetByte(aKey, aVal);
j +=2;
}
@@ -2092,7 +2092,7 @@ static Standard_Integer DDataStd_SetNDataIntAr (Draw_Interpretor& di,
Standard_Integer j;
TCollection_ExtendedString aKey(arg[3]);
Standard_Integer aNum = atoi(arg[4]);
Standard_Integer aNum = Draw::Atoi(arg[4]);
if (aNum <= 0) return 1;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
@@ -2104,7 +2104,7 @@ static Standard_Integer DDataStd_SetNDataIntAr (Draw_Interpretor& di,
j = 5;
Handle(TColStd_HArray1OfInteger) anArr = new TColStd_HArray1OfInteger(1, aNum);
for(Standard_Integer i = 1; i<=aNum; i++) {
Standard_Integer aVal = atoi(arg[j]);
Standard_Integer aVal = Draw::Atoi(arg[j]);
anArr->SetValue(i, aVal);
j++;
}
@@ -2222,7 +2222,7 @@ static Standard_Integer DDataStd_SetNDataRealAr (Draw_Interpretor& di,
Standard_Integer j;
TCollection_ExtendedString aKey(arg[3]);
Standard_Integer aNum = atoi(arg[4]);
Standard_Integer aNum = Draw::Atoi(arg[4]);
if (aNum <= 0) return 1;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
@@ -2234,7 +2234,7 @@ static Standard_Integer DDataStd_SetNDataRealAr (Draw_Interpretor& di,
j = 5;
Handle(TColStd_HArray1OfReal) anArr = new TColStd_HArray1OfReal(1, aNum);
for(Standard_Integer i = 1; i<=aNum; i++) {
Standard_Real aVal = atof(arg[j]);
Standard_Real aVal = Draw::Atof(arg[j]);
anArr->SetValue(i, aVal);
j++;
}

View File

@@ -218,7 +218,7 @@ static Standard_Integer DDataStd_SetPattern (Draw_Interpretor& di,
Handle(TDataXtd_PatternStd) aP = TDataXtd_PatternStd::Set(L);
// set signature
Standard_Integer signature = atoi(arg[3]);
Standard_Integer signature = Draw::Atoi(arg[3]);
aP->Signature(signature);
TDF_Label aLab;
@@ -410,7 +410,7 @@ static Standard_Integer DDataStd_SetPosition (Draw_Interpretor& di,
TDF_Label L;
DDF::AddLabel(DF, arg[2], L);
Standard_Real X = atof(arg[3]), Y = atof(arg[4]), Z = atof(arg[5]);
Standard_Real X = Draw::Atof(arg[3]), Y = Draw::Atof(arg[4]), Z = Draw::Atof(arg[5]);
gp_Pnt aPos (X, Y, Z);
TDataXtd_Position::Set(L,aPos);

View File

@@ -62,12 +62,12 @@
static void Location (Standard_Integer nb, const char** arg, gp_Ax2& Loc) {
if (nb == 9) {
Standard_Real X = atof(arg[3]);
Standard_Real Y = atof(arg[4]);
Standard_Real Z = atof(arg[5]);
Standard_Real DX = atof(arg[6]);
Standard_Real DY = atof(arg[7]);
Standard_Real DZ = atof(arg[8]);
Standard_Real X = Draw::Atof(arg[3]);
Standard_Real Y = Draw::Atof(arg[4]);
Standard_Real Z = Draw::Atof(arg[5]);
Standard_Real DX = Draw::Atof(arg[6]);
Standard_Real DY = Draw::Atof(arg[7]);
Standard_Real DZ = Draw::Atof(arg[8]);
Loc = gp_Ax2 (gp_Pnt(X,Y,Z), gp_Dir(DX,DY,DZ));
}
}
@@ -193,9 +193,9 @@ static Standard_Integer DDataStd_SetPlane (Draw_Interpretor& di,
// if (nb < 6) return 1;
// gp_Trsf T;
// Standard_Real x = atof(arg[3]);
// Standard_Real y = atof(arg[4]);
// Standard_Real z = atof(arg[5]);
// Standard_Real x = Draw::Atof(arg[3]);
// Standard_Real y = Draw::Atof(arg[4]);
// Standard_Real z = Draw::Atof(arg[5]);
// if (nb == 6) {
// T.SetTranslation(gp_Vec(x,y,z));
@@ -203,10 +203,10 @@ static Standard_Integer DDataStd_SetPlane (Draw_Interpretor& di,
// else if (nb < 10)
// return 1;
// else {
// Standard_Real dx = atof(arg[6]);
// Standard_Real dy = atof(arg[7]);
// Standard_Real dz = atof(arg[8]);
// Standard_Real ang = atof(arg[9]);
// Standard_Real dx = Draw::Atof(arg[6]);
// Standard_Real dy = Draw::Atof(arg[7]);
// Standard_Real dz = Draw::Atof(arg[8]);
// Standard_Real ang = Draw::Atof(arg[9]);
// T.SetRotation(gp_Ax1(gp_Pnt(x,y,z),
// gp_Vec(dx,dy,dz)),
// ang * (M_PI / 180.0));

View File

@@ -76,9 +76,9 @@ static Standard_Integer DDataStd_PNT (Draw_Interpretor& di,
if (!DDF::GetDF (arg[1], DF)) return 1;
TDF_Label L;
DDF::AddLabel (DF, arg[2], L);
Standard_Real x = atof(arg[3]);
Standard_Real y = atof(arg[4]);
Standard_Real z = atof(arg[5]);
Standard_Real x = Draw::Atof(arg[3]);
Standard_Real y = Draw::Atof(arg[4]);
Standard_Real z = Draw::Atof(arg[5]);
TDataXtd_Point::Set (L,gp_Pnt(x,y,z));
return 0;
}

View File

@@ -334,8 +334,8 @@ static Standard_Integer DDataStd_TreeBrowse (Draw_Interpretor& di,
Handle(DDataStd_TreeBrowser) NewTreeNode = new DDataStd_TreeBrowser (lab);
char *name = new char[50];
if (n == 4) sprintf(name,"treebrowser_%s",a[3]);
else sprintf(name,"treebrowser_%s",a[1]);
if (n == 4) Sprintf(name,"treebrowser_%s",a[3]);
else Sprintf(name,"treebrowser_%s",a[1]);
Draw::Set(name, NewTreeNode);
TCollection_AsciiString inst1("treebrowser ");
@@ -387,7 +387,7 @@ static Standard_Integer DDataStd_ChildNodeIterate (Draw_Interpretor& di,
if (n >= 4) {
Handle(TDF_Data) DF;
if (!DDF::GetDF(a[1],DF)) return 1;
const Standard_Boolean AllLevels(atoi(a[3]));
const Standard_Boolean AllLevels(Draw::Atoi(a[3]));
Handle(TDataStd_TreeNode) TN, Value;
Standard_GUID ID;
@@ -450,7 +450,7 @@ static Standard_Integer DDataStd_InitChildNodeIterator (Draw_Interpretor& di,
}
if (!DDF::Find(DF, a[2], ID, TN)) return 1;
const Standard_Boolean AllLevels(atoi(a[3]));
const Standard_Boolean AllLevels(Draw::Atoi(a[3]));
cni.Initialize(TN, AllLevels);
return 0;
}