mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
Coding - Moving to Sprintf call (#675)
- Updates function calls from `sprintf` to `Sprintf` across the entire codebase - Updates comments and documentation references to reflect the new function name - Adds format attribute annotations to the `Sprintf` function declaration for better compiler validation
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <LDOM_CharReference.hxx>
|
||||
|
||||
#include <Standard_CString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -194,7 +197,7 @@ char* LDOM_CharReference::Encode(const char* theSrc,
|
||||
*ptrDest++ = *ptrSrc;
|
||||
else if (aCode == CHAR_REF)
|
||||
{ // character reference
|
||||
sprintf(ptrDest, "&#x%02x;", iSrc);
|
||||
Sprintf(ptrDest, "&#x%02x;", iSrc);
|
||||
ptrDest += 6;
|
||||
}
|
||||
else // predefined entity reference
|
||||
|
@@ -425,7 +425,7 @@ void LDOM_XmlWriter::WriteAttribute(Standard_OStream& theOStream, const LDOM_Nod
|
||||
myABuffer = new char[aLength + 1];
|
||||
myABufferLen = aLength;
|
||||
}
|
||||
sprintf(myABuffer,
|
||||
Sprintf(myABuffer,
|
||||
"%c%s%c%c%d%c",
|
||||
chSpace,
|
||||
aName,
|
||||
@@ -461,7 +461,7 @@ void LDOM_XmlWriter::WriteAttribute(Standard_OStream& theOStream, const LDOM_Nod
|
||||
myABufferLen = aLength;
|
||||
}
|
||||
|
||||
sprintf(myABuffer,
|
||||
Sprintf(myABuffer,
|
||||
"%c%s%c%c%s%c",
|
||||
chSpace,
|
||||
aName,
|
||||
|
@@ -182,7 +182,7 @@ void TPrsStd_ConstraintTools::ComputeTextAndValue(const Handle(TDataXtd_Constrai
|
||||
outvalue = UnitsAPI::CurrentFromLS(val, "LENGTH");
|
||||
}
|
||||
char res[1000];
|
||||
sprintf(res, "%g", outvalue);
|
||||
Sprintf(res, "%g", outvalue);
|
||||
txt = TCollection_ExtendedString(res);
|
||||
|
||||
if (VAL->IsCaptured())
|
||||
|
@@ -143,7 +143,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BREntity::TransferShape(
|
||||
// the following function forces indirect surfaces to
|
||||
// direct surfaces (mandatory in IGES)
|
||||
// theShape = ShapeCustom::DirectFaces(start);
|
||||
// sprintf(Name,"res_%d",Nb++);
|
||||
// Sprintf(Name,"res_%d",Nb++);
|
||||
// DBRep::Set(Name,theShape);
|
||||
|
||||
if (start.ShapeType() == TopAbs_FACE)
|
||||
|
@@ -427,18 +427,18 @@ void IGESAppli_ToolElementResults::OwnCheck(const Handle(IGESAppli_ElementResult
|
||||
ach->AddFail("One of the Data Layer Flags not in [0-4]");
|
||||
if (dlf < 4 && ent->NbLayers(i) != 1)
|
||||
{
|
||||
sprintf(mess, "Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]", i);
|
||||
Sprintf(mess, "Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
if (rrf == 1 || rrf == 2)
|
||||
if (nrl != 1 || ent->ResultDataLoc(i, 1) != 0)
|
||||
{
|
||||
sprintf(mess, "Result Data Locs n0.%d incorrect for Result Report = 1 or 2", i);
|
||||
Sprintf(mess, "Result Data Locs n0.%d incorrect for Result Report = 1 or 2", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
if (ent->NbResults(i) != (nv * nl * nrl))
|
||||
{
|
||||
sprintf(mess, "Nb. of results for Element n0.%d incorrect, should be %d", i, nv * nl * nrl);
|
||||
Sprintf(mess, "Nb. of results for Element n0.%d incorrect, should be %d", i, nv * nl * nrl);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
}
|
||||
|
@@ -147,7 +147,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
{
|
||||
char mess[300];
|
||||
const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
|
||||
sprintf(mess, "\t%s", aBinder->ResultTypeName());
|
||||
Sprintf(mess, "\t%s", aBinder->ResultTypeName());
|
||||
if (aMapCountResult.IsBound(mess))
|
||||
aMapCountResult.ChangeFind(mess)++;
|
||||
else
|
||||
@@ -160,7 +160,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
|
||||
DeclareAndCast(IGESData_IGESEntity, igesEnt, iterTrans.Starting());
|
||||
|
||||
sprintf(mess,
|
||||
Sprintf(mess,
|
||||
"%d\t%d\t%s\t%s",
|
||||
igesEnt->TypeNumber(),
|
||||
igesEnt->FormNumber(),
|
||||
@@ -188,7 +188,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
Standard_Integer nw = aCheck->NbWarnings(), nf = aCheck->NbFails(), i;
|
||||
for (i = 1; (failsonly == IFSelect_FailAndWarn) && (i <= nw); i++)
|
||||
{
|
||||
sprintf(mess, "\t W\t%d\t%d\t%s", type, form, aCheck->CWarning(i));
|
||||
Sprintf(mess, "\t W\t%d\t%d\t%s", type, form, aCheck->CWarning(i));
|
||||
if (aMapCount.IsBound(mess))
|
||||
aMapCount.ChangeFind(mess)++;
|
||||
else
|
||||
@@ -206,7 +206,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
}
|
||||
for (i = 1; i <= nf; i++)
|
||||
{
|
||||
sprintf(mess, "\t F\t%d\t%d\t%s", type, form, aCheck->CFail(i));
|
||||
Sprintf(mess, "\t F\t%d\t%d\t%s", type, form, aCheck->CFail(i));
|
||||
// TF << mess << std::endl;
|
||||
if (aMapCount.IsBound(mess))
|
||||
aMapCount.ChangeFind(mess)++;
|
||||
@@ -270,18 +270,18 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
Message_Msg msg3035("IGES_3035");
|
||||
TF->Send(msg3035, Message_Info);
|
||||
char line[80];
|
||||
sprintf(line, "\t\t\t");
|
||||
Sprintf(line, "\t\t\t");
|
||||
aSender << line;
|
||||
Standard_Integer nbInLine = 0;
|
||||
for (Standard_Integer i = 1; i <= length; i++)
|
||||
{
|
||||
// IDT_Out << (entityList->Value(i)) << " ";
|
||||
sprintf(line, "\t %d", entityList->Value(i));
|
||||
Sprintf(line, "\t %d", entityList->Value(i));
|
||||
aSender << line;
|
||||
if (++nbInLine == 6)
|
||||
{
|
||||
nbInLine = 0;
|
||||
sprintf(line, "\n\t\t\t");
|
||||
Sprintf(line, "\n\t\t\t");
|
||||
aSender << line;
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
{
|
||||
char mess[300];
|
||||
|
||||
sprintf(mess,
|
||||
Sprintf(mess,
|
||||
"%d\t%d \t%s\t%s",
|
||||
root->TypeNumber(),
|
||||
root->FormNumber(),
|
||||
@@ -350,7 +350,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly,
|
||||
for (; aMapCountIter.More(); aMapCountIter.Next())
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value());
|
||||
Sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value());
|
||||
// clang-format off
|
||||
TF->SendInfo() << mess << std::endl; //dicoCountIter.Value() << dicoCountIter.Name() << std::endl;
|
||||
// clang-format on
|
||||
|
@@ -190,7 +190,7 @@ void IGESData::Init()
|
||||
IGESData_GlobalSection GS;
|
||||
// #58 rln 28.12.98 changing default values for Global Section
|
||||
char procver[80];
|
||||
sprintf(procver, XSTEP_PROCESSOR_VERSION, "IGES");
|
||||
Sprintf(procver, XSTEP_PROCESSOR_VERSION, "IGES");
|
||||
Handle(TCollection_HAsciiString) gsys = new TCollection_HAsciiString(procver);
|
||||
Interface_Static::Init("XSTEP", "write.iges.header.product", 't', procver);
|
||||
|
||||
|
@@ -53,7 +53,7 @@ static void MakeHollerith(const Handle(TCollection_HAsciiString)& astr,
|
||||
Standard_Integer ln = astr->Length();
|
||||
if (ln == 0)
|
||||
return;
|
||||
sprintf(text, "%dH%s", ln, astr->ToCString());
|
||||
Sprintf(text, "%dH%s", ln, astr->ToCString());
|
||||
lt = ln + 2;
|
||||
if (ln >= 10)
|
||||
lt++;
|
||||
@@ -415,51 +415,51 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params() const
|
||||
MakeHollerith(theInterfaceVersion, text, lt);
|
||||
res->Append(text, lt, Interface_ParamText, 0);
|
||||
|
||||
sprintf(nombre, "%d", theIntegerBits);
|
||||
Sprintf(nombre, "%d", theIntegerBits);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
sprintf(nombre, "%d", theMaxPower10Single);
|
||||
Sprintf(nombre, "%d", theMaxPower10Single);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
sprintf(nombre, "%d", theMaxDigitsSingle);
|
||||
Sprintf(nombre, "%d", theMaxDigitsSingle);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
sprintf(nombre, "%d", theMaxPower10Double);
|
||||
Sprintf(nombre, "%d", theMaxPower10Double);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
sprintf(nombre, "%d", theMaxDigitsDouble);
|
||||
Sprintf(nombre, "%d", theMaxDigitsDouble);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
MakeHollerith(theReceiveName, text, lt);
|
||||
res->Append(text, lt, Interface_ParamText, 0);
|
||||
|
||||
Interface_FloatWriter::Convert(theScale, nombre, Standard_True, 0., 0., "%f", "%f");
|
||||
// sprintf(nombre,"%f",theScale);
|
||||
// Sprintf(nombre,"%f",theScale);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0);
|
||||
|
||||
sprintf(nombre, "%d", theUnitFlag);
|
||||
Sprintf(nombre, "%d", theUnitFlag);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
MakeHollerith(theUnitName, text, lt);
|
||||
res->Append(text, lt, Interface_ParamText, 0);
|
||||
|
||||
sprintf(nombre, "%d", theLineWeightGrad);
|
||||
Sprintf(nombre, "%d", theLineWeightGrad);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
Interface_FloatWriter::Convert(theMaxLineWeight, nombre, Standard_True, 0., 0., "%f", "%f");
|
||||
// sprintf(nombre,"%f",theMaxLineWeight);
|
||||
// Sprintf(nombre,"%f",theMaxLineWeight);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0);
|
||||
|
||||
MakeHollerith(theDate, text, lt);
|
||||
res->Append(text, lt, Interface_ParamText, 0);
|
||||
|
||||
Interface_FloatWriter::Convert(theResolution, nombre, Standard_True, 0., 0., "%g", "%g");
|
||||
// sprintf(nombre,"%f",theResolution);
|
||||
// Sprintf(nombre,"%f",theResolution);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0);
|
||||
|
||||
if (hasMaxCoord)
|
||||
Interface_FloatWriter::Convert(theMaxCoord, nombre, Standard_True, 0., 0., "%f", "%f");
|
||||
// sprintf(nombre,"%f",theMaxCoord);
|
||||
// Sprintf(nombre,"%f",theMaxCoord);
|
||||
else
|
||||
nombre[0] = '\0';
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0);
|
||||
@@ -470,10 +470,10 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params() const
|
||||
MakeHollerith(theCompanyName, text, lt);
|
||||
res->Append(text, lt, Interface_ParamText, 0);
|
||||
|
||||
sprintf(nombre, "%d", theIGESVersion);
|
||||
Sprintf(nombre, "%d", theIGESVersion);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
sprintf(nombre, "%d", theDraftingStandard);
|
||||
Sprintf(nombre, "%d", theDraftingStandard);
|
||||
res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0);
|
||||
|
||||
if (!theLastChangeDate.IsNull())
|
||||
@@ -757,14 +757,14 @@ Handle(TCollection_HAsciiString) IGESData_GlobalSection::NewDateString(
|
||||
}
|
||||
Standard_Integer date1 = (an) * 10000 + moi * 100 + jou;
|
||||
Standard_Integer date2 = (heur + 100) * 10000 + minut * 100 + second;
|
||||
sprintf(madate, "%d%d", date1, date2);
|
||||
Sprintf(madate, "%d%d", date1, date2);
|
||||
madate[(mode == 0 ? 6 : 8)] = '.';
|
||||
if (!dizaine)
|
||||
madate[0] = '0';
|
||||
}
|
||||
else if (mode == 1)
|
||||
{
|
||||
sprintf(madate, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", anne, moi, jou, heur, minut, second);
|
||||
Sprintf(madate, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", anne, moi, jou, heur, minut, second);
|
||||
}
|
||||
return new TCollection_HAsciiString(madate);
|
||||
}
|
||||
|
@@ -481,7 +481,7 @@ Handle(TCollection_HAsciiString) IGESData_IGESEntity::NameValue() const
|
||||
if (theSubScriptN < 0)
|
||||
return theShortLabel;
|
||||
char lenom[50];
|
||||
sprintf(lenom, "%s(%d)", theShortLabel->ToCString(), theSubScriptN);
|
||||
Sprintf(lenom, "%s(%d)", theShortLabel->ToCString(), theSubScriptN);
|
||||
nom = new TCollection_HAsciiString(lenom);
|
||||
}
|
||||
else if (nbname > 0)
|
||||
|
@@ -639,9 +639,9 @@ Handle(TCollection_HAsciiString) IGESData_IGESModel::StringLabel(
|
||||
char text[20];
|
||||
Standard_Integer num = Number(ent);
|
||||
if (num > 0)
|
||||
sprintf(text, "D%d", 2 * num - 1);
|
||||
Sprintf(text, "D%d", 2 * num - 1);
|
||||
else
|
||||
sprintf(text, "D0...");
|
||||
Sprintf(text, "D0...");
|
||||
label = new TCollection_HAsciiString(text);
|
||||
}
|
||||
return label;
|
||||
|
@@ -352,7 +352,7 @@ void IGESData_IGESWriter::OwnParams(const Handle(IGESData_IGESEntity)& anent)
|
||||
throw Interface_InterfaceError("IGESWriter : OwnParams");
|
||||
thepnum.SetValue(themodel->Number(anent), thepars->Length() + 1);
|
||||
thecurr.Clear();
|
||||
sprintf(text, "%d", anent->TypeNumber());
|
||||
Sprintf(text, "%d", anent->TypeNumber());
|
||||
AddString(text);
|
||||
thestep = IGESData_ReadOwn;
|
||||
}
|
||||
@@ -464,7 +464,7 @@ void IGESData_IGESWriter::Send(const Standard_Integer val)
|
||||
{
|
||||
char text[20];
|
||||
AddChar(thesep);
|
||||
sprintf(text, "%d", val);
|
||||
Sprintf(text, "%d", val);
|
||||
AddString(text);
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
for (i = 1; i <= nbs; i++)
|
||||
{
|
||||
char finlin[20];
|
||||
sprintf(finlin, "S%7.7d", i);
|
||||
Sprintf(finlin, "S%7.7d", i);
|
||||
line = thestar->Value(i);
|
||||
|
||||
if (fnes)
|
||||
@@ -634,7 +634,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
for (i = 1; i <= nbg && isGood; i++)
|
||||
{
|
||||
char finlin[20];
|
||||
sprintf(finlin, "G%7.7d", i);
|
||||
Sprintf(finlin, "G%7.7d", i);
|
||||
line = thehead->Value(i);
|
||||
|
||||
if (fnes)
|
||||
@@ -688,7 +688,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
num);
|
||||
v[1] = thepnum.Value(i); // start in P
|
||||
v[15] = thepnum.Value(i + 1) - thepnum.Value(i); // nb of lines in P
|
||||
sprintf(ligne,
|
||||
Sprintf(ligne,
|
||||
"%8d%8d%8d%8d%8d%8d%8d%8d%2.2d%2.2d%2.2d%2.2dD%7.7d",
|
||||
v[0],
|
||||
v[1],
|
||||
@@ -708,7 +708,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
else
|
||||
S << ligne;
|
||||
S << "\n";
|
||||
sprintf(ligne,
|
||||
Sprintf(ligne,
|
||||
"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
|
||||
v[0],
|
||||
v[13],
|
||||
@@ -745,7 +745,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
for (Standard_Integer j = thepnum.Value(i); j < thepnum.Value(i + 1); j++)
|
||||
{
|
||||
char finlin[32];
|
||||
sprintf(finlin, " %7.7dP%7.7d", 2 * i - 1, j);
|
||||
Sprintf(finlin, " %7.7dP%7.7d", 2 * i - 1, j);
|
||||
line = thepars->Value(j);
|
||||
// line->LeftJustify(MaxcarsP,' '); replaced by more economical ! :
|
||||
|
||||
@@ -774,7 +774,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const
|
||||
if (!isGood)
|
||||
return isGood;
|
||||
// Terminal Section (pas trop compliquee, ma foi)
|
||||
sprintf(ligne,
|
||||
Sprintf(ligne,
|
||||
"S%7dG%7dD%7dP%7d T0000001",
|
||||
nbs,
|
||||
nbg,
|
||||
|
@@ -436,7 +436,7 @@ Standard_Boolean IGESData_ParamReader::ReadBoolean(const IGESData_ParamCursor& P
|
||||
if (flag != 0 && flag != 1)
|
||||
{
|
||||
char ssem[100];
|
||||
sprintf(ssem, " : Value is not 0/1, but %s", FP.CValue());
|
||||
Sprintf(ssem, " : Value is not 0/1, but %s", FP.CValue());
|
||||
if (exact)
|
||||
{
|
||||
AddFail(mess, ssem, " : Value is not 0/1, but %s");
|
||||
@@ -858,7 +858,7 @@ Standard_Boolean IGESData_ParamReader::ReadInts(const IGESData_ParamCursor&
|
||||
else
|
||||
{
|
||||
char ssem[100];
|
||||
sprintf(ssem, " : not an Integer, rank %d", i);
|
||||
Sprintf(ssem, " : not an Integer, rank %d", i);
|
||||
AddFail(mess, ssem, " : not an Integer, rank %d");
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1135,12 +1135,12 @@ Standard_Boolean IGESData_ParamReader::ReadEnts(const Handle(IGESData_IGESReader
|
||||
char mest[80];
|
||||
if (nbneg > 0)
|
||||
{
|
||||
sprintf(mest, "Skipped Negative Pointer(s), count %d", nbneg);
|
||||
Sprintf(mest, "Skipped Negative Pointer(s), count %d", nbneg);
|
||||
AddWarning(mest, "Skipped Negative Pointer(s), count %d");
|
||||
}
|
||||
if (nbnul > 0)
|
||||
{
|
||||
sprintf(mest, "Skipped Null Type Entity(ies), count %d", nbnul);
|
||||
Sprintf(mest, "Skipped Null Type Entity(ies), count %d", nbnul);
|
||||
AddWarning(mest, "Skipped Null Type Entity(ies), count %d");
|
||||
}
|
||||
return Standard_True;
|
||||
@@ -1247,7 +1247,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S
|
||||
{
|
||||
// char ssem[100];
|
||||
pbrealint = num;
|
||||
// sprintf(ssem,": Integer converted to Real, 1st rank=%d",num);
|
||||
// Sprintf(ssem,": Integer converted to Real, 1st rank=%d",num);
|
||||
// AddWarning (mess,ssem,"At least one Integer converted to Real, 1st rank=%d");
|
||||
}
|
||||
}
|
||||
@@ -1279,7 +1279,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S
|
||||
{
|
||||
// char ssem[100];
|
||||
pbrealform = num;
|
||||
// sprintf(ssem,"Real with no decimal point (added), 1st rank=%d",num);
|
||||
// Sprintf(ssem,"Real with no decimal point (added), 1st rank=%d",num);
|
||||
// AddWarning (mess,ssem,"Real with no decimal point (added), 1st rank=%d");
|
||||
}
|
||||
}
|
||||
@@ -1297,7 +1297,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S
|
||||
else
|
||||
{
|
||||
// char ssem[100];
|
||||
// sprintf(ssem,": not given as Real, rank %d",num);
|
||||
// Sprintf(ssem,": not given as Real, rank %d",num);
|
||||
// AddFail (mess,ssem,": not given as Real, rank %d");
|
||||
/* TCollection_AsciiString mess = amsg.Value();
|
||||
if ((mess.Search("ter %d"))||(mess.Search("tre %d")))
|
||||
@@ -1325,7 +1325,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num,
|
||||
{
|
||||
char ssem[100];
|
||||
pbrealint = num;
|
||||
sprintf(ssem, ": Integer converted to Real, 1st rank=%d", num);
|
||||
Sprintf(ssem, ": Integer converted to Real, 1st rank=%d", num);
|
||||
AddWarning(mess, ssem, "At least one Integer converted to Real, 1st rank=%d");
|
||||
}
|
||||
}
|
||||
@@ -1357,7 +1357,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num,
|
||||
{
|
||||
char ssem[100];
|
||||
pbrealform = num;
|
||||
sprintf(ssem, "Real with no decimal point (added), 1st rank=%d", num);
|
||||
Sprintf(ssem, "Real with no decimal point (added), 1st rank=%d", num);
|
||||
AddWarning(mess, ssem, "Real with no decimal point (added), 1st rank=%d");
|
||||
}
|
||||
}
|
||||
@@ -1376,7 +1376,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num,
|
||||
{
|
||||
val = 0.0; // DEFAULT
|
||||
char ssem[100];
|
||||
sprintf(ssem, ": not given as Real, rank %d", num);
|
||||
Sprintf(ssem, ": not given as Real, rank %d", num);
|
||||
AddFail(mess, ssem, ": not given as Real, rank %d");
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -444,13 +444,13 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en
|
||||
char mess[80];
|
||||
if (ent->AttributeType(i) < 0 || ent->AttributeType(i) > 9999)
|
||||
{
|
||||
sprintf(mess, "Attribute Type n0.%d not in <0 - 9999>", ent->AttributeType(i));
|
||||
Sprintf(mess, "Attribute Type n0.%d not in <0 - 9999>", ent->AttributeType(i));
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
Standard_Integer aty = ent->AttributeValueDataType(i);
|
||||
if (aty < 0 || aty > 6)
|
||||
{
|
||||
sprintf(mess, "Attribute Value Data Type n0.%d not in <0 - 6>", aty);
|
||||
Sprintf(mess, "Attribute Value Data Type n0.%d not in <0 - 6>", aty);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
if (ent->AttributeValueCount(i) <= 0)
|
||||
@@ -460,7 +460,7 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en
|
||||
{
|
||||
if (aty == 0 || aty == 5)
|
||||
continue;
|
||||
sprintf(mess, "Form Number > 0 and Attribute Value List n0.%d undefined", aty);
|
||||
Sprintf(mess, "Form Number > 0 and Attribute Value List n0.%d undefined", aty);
|
||||
ach->AddFail(mess);
|
||||
continue;
|
||||
}
|
||||
@@ -472,31 +472,31 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en
|
||||
case 1:
|
||||
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
||||
{
|
||||
sprintf(mess, "Attribute List n0.%d (Integers) badly defined", aty);
|
||||
Sprintf(mess, "Attribute List n0.%d (Integers) badly defined", aty);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal)))
|
||||
{
|
||||
sprintf(mess, "Attribute List n0.%d (Reals) badly defined", aty);
|
||||
Sprintf(mess, "Attribute List n0.%d (Reals) badly defined", aty);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString)))
|
||||
{
|
||||
sprintf(mess, "Attribute List n0.%d (Strings) badly defined", aty);
|
||||
Sprintf(mess, "Attribute List n0.%d (Strings) badly defined", aty);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity)))
|
||||
{
|
||||
sprintf(mess, "Attribute List n0.%d (IGES Pointers) badly defined", aty);
|
||||
Sprintf(mess, "Attribute List n0.%d (IGES Pointers) badly defined", aty);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
||||
{
|
||||
sprintf(mess, "Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
|
||||
Sprintf(mess, "Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@@ -335,21 +335,21 @@ void IGESDimen_ToolGeneralNote::OwnCheck(const Handle(IGESDimen_GeneralNote)& en
|
||||
if (ent->NbCharacters(i) != ent->Text(i)->Length())
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Number of Characters != Length of Text String", i);
|
||||
Sprintf(mess, "%d : Number of Characters != Length of Text String", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
Standard_Integer mflag = ent->MirrorFlag(i);
|
||||
if ((mflag < 0) || (mflag > 2))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Mirror flag != 0, 1, 2", i);
|
||||
Sprintf(mess, "%d : Mirror flag != 0, 1, 2", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
Standard_Integer rflag = ent->RotateFlag(i);
|
||||
if ((rflag < 0) || (rflag > 1))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Rotate flag != 0, 1", i);
|
||||
Sprintf(mess, "%d : Rotate flag != 0, 1", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
}
|
||||
|
@@ -471,7 +471,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot
|
||||
if (ent->NbCharacters(i) != ent->Text(i)->Length())
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Number of Characters != Length of Text String", i);
|
||||
Sprintf(mess, "%d : Number of Characters != Length of Text String", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot
|
||||
if ((charcode >= 0) && (charcode != 1) && ((charcode < 1001) || (charcode > 1003)))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Character Set Code != 1, 1001, 1002, 1003", i);
|
||||
Sprintf(mess, "%d : Character Set Code != 1, 1001, 1002, 1003", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot
|
||||
if ((chardisp < 0) || (chardisp > 1))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Character Display != 0, 1", i);
|
||||
Sprintf(mess, "%d : Character Display != 0, 1", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot
|
||||
if ((mflag < 0) || (mflag > 2))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Mirror flag != 0, 1, 2", i);
|
||||
Sprintf(mess, "%d : Mirror flag != 0, 1, 2", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot
|
||||
if ((rflag < 0) || (rflag > 1))
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "%d : Rotate flag != 0, 1", i);
|
||||
Sprintf(mess, "%d : Rotate flag != 0, 1", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
}
|
||||
|
@@ -226,7 +226,7 @@ void IGESDraw_ToolViewsVisible::OwnCheck(const Handle(IGESDraw_ViewsVisible)& en
|
||||
if (!res)
|
||||
return;
|
||||
char mess[80];
|
||||
sprintf(mess, "Mismatch for %d Entities displayed", res);
|
||||
Sprintf(mess, "Mismatch for %d Entities displayed", res);
|
||||
ach->AddFail(mess, "Mismatch for %d Entities displayed");
|
||||
}
|
||||
|
||||
|
@@ -360,7 +360,7 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck(const Handle(IGESDraw_ViewsVisi
|
||||
if (!res)
|
||||
return;
|
||||
char mess[80];
|
||||
sprintf(mess, "Mismatch for %d Entities displayed", res);
|
||||
Sprintf(mess, "Mismatch for %d Entities displayed", res);
|
||||
ach->AddFail(mess, "Mismatch for %d Entities displayed");
|
||||
}
|
||||
|
||||
|
@@ -407,7 +407,7 @@ void IGESGeom_ToolBoundary::OwnCheck(const Handle(IGESGeom_Boundary)& ent,
|
||||
if (ent->NbParameterCurves(i) != 0)
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess,"Nb. Parameter Space Curve %d !=0 while Boundary Type=0",i);
|
||||
Sprintf(mess,"Nb. Parameter Space Curve %d !=0 while Boundary Type=0",i);
|
||||
ach.SendFail(mess);
|
||||
}
|
||||
*/
|
||||
|
@@ -212,9 +212,9 @@ IFSelect_ReturnStatus IGESSelect_Activator::Do(const Standard_Integer
|
||||
}
|
||||
char signature[20];
|
||||
if (argc == 2)
|
||||
sprintf(signature, "%s", arg1);
|
||||
Sprintf(signature, "%s", arg1);
|
||||
else
|
||||
sprintf(signature, "%s %s", arg1, arg2);
|
||||
Sprintf(signature, "%s %s", arg1, arg2);
|
||||
Handle(IFSelect_SelectSignature) sel =
|
||||
new IFSelect_SelectSignature(new IGESSelect_IGESTypeForm, signature, (argc > 2));
|
||||
return pilot->RecordItem(sel);
|
||||
|
@@ -72,6 +72,6 @@ TCollection_AsciiString IGESSelect_AddFileComment::Label() const
|
||||
{
|
||||
Standard_Integer nb = NbLines();
|
||||
char labl[80];
|
||||
sprintf(labl, "Add %d Comment Lines (Start Section)", nb);
|
||||
Sprintf(labl, "Add %d Comment Lines (Start Section)", nb);
|
||||
return TCollection_AsciiString(labl);
|
||||
}
|
||||
|
@@ -119,14 +119,14 @@ TCollection_AsciiString IGESSelect_ChangeLevelList::Label() const
|
||||
newl = thenew->Value();
|
||||
|
||||
if (yaold)
|
||||
sprintf(labl, "Changes Level Lists containing %d", oldl);
|
||||
Sprintf(labl, "Changes Level Lists containing %d", oldl);
|
||||
else
|
||||
sprintf(labl, "Changes all Level Lists in D.E. %d", oldl);
|
||||
Sprintf(labl, "Changes all Level Lists in D.E. %d", oldl);
|
||||
TCollection_AsciiString label(labl);
|
||||
if (yanew)
|
||||
sprintf(labl, " to Number %d", newl);
|
||||
Sprintf(labl, " to Number %d", newl);
|
||||
else
|
||||
sprintf(labl, " to Number = first value in List");
|
||||
Sprintf(labl, " to Number = first value in List");
|
||||
label.AssignCat(labl);
|
||||
return label;
|
||||
}
|
||||
|
@@ -103,8 +103,8 @@ TCollection_AsciiString IGESSelect_ChangeLevelNumber::Label() const
|
||||
newl = thenew->Value();
|
||||
|
||||
if (yaold)
|
||||
sprintf(labl, "Changes Level Number %d to %d", oldl, newl);
|
||||
Sprintf(labl, "Changes Level Number %d to %d", oldl, newl);
|
||||
else
|
||||
sprintf(labl, "Changes all Level Numbers positive and zero to %d", newl);
|
||||
Sprintf(labl, "Changes all Level Numbers positive and zero to %d", newl);
|
||||
return TCollection_AsciiString(labl);
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ void IGESSelect_CounterOfLevelNumber::AddLevel(const Handle(Standard_Transient)&
|
||||
// if (level == 0) Add(ent," NO LEVEL");
|
||||
// else {
|
||||
char signature[30];
|
||||
sprintf(signature, "%7d", level);
|
||||
Sprintf(signature, "%7d", level);
|
||||
Add(ent, signature);
|
||||
// }
|
||||
}
|
||||
@@ -140,7 +140,7 @@ Handle(TCollection_HAsciiString) IGESSelect_CounterOfLevelNumber::Sign(
|
||||
if (level < 0)
|
||||
return new TCollection_HAsciiString("LEVEL LIST");
|
||||
char signature[30];
|
||||
sprintf(signature, "%7d", level);
|
||||
Sprintf(signature, "%7d", level);
|
||||
return new TCollection_HAsciiString(signature);
|
||||
}
|
||||
|
||||
|
@@ -127,7 +127,7 @@ Standard_Boolean IGESSelect_Dumper::WriteOwn(IFSelect_SessionFile& f
|
||||
Standard_Integer np = sp->GlobalNumber();
|
||||
Handle(TCollection_HAsciiString) val = sp->Value();
|
||||
char intext[10];
|
||||
sprintf(intext, "%d", np);
|
||||
Sprintf(intext, "%d", np);
|
||||
file.SendText(intext);
|
||||
file.SendItem(val);
|
||||
return Standard_True;
|
||||
@@ -198,9 +198,9 @@ Standard_Boolean IGESSelect_Dumper::ReadOwn(IFSelect_SessionFile& file,
|
||||
// Attention, 2 termes possibles pour la signature
|
||||
char sig[40];
|
||||
if (file.NbParams() == 2)
|
||||
sprintf(sig, "%s", file.ParamValue(2).ToCString());
|
||||
Sprintf(sig, "%s", file.ParamValue(2).ToCString());
|
||||
else
|
||||
sprintf(sig, "%s %s", file.ParamValue(2).ToCString(), file.ParamValue(3).ToCString());
|
||||
Sprintf(sig, "%s %s", file.ParamValue(2).ToCString(), file.ParamValue(3).ToCString());
|
||||
// item = new IGESSelect_SelectIGESTypeForm(sig,exact);
|
||||
// return Standard_True;
|
||||
}
|
||||
|
@@ -58,16 +58,16 @@ Standard_CString IGESSelect_IGESTypeForm::Value(
|
||||
if (unk)
|
||||
{
|
||||
if (theform)
|
||||
sprintf(typeval, "%d %d (?)", typenum, formnum);
|
||||
Sprintf(typeval, "%d %d (?)", typenum, formnum);
|
||||
else
|
||||
sprintf(typeval, "%d (?)", typenum);
|
||||
Sprintf(typeval, "%d (?)", typenum);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (theform)
|
||||
sprintf(typeval, "%d %d", typenum, formnum);
|
||||
Sprintf(typeval, "%d %d", typenum, formnum);
|
||||
else
|
||||
sprintf(typeval, "%d", typenum);
|
||||
Sprintf(typeval, "%d", typenum);
|
||||
}
|
||||
return &typeval[0];
|
||||
}
|
||||
|
@@ -72,6 +72,6 @@ TCollection_AsciiString IGESSelect_SelectLevelNumber::ExtractLabel() const
|
||||
if (numlev == 0)
|
||||
return TCollection_AsciiString("IGES Entity attached to no Level");
|
||||
|
||||
sprintf(labl, "IGES Entity, Level Number admitting %d", numlev);
|
||||
Sprintf(labl, "IGES Entity, Level Number admitting %d", numlev);
|
||||
return TCollection_AsciiString(labl);
|
||||
}
|
||||
|
@@ -75,7 +75,7 @@ TCollection_AsciiString IGESSelect_SelectName::ExtractLabel() const
|
||||
char labl[50];
|
||||
if (!thename.IsNull())
|
||||
{
|
||||
sprintf(labl, "IGES Entity, Name : %s", thename->ToCString());
|
||||
Sprintf(labl, "IGES Entity, Name : %s", thename->ToCString());
|
||||
return TCollection_AsciiString(labl);
|
||||
}
|
||||
else
|
||||
|
@@ -60,7 +60,7 @@ void IGESSelect_SetGlobalParameter::Performing(IFSelect_ContextModif&
|
||||
if (thenum <= 0 || thenum > oldset->NbParams())
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "Set IGES Global Parameter : Number %d incorrect", thenum);
|
||||
Sprintf(mess, "Set IGES Global Parameter : Number %d incorrect", thenum);
|
||||
ctx.CCheck()->AddFail(mess);
|
||||
return;
|
||||
}
|
||||
@@ -77,8 +77,8 @@ TCollection_AsciiString IGESSelect_SetGlobalParameter::Label() const
|
||||
{
|
||||
char mess[80];
|
||||
if (theval.IsNull())
|
||||
sprintf(mess, "Set IGES Global Parameter (undefined)");
|
||||
Sprintf(mess, "Set IGES Global Parameter (undefined)");
|
||||
else
|
||||
sprintf(mess, "Set IGES Global Parameter Number %d to %s", thenum, theval->ToCString());
|
||||
Sprintf(mess, "Set IGES Global Parameter Number %d to %s", thenum, theval->ToCString());
|
||||
return TCollection_AsciiString(mess);
|
||||
}
|
||||
|
@@ -59,9 +59,9 @@ Standard_CString IGESSelect_SignLevelNumber::Value(
|
||||
// if (level < 0) return (thecountmode ? " NO LEVEL" : "/0/");
|
||||
laval.Clear();
|
||||
if (thecountmode)
|
||||
sprintf(carlev, "%7d", level);
|
||||
Sprintf(carlev, "%7d", level);
|
||||
else
|
||||
sprintf(carlev, "/%d/", level);
|
||||
Sprintf(carlev, "/%d/", level);
|
||||
laval.AssignCat(carlev);
|
||||
}
|
||||
else if (thecountmode)
|
||||
@@ -73,7 +73,7 @@ Standard_CString IGESSelect_SignLevelNumber::Value(
|
||||
laval.AssignCat("LIST:/");
|
||||
for (i = 1; i <= nblev; i++)
|
||||
{
|
||||
sprintf(carlev, "%d/", levelist->LevelNumber(i));
|
||||
Sprintf(carlev, "%d/", levelist->LevelNumber(i));
|
||||
laval.AssignCat(carlev);
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ Standard_CString IGESSelect_SignStatus::Value(
|
||||
j = igesent->SubordinateStatus();
|
||||
k = igesent->UseFlag();
|
||||
l = igesent->HierarchyStatus();
|
||||
sprintf(theval, "%d,%d,%d,%d", i, j, k, l);
|
||||
Sprintf(theval, "%d,%d,%d,%d", i, j, k, l);
|
||||
return theval;
|
||||
}
|
||||
|
||||
|
@@ -181,7 +181,7 @@ void IGESSolid_ToolBooleanTree::OwnCheck(const Handle(IGESSolid_BooleanTree)& en
|
||||
if (ent->Operation(i) < 1 || ent->Operation(i) > 3)
|
||||
{
|
||||
char mess[80];
|
||||
sprintf(mess, "Item no. %d Incorrect", i);
|
||||
Sprintf(mess, "Item no. %d Incorrect", i);
|
||||
ach->AddFail(mess);
|
||||
}
|
||||
}
|
||||
|
@@ -236,7 +236,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferCompositeCurveGeneral(
|
||||
// clang-format on
|
||||
Msg1045.Arg(i);
|
||||
SendWarning(start, Msg1045);
|
||||
// sprintf (mess, "The entities of the CompositeCurve are the same: %d & %d", i-1, i);
|
||||
// Sprintf (mess, "The entities of the CompositeCurve are the same: %d & %d", i-1, i);
|
||||
// AddWarning (start, mess);
|
||||
continue;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferCompositeCurveGeneral(
|
||||
Msg1050.Arg(i);
|
||||
SendWarning(start, Msg1050);
|
||||
|
||||
// sprintf(mess, "Curve %dd needs to be reversed : %d", ( is2d ? 2 : 3 ), i);//:13
|
||||
// Sprintf(mess, "Curve %dd needs to be reversed : %d", ( is2d ? 2 : 3 ), i);//:13
|
||||
// AddWarning(start, mess);
|
||||
}
|
||||
if (distmin > precision)
|
||||
|
@@ -109,7 +109,7 @@ void APIHeaderSection_MakeHeader::Init(const Standard_CString nameval)
|
||||
fn->SetOrganization(org);
|
||||
|
||||
char procver[80];
|
||||
sprintf(procver, XSTEP_PROCESSOR_VERSION, "STEP");
|
||||
Sprintf(procver, XSTEP_PROCESSOR_VERSION, "STEP");
|
||||
Handle(TCollection_HAsciiString) pv = new TCollection_HAsciiString(procver);
|
||||
// Handle(TCollection_HAsciiString) pv =
|
||||
// new TCollection_HAsciiString(XSTEP_VERSION);
|
||||
|
@@ -134,7 +134,7 @@ void RWStepBasic_RWUncertaintyMeasureWithUnit::WriteStep(
|
||||
// Interface_FloatWriter::Convert
|
||||
// (Interface_MSG::Intervalled(ent->ValueComponent()*0.98,5,Standard_True),
|
||||
// lmv,Standard_True, 10.,0.1,"%E","%E");
|
||||
// sprintf (lm,"LENGTH_MEASURE(%s)",lmv);
|
||||
// Sprintf (lm,"LENGTH_MEASURE(%s)",lmv);
|
||||
// SW.SendString(lm);
|
||||
|
||||
// SW.AddString("LENGTH_MEASURE");
|
||||
|
@@ -696,7 +696,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer(STEPControl_Reader&
|
||||
for ( Standard_Integer k=0; mainfile[k]; k++ )
|
||||
if ( mainfile[k] == '/' ) slash = k;
|
||||
strncpy ( fullname, mainfile, slash );
|
||||
sprintf ( &fullname[slash], "%s%s", ( mainfile[0] ? "/" : "" ), filename );
|
||||
Sprintf ( &fullname[slash], "%s%s", ( mainfile[0] ? "/" : "" ), filename );
|
||||
*/
|
||||
|
||||
// get and check PD associated with the current extern ref
|
||||
|
@@ -389,7 +389,7 @@ Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetProductName() con
|
||||
{
|
||||
PdtName->AssignCat((char*)(i > 1 ? "." : " "));
|
||||
char buf[100];
|
||||
sprintf(buf, "%d", myLevel.Value(i));
|
||||
Sprintf(buf, "%d", myLevel.Value(i));
|
||||
PdtName->AssignCat(buf);
|
||||
}
|
||||
|
||||
|
@@ -111,7 +111,7 @@ void StepData_Protocol::AddDescr(const Handle(StepData_EDescr)& adescr, const St
|
||||
if (!sd.IsNull())
|
||||
thedscnam.Bind(sd->TypeName(), sd);
|
||||
char fonom[10];
|
||||
sprintf(fonom, "%d", CN);
|
||||
Sprintf(fonom, "%d", CN);
|
||||
thedscnam.Bind(fonom, adescr);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ Handle(StepData_EDescr) StepData_Protocol::Descr(const Standard_Integer num) con
|
||||
if (thedscnam.IsEmpty())
|
||||
return dsc;
|
||||
char fonom[10];
|
||||
sprintf(fonom, "%d", num);
|
||||
Sprintf(fonom, "%d", num);
|
||||
Handle(Standard_Transient) aTDsc;
|
||||
if (thedscnam.Find(fonom, aTDsc))
|
||||
dsc = Handle(StepData_EDescr)::DownCast(aTDsc);
|
||||
|
@@ -210,7 +210,7 @@ Standard_Boolean StepData_StepDumper::Dump(Standard_OStream& S,
|
||||
{
|
||||
if (ids.Value(i) <= 0 || ids.Value(i) == i)
|
||||
continue;
|
||||
sprintf(unid, "%d:#%d", i, ids.Value(i));
|
||||
Sprintf(unid, "%d:#%d", i, ids.Value(i));
|
||||
nbc = (Standard_Integer)strlen(unid);
|
||||
nbr = ((80 - nbc) % 4) + 2;
|
||||
nbl += nbc;
|
||||
|
@@ -206,11 +206,11 @@ Handle(TCollection_HAsciiString) StepData_StepModel::StringLabel(
|
||||
Standard_Integer nid = (!num ? 0 : theidnums->Value(num));
|
||||
|
||||
if (nid > 0)
|
||||
sprintf(text, "#%d", nid);
|
||||
Sprintf(text, "#%d", nid);
|
||||
else if (num > 0)
|
||||
sprintf(text, "(#%d)", num);
|
||||
Sprintf(text, "(#%d)", num);
|
||||
else
|
||||
sprintf(text, "(#0..)");
|
||||
Sprintf(text, "(#0..)");
|
||||
|
||||
label = new TCollection_HAsciiString(text);
|
||||
return label;
|
||||
|
@@ -376,7 +376,7 @@ StepData_StepReaderData::StepData_StepReaderData(const Standard_Integer nbhea
|
||||
if (initstr)
|
||||
return;
|
||||
// for (Standard_Integer i = 0; i < Maxlst; i ++) {
|
||||
// sprintf(textnum,"$%d",i+1);
|
||||
// Sprintf(textnum,"$%d",i+1);
|
||||
// subl[i].AssignCat(textnum);
|
||||
// }
|
||||
initstr = Standard_True;
|
||||
@@ -596,21 +596,21 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString
|
||||
NamedForComplex(name, num0, n, ach); // on a rembobine
|
||||
// Not in alphabetical order: loop
|
||||
Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
for (n = num0; n > 0; n = NextForComplex(n))
|
||||
{
|
||||
if (!strcmp(RecordType(n).ToCString(), name))
|
||||
{
|
||||
num = n;
|
||||
errmess = new String("Complex Record n0.%d, member type %s not in alphabetic order");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
num = 0;
|
||||
errmess = new String("Complex Record n0.%d, member type %s not found");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, name);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -635,7 +635,7 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString
|
||||
|
||||
// entities are not in alphabetical order
|
||||
Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
for (n = num0; n > 0; n = NextForComplex(n))
|
||||
{
|
||||
if (!strcmp(RecordType(n).ToCString(), theName)
|
||||
@@ -643,14 +643,14 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString
|
||||
{
|
||||
num = n;
|
||||
errmess = new String("Complex Record n0.%d, member type %s not in alphabetic order");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
num = 0;
|
||||
errmess = new String("Complex Record n0.%d, member type %s not found");
|
||||
sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
Sprintf(txtmes, errmess->ToCString(), num0, theName);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -671,7 +671,7 @@ Standard_Boolean StepData_StepReaderData::CheckNbParams(const Standard_Integer
|
||||
errmess = new String("Count of Parameters is not %d");
|
||||
else
|
||||
errmess = new String("Count of Parameters is not %d for %s");
|
||||
sprintf(txtmes, errmess->ToCString(), nbreq, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nbreq, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -694,7 +694,7 @@ Standard_Boolean StepData_StepReaderData::ReadSubList(const Standard_Integer n
|
||||
if (aNbParams == 0)
|
||||
{
|
||||
Handle(String) anErrMess = new String("Parameter n0.%d (%s) is an empty LIST");
|
||||
sprintf(txtmes, anErrMess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, anErrMess->ToCString(), nump, mess);
|
||||
ach->AddWarning(txtmes, anErrMess->ToCString());
|
||||
}
|
||||
return Standard_True;
|
||||
@@ -706,7 +706,7 @@ Standard_Boolean StepData_StepReaderData::ReadSubList(const Standard_Integer n
|
||||
return Standard_False;
|
||||
|
||||
Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST");
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (acceptvoid && isvoid)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1033,7 +1033,7 @@ Standard_Boolean StepData_StepReaderData::ReadMember(const Standard_Integer
|
||||
return res;
|
||||
// changement -> refus
|
||||
Handle(String) errmess = new String("Parameter n0.%d (%s) : does not match SELECT clause");
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1354,7 +1354,7 @@ Standard_Boolean StepData_StepReaderData::ReadXY(const Standard_Integer num,
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1401,7 +1401,7 @@ Standard_Boolean StepData_StepReaderData::ReadXYZ(const Standard_Integer num,
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1428,7 +1428,7 @@ Standard_Boolean StepData_StepReaderData::ReadReal(const Standard_Integer num,
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1483,7 +1483,7 @@ Standard_Boolean StepData_StepReaderData::ReadEntity(const Standard_Integer
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1551,7 +1551,7 @@ Standard_Boolean StepData_StepReaderData::ReadEntity(const Standard_Integer nu
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1592,7 +1592,7 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer n
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1631,7 +1631,7 @@ Standard_Boolean StepData_StepReaderData::ReadBoolean(const Standard_Integer n
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1668,7 +1668,7 @@ Standard_Boolean StepData_StepReaderData::ReadLogical(const Standard_Integer n
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1710,7 +1710,7 @@ Standard_Boolean StepData_StepReaderData::ReadString(const Standard_Integer
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1749,7 +1749,7 @@ Standard_Boolean StepData_StepReaderData::ReadEnumParam(const Standard_Integer
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1765,7 +1765,7 @@ void StepData_StepReaderData::FailEnumValue(const Standard_Integer /* num */,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Handle(String) errmess = new String("Parameter n0.%d (%s) : Incorrect Enumeration Value");
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
}
|
||||
|
||||
@@ -1808,7 +1808,7 @@ Standard_Boolean StepData_StepReaderData::ReadEnum(const Standard_Integer num,
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -1840,7 +1840,7 @@ Standard_Boolean StepData_StepReaderData::ReadTypedParam(const Standard_Integer
|
||||
if (mustbetyped)
|
||||
{
|
||||
errmess = new String("Parameter n0.%d (%s) : single, not typed");
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1857,7 +1857,7 @@ Standard_Boolean StepData_StepReaderData::ReadTypedParam(const Standard_Integer
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1886,7 +1886,7 @@ Standard_Boolean StepData_StepReaderData::CheckDerived(const Standard_Integer
|
||||
|
||||
if (errmess.IsNull())
|
||||
return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
Sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
if (warn)
|
||||
ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else
|
||||
@@ -2076,7 +2076,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
|
||||
}
|
||||
char failmess[100];
|
||||
// ... Build the Check ...
|
||||
sprintf(failmess, "Unresolved Reference, Ent.Id.#%d Param.n0 %d (Id.#%d)", ident, na, id);
|
||||
Sprintf(failmess, "Unresolved Reference, Ent.Id.#%d Param.n0 %d (Id.#%d)", ident, na, id);
|
||||
thecheck->AddFail(failmess, "Unresolved Reference");
|
||||
// ... And output a more complete message
|
||||
sout << "*** ERR StepReaderData *** Entite #" << ident << "\n Type:" << RecordType(num)
|
||||
@@ -2166,7 +2166,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
|
||||
{
|
||||
// We are inside: report it
|
||||
char ligne[80];
|
||||
sprintf(ligne, "Ident defined SEVERAL TIMES : #%d", ident);
|
||||
Sprintf(ligne, "Ident defined SEVERAL TIMES : #%d", ident);
|
||||
thecheck->AddFail(ligne, "Ident defined SEVERAL TIMES : #%d");
|
||||
sout << "StepReaderData : SetEntityNumbers, " << ligne << std::endl;
|
||||
}
|
||||
@@ -2430,7 +2430,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap)
|
||||
}
|
||||
}
|
||||
// ... Build the Check ...
|
||||
sprintf(failmess,
|
||||
Sprintf(failmess,
|
||||
"Unresolved Reference, Ent.n0 %d (Id.#%d) Param.n0 %d (Id.#%d)",
|
||||
nument,
|
||||
ident,
|
||||
|
@@ -299,9 +299,9 @@ void StepData_StepWriter::SendEntity(const Standard_Integer num, const StepData_
|
||||
if (idnum == 0)
|
||||
idnum = num;
|
||||
if (thelabmode < 2 || idnum == idtrue)
|
||||
sprintf(lident, "#%d = ", idnum); // skl 29.01.2003
|
||||
Sprintf(lident, "#%d = ", idnum); // skl 29.01.2003
|
||||
else
|
||||
sprintf(lident, "%d:#%d = ", idnum, idtrue); // skl 29.01.2003
|
||||
Sprintf(lident, "%d:#%d = ", idnum, idtrue); // skl 29.01.2003
|
||||
|
||||
// SendIdent reused, lident has just been calculated
|
||||
thecurr.Clear();
|
||||
@@ -444,7 +444,7 @@ void StepData_StepWriter::Indent(const Standard_Boolean onent)
|
||||
void StepData_StepWriter::SendIdent(const Standard_Integer ident)
|
||||
{
|
||||
char lident[12];
|
||||
sprintf(lident, "#%d =", ident);
|
||||
Sprintf(lident, "#%d =", ident);
|
||||
thecurr.Clear();
|
||||
thecurr.Add(lident);
|
||||
themult = Standard_False;
|
||||
@@ -806,7 +806,7 @@ void StepData_StepWriter::Send(const Standard_Integer val)
|
||||
{
|
||||
char lval[12];
|
||||
AddParam();
|
||||
sprintf(lval, "%d", val);
|
||||
Sprintf(lval, "%d", val);
|
||||
AddString(lval, (Standard_Integer)strlen(lval));
|
||||
}
|
||||
|
||||
@@ -947,9 +947,9 @@ void StepData_StepWriter::Send(const Handle(Standard_Transient)& val)
|
||||
if (idnum == 0)
|
||||
idnum = num;
|
||||
if (thelabmode < 2 || idnum == idtrue)
|
||||
sprintf(lident, "#%d", idnum);
|
||||
Sprintf(lident, "#%d", idnum);
|
||||
else
|
||||
sprintf(lident, "%d:#%d", idnum, idtrue);
|
||||
Sprintf(lident, "%d:#%d", idnum, idtrue);
|
||||
AddParam();
|
||||
AddString(lident, (Standard_Integer)strlen(lident));
|
||||
}
|
||||
|
@@ -697,7 +697,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_GeometricSet)&
|
||||
if (ent.IsNull())
|
||||
{
|
||||
char buff[100];
|
||||
sprintf(buff, "Entity %d is a Null entity", i);
|
||||
Sprintf(buff, "Entity %d is a Null entity", i);
|
||||
TP->AddWarning(GCS, buff);
|
||||
continue;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list
|
||||
{
|
||||
Standard_Integer i, nb, num, nbe = (model.IsNull() ? 0 : model->NbEntities());
|
||||
char mess[300];
|
||||
sprintf(mess, "Check %s", list.Name());
|
||||
Sprintf(mess, "Check %s", list.Name());
|
||||
SetName(mess);
|
||||
for (list.Start(); list.More(); list.Next())
|
||||
{
|
||||
@@ -76,9 +76,9 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list
|
||||
for (i = 1; i <= nb; i++)
|
||||
{
|
||||
if (ent.IsNull())
|
||||
sprintf(mess, "F: %s", check->CFail(i, original));
|
||||
Sprintf(mess, "F: %s", check->CFail(i, original));
|
||||
else
|
||||
sprintf(mess, "F:%s: %s", tystr, check->CFail(i, original));
|
||||
Sprintf(mess, "F:%s: %s", tystr, check->CFail(i, original));
|
||||
Add(ent, mess);
|
||||
}
|
||||
nb = 0;
|
||||
@@ -87,9 +87,9 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list
|
||||
for (i = 1; i <= nb; i++)
|
||||
{
|
||||
if (ent.IsNull())
|
||||
sprintf(mess, "W: %s", check->CWarning(i, original));
|
||||
Sprintf(mess, "W: %s", check->CWarning(i, original));
|
||||
else
|
||||
sprintf(mess, "W:%s: %s", tystr, check->CWarning(i, original));
|
||||
Sprintf(mess, "W:%s: %s", tystr, check->CWarning(i, original));
|
||||
Add(ent, mess);
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ Standard_CString IFSelect_DispPerSignature::SignName() const
|
||||
TCollection_AsciiString IFSelect_DispPerSignature::Label() const
|
||||
{
|
||||
char lab[50];
|
||||
sprintf(lab, "One File per Signature %s", SignName());
|
||||
Sprintf(lab, "One File per Signature %s", SignName());
|
||||
return TCollection_AsciiString(lab);
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ void IFSelect_GraphCounter::AddWithGraph(const Handle(TColStd_HSequenceOfTransie
|
||||
Add(ent, "9");
|
||||
break;
|
||||
default:
|
||||
sprintf(val, "%d", n);
|
||||
Sprintf(val, "%d", n);
|
||||
Add(ent, val);
|
||||
break;
|
||||
}
|
||||
|
@@ -199,7 +199,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendCopied(const Handle(IFSelect_W
|
||||
if (!res)
|
||||
{
|
||||
char mess[100];
|
||||
sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i);
|
||||
Sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i);
|
||||
checks.CCheck(0)->AddFail(mess);
|
||||
Message::SendInfo() << " ** Sending File n0." << i << " has failed, abandon **"
|
||||
<< std::endl;
|
||||
@@ -267,7 +267,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Sending(IFSelect_ShareOutResult&
|
||||
if (!res)
|
||||
{
|
||||
char mess[100];
|
||||
sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i);
|
||||
Sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i);
|
||||
checks.CCheck(0)->AddFail(mess);
|
||||
Message::SendInfo() << " ** Sending File " << filename << " has failed, abandon **"
|
||||
<< std::endl;
|
||||
|
@@ -126,13 +126,13 @@ TCollection_AsciiString IFSelect_SelectAnyList::Label() const
|
||||
if (HasUpper())
|
||||
rankto = UpperValue();
|
||||
if (rankfrom == rankto)
|
||||
sprintf(lab, " (no %d)", rankfrom);
|
||||
Sprintf(lab, " (no %d)", rankfrom);
|
||||
else if (rankfrom == 0)
|
||||
sprintf(lab, " (-> %d)", rankfrom);
|
||||
Sprintf(lab, " (-> %d)", rankfrom);
|
||||
else if (rankto == 0)
|
||||
sprintf(lab, " (%d ->)", rankto);
|
||||
Sprintf(lab, " (%d ->)", rankto);
|
||||
else
|
||||
sprintf(lab, " (%d -> %d)", rankfrom, rankto);
|
||||
Sprintf(lab, " (%d -> %d)", rankfrom, rankto);
|
||||
|
||||
TCollection_AsciiString labl("In List ");
|
||||
labl.AssignCat(ListLabel());
|
||||
|
@@ -111,7 +111,7 @@ TCollection_AsciiString IFSelect_SelectExplore::Label() const
|
||||
else if (thelevel > 0)
|
||||
{
|
||||
char lab[30];
|
||||
sprintf(lab, "(Level %d)", thelevel);
|
||||
Sprintf(lab, "(Level %d)", thelevel);
|
||||
labl.AssignCat(lab);
|
||||
}
|
||||
labl.AssignCat(ExploreLabel());
|
||||
|
@@ -104,13 +104,13 @@ TCollection_AsciiString IFSelect_SelectRange::ExtractLabel() const
|
||||
if (!theupper.IsNull())
|
||||
rankto = theupper->Value();
|
||||
if (rankfrom == rankto)
|
||||
sprintf(lab, "Rank no %d", rankfrom);
|
||||
Sprintf(lab, "Rank no %d", rankfrom);
|
||||
else if (rankfrom == 0)
|
||||
sprintf(lab, "Until no %d", rankto);
|
||||
Sprintf(lab, "Until no %d", rankto);
|
||||
else if (rankto == 0)
|
||||
sprintf(lab, "From no %d", rankto);
|
||||
Sprintf(lab, "From no %d", rankto);
|
||||
else
|
||||
sprintf(lab, "From %d Until %d", rankfrom, rankto);
|
||||
Sprintf(lab, "From %d Until %d", rankfrom, rankto);
|
||||
|
||||
return TCollection_AsciiString(lab);
|
||||
}
|
||||
|
@@ -88,9 +88,9 @@ TCollection_AsciiString IFSelect_SelectSent::ExtractLabel() const
|
||||
if (thecnt > 2)
|
||||
{
|
||||
if (thelst)
|
||||
sprintf(lb, "Sent at least %d times entities", thecnt);
|
||||
Sprintf(lb, "Sent at least %d times entities", thecnt);
|
||||
else
|
||||
sprintf(lb, "Sent just %d times entities", thecnt);
|
||||
Sprintf(lb, "Sent just %d times entities", thecnt);
|
||||
lab.AssignCat(lb);
|
||||
}
|
||||
return lab;
|
||||
|
@@ -92,7 +92,7 @@ TCollection_AsciiString IFSelect_SelectSuite::Label() const
|
||||
if (thelab.Length() > 0)
|
||||
return thelab;
|
||||
char txt[100];
|
||||
sprintf(txt, "Suite of %d Selections", NbItems());
|
||||
Sprintf(txt, "Suite of %d Selections", NbItems());
|
||||
TCollection_AsciiString lab(txt);
|
||||
return lab;
|
||||
}
|
||||
|
@@ -206,11 +206,11 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
}
|
||||
|
||||
// ... ECRITURE
|
||||
sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name());
|
||||
Sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name());
|
||||
WriteLine(laligne, '\n');
|
||||
sprintf(laligne, "!GENERALS");
|
||||
Sprintf(laligne, "!GENERALS");
|
||||
WriteLine(laligne, '\n');
|
||||
sprintf(laligne, "ErrorHandle %d", (thesess->ErrorHandle() ? 1 : 0));
|
||||
Sprintf(laligne, "ErrorHandle %d", (thesess->ErrorHandle() ? 1 : 0));
|
||||
WriteLine(laligne, '\n');
|
||||
Handle(TColStd_HSequenceOfInteger) idents;
|
||||
Standard_Integer nb;
|
||||
@@ -230,10 +230,10 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
{
|
||||
thenewnum++;
|
||||
idents->SetValue(i, thenewnum);
|
||||
sprintf(laligne, " #%d %d", thenewnum, P->Value());
|
||||
Sprintf(laligne, " #%d %d", thenewnum, P->Value());
|
||||
}
|
||||
else
|
||||
sprintf(laligne, " %s %d", name->ToCString(), P->Value());
|
||||
Sprintf(laligne, " %s %d", name->ToCString(), P->Value());
|
||||
WriteLine(laligne, '\n');
|
||||
}
|
||||
|
||||
@@ -250,10 +250,10 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
{
|
||||
thenewnum++;
|
||||
thenums->SetValue(i, thenewnum);
|
||||
sprintf(laligne, " #%d %s", thenewnum, P->ToCString());
|
||||
Sprintf(laligne, " #%d %s", thenewnum, P->ToCString());
|
||||
}
|
||||
else
|
||||
sprintf(laligne, " %s %s", name->ToCString(), P->ToCString());
|
||||
Sprintf(laligne, " %s %s", name->ToCString(), P->ToCString());
|
||||
WriteLine(laligne, '\n');
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
DeclareAndCast(IFSelect_SelectExtract, sxt, P);
|
||||
if (!sxt.IsNull())
|
||||
{
|
||||
sprintf(laligne, " %c", (sxt->IsDirect() ? 'D' : 'R'));
|
||||
Sprintf(laligne, " %c", (sxt->IsDirect() ? 'D' : 'R'));
|
||||
WriteLine(laligne);
|
||||
}
|
||||
DeclareAndCast(IFSelect_SelectAnyList, sli, P);
|
||||
@@ -300,9 +300,9 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
continue;
|
||||
name = thesess->Name(P);
|
||||
if (name.IsNull())
|
||||
sprintf(laligne, " #%d %d", thenums->Value(i), nbs);
|
||||
Sprintf(laligne, " #%d %d", thenums->Value(i), nbs);
|
||||
else
|
||||
sprintf(laligne, " %s %d", name->ToCString(), nbs);
|
||||
Sprintf(laligne, " %s %d", name->ToCString(), nbs);
|
||||
WriteLine(laligne);
|
||||
for (Standard_Integer k = 1; k <= nbs; k++)
|
||||
SendItem(thesess->Source(P, k));
|
||||
@@ -394,7 +394,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
|
||||
namingpart = P->RootName();
|
||||
SetOwn(Standard_False);
|
||||
SendItem(P);
|
||||
sprintf(laligne, " %s", namingpart->ToCString());
|
||||
Sprintf(laligne, " %s", namingpart->ToCString());
|
||||
WriteLine(laligne, ' ');
|
||||
WriteLine("", '\n');
|
||||
}
|
||||
@@ -975,10 +975,10 @@ void IFSelect_SessionFile::NewItem(const Standard_Integer ident,
|
||||
{
|
||||
thenewnum++;
|
||||
thenums->SetValue(ident, thenewnum);
|
||||
sprintf(laligne, " #%d %s", thenewnum, par->DynamicType()->Name());
|
||||
Sprintf(laligne, " #%d %s", thenewnum, par->DynamicType()->Name());
|
||||
}
|
||||
else
|
||||
sprintf(laligne, " %s %s", thesess->Name(par)->ToCString(), par->DynamicType()->Name());
|
||||
Sprintf(laligne, " %s %s", thesess->Name(par)->ToCString(), par->DynamicType()->Name());
|
||||
WriteLine(laligne);
|
||||
}
|
||||
|
||||
@@ -1014,17 +1014,17 @@ void IFSelect_SessionFile::SendItem(const Handle(Standard_Transient)& par)
|
||||
//// if (theownflag) WriteLine(" :");
|
||||
//// else WriteLine(" ");
|
||||
if (filenum < 0)
|
||||
sprintf(laligne, " :%s", thesess->Name(par)->ToCString());
|
||||
Sprintf(laligne, " :%s", thesess->Name(par)->ToCString());
|
||||
else
|
||||
sprintf(laligne, " #%d", filenum);
|
||||
Sprintf(laligne, " #%d", filenum);
|
||||
WriteLine(laligne);
|
||||
}
|
||||
|
||||
void IFSelect_SessionFile::SendText(const Standard_CString text)
|
||||
{
|
||||
char laligne[100];
|
||||
//// if (theownflag) sprintf(laligne," :%s",text);
|
||||
sprintf(laligne, " %s", text);
|
||||
//// if (theownflag) Sprintf(laligne," :%s",text);
|
||||
Sprintf(laligne, " %s", text);
|
||||
WriteLine(laligne);
|
||||
}
|
||||
|
||||
|
@@ -396,17 +396,17 @@ TCollection_AsciiString IFSelect_ShareOut::FileName(const Standard_Integer dnum,
|
||||
}
|
||||
if (nbch > 1)
|
||||
{
|
||||
sprintf(format, "_ %d.%dd", nbch, nbch);
|
||||
Sprintf(format, "_ %d.%dd", nbch, nbch);
|
||||
format[1] = '%';
|
||||
}
|
||||
else if (npac >= num || num >= 1)
|
||||
{
|
||||
sprintf(format, "_ d");
|
||||
Sprintf(format, "_ d");
|
||||
format[1] = '%';
|
||||
}
|
||||
if (format[1] == '%')
|
||||
{
|
||||
sprintf(suffixe, format, num);
|
||||
Sprintf(suffixe, format, num);
|
||||
res.AssignCat(suffixe);
|
||||
}
|
||||
}
|
||||
|
@@ -163,6 +163,6 @@ Standard_CString IFSelect_Signature::IntValue(const Standard_Integer val)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sprintf(intval, "%d", val);
|
||||
Sprintf(intval, "%d", val);
|
||||
return intval;
|
||||
}
|
||||
|
@@ -234,11 +234,11 @@ TCollection_AsciiString IFSelect_TransformStandard::Label() const
|
||||
labl.AssignCat("On the spot Edition");
|
||||
Standard_Integer nb = NbModifiers();
|
||||
if (nb == 0)
|
||||
sprintf(lab, " (no Modifier)");
|
||||
Sprintf(lab, " (no Modifier)");
|
||||
if (nb == 1)
|
||||
sprintf(lab, " - %s", Modifier(1)->Label().ToCString());
|
||||
Sprintf(lab, " - %s", Modifier(1)->Label().ToCString());
|
||||
if (nb > 1)
|
||||
sprintf(lab, " - %d Modifiers", nb);
|
||||
Sprintf(lab, " - %d Modifiers", nb);
|
||||
labl.AssignCat(lab);
|
||||
return labl;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ static int errh = 1;
|
||||
static void raisecheck(Standard_Failure& theException, Handle(Interface_Check)& ach)
|
||||
{
|
||||
char mess[100];
|
||||
sprintf(mess, "** Exception Raised during Check : %s **", theException.DynamicType()->Name());
|
||||
Sprintf(mess, "** Exception Raised during Check : %s **", theException.DynamicType()->Name());
|
||||
ach->AddFail(mess);
|
||||
#ifdef _WIN32
|
||||
if (theException.IsKind(STANDARD_TYPE(OSD_Exception)))
|
||||
|
@@ -26,11 +26,11 @@
|
||||
|
||||
//! This class converts a floating number (Real) to a string
|
||||
//! It can be used if the standard C-C++ output functions
|
||||
//! (sprintf or std::cout<<) are not convenient. That is to say :
|
||||
//! (Sprintf or std::cout<<) are not convenient. That is to say :
|
||||
//! - to suppress trailing '0' and 'E+00' (if desired)
|
||||
//! - to control exponent output and floating point output
|
||||
//!
|
||||
//! Formats are given in the form used by printf-sprintf
|
||||
//! Formats are given in the form used by printf-Sprintf
|
||||
class Interface_FloatWriter
|
||||
{
|
||||
public:
|
||||
|
@@ -43,7 +43,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, const Standard_Integer
|
||||
theval(NULL)
|
||||
{
|
||||
char mess[300];
|
||||
sprintf(mess, Interface_MSG::Translated(thekey), i1);
|
||||
Sprintf(mess, Interface_MSG::Translated(thekey), i1);
|
||||
theval = new char[strlen(mess) + 1];
|
||||
strcpy(theval, mess);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key,
|
||||
theval(NULL)
|
||||
{
|
||||
char mess[300];
|
||||
sprintf(mess, Interface_MSG::Translated(thekey), i1, i2);
|
||||
Sprintf(mess, Interface_MSG::Translated(thekey), i1, i2);
|
||||
theval = new char[strlen(mess) + 1];
|
||||
strcpy(theval, mess);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key,
|
||||
theval(NULL)
|
||||
{
|
||||
char mess[300];
|
||||
sprintf(mess,
|
||||
Sprintf(mess,
|
||||
Interface_MSG::Translated(thekey),
|
||||
(intervals < 0 ? r1 : Interface_MSG::Intervalled(r1, intervals)));
|
||||
theval = new char[strlen(mess) + 1];
|
||||
@@ -79,7 +79,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, const Standard_CString
|
||||
theval(NULL)
|
||||
{
|
||||
char mess[300];
|
||||
sprintf(mess, Interface_MSG::Translated(thekey), str);
|
||||
Sprintf(mess, Interface_MSG::Translated(thekey), str);
|
||||
theval = new char[strlen(mess) + 1];
|
||||
strcpy(theval, mess);
|
||||
}
|
||||
@@ -91,7 +91,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key,
|
||||
theval(NULL)
|
||||
{
|
||||
char mess[300];
|
||||
sprintf(mess, Interface_MSG::Translated(thekey), val, str);
|
||||
Sprintf(mess, Interface_MSG::Translated(thekey), val, str);
|
||||
theval = new char[strlen(mess) + 1];
|
||||
strcpy(theval, mess);
|
||||
}
|
||||
@@ -423,9 +423,9 @@ void Interface_MSG::TDate(const Standard_CString text,
|
||||
}
|
||||
char* pText = (char*)text;
|
||||
if (!format || format[0] == '\0')
|
||||
sprintf(pText, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", y2, m2, d2, h2, n2, s2);
|
||||
Sprintf(pText, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", y2, m2, d2, h2, n2, s2);
|
||||
else if ((format[0] == 'c' || format[0] == 'C') && format[1] == ':')
|
||||
sprintf(pText, &format[2], y2, m2, d2, h2, n2, s2);
|
||||
Sprintf(pText, &format[2], y2, m2, d2, h2, n2, s2);
|
||||
}
|
||||
|
||||
Standard_Boolean Interface_MSG::NDate(const Standard_CString text,
|
||||
|
@@ -58,18 +58,18 @@ public:
|
||||
|
||||
//! Translates a message which contains one integer variable
|
||||
//! It is just a help which avoid the following :
|
||||
//! char mess[100]; sprintf(mess,Interface_MSG("code"),ival);
|
||||
//! char mess[100]; Sprintf(mess,Interface_MSG("code"),ival);
|
||||
//! then AddFail(mess);
|
||||
//! replaced by AddFail (Interface_MSG("code",ival));
|
||||
//!
|
||||
//! The basic message is intended to be in C-sprintf format,
|
||||
//! The basic message is intended to be in C-Sprintf format,
|
||||
//! with one %d form in it
|
||||
Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_Integer i1);
|
||||
|
||||
//! Translates a message which contains two integer variables
|
||||
//! As for one integer, it is just a writing help
|
||||
//!
|
||||
//! The basic message is intended to be in C-sprintf format
|
||||
//! The basic message is intended to be in C-Sprintf format
|
||||
//! with two %d forms in it
|
||||
Standard_EXPORT Interface_MSG(const Standard_CString key,
|
||||
const Standard_Integer i1,
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
//! interval (see below, method Intervals)
|
||||
//! As for one integer, it is just a writing help
|
||||
//!
|
||||
//! The basic message is intended to be in C-sprintf format
|
||||
//! The basic message is intended to be in C-Sprintf format
|
||||
//! with one %f form (or equivalent : %e etc) in it
|
||||
Standard_EXPORT Interface_MSG(const Standard_CString key,
|
||||
const Standard_Real r1,
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
//! Translates a message which contains one string variable
|
||||
//! As for one integer, it is just a writing help
|
||||
//!
|
||||
//! The basic message is intended to be in C-sprintf format
|
||||
//! The basic message is intended to be in C-Sprintf format
|
||||
//! with one %s form in it
|
||||
Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_CString str);
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
//! As for one integer, it is just a writing help
|
||||
//! Used for instance to say "Param n0.<ival> i.e. <str> is not.."
|
||||
//!
|
||||
//! The basic message is intended to be in C-sprintf format
|
||||
//! The basic message is intended to be in C-Sprintf format
|
||||
//! with one %d then one %s forms in it
|
||||
Standard_EXPORT Interface_MSG(const Standard_CString key,
|
||||
const Standard_Integer ival,
|
||||
|
@@ -214,20 +214,20 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot
|
||||
if (nbvar == 0)
|
||||
{
|
||||
if (argc > 3 && mode > 0)
|
||||
sprintf(nomvar, "%s", arg3);
|
||||
Sprintf(nomvar, "%s", arg3);
|
||||
else if (argc > 2 && mode == 0)
|
||||
sprintf(nomvar, "%s", arg2);
|
||||
Sprintf(nomvar, "%s", arg2);
|
||||
else
|
||||
sprintf(nomvar, "tp_%d", i);
|
||||
Sprintf(nomvar, "tp_%d", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (argc > 3 && mode > 0)
|
||||
sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
else if (argc > 2 && mode == 0)
|
||||
sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
else
|
||||
sprintf(nomvar, "tp_%d", i);
|
||||
Sprintf(nomvar, "tp_%d", i);
|
||||
}
|
||||
sout << " -> 1 DRAW Shape: " << nomvar << std::endl;
|
||||
XSControl::Vars(pilot)->SetShape(nomvar, sh);
|
||||
@@ -257,11 +257,11 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot
|
||||
continue;
|
||||
}
|
||||
if (argc > 3 && mode > 0)
|
||||
sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
else if (argc > 2 && mode == 0)
|
||||
sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
else
|
||||
sprintf(nomvar, "tp_%d_%d", i, nbvar);
|
||||
Sprintf(nomvar, "tp_%d_%d", i, nbvar);
|
||||
sout << " " << nomvar;
|
||||
XSControl::Vars(pilot)->SetShape(nomvar, sh);
|
||||
}
|
||||
@@ -288,20 +288,20 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot
|
||||
if (nbvar == 0)
|
||||
{
|
||||
if (argc > 3 && mode > 0)
|
||||
sprintf(nomvar, "%s", arg3);
|
||||
Sprintf(nomvar, "%s", arg3);
|
||||
else if (argc > 2 && mode == 0)
|
||||
sprintf(nomvar, "%s", arg2);
|
||||
Sprintf(nomvar, "%s", arg2);
|
||||
else
|
||||
sprintf(nomvar, "tp_%d", i);
|
||||
Sprintf(nomvar, "tp_%d", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (argc > 3 && mode > 0)
|
||||
sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg3, nbvar);
|
||||
else if (argc > 2 && mode == 0)
|
||||
sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
Sprintf(nomvar, "%s_%d", arg2, nbvar);
|
||||
else
|
||||
sprintf(nomvar, "tp_%d", i);
|
||||
Sprintf(nomvar, "tp_%d", i);
|
||||
}
|
||||
char* nomv = nomvar;
|
||||
XSControl::Vars(pilot)->Set(nomv, geom);
|
||||
@@ -863,7 +863,7 @@ static IFSelect_ReturnStatus XSControl_trimport(const Handle(IFSelect_SessionPil
|
||||
else
|
||||
{
|
||||
char nomsh[50];
|
||||
sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs);
|
||||
Sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs);
|
||||
XSControl::Vars(pilot)->SetShape(nomsh, sh);
|
||||
}
|
||||
}
|
||||
@@ -1060,7 +1060,7 @@ Standard_Integer XSControl_FuncShape::MoreShapes(const Handle(XSControl_WorkSess
|
||||
for (i = n1; i <= n2; i++)
|
||||
{
|
||||
const char* nomshh = &nomsh[0];
|
||||
sprintf(nomsh, "%s%d", nom, i);
|
||||
Sprintf(nomsh, "%s%d", nom, i);
|
||||
TopoDS_Shape Shape = session->Vars()->GetShape(nomshh);
|
||||
if (Shape.IsNull())
|
||||
continue;
|
||||
|
@@ -132,7 +132,7 @@ Standard_CString XSControl_SignTransferStatus::Value(
|
||||
}
|
||||
bnd = bnd->NextResult();
|
||||
}
|
||||
// if (stat == 11) sprintf(themes,"Result:%s",binder->ResultTypeName());
|
||||
// if (stat == 11) Sprintf(themes,"Result:%s",binder->ResultTypeName());
|
||||
if (stat == 12)
|
||||
themes().AssignCat("/Warning");
|
||||
if (stat == 13)
|
||||
|
@@ -1122,7 +1122,7 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char
|
||||
mess[0] = '\0';
|
||||
if (binder.IsNull())
|
||||
{
|
||||
sprintf(mess, "(no data recorded)");
|
||||
Sprintf(mess, "(no data recorded)");
|
||||
return 0;
|
||||
}
|
||||
Interface_CheckStatus cst = binder->Check()->Status();
|
||||
@@ -1130,10 +1130,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char
|
||||
{
|
||||
stat = 11;
|
||||
if (binder->HasResult())
|
||||
sprintf(mess, "%s", binder->ResultTypeName());
|
||||
Sprintf(mess, "%s", binder->ResultTypeName());
|
||||
else
|
||||
{
|
||||
sprintf(mess, "(no result)");
|
||||
Sprintf(mess, "(no result)");
|
||||
stat = 1;
|
||||
}
|
||||
}
|
||||
@@ -1141,10 +1141,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char
|
||||
{
|
||||
stat = 12;
|
||||
if (binder->HasResult())
|
||||
sprintf(mess, "%s (+ warning)", binder->ResultTypeName());
|
||||
Sprintf(mess, "%s (+ warning)", binder->ResultTypeName());
|
||||
else
|
||||
{
|
||||
sprintf(mess, "(warning)");
|
||||
Sprintf(mess, "(warning)");
|
||||
stat = 2;
|
||||
}
|
||||
}
|
||||
@@ -1152,10 +1152,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char
|
||||
{
|
||||
stat = 13;
|
||||
if (binder->HasResult())
|
||||
sprintf(mess, "%s (+ FAIL)", binder->ResultTypeName());
|
||||
Sprintf(mess, "%s (+ FAIL)", binder->ResultTypeName());
|
||||
else
|
||||
{
|
||||
sprintf(mess, "(FAIL)");
|
||||
Sprintf(mess, "(FAIL)");
|
||||
stat = 3;
|
||||
}
|
||||
}
|
||||
@@ -1359,7 +1359,7 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP
|
||||
TCollection_AsciiString mest(model->TypeName(ent, Standard_False));
|
||||
mest.AssignCat(" -> ");
|
||||
mest.AssignCat(mess);
|
||||
// sprintf(mest,"%s -> %s",model->TypeName(ent,Standard_False),mess);
|
||||
// Sprintf(mest,"%s -> %s",model->TypeName(ent,Standard_False),mess);
|
||||
counter->Add(ent, mest.ToCString());
|
||||
}
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ Standard_EXPORT const char* DrawTrSurf_SetPnt(const char* theNameStr, void* theP
|
||||
{
|
||||
const gp_Pnt& aP = *(gp_Pnt*)thePntPtr;
|
||||
static char buff[256];
|
||||
sprintf(buff,
|
||||
Sprintf(buff,
|
||||
"Point (%.16g, %.16g, %.16g) set to DRAW variable %.80s",
|
||||
aP.X(),
|
||||
aP.Y(),
|
||||
@@ -94,7 +94,7 @@ Standard_EXPORT const char* DrawTrSurf_SetPnt2d(const char* theNameStr, void* th
|
||||
{
|
||||
const gp_Pnt2d& aP = *(gp_Pnt2d*)thePnt2dPtr;
|
||||
static char buff[256];
|
||||
sprintf(buff, "Point (%.16g, %.16g) set to DRAW variable %.80s", aP.X(), aP.Y(), theNameStr);
|
||||
Sprintf(buff, "Point (%.16g, %.16g) set to DRAW variable %.80s", aP.X(), aP.Y(), theNameStr);
|
||||
DrawTrSurf::Set(theNameStr, aP);
|
||||
return buff;
|
||||
}
|
||||
|
@@ -4045,10 +4045,10 @@ static Standard_Integer OCC26407(Draw_Interpretor& theDI,
|
||||
}
|
||||
DBRep::Set(theArgVec[1], face);
|
||||
char buf[256];
|
||||
sprintf(buf, "isos %s 0", theArgVec[1]);
|
||||
Sprintf(buf, "isos %s 0", theArgVec[1]);
|
||||
theDI.Eval(buf);
|
||||
|
||||
sprintf(buf, "triangles %s", theArgVec[1]);
|
||||
Sprintf(buf, "triangles %s", theArgVec[1]);
|
||||
theDI.Eval(buf);
|
||||
|
||||
theDI.Eval("smallview; fit");
|
||||
@@ -4104,7 +4104,7 @@ static Standard_Integer OCC26485(Draw_Interpretor& theDI,
|
||||
if (aNormal.X() == 0 && aNormal.Y() == 0 && aNormal.Z() == 1)
|
||||
{
|
||||
char buf[256];
|
||||
sprintf(buf, "fail_%d", i + 1);
|
||||
Sprintf(buf, "fail_%d", i + 1);
|
||||
theDI << "Failed. Point " << buf << ": " << aPoint.X() << " " << aPoint.Y() << " "
|
||||
<< aPoint.Z() << "\n";
|
||||
|
||||
@@ -4450,14 +4450,14 @@ Standard_Integer OCC26525(Draw_Interpretor& di, Standard_Integer n, const char**
|
||||
}
|
||||
|
||||
aNbPoints = aHInter.NbPoints();
|
||||
sprintf(buf, " Number of intersection points found: %d", aNbPoints);
|
||||
Sprintf(buf, " Number of intersection points found: %d", aNbPoints);
|
||||
di << buf << "\n";
|
||||
for (i = 1; i <= aNbPoints; ++i)
|
||||
{
|
||||
const IntCurveSurface_IntersectionPoint& aIP = aHInter.Point(i);
|
||||
aIP.Values(aP, aU, aV, aT, aTC);
|
||||
//
|
||||
sprintf(buf, "point %s_%d %lg %lg %lg ", a[1], i, aP.X(), aP.Y(), aP.Z());
|
||||
Sprintf(buf, "point %s_%d %lg %lg %lg ", a[1], i, aP.X(), aP.Y(), aP.Z());
|
||||
di << buf << "\n";
|
||||
}
|
||||
|
||||
|
@@ -318,17 +318,17 @@ Standard_Integer bopcheck(Draw_Interpretor& di, Standard_Integer n, const char**
|
||||
iT = aBI.Type();
|
||||
di << aInterfTypes[iT] << ": ";
|
||||
//
|
||||
sprintf(aName1, "x%d", n1);
|
||||
// sprintf(aName1, "x%d", iCnt);
|
||||
Sprintf(aName1, "x%d", n1);
|
||||
// Sprintf(aName1, "x%d", iCnt);
|
||||
DBRep::Set(aName1, aS1);
|
||||
//
|
||||
++iCnt;
|
||||
sprintf(aName2, "x%d", n2);
|
||||
// sprintf(aName2, "x%d", iCnt);
|
||||
Sprintf(aName2, "x%d", n2);
|
||||
// Sprintf(aName2, "x%d", iCnt);
|
||||
DBRep::Set(aName2, aS2);
|
||||
++iCnt;
|
||||
//
|
||||
sprintf(buf, "%s %s \n", aName1, aName2);
|
||||
Sprintf(buf, "%s %s \n", aName1, aName2);
|
||||
di << buf;
|
||||
}
|
||||
//
|
||||
@@ -1273,9 +1273,9 @@ Standard_Integer checkcurveonsurf(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
++aFCounter;
|
||||
}
|
||||
//
|
||||
sprintf(anEName, "e_%d", nE);
|
||||
sprintf(aFName, "f_%d", nF);
|
||||
sprintf(buf,
|
||||
Sprintf(anEName, "e_%d", nE);
|
||||
Sprintf(aFName, "f_%d", nF);
|
||||
Sprintf(buf,
|
||||
"edge %s on face %s (max dist: %3.16f, parameter on curve: %3.16f)\n",
|
||||
anEName,
|
||||
aFName,
|
||||
@@ -1311,7 +1311,7 @@ Standard_Integer checkcurveonsurf(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
//
|
||||
aTolE = aDMETol.Find(aE);
|
||||
aTolE *= 1.001;
|
||||
sprintf(buf, "settolerance %s_%d %3.16f;\n", a[1], anECounter, aTolE);
|
||||
Sprintf(buf, "settolerance %s_%d %3.16f;\n", a[1], anECounter, aTolE);
|
||||
di << buf;
|
||||
}
|
||||
}
|
||||
|
@@ -522,7 +522,7 @@ Standard_Integer bopwho(Draw_Interpretor& di, Standard_Integer n, const char** a
|
||||
di << " FF points: ";
|
||||
bFound = Standard_True;
|
||||
}
|
||||
sprintf(buf, "(%d, %d) ", n1, n2);
|
||||
Sprintf(buf, "(%d, %d) ", n1, n2);
|
||||
di << buf;
|
||||
}
|
||||
} // for (k=0; k<aNbP; ++k)
|
||||
@@ -578,12 +578,12 @@ Standard_Integer bopnews(Draw_Interpretor& di, Standard_Integer n, const char**
|
||||
{
|
||||
const TopoDS_Shape& aS = aSI.Shape();
|
||||
//
|
||||
sprintf(buf, "z%d", i);
|
||||
Sprintf(buf, "z%d", i);
|
||||
aText = buf;
|
||||
aDShape = new BOPTest_DrawableShape(aS, aText, aTextColor);
|
||||
Draw::Set(aText, aDShape);
|
||||
//
|
||||
sprintf(buf, "z%d ", i);
|
||||
Sprintf(buf, "z%d ", i);
|
||||
di << buf;
|
||||
//
|
||||
bFound = Standard_True;
|
||||
@@ -764,7 +764,7 @@ Standard_Integer bopsc(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
di << buf;
|
||||
iX = 1;
|
||||
}
|
||||
sprintf(buf, "t_%d_%d", k, nSp);
|
||||
Sprintf(buf, "t_%d_%d", k, nSp);
|
||||
di << buf;
|
||||
//
|
||||
const TopoDS_Shape& aSp = pDS->Shape(nSp);
|
||||
@@ -793,11 +793,11 @@ Standard_Integer bopsc(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
}
|
||||
if (!iX)
|
||||
{
|
||||
sprintf(buf, "[%d %d] section vertices: ", nF1, nF2);
|
||||
Sprintf(buf, "[%d %d] section vertices: ", nF1, nF2);
|
||||
di << buf;
|
||||
iX = 1;
|
||||
}
|
||||
sprintf(buf, "p_%d_%d", k, nSp);
|
||||
Sprintf(buf, "p_%d_%d", k, nSp);
|
||||
di << buf;
|
||||
//
|
||||
const TopoDS_Shape& aSp = pDS->Shape(nSp);
|
||||
@@ -1263,7 +1263,7 @@ Standard_Integer bopimage(Draw_Interpretor& di, Standard_Integer n, const char**
|
||||
}
|
||||
//
|
||||
di << i << " images found\n";
|
||||
sprintf(buf, "%s_im", a[1]);
|
||||
Sprintf(buf, "%s_im", a[1]);
|
||||
DBRep::Set(buf, aC);
|
||||
di << buf << "\n";
|
||||
//
|
||||
@@ -1303,7 +1303,7 @@ Standard_Integer boporigin(Draw_Interpretor& di, Standard_Integer n, const char*
|
||||
}
|
||||
//
|
||||
char buf[32];
|
||||
sprintf(buf, "%s_or", a[1]);
|
||||
Sprintf(buf, "%s_or", a[1]);
|
||||
//
|
||||
const TopTools_ListOfShape& aLSx = aDMI.Find(aS);
|
||||
if (aLSx.Extent() == 1)
|
||||
@@ -1396,7 +1396,7 @@ Standard_Integer bopfsd(Draw_Interpretor& di, Standard_Integer n, const char** a
|
||||
//
|
||||
di << i << " SD shapes found\n";
|
||||
//
|
||||
sprintf(buf, "%s_sd", a[1]);
|
||||
Sprintf(buf, "%s_sd", a[1]);
|
||||
DBRep::Set(buf, aC);
|
||||
//
|
||||
di << buf << "\n";
|
||||
@@ -1464,7 +1464,7 @@ Standard_Integer bopbface(Draw_Interpretor& di, Standard_Integer n, const char**
|
||||
for (i = 1; aIt.More(); aIt.Next(), ++i)
|
||||
{
|
||||
const TopoDS_Shape& aFR = aIt.Value();
|
||||
sprintf(buf, "%s_%d", a[1], i);
|
||||
Sprintf(buf, "%s_%d", a[1], i);
|
||||
DBRep::Set(buf, aFR);
|
||||
di << " " << buf;
|
||||
}
|
||||
@@ -1534,7 +1534,7 @@ Standard_Integer bopbsolid(Draw_Interpretor& di, Standard_Integer n, const char*
|
||||
for (i = 1; aIt.More(); aIt.Next(), ++i)
|
||||
{
|
||||
const TopoDS_Shape& aSR = aIt.Value();
|
||||
sprintf(buf, "%s_%d", a[1], i);
|
||||
Sprintf(buf, "%s_%d", a[1], i);
|
||||
DBRep::Set(buf, aSR);
|
||||
di << " " << buf;
|
||||
}
|
||||
@@ -1690,7 +1690,7 @@ void SearchNewIndex(const char* theCType,
|
||||
}
|
||||
//
|
||||
anInt.Indices(n1, n2);
|
||||
sprintf(buf, "(%d, %d) ", n1, n2);
|
||||
Sprintf(buf, "(%d, %d) ", n1, n2);
|
||||
di << buf;
|
||||
}
|
||||
}
|
||||
|
@@ -194,7 +194,7 @@ Standard_Integer MakePeriodic(Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
char cDirName[2];
|
||||
sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
Sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
|
||||
Standard_Real aPeriod = 0;
|
||||
if (theArgc > i + 1)
|
||||
@@ -281,7 +281,7 @@ Standard_Integer RepeatShape(Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
char cDirName[2];
|
||||
sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
Sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
|
||||
Standard_Integer aTimes = 0;
|
||||
if (theArgc > i + 1)
|
||||
|
@@ -135,7 +135,7 @@ Standard_Integer MakePeriodic(Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
char cDirName[2];
|
||||
sprintf(cDirName, "%c", theArgv[iDir][1]);
|
||||
Sprintf(cDirName, "%c", theArgv[iDir][1]);
|
||||
|
||||
if (theArgc == (i + 1))
|
||||
{
|
||||
@@ -254,7 +254,7 @@ Standard_Integer RepeatShape(Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
char cDirName[2];
|
||||
sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
Sprintf(cDirName, "%c", theArgv[i][1]);
|
||||
|
||||
Standard_Integer aTimes = 0;
|
||||
if (theArgc > i + 1)
|
||||
|
@@ -370,7 +370,7 @@ static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const
|
||||
di << "Attention (critical value of tolerance) :";
|
||||
}
|
||||
char aMsg[256];
|
||||
sprintf(aMsg, " T=%lg\tD=%lg\n", aT, aD);
|
||||
Sprintf(aMsg, " T=%lg\tD=%lg\n", aT, aD);
|
||||
di << aMsg;
|
||||
//
|
||||
aMr = new Draw_Marker3D(aP, Draw_Plus, aColor, iSize);
|
||||
|
@@ -58,7 +58,7 @@
|
||||
void WriteShape(const TopoDS_Shape& shape, const Standard_Integer number)
|
||||
{
|
||||
char fname[110];
|
||||
sprintf(fname, "Shape_%d", number);
|
||||
Sprintf(fname, "Shape_%d", number);
|
||||
std::ofstream f(fname, std::ios::out | std::ios::binary);
|
||||
std::cout << "Output file name : " << fname << std::endl;
|
||||
f << "DBRep_DrawableShape\n";
|
||||
|
@@ -189,7 +189,7 @@ Standard_Integer NCollection_UBTreeFiller<TheObjType, TheBndType>::CheckTree(
|
||||
const Standard_Real aLen1 = sqrt(aLen / num);
|
||||
const Standard_Real aLen0 = log(num) / log(2.);
|
||||
char buf[128];
|
||||
sprintf(buf, "Checking UBTree:%8d leaves, balance =%7.2f", aNumber, aLen1 / aLen0);
|
||||
Sprintf(buf, "Checking UBTree:%8d leaves, balance =%7.2f", aNumber, aLen1 / aLen0);
|
||||
theStream << buf << std::endl;
|
||||
return aNumber;
|
||||
}
|
||||
|
@@ -173,7 +173,7 @@ void OSD_Environment::Build()
|
||||
|
||||
// create a new entry in the buffer and add it to environment
|
||||
buffer[index] = (char*)malloc(len + myValue.Length() + 2);
|
||||
sprintf(buffer[index], "%s=%s", myName.ToCString(), myValue.ToCString());
|
||||
Sprintf(buffer[index], "%s=%s", myName.ToCString(), myValue.ToCString());
|
||||
putenv(buffer[index]);
|
||||
|
||||
// then (and only then!) free old entry, if existed
|
||||
|
@@ -457,7 +457,7 @@ void OSD_Error::Perror()
|
||||
default: {
|
||||
Standard_Character buf[255];
|
||||
//
|
||||
sprintf(buf, "%sUnknowm error #%d", buffer.ToCString(), myErrno);
|
||||
Sprintf(buf, "%sUnknowm error #%d", buffer.ToCString(), myErrno);
|
||||
TCollection_AsciiString interm(buf);
|
||||
buffer = interm;
|
||||
extCode = ERR_UNKNOWN;
|
||||
|
@@ -152,7 +152,7 @@ TCollection_AsciiString OSD_Host::InternetAddress()
|
||||
b = (unsigned char)internet_address.h_addr_list[0][1];
|
||||
c = (unsigned char)internet_address.h_addr_list[0][2];
|
||||
d = (unsigned char)internet_address.h_addr_list[0][3];
|
||||
sprintf(buffer, "%d.%d.%d.%d", a, b, c, d);
|
||||
Sprintf(buffer, "%d.%d.%d.%d", a, b, c, d);
|
||||
result = buffer;
|
||||
return (result);
|
||||
}
|
||||
|
@@ -938,7 +938,7 @@ static void SegvHandler(const int theSignal,
|
||||
void* anAddress = theSigInfo->si_addr;
|
||||
{
|
||||
char aMsg[100];
|
||||
sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx.", (long)anAddress);
|
||||
Sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx.", (long)anAddress);
|
||||
|
||||
const int aStackLength = OSD_SignalStackTraceLength;
|
||||
const int aStackBufLen = Max(aStackLength * 200, 2048);
|
||||
@@ -975,7 +975,7 @@ static void SegvHandler(const int theSignal,
|
||||
unsigned long anOffset = ((struct sigcontext*)theContext)->sc_sl.sl_ss.ss_cr21;
|
||||
{
|
||||
char aMsg[100];
|
||||
sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx", anOffset);
|
||||
Sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx", anOffset);
|
||||
OSD_SIGSEGV::NewInstance(aMsg)->Jump();
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
//! This class intended to temporary switch C locale and logically equivalent to setlocale(LC_ALL,
|
||||
//! "C"). It is intended to format text regardless of user locale settings (for import/export
|
||||
//! functionality). Thus following calls to sprintf, atoi and other functions will use "C" locale.
|
||||
//! functionality). Thus following calls to Sprintf, atoi and other functions will use "C" locale.
|
||||
//! Destructor of this class will return original locale.
|
||||
//!
|
||||
//! Notice that this functionality is platform dependent and intended only to workaround alien code
|
||||
|
@@ -58,13 +58,25 @@ extern "C"
|
||||
Standard_EXPORT double Strtod(const char* theStr, char** theNextPtr);
|
||||
|
||||
//! Equivalent of standard C function printf() that always uses C locale
|
||||
Standard_EXPORT int Printf(const char* theFormat, ...);
|
||||
Standard_EXPORT int Printf(const char* theFormat, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
;
|
||||
|
||||
//! Equivalent of standard C function fprintf() that always uses C locale
|
||||
Standard_EXPORT int Fprintf(FILE* theFile, const char* theFormat, ...);
|
||||
Standard_EXPORT int Fprintf(FILE* theFile, const char* theFormat, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
|
||||
//! Equivalent of standard C function sprintf() that always uses C locale
|
||||
Standard_EXPORT int Sprintf(char* theBuffer, const char* theFormat, ...);
|
||||
Standard_EXPORT int Sprintf(char* theBuffer, const char* theFormat, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
|
||||
//! Equivalent of standard C function vsprintf() that always uses C locale.
|
||||
//! Note that this function does not check buffer bounds and should be used with precaution
|
||||
@@ -73,7 +85,11 @@ extern "C"
|
||||
//! @param[in] theFormat format to apply
|
||||
//! @param[in] theArgList argument list for specified format
|
||||
//! @return the total number of characters written, or a negative number on error
|
||||
Standard_EXPORT int Vsprintf(char* theBuffer, const char* theFormat, va_list theArgList);
|
||||
Standard_EXPORT int Vsprintf(char* theBuffer, const char* theFormat, va_list theArgList)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 2, 0)))
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -316,7 +316,7 @@ void Standard_GUID::Assign(const Standard_UUID& theUUID)
|
||||
|
||||
void Standard_GUID::ToCString(const Standard_PCharacter aStrGuid) const
|
||||
{
|
||||
sprintf(aStrGuid,
|
||||
Sprintf(aStrGuid,
|
||||
"%.8x-%.4x-%.4x-%.4x-%.2x%.2x%.2x%.2x%.2x%.2x",
|
||||
my32b,
|
||||
(unsigned short)my16b1,
|
||||
|
@@ -688,7 +688,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire)
|
||||
|
||||
// Temporary
|
||||
// char* name = new char[100];
|
||||
// sprintf(name, "c%d", i);
|
||||
// Sprintf(name, "c%d", i);
|
||||
// DrawTrSurf::Set(name, tab(i-1));
|
||||
|
||||
if (i > 1)
|
||||
|
@@ -550,7 +550,7 @@ void BRepAlgo_Loop::Perform()
|
||||
std::cout << "NewLoop" << std::endl;
|
||||
NbLoops++;
|
||||
#ifdef DRAW
|
||||
sprintf(name, "FLoop_%d", NbLoops);
|
||||
Sprintf(name, "FLoop_%d", NbLoops);
|
||||
DBRep::Set(name, myFace);
|
||||
Standard_Integer NbEdges = 1;
|
||||
#endif
|
||||
@@ -558,7 +558,7 @@ void BRepAlgo_Loop::Perform()
|
||||
{
|
||||
const TopoDS_Edge& E = TopoDS::Edge(itl.Value());
|
||||
#ifdef DRAW
|
||||
sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++);
|
||||
Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++);
|
||||
DBRep::Set(name, E);
|
||||
#endif
|
||||
}
|
||||
@@ -566,7 +566,7 @@ void BRepAlgo_Loop::Perform()
|
||||
{
|
||||
const TopoDS_Edge& E = TopoDS::Edge(itl.Value());
|
||||
#ifdef DRAW
|
||||
sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++);
|
||||
Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++);
|
||||
DBRep::Set(name, E);
|
||||
#endif
|
||||
}
|
||||
@@ -632,7 +632,7 @@ void BRepAlgo_Loop::Perform()
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
|
||||
if (Done.Add(E))
|
||||
{
|
||||
sprintf(name, "EEC_%d_%d", NbLoops, NbEdges++);
|
||||
Sprintf(name, "EEC_%d_%d", NbLoops, NbEdges++);
|
||||
DBRep::Set(name, E);
|
||||
}
|
||||
}
|
||||
@@ -763,7 +763,7 @@ void BRepAlgo_Loop::Perform()
|
||||
#ifdef DRAW
|
||||
if (AffichLoop)
|
||||
{
|
||||
sprintf(name, "NW_%d_%d", NbLoops, NbWires++);
|
||||
Sprintf(name, "NW_%d_%d", NbLoops, NbWires++);
|
||||
DBRep::Set(name, NW);
|
||||
}
|
||||
#endif
|
||||
|
@@ -647,7 +647,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PROFIL_%d", ++NbPROFILS);
|
||||
Sprintf(name, "PROFIL_%d", ++NbPROFILS);
|
||||
DBRep::Set(name, Pr);
|
||||
}
|
||||
#endif
|
||||
@@ -962,7 +962,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "ARCEDGE_%d_%d_%d", i, vv, Ti);
|
||||
Sprintf(name, "ARCEDGE_%d_%d_%d", i, vv, Ti);
|
||||
DBRep::Set(name, CurrentEdge);
|
||||
}
|
||||
#endif
|
||||
@@ -1141,7 +1141,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k);
|
||||
Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k);
|
||||
DBRep::Set(name, aSeqOfShape.Value(k));
|
||||
}
|
||||
#endif
|
||||
@@ -1185,7 +1185,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k);
|
||||
Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k);
|
||||
DBRep::Set(name, aSeqOfShape.Value(k));
|
||||
}
|
||||
#endif
|
||||
@@ -1278,7 +1278,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
|
||||
{
|
||||
std::cout << " End of construction of an elementary volevo." << std::endl;
|
||||
char name[100];
|
||||
sprintf(name, "VEVO_%d", ++NbVEVOS);
|
||||
Sprintf(name, "VEVO_%d", ++NbVEVOS);
|
||||
DBRep::Set(name, myShape);
|
||||
}
|
||||
#endif
|
||||
@@ -1391,7 +1391,7 @@ void BRepFill_Evolved::PlanarPerform(const TopoDS_Face& Sp,
|
||||
for (; it.More(); it.Next())
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PARALI_%d", ++k);
|
||||
Sprintf(name, "PARALI_%d", ++k);
|
||||
DBRep::Set(name, it.Value());
|
||||
}
|
||||
}
|
||||
@@ -1501,7 +1501,7 @@ void BRepFill_Evolved::VerticalPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PARALI_%d", ++NbVEVOS);
|
||||
Sprintf(name, "PARALI_%d", ++NbVEVOS);
|
||||
DBRep::Set(name, Base);
|
||||
}
|
||||
#endif
|
||||
@@ -1511,7 +1511,7 @@ void BRepFill_Evolved::VerticalPerform(const TopoDS_Face& Sp,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "PRISM_%d", NbVEVOS);
|
||||
Sprintf(name, "PRISM_%d", NbVEVOS);
|
||||
DBRep::Set(name, PS.Shape());
|
||||
}
|
||||
#endif
|
||||
@@ -1803,7 +1803,7 @@ void BRepFill_Evolved::PrepareSpine(TopoDS_Face& WorkSpine,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "workspine");
|
||||
Sprintf(name, "workspine");
|
||||
DBRep::Set(name, WorkSpine);
|
||||
}
|
||||
#endif
|
||||
@@ -2280,9 +2280,9 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, const gp_Ax3& AxeRef)
|
||||
if (AffichGeom)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "EVOLBASE_%d", ++NbFACES);
|
||||
Sprintf(name, "EVOLBASE_%d", ++NbFACES);
|
||||
DBRep::Set(name, SE);
|
||||
sprintf(name, "EVOLPROF_%d", NbFACES);
|
||||
Sprintf(name, "EVOLPROF_%d", NbFACES);
|
||||
DBRep::Set(name, GenProf);
|
||||
}
|
||||
#endif
|
||||
@@ -2294,7 +2294,7 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, const gp_Ax3& AxeRef)
|
||||
if (AffichGeom)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "EVOL_%d", ++NbFACES);
|
||||
Sprintf(name, "EVOL_%d", ++NbFACES);
|
||||
DBRep::Set(name, Pipe.Shape());
|
||||
}
|
||||
#endif
|
||||
@@ -2367,13 +2367,13 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
|
||||
if (AffichGeom)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "EVOLBASE_%d", ++NbFACES);
|
||||
Sprintf(name, "EVOLBASE_%d", ++NbFACES);
|
||||
DrawTrSurf::Set(name, new Geom_Line(AxeRev));
|
||||
// DrawTrSurf::Set(name,new Geom_Line(AxeRev));
|
||||
sprintf(name, "EVOLPROF_%d", NbFACES);
|
||||
Sprintf(name, "EVOLPROF_%d", NbFACES);
|
||||
DBRep::Set(name, GenProf);
|
||||
|
||||
sprintf(name, "EVOL_%d", NbFACES);
|
||||
Sprintf(name, "EVOL_%d", NbFACES);
|
||||
DBRep::Set(name, Rev.Shape());
|
||||
}
|
||||
#endif
|
||||
@@ -2463,10 +2463,10 @@ void BRepFill_Evolved::TransformInitWork(const TopLoc_Location& LS, const TopLoc
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "movedspine");
|
||||
Sprintf(name, "movedspine");
|
||||
TopoDS_Face SL = mySpine;
|
||||
DBRep::Set(name, SL);
|
||||
sprintf(name, "movedprofile");
|
||||
Sprintf(name, "movedprofile");
|
||||
TopoDS_Wire PL = myProfile;
|
||||
DBRep::Set(name, PL);
|
||||
}
|
||||
@@ -2673,7 +2673,7 @@ void TrimFace(const TopoDS_Face& Face,
|
||||
std::cout << " : " << NB << " edges within the restriction" << std::endl;
|
||||
for (Standard_Integer j = 1; j <= NB; j++)
|
||||
{
|
||||
sprintf(name, "TRIMEDGE_%d_%d", NbTRIMFACES, j);
|
||||
Sprintf(name, "TRIMEDGE_%d_%d", NbTRIMFACES, j);
|
||||
DBRep::Set(name, TopoDS::Edge(TheEdges.Value(j)));
|
||||
}
|
||||
}
|
||||
|
@@ -502,11 +502,11 @@ void BRepFill_MultiLine::Curves(Handle(Geom_Curve)& Curve,
|
||||
if (AffichCurve)
|
||||
{
|
||||
char name[100];
|
||||
sprintf(name, "C2_%d", NbProj);
|
||||
Sprintf(name, "C2_%d", NbProj);
|
||||
DrawTrSurf::Set(name, TLine);
|
||||
sprintf(name, "C3_%d", NbProj);
|
||||
Sprintf(name, "C3_%d", NbProj);
|
||||
DrawTrSurf::Set(name, Curve);
|
||||
sprintf(name, "SS_%d", NbProj);
|
||||
Sprintf(name, "SS_%d", NbProj);
|
||||
DrawTrSurf::Set(name, Plane);
|
||||
NbProj++;
|
||||
}
|
||||
|
@@ -380,7 +380,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
|
||||
{
|
||||
NBSECT++;
|
||||
char name[256];
|
||||
sprintf(name, "WIRE_%d", NBSECT);
|
||||
Sprintf(name, "WIRE_%d", NBSECT);
|
||||
DBRep::Set(name, TopoDS::Wire(S.Value(i)));
|
||||
}
|
||||
#endif
|
||||
@@ -562,7 +562,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal& P, const Standard_Bo
|
||||
if (Affich)
|
||||
{
|
||||
char* name = new char[100];
|
||||
sprintf(name, "Ref_Surf");
|
||||
Sprintf(name, "Ref_Surf");
|
||||
DrawTrSurf::Set(name, mySurface);
|
||||
}
|
||||
#endif
|
||||
|
@@ -824,7 +824,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine,
|
||||
if (AffichGeom)
|
||||
{
|
||||
char name[256];
|
||||
sprintf(name, "BISSEC_%d", NbBISSEC++);
|
||||
Sprintf(name, "BISSEC_%d", NbBISSEC++);
|
||||
DrawTrSurf::Set(name, Bisec.Value());
|
||||
}
|
||||
#endif
|
||||
@@ -2052,7 +2052,7 @@ void MakeCircle(const TopoDS_Edge& E,
|
||||
if (AffichGeom && !OE.IsNull())
|
||||
{
|
||||
char name[256];
|
||||
sprintf(name, "OFFSET_%d", ++NbOFFSET);
|
||||
Sprintf(name, "OFFSET_%d", ++NbOFFSET);
|
||||
DBRep::Set(name, OE);
|
||||
}
|
||||
#endif
|
||||
@@ -2182,7 +2182,7 @@ void MakeOffset(const TopoDS_Edge& E,
|
||||
if (AffichGeom && !OE.IsNull())
|
||||
{
|
||||
char name[256];
|
||||
sprintf(name, "OFFSET_%d", ++NbOFFSET);
|
||||
Sprintf(name, "OFFSET_%d", ++NbOFFSET);
|
||||
DBRep::Set(name, OE);
|
||||
// Standard_Real ii = 0;
|
||||
}
|
||||
@@ -2443,7 +2443,7 @@ void TrimEdge(const TopoDS_Edge& E,
|
||||
if (AffichEdge)
|
||||
{
|
||||
char name[256];
|
||||
sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES);
|
||||
Sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES);
|
||||
DBRep::Set(name, NewEdge);
|
||||
}
|
||||
if (Affich2d)
|
||||
@@ -2454,7 +2454,7 @@ void TrimEdge(const TopoDS_Edge& E,
|
||||
Handle(Geom2d_Curve) C;
|
||||
BRep_Tool::CurveOnSurface(NewEdge, C, Surf, L, f, l);
|
||||
char name[256];
|
||||
sprintf(name, "OFFSET2d_%d", NbTRIMEDGES++);
|
||||
Sprintf(name, "OFFSET2d_%d", NbTRIMEDGES++);
|
||||
Handle(Geom2d_TrimmedCurve) C2d = new Geom2d_TrimmedCurve(C, f, l);
|
||||
Handle(DrawTrSurf_Curve2d) dr = new DrawTrSurf_Curve2d(C2d, Standard_False);
|
||||
dr->SetColor(Draw_bleu);
|
||||
|
@@ -1107,7 +1107,7 @@ void BRepFill_PipeShell::Prepare()
|
||||
for (Standard_Integer i = 1; i <= WSeq.Length(); i++)
|
||||
{
|
||||
NBSECT++;
|
||||
sprintf(name, "WSeq_%d", NBSECT);
|
||||
Sprintf(name, "WSeq_%d", NBSECT);
|
||||
DBRep::Set(name, TopoDS::Wire(WSeq.Value(i)));
|
||||
}
|
||||
}
|
||||
|
@@ -798,11 +798,11 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
|
||||
{ // Error of construction !!
|
||||
#ifdef DRAW
|
||||
char name[100];
|
||||
sprintf(name, "firstvertex_error");
|
||||
Sprintf(name, "firstvertex_error");
|
||||
DBRep::Set(name, VF);
|
||||
sprintf(name, "lastvertex_error");
|
||||
Sprintf(name, "lastvertex_error");
|
||||
DBRep::Set(name, VL);
|
||||
sprintf(name, "curve3d_error");
|
||||
Sprintf(name, "curve3d_error");
|
||||
char* Temp = name;
|
||||
DrawTrSurf::Set(Temp, C3d);
|
||||
// DrawTrSurf::Set(name, C3d);
|
||||
@@ -1573,11 +1573,11 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
|
||||
{ // Erreur de construction !!
|
||||
#ifdef DRAW
|
||||
char name[100];
|
||||
sprintf(name, "firstvertex_error");
|
||||
Sprintf(name, "firstvertex_error");
|
||||
DBRep::Set(name, VFirst);
|
||||
sprintf(name, "lastvertex_error");
|
||||
Sprintf(name, "lastvertex_error");
|
||||
DBRep::Set(name, VLast);
|
||||
sprintf(name, "curve3d_error");
|
||||
Sprintf(name, "curve3d_error");
|
||||
char* Temp = name;
|
||||
DrawTrSurf::Set(Temp, Iso);
|
||||
// DrawTrSurf::Set(name,Iso);
|
||||
@@ -2129,11 +2129,11 @@ Standard_Boolean BRepFill_Sweep::BuildWire(const BRepFill_TransitionStyle /*Tran
|
||||
{ // Error of construction !!
|
||||
#ifdef DRAW
|
||||
char name[100];
|
||||
sprintf(name, "firstvertex_error");
|
||||
Sprintf(name, "firstvertex_error");
|
||||
DBRep::Set(name, myVEdges->Value(1, ipath));
|
||||
sprintf(name, "lastvertex_error");
|
||||
Sprintf(name, "lastvertex_error");
|
||||
DBRep::Set(name, myVEdges->Value(1, ipath + 1));
|
||||
sprintf(name, "curve3d_error");
|
||||
Sprintf(name, "curve3d_error");
|
||||
char* Temp = name;
|
||||
DrawTrSurf::Set(Temp, Iso);
|
||||
// DrawTrSurf::Set(name,Iso);
|
||||
@@ -2145,11 +2145,11 @@ Standard_Boolean BRepFill_Sweep::BuildWire(const BRepFill_TransitionStyle /*Tran
|
||||
#ifdef DRAW
|
||||
if (Affich)
|
||||
{
|
||||
sprintf(name, "Surf_%d", ipath);
|
||||
Sprintf(name, "Surf_%d", ipath);
|
||||
char* Temp = name;
|
||||
DrawTrSurf::Set(Temp, S);
|
||||
// DrawTrSurf::Set(name, S);
|
||||
sprintf(name, "Edge_%d", ipath);
|
||||
Sprintf(name, "Edge_%d", ipath);
|
||||
DBRep::Set(name, E);
|
||||
}
|
||||
#endif
|
||||
@@ -2292,7 +2292,7 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra
|
||||
#ifdef DRAW
|
||||
if (Affich)
|
||||
{
|
||||
sprintf(name, "Surf_%d_%d", isec, IPath);
|
||||
Sprintf(name, "Surf_%d_%d", isec, IPath);
|
||||
char* Temp = name;
|
||||
DrawTrSurf::Set(Temp, TabS(isec, ipath));
|
||||
}
|
||||
@@ -2869,7 +2869,7 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra
|
||||
{
|
||||
for (isec = 1; isec <= NbLaw + 1; isec++)
|
||||
{
|
||||
sprintf(name, "uedge_%d_%d", isec, IPath);
|
||||
Sprintf(name, "uedge_%d_%d", isec, IPath);
|
||||
DBRep::Set(name, UEdge(isec, ipath));
|
||||
}
|
||||
}
|
||||
@@ -2878,13 +2878,13 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra
|
||||
{
|
||||
for (isec = 1; isec <= NbLaw; isec++)
|
||||
{
|
||||
sprintf(name, "vedge_%d_%d", isec, IPath);
|
||||
Sprintf(name, "vedge_%d_%d", isec, IPath);
|
||||
DBRep::Set(name, VEdge(isec, ipath));
|
||||
}
|
||||
|
||||
for (isec = 1; isec <= NbLaw + 1; isec++)
|
||||
{
|
||||
sprintf(name, "vertex_%d_%d", isec, IPath);
|
||||
Sprintf(name, "vertex_%d_%d", isec, IPath);
|
||||
DBRep::Set(name, Vertex(isec, ipath));
|
||||
}
|
||||
}
|
||||
@@ -3675,9 +3675,9 @@ Standard_Boolean BRepFill_Sweep::PerformCorner(const Standard_Integer
|
||||
char name[100];
|
||||
DBRep::Set("TrimmedShell", TheShape);
|
||||
for (jj=1; jj <=myFaces->ColLength(); jj++){
|
||||
sprintf(name,"Tfaces_%d_%d", jj, I1);
|
||||
Sprintf(name,"Tfaces_%d_%d", jj, I1);
|
||||
DBRep::Set(name, myFaces->Value(jj, I1));
|
||||
sprintf(name,"Tfaces_%d_%d", jj, I2);
|
||||
Sprintf(name,"Tfaces_%d_%d", jj, I2);
|
||||
DBRep::Set(name, myFaces->Value(jj, I2));
|
||||
}
|
||||
}
|
||||
|
@@ -331,19 +331,19 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
|
||||
f = AC1.FirstParameter();
|
||||
l = AC1.LastParameter();
|
||||
char name[32];
|
||||
sprintf(name, "C1_%d", ++intind);
|
||||
Sprintf(name, "C1_%d", ++intind);
|
||||
DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C1, f, l));
|
||||
f = AC2.FirstParameter();
|
||||
l = AC2.LastParameter();
|
||||
sprintf(name, "C2_%d", intind);
|
||||
Sprintf(name, "C2_%d", intind);
|
||||
DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C2, f, l));
|
||||
f = myBis.FirstParameter();
|
||||
l = myBis.LastParameter();
|
||||
sprintf(name, "BIS%d", intind);
|
||||
Sprintf(name, "BIS%d", intind);
|
||||
DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(myBis.Curve(), f, l));
|
||||
sprintf(name, "E1_%d", intind);
|
||||
Sprintf(name, "E1_%d", intind);
|
||||
DBRep::Set(name, Edge1);
|
||||
sprintf(name, "E2_%d", intind);
|
||||
Sprintf(name, "E2_%d", intind);
|
||||
DBRep::Set(name, Edge2);
|
||||
}
|
||||
#endif
|
||||
|
@@ -97,19 +97,19 @@ BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& B
|
||||
#ifdef DRAW
|
||||
char name[256];
|
||||
|
||||
sprintf(name, "FACE1_%d", NBCALL);
|
||||
Sprintf(name, "FACE1_%d", NBCALL);
|
||||
DBRep::Set(name, myFace1);
|
||||
|
||||
sprintf(name, "FACE2_%d", NBCALL);
|
||||
Sprintf(name, "FACE2_%d", NBCALL);
|
||||
DBRep::Set(name, myFace2);
|
||||
|
||||
sprintf(name, "EDGE1_%d", NBCALL);
|
||||
Sprintf(name, "EDGE1_%d", NBCALL);
|
||||
DBRep::Set(name, myEdge1);
|
||||
|
||||
sprintf(name, "EDGE2_%d", NBCALL);
|
||||
Sprintf(name, "EDGE2_%d", NBCALL);
|
||||
DBRep::Set(name, myEdge2);
|
||||
|
||||
sprintf(name, "BISSEC_%d", NBCALL);
|
||||
Sprintf(name, "BISSEC_%d", NBCALL);
|
||||
DrawTrSurf::Set(name, myBis);
|
||||
#endif
|
||||
}
|
||||
@@ -403,10 +403,10 @@ void BRepFill_TrimSurfaceTool::IntersectWith(const TopoDS_Edge& EdgeOnF1,
|
||||
{
|
||||
char name[256];
|
||||
Standard_Integer i1 = 0, i2 = 2;
|
||||
sprintf(name, "EdgeOnF1_%d_%d", i1, NBCALL);
|
||||
Sprintf(name, "EdgeOnF1_%d_%d", i1, NBCALL);
|
||||
DBRep::Set(name, EdgeOnF1);
|
||||
|
||||
sprintf(name, "EdgeOnF2_%d_%d", i2, NBCALL);
|
||||
Sprintf(name, "EdgeOnF2_%d_%d", i2, NBCALL);
|
||||
DBRep::Set(name, EdgeOnF2);
|
||||
}
|
||||
|
||||
|
@@ -330,11 +330,11 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real
|
||||
#ifdef IFV
|
||||
char name[16];
|
||||
char* nm = &name[0];
|
||||
sprintf(name, "C3D_%d", ++NbCalls);
|
||||
Sprintf(name, "C3D_%d", ++NbCalls);
|
||||
DrawTrSurf::Set(nm, C3D);
|
||||
sprintf(name, "PC1_%d", NbCalls);
|
||||
Sprintf(name, "PC1_%d", NbCalls);
|
||||
DrawTrSurf::Set(nm, PC1);
|
||||
sprintf(name, "PC2_%d", NbCalls);
|
||||
Sprintf(name, "PC2_%d", NbCalls);
|
||||
DrawTrSurf::Set(nm, PC2);
|
||||
#endif
|
||||
//*/
|
||||
@@ -515,13 +515,13 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real
|
||||
iparmax = NbPol;
|
||||
|
||||
#ifdef IFV
|
||||
sprintf(name, "C3Dmod_%d", NbCalls);
|
||||
Sprintf(name, "C3Dmod_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, C3D);
|
||||
sprintf(name, "PC1mod_%d", NbCalls);
|
||||
Sprintf(name, "PC1mod_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, PC1);
|
||||
sprintf(name, "PC2mod_%d", NbCalls);
|
||||
Sprintf(name, "PC2mod_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, PC2);
|
||||
#endif
|
||||
@@ -743,18 +743,18 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real
|
||||
}
|
||||
|
||||
#ifdef IFV
|
||||
sprintf(name, "C3Dnew_%d", NbCalls);
|
||||
Sprintf(name, "C3Dnew_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, C3Dnew);
|
||||
if (CompPC1)
|
||||
{
|
||||
sprintf(name, "PC1new_%d", NbCalls);
|
||||
Sprintf(name, "PC1new_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, PC1new);
|
||||
}
|
||||
if (CompPC2)
|
||||
{
|
||||
sprintf(name, "PC2new_%d", NbCalls);
|
||||
Sprintf(name, "PC2new_%d", NbCalls);
|
||||
nm = &name[0];
|
||||
DrawTrSurf::Set(nm, PC2new);
|
||||
}
|
||||
|
@@ -984,14 +984,14 @@ void BRepFeat_MakeLinearForm::Perform()
|
||||
Standard_Integer ii = 0;
|
||||
for(; expr.More(); expr.Next()) {
|
||||
ii++;
|
||||
sprintf(nom1, "faceinitial_%d", ii);
|
||||
Sprintf(nom1, "faceinitial_%d", ii);
|
||||
DBRep::Set(nom1, expr.Current());
|
||||
Standard_Integer jj = 0;
|
||||
const TopTools_ListOfShape& list = Modified(expr.Current());
|
||||
TopTools_ListIteratorOfListOfShape ite(list);
|
||||
for(; ite.More(); ite.Next()) {
|
||||
jj++;
|
||||
sprintf(nom2, "facemodifie_%d_%d", ii, jj);
|
||||
Sprintf(nom2, "facemodifie_%d_%d", ii, jj);
|
||||
DBRep::Set(nom2, ite.Value());
|
||||
}
|
||||
}
|
||||
@@ -1000,14 +1000,14 @@ void BRepFeat_MakeLinearForm::Perform()
|
||||
ii=0;
|
||||
for(; expr.More(); expr.Next()) {
|
||||
ii++;
|
||||
sprintf(nom1, "edgeinitial_%d", ii);
|
||||
Sprintf(nom1, "edgeinitial_%d", ii);
|
||||
DBRep::Set(nom1, expr.Current());
|
||||
Standard_Integer jj = 0;
|
||||
const TopTools_ListOfShape& genf = Generated(expr.Current());
|
||||
TopTools_ListIteratorOfListOfShape ite(genf);
|
||||
for(; ite.More(); ite.Next()) {
|
||||
jj++;
|
||||
sprintf(nom2, "egdegeneree_%d_%d", ii, jj);
|
||||
Sprintf(nom2, "egdegeneree_%d_%d", ii, jj);
|
||||
DBRep::Set(nom2, ite.Value());
|
||||
}
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ static void Drawsect(const Handle(Adaptor3d_Surface)& surf,
|
||||
// POP pour NT
|
||||
// char name[100];
|
||||
char* name = new char[100];
|
||||
sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
Sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
#ifdef DRAW
|
||||
DrawTrSurf::Set(name, sect);
|
||||
#endif
|
||||
|
@@ -153,7 +153,7 @@ static void Drawsect(const Standard_Real param, Blend_RstRstFunction& Func)
|
||||
#ifdef DRAW
|
||||
char tname[100];
|
||||
Standard_CString name = tname;
|
||||
sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
Sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
DrawTrSurf::Set(name, sect);
|
||||
#endif
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ static void Drawsect(const Standard_Real param, Blend_SurfRstFunction& Func)
|
||||
#ifdef DRAW
|
||||
char tname[100];
|
||||
Standard_CString name = tname;
|
||||
sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
Sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
DrawTrSurf::Set(name, sect);
|
||||
#endif
|
||||
}
|
||||
|
@@ -103,12 +103,12 @@ static void Drawsect(const Handle(Adaptor3d_Surface)& surf1,
|
||||
if ((State == Blend_StepTooLarge) || (State == Blend_SamePoints))
|
||||
{
|
||||
IndexOfRejection++;
|
||||
sprintf(name, "%s_%d", "Rejection", IndexOfRejection);
|
||||
Sprintf(name, "%s_%d", "Rejection", IndexOfRejection);
|
||||
}
|
||||
else
|
||||
{
|
||||
IndexOfSection++;
|
||||
sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
Sprintf(name, "%s_%d", "Section", IndexOfSection);
|
||||
}
|
||||
#ifdef DRAW
|
||||
Handle(DrawTrSurf_BSplineCurve) BS = new (DrawTrSurf_BSplineCurve)(sect);
|
||||
@@ -2251,11 +2251,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func,
|
||||
#ifdef DRAW
|
||||
Standard_Integer nbpts = line->NbPoints();
|
||||
char name[100];
|
||||
sprintf(name, "pg%d", nbpts);
|
||||
Sprintf(name, "pg%d", nbpts);
|
||||
DrawTrSurf::Set(name, PtOnGuide);
|
||||
sprintf(name, "p1_%d", nbpts);
|
||||
Sprintf(name, "p1_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS1());
|
||||
sprintf(name, "p2_%d", nbpts);
|
||||
Sprintf(name, "p2_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS2());
|
||||
#endif
|
||||
|
||||
@@ -2327,11 +2327,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func,
|
||||
#ifdef DRAW
|
||||
Standard_Integer nbpts = line->NbPoints();
|
||||
char name[100];
|
||||
sprintf(name, "pg%d", nbpts);
|
||||
Sprintf(name, "pg%d", nbpts);
|
||||
DrawTrSurf::Set(name, PtOnGuide);
|
||||
sprintf(name, "p1_%d", nbpts);
|
||||
Sprintf(name, "p1_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS1());
|
||||
sprintf(name, "p2_%d", nbpts);
|
||||
Sprintf(name, "p2_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS2());
|
||||
#endif
|
||||
|
||||
@@ -2374,11 +2374,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func,
|
||||
#ifdef DRAW
|
||||
Standard_Integer nbpts = line->NbPoints();
|
||||
char name[100];
|
||||
sprintf(name, "pg%d", nbpts);
|
||||
Sprintf(name, "pg%d", nbpts);
|
||||
DrawTrSurf::Set(name, PtOnGuide);
|
||||
sprintf(name, "p1_%d", nbpts);
|
||||
Sprintf(name, "p1_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS1());
|
||||
sprintf(name, "p2_%d", nbpts);
|
||||
Sprintf(name, "p2_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS2());
|
||||
#endif
|
||||
|
||||
@@ -2410,11 +2410,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func,
|
||||
#ifdef DRAW
|
||||
Standard_Integer nbpts = line->NbPoints();
|
||||
char name[100];
|
||||
sprintf(name, "pg%d", nbpts);
|
||||
Sprintf(name, "pg%d", nbpts);
|
||||
DrawTrSurf::Set(name, PtOnGuide);
|
||||
sprintf(name, "p1_%d", nbpts);
|
||||
Sprintf(name, "p1_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS1());
|
||||
sprintf(name, "p2_%d", nbpts);
|
||||
Sprintf(name, "p2_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS2());
|
||||
#endif
|
||||
|
||||
@@ -2446,11 +2446,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func,
|
||||
#ifdef DRAW
|
||||
Standard_Integer nbpts = line->NbPoints();
|
||||
char name[100];
|
||||
sprintf(name, "pg%d", nbpts);
|
||||
Sprintf(name, "pg%d", nbpts);
|
||||
DrawTrSurf::Set(name, PtOnGuide);
|
||||
sprintf(name, "p1_%d", nbpts);
|
||||
Sprintf(name, "p1_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS1());
|
||||
sprintf(name, "p2_%d", nbpts);
|
||||
Sprintf(name, "p2_%d", nbpts);
|
||||
DrawTrSurf::Set(name, previousP.PointOnS2());
|
||||
#endif
|
||||
|
||||
|
@@ -445,7 +445,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData(Handle(ChFiDS_SurfData)& D
|
||||
IndexOfConge++;
|
||||
// char name[100];
|
||||
char* name = new char[100];
|
||||
sprintf(name, "%s_%d", "Surf", IndexOfConge);
|
||||
Sprintf(name, "%s_%d", "Surf", IndexOfConge);
|
||||
DrawTrSurf::Set(name, Surfcoin);
|
||||
}
|
||||
#endif
|
||||
@@ -757,7 +757,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data
|
||||
IndexOfConge++;
|
||||
// char name[100];
|
||||
char* name = new char[100];
|
||||
sprintf(name, "%s_%d", "Surf", IndexOfConge);
|
||||
Sprintf(name, "%s_%d", "Surf", IndexOfConge);
|
||||
DrawTrSurf::Set(name, Surf);
|
||||
}
|
||||
#endif
|
||||
|
@@ -368,7 +368,7 @@ void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr,
|
||||
#ifdef DRAW
|
||||
// char name[100];
|
||||
char* name = new char[100];
|
||||
sprintf(name, "fillet_%d", NbSD++);
|
||||
Sprintf(name, "fillet_%d", NbSD++);
|
||||
DBRep::Set(name, F);
|
||||
#endif
|
||||
}
|
||||
|
@@ -688,10 +688,10 @@ Standard_Boolean
|
||||
{
|
||||
const IntSurf_PntOn2S& thePoint = ResultPntOn2SLine->Value(i);
|
||||
gp_Pnt curPnt = thePoint.Value();
|
||||
sprintf(name, "p%d_%d", indc, i);
|
||||
Sprintf(name, "p%d_%d", indc, i);
|
||||
DrawTrSurf::Set(name, curPnt);
|
||||
gp_Pnt2d curPnt2d = thePoint.ValueOnSurface(onfirst);
|
||||
sprintf(name, "pp%d_%d", indc, i);
|
||||
Sprintf(name, "pp%d_%d", indc, i);
|
||||
DrawTrSurf::Set(name, curPnt2d);
|
||||
}
|
||||
#endif
|
||||
|
@@ -191,9 +191,9 @@ void GeomFill_CircularBlendFunc::Discret()
|
||||
myCurve1->D0(T, P1);
|
||||
myCurve2->D0(T, P2);
|
||||
/*
|
||||
sprintf(name,"PNT_%d",NbSections++);
|
||||
Sprintf(name,"PNT_%d",NbSections++);
|
||||
DrawTrSurf::Set(name, P1);
|
||||
sprintf(name,"PNT_%d",NbSections++);
|
||||
Sprintf(name,"PNT_%d",NbSections++);
|
||||
DrawTrSurf::Set(name, P2);*/
|
||||
myPath->D0(T, Center);
|
||||
ns1.SetXYZ(Center.XYZ() - P1.XYZ());
|
||||
@@ -296,7 +296,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::D0(const Standard_Real Param,
|
||||
#ifdef DRAW
|
||||
// Handle(Geom_BSplineCurve) BS =
|
||||
// new Geom_BSplineCurve(Poles,Weights,Knots,Mults,Degree);
|
||||
// sprintf(name,"SECT_%d",NbSections++);
|
||||
// Sprintf(name,"SECT_%d",NbSections++);
|
||||
// DrawTrSurf::Set(name,BS);
|
||||
#endif
|
||||
return Standard_True;
|
||||
|
@@ -427,7 +427,7 @@ void GeomFill_CorrectedFrenet::Init()
|
||||
}
|
||||
char tname[100];
|
||||
Standard_CString name = tname;
|
||||
sprintf(name, "Binorm_%d", ++CorrNumber);
|
||||
Sprintf(name, "Binorm_%d", ++CorrNumber);
|
||||
Handle(Geom_BSplineCurve) BS = new (Geom_BSplineCurve)(TabP, TI, M, 1);
|
||||
// DrawTrSurf::Set(&name[0], BS);
|
||||
DrawTrSurf::Set(name, BS);
|
||||
|
@@ -61,7 +61,7 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
|
||||
if (Affich)
|
||||
{
|
||||
char name[256];
|
||||
sprintf(name, "UnifSect_%d", ++NumSec);
|
||||
Sprintf(name, "UnifSect_%d", ++NumSec);
|
||||
DrawTrSurf::Set(name, myCurve);
|
||||
}
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user