// commercial license or contractual agreement.
#include <LDOM_CharReference.hxx>
+
+#include <Standard_CString.hxx>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
*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
myABuffer = new char[aLength + 1];
myABufferLen = aLength;
}
- sprintf(myABuffer,
+ Sprintf(myABuffer,
"%c%s%c%c%d%c",
chSpace,
aName,
myABufferLen = aLength;
}
- sprintf(myABuffer,
+ Sprintf(myABuffer,
"%c%s%c%c%s%c",
chSpace,
aName,
outvalue = UnitsAPI::CurrentFromLS(val, "LENGTH");
}
char res[1000];
- sprintf(res, "%g", outvalue);
+ Sprintf(res, "%g", outvalue);
txt = TCollection_ExtendedString(res);
if (VAL->IsCaptured())
// 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)
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);
}
}
{
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
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(),
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
}
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)++;
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;
}
}
{
char mess[300];
- sprintf(mess,
+ Sprintf(mess,
"%d\t%d \t%s\t%s",
root->TypeNumber(),
root->FormNumber(),
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
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);
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++;
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);
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())
}
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);
}
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)
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;
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;
}
{
char text[20];
AddChar(thesep);
- sprintf(text, "%d", val);
+ Sprintf(text, "%d", val);
AddString(text);
}
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)
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)
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],
else
S << ligne;
S << "\n";
- sprintf(ligne,
+ Sprintf(ligne,
"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
v[0],
v[13],
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 ! :
if (!isGood)
return isGood;
// Terminal Section (pas trop compliquee, ma foi)
- sprintf(ligne,
+ Sprintf(ligne,
"S%7dG%7dD%7dP%7d T0000001",
nbs,
nbg,
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");
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;
}
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;
{
// 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");
}
}
{
// 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");
}
}
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")))
{
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");
}
}
{
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");
}
}
{
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;
}
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)
{
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;
}
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:
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);
}
}
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);
}
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);
}
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);
}
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);
}
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);
}
}
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");
}
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");
}
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);
}
*/
}
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);
{
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);
}
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;
}
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);
}
// if (level == 0) Add(ent," NO LEVEL");
// else {
char signature[30];
- sprintf(signature, "%7d", level);
+ Sprintf(signature, "%7d", level);
Add(ent, signature);
// }
}
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);
}
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;
// 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;
}
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];
}
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);
}
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
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;
}
{
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);
}
// 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)
laval.AssignCat("LIST:/");
for (i = 1; i <= nblev; i++)
{
- sprintf(carlev, "%d/", levelist->LevelNumber(i));
+ Sprintf(carlev, "%d/", levelist->LevelNumber(i));
laval.AssignCat(carlev);
}
}
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;
}
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);
}
}
// 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;
}
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)
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);
// 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");
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
{
PdtName->AssignCat((char*)(i > 1 ? "." : " "));
char buf[100];
- sprintf(buf, "%d", myLevel.Value(i));
+ Sprintf(buf, "%d", myLevel.Value(i));
PdtName->AssignCat(buf);
}
if (!sd.IsNull())
thedscnam.Bind(sd->TypeName(), sd);
char fonom[10];
- sprintf(fonom, "%d", CN);
+ Sprintf(fonom, "%d", CN);
thedscnam.Bind(fonom, adescr);
}
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);
{
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;
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;
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;
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;
}
// 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)
{
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;
}
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;
}
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;
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
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;
}
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;
}
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;
}
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;
}
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
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
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
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;
}
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;
}
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
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
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());
}
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
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;
}
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;
}
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
}
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)
{
// 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;
}
}
}
// ... Build the Check ...
- sprintf(failmess,
+ Sprintf(failmess,
"Unresolved Reference, Ent.n0 %d (Id.#%d) Param.n0 %d (Id.#%d)",
nument,
ident,
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();
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;
{
char lval[12];
AddParam();
- sprintf(lval, "%d", val);
+ Sprintf(lval, "%d", val);
AddString(lval, (Standard_Integer)strlen(lval));
}
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));
}
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;
}
{
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())
{
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;
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);
}
}
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);
}
Add(ent, "9");
break;
default:
- sprintf(val, "%d", n);
+ Sprintf(val, "%d", n);
Add(ent, val);
break;
}
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;
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;
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());
else if (thelevel > 0)
{
char lab[30];
- sprintf(lab, "(Level %d)", thelevel);
+ Sprintf(lab, "(Level %d)", thelevel);
labl.AssignCat(lab);
}
labl.AssignCat(ExploreLabel());
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);
}
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;
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;
}
}
// ... 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;
{
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');
}
{
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');
}
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);
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));
namingpart = P->RootName();
SetOwn(Standard_False);
SendItem(P);
- sprintf(laligne, " %s", namingpart->ToCString());
+ Sprintf(laligne, " %s", namingpart->ToCString());
WriteLine(laligne, ' ');
WriteLine("", '\n');
}
{
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);
}
//// 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);
}
}
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);
}
}
default:
break;
}
- sprintf(intval, "%d", val);
+ Sprintf(intval, "%d", val);
return intval;
}
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;
}
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)))
//! 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:
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);
}
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);
}
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];
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);
}
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);
}
}
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,
//! 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,
//! 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,
//! 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);
//! 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,
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);
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);
}
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);
else
{
char nomsh[50];
- sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs);
+ Sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs);
XSControl::Vars(pilot)->SetShape(nomsh, sh);
}
}
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;
}
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)
mess[0] = '\0';
if (binder.IsNull())
{
- sprintf(mess, "(no data recorded)");
+ Sprintf(mess, "(no data recorded)");
return 0;
}
Interface_CheckStatus cst = binder->Check()->Status();
{
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;
}
}
{
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;
}
}
{
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;
}
}
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());
}
}
{
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(),
{
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;
}
}
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");
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";
}
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";
}
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;
}
//
++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,
//
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;
}
}
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)
{
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;
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);
}
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);
}
//
di << i << " images found\n";
- sprintf(buf, "%s_im", a[1]);
+ Sprintf(buf, "%s_im", a[1]);
DBRep::Set(buf, aC);
di << buf << "\n";
//
}
//
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)
//
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";
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;
}
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;
}
}
//
anInt.Indices(n1, n2);
- sprintf(buf, "(%d, %d) ", n1, n2);
+ Sprintf(buf, "(%d, %d) ", n1, n2);
di << buf;
}
}
}
char cDirName[2];
- sprintf(cDirName, "%c", theArgv[i][1]);
+ Sprintf(cDirName, "%c", theArgv[i][1]);
Standard_Real aPeriod = 0;
if (theArgc > i + 1)
}
char cDirName[2];
- sprintf(cDirName, "%c", theArgv[i][1]);
+ Sprintf(cDirName, "%c", theArgv[i][1]);
Standard_Integer aTimes = 0;
if (theArgc > i + 1)
}
char cDirName[2];
- sprintf(cDirName, "%c", theArgv[iDir][1]);
+ Sprintf(cDirName, "%c", theArgv[iDir][1]);
if (theArgc == (i + 1))
{
}
char cDirName[2];
- sprintf(cDirName, "%c", theArgv[i][1]);
+ Sprintf(cDirName, "%c", theArgv[i][1]);
Standard_Integer aTimes = 0;
if (theArgc > i + 1)
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);
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";
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;
}
// 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
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;
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);
}
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);
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();
}
}
//! 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
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
//! @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
}
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,
// 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)
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
{
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
}
{
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
}
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);
}
}
#ifdef DRAW
if (AffichLoop)
{
- sprintf(name, "NW_%d_%d", NbLoops, NbWires++);
+ Sprintf(name, "NW_%d_%d", NbLoops, NbWires++);
DBRep::Set(name, NW);
}
#endif
if (AffichEdge)
{
char name[100];
- sprintf(name, "PROFIL_%d", ++NbPROFILS);
+ Sprintf(name, "PROFIL_%d", ++NbPROFILS);
DBRep::Set(name, Pr);
}
#endif
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
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
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
{
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
for (; it.More(); it.Next())
{
char name[100];
- sprintf(name, "PARALI_%d", ++k);
+ Sprintf(name, "PARALI_%d", ++k);
DBRep::Set(name, it.Value());
}
}
if (AffichEdge)
{
char name[100];
- sprintf(name, "PARALI_%d", ++NbVEVOS);
+ Sprintf(name, "PARALI_%d", ++NbVEVOS);
DBRep::Set(name, Base);
}
#endif
if (AffichEdge)
{
char name[100];
- sprintf(name, "PRISM_%d", NbVEVOS);
+ Sprintf(name, "PRISM_%d", NbVEVOS);
DBRep::Set(name, PS.Shape());
}
#endif
if (AffichEdge)
{
char name[100];
- sprintf(name, "workspine");
+ Sprintf(name, "workspine");
DBRep::Set(name, WorkSpine);
}
#endif
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
if (AffichGeom)
{
char name[100];
- sprintf(name, "EVOL_%d", ++NbFACES);
+ Sprintf(name, "EVOL_%d", ++NbFACES);
DBRep::Set(name, Pipe.Shape());
}
#endif
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
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);
}
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)));
}
}
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++;
}
{
NBSECT++;
char name[256];
- sprintf(name, "WIRE_%d", NBSECT);
+ Sprintf(name, "WIRE_%d", NBSECT);
DBRep::Set(name, TopoDS::Wire(S.Value(i)));
}
#endif
if (Affich)
{
char* name = new char[100];
- sprintf(name, "Ref_Surf");
+ Sprintf(name, "Ref_Surf");
DrawTrSurf::Set(name, mySurface);
}
#endif
if (AffichGeom)
{
char name[256];
- sprintf(name, "BISSEC_%d", NbBISSEC++);
+ Sprintf(name, "BISSEC_%d", NbBISSEC++);
DrawTrSurf::Set(name, Bisec.Value());
}
#endif
if (AffichGeom && !OE.IsNull())
{
char name[256];
- sprintf(name, "OFFSET_%d", ++NbOFFSET);
+ Sprintf(name, "OFFSET_%d", ++NbOFFSET);
DBRep::Set(name, OE);
}
#endif
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;
}
if (AffichEdge)
{
char name[256];
- sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES);
+ Sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES);
DBRep::Set(name, NewEdge);
}
if (Affich2d)
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);
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)));
}
}
{ // 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);
{ // 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);
{ // 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);
#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
#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));
}
{
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));
}
}
{
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));
}
}
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));
}
}
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
#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
}
{
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);
}
#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
//*/
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
}
#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);
}
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());
}
}
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());
}
}
// 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
#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
}
#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
}
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);
#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
#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
#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
#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
#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
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
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
#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
}
{
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
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());
#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;
}
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);
if (Affich)
{
char name[256];
- sprintf(name, "UnifSect_%d", ++NumSec);
+ Sprintf(name, "UnifSect_%d", ++NumSec);
DrawTrSurf::Set(name, myCurve);
}
#endif
{
#ifdef DRAW
char name[256];
- sprintf(name, "NS_Surf_%d", NbSurf);
+ Sprintf(name, "NS_Surf_%d", NbSurf);
DrawTrSurf::Set(name, BS);
std::cout << std::endl
<< "RESULTAT de ComputeSurface : NS_Surf_" << NbSurf << std::endl
Handle(Geom_BSplineCurve) BS = new Geom_BSplineCurve(Poles, Weights, Knots, Mults, Degree);
#ifdef DRAW
char name[256];
- sprintf(name, "SECT_%d", NbSections);
+ Sprintf(name, "SECT_%d", NbSections);
DrawTrSurf::Set(name, BS);
#endif
}
Handle(Geom_BSplineCurve) BS = new Geom_BSplineCurve(Poles, Weights, Knots, Mults, Degree);
#ifdef DRAW
char name[256];
- sprintf(name, "sect_%d", i);
+ Sprintf(name, "sect_%d", i);
DrawTrSurf::Set(name, BS);
#endif
}
if (Affich)
{
char name[256];
- sprintf(name, "SECTION_%d", ++NbSECTIONS);
+ Sprintf(name, "SECTION_%d", ++NbSECTIONS);
DrawTrSurf::Set(name, myFirstSect->Transformed(cumulTR));
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "SECTION_%d", ++NbSECTIONS);
+ Sprintf(name, "SECTION_%d", ++NbSECTIONS);
DrawTrSurf::Set(name, BS);
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "UnifSect_%d", ++NumSec);
+ Sprintf(name, "UnifSect_%d", ++NumSec);
DrawTrSurf::Set(name, myCurve);
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "proj_%d", ++NbProj);
+ Sprintf(name, "proj_%d", ++NbProj);
DrawTrSurf::Set(name, Curve2d);
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "planinit_%d", NbPlan + 1);
+ Sprintf(name, "planinit_%d", NbPlan + 1);
DrawTrSurf::Set(name, mySurfInit);
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "surfinit_%d", ++NbPlan);
+ Sprintf(name, "surfinit_%d", ++NbPlan);
DrawTrSurf::Set(name, mySurfInit);
}
#endif
{
Handle(Draw_Marker3D) mark = new (Draw_Marker3D)(P1, Draw_X, Draw_vert);
char name[256];
- sprintf(name, "mark_%d", ++NbMark);
+ Sprintf(name, "mark_%d", ++NbMark);
Draw::Set(name, mark);
}
#endif
LinCont->D0(U, P);
Handle(Draw_Marker3D) mark = new (Draw_Marker3D)(P, Draw_X, Draw_orange);
char name[256];
- sprintf(name, "mark_%d", ++NbMark);
+ Sprintf(name, "mark_%d", ++NbMark);
Draw::Set(name, mark);
if (!LinCont->ProjectedCurve().IsNull())
P2d = LinCont->ProjectedCurve()->Value(U);
else
P2d = ProjectPoint(P);
}
- sprintf(name, "mark2d_%d", ++NbMark);
+ Sprintf(name, "mark2d_%d", ++NbMark);
Handle(Draw_Marker2D) mark2d = new (Draw_Marker2D)(P2d, Draw_X, Draw_orange);
Draw::Set(name, mark2d);
}
LinCont->D0(U, P);
Handle(Draw_Marker3D) mark = new Draw_Marker3D(P, Draw_X, Draw_or);
char name[256];
- sprintf(name, "mark_%d", ++NbMark);
+ Sprintf(name, "mark_%d", ++NbMark);
Draw::Set(name, mark);
}
#endif
static Standard_Integer Compteur=0;
char tamp[100];
Compteur++;
- sprintf(tamp,"Poly%d",Compteur);
+ Sprintf(tamp,"Poly%d",Compteur);
std::cout<<" @@@@@@@@@@@ F i c h i e r : "<<tamp<<" @@@@@@@@@@"<<std::endl;
FILE *fp;
fp=fopen(tamp,"w");
const gp_Pnt aPP(theALine->Value(aPrm));
std::cout << "vertex v" << ii << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl;
- sprintf(name, "p%d_%d", ii, ind);
+ Sprintf(name, "p%d_%d", ii, ind);
Draw::Set(name, aPP);
}
std::cout << " --- DUMP ALine (end) -----" << std::endl;
if (Inter2dAffichInt2d)
{
char name[256];
- sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
+ Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
DBRep::Set(name, E1);
- sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
+ Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
DBRep::Set(name, E2);
}
#endif
if (Inter2dAffichInt2d)
{
char name[256];
- sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
+ Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
DBRep::Set(name, E1);
- sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
+ Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++);
DBRep::Set(name, E2);
}
#endif
if (Affich)
{
char name[256];
- sprintf(name, "CF_%d", NbF++);
+ Sprintf(name, "CF_%d", NbF++);
DBRep::Set(name, F);
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "VP_%d", NVP++);
+ Sprintf(name, "VP_%d", NVP++);
DBRep::Set(name, it1LE.Value());
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "VM_%d", NVM++);
+ Sprintf(name, "VM_%d", NVM++);
DBRep::Set(name, it1LE.Value());
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "VN_%d", NVN++);
+ Sprintf(name, "VN_%d", NVN++);
DBRep::Set(name, it1LE.Value());
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AF_%d", NbAF++);
+ Sprintf(name, "AF_%d", NbAF++);
DBRep::Set(name, OFE);
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, COE);
COES.Add(COE);
}
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AF_%d", NbAF++);
+ Sprintf(name, "AF_%d", NbAF++);
DBRep::Set(name, OF);
}
#endif
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, COE);
COES.Add(COE);
}
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, OE);
COES.Add(OE);
}
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, COE);
COES.Add(COE);
}
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, COE);
COES.Add(COE);
}
#ifdef DRAW
if (AffichInt2d)
{
- sprintf(name, "AE_%d", NbAE++);
+ Sprintf(name, "AE_%d", NbAE++);
DBRep::Set(name, OE);
COES.Add(OE);
}
{
NbOFFSET++;
- sprintf(name, "VOnSph_%d", NbOFFSET);
+ Sprintf(name, "VOnSph_%d", NbOFFSET);
#ifdef DRAW
DBRep::Set(name, Vertex);
#endif
Standard_Integer NbEdges = 1;
for (it.Initialize(LEdge); it.More(); it.Next())
{
- sprintf(name, "EOnSph_%d_%d", NbOFFSET, NbEdges++);
+ Sprintf(name, "EOnSph_%d_%d", NbOFFSET, NbEdges++);
#ifdef DRAW
const TopoDS_Shape& CurE = it.Value();
DBRep::Set(name, CurE);
// char name[100];
if (Affich)
{
- sprintf(name, "SPHERE_%d", NbOFFSET);
+ Sprintf(name, "SPHERE_%d", NbOFFSET);
DrawTrSurf::Set(name, S);
}
Standard_Integer CO = 1;
#ifdef DRAW
if (Affich)
{
- sprintf(name, "CURVE_%d_%d", NbOFFSET, CO);
+ Sprintf(name, "CURVE_%d_%d", NbOFFSET, CO);
DrawTrSurf::Set(name, C);
CO++;
}
if (AffichInter)
{
char name[256];
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F1);
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F2);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "EI_%d", NbNewEdges++);
+ Sprintf(name, "EI_%d", NbNewEdges++);
DBRep::Set(name, E.Oriented(O1));
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F1);
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F2);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "EI_%d", NbNewEdges++);
+ Sprintf(name, "EI_%d", NbNewEdges++);
DBRep::Set(name, anEdge.Oriented(O1));
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F1);
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F2);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "EI_%d", NbNewEdges++);
+ Sprintf(name, "EI_%d", NbNewEdges++);
DBRep::Set(name, CurE.Oriented(O1));
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F1);
- sprintf(name, "FF_%d", NbFaces++);
+ Sprintf(name, "FF_%d", NbFaces++);
DBRep::Set(name, F2);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "EI_%d", NbNewEdges++);
+ Sprintf(name, "EI_%d", NbNewEdges++);
DBRep::Set(name, E.Oriented(O1));
}
#endif
if (AffichExtent)
{
char name[256];
- sprintf(name, "F_%d", NbExtE);
+ Sprintf(name, "F_%d", NbExtE);
DBRep::Set(name, EF);
- sprintf(name, "OE_%d", NbExtE);
+ Sprintf(name, "OE_%d", NbExtE);
DBRep::Set(name, E);
- sprintf(name, "ExtE_%d", NbExtE++);
+ Sprintf(name, "ExtE_%d", NbExtE++);
DBRep::Set(name, NE);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "FTE_%d", NbFTE++);
+ Sprintf(name, "FTE_%d", NbFTE++);
DBRep::Set(name, F);
}
#endif
if (AffichInter)
{
char name[256];
- sprintf(name, "FOB_%d", NbFOB++);
+ Sprintf(name, "FOB_%d", NbFOB++);
DBRep::Set(name, NF);
}
#endif
{
char name[32];
ns++;
- sprintf(name, "FR%d", ns);
+ Sprintf(name, "FR%d", ns);
BRepTools::Write(FR.Current(), name);
}
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "%s_%d", "SURF", nbc);
+ Sprintf(name, "%s_%d", "SURF", nbc);
DBRep::Set(name, AnOffset.Face());
nbc++;
}
#ifdef DRAW
if (Affich)
{
- sprintf(name, "%s_%d", "SURF", nbc);
+ Sprintf(name, "%s_%d", "SURF", nbc);
DBRep::Set(name, OFT.Face());
nbc++;
}
CutEdge(E, VonE, NewE);
for (TopTools_ListIteratorOfListOfShape it(NewE); it.More(); it.Next())
{
- sprintf(name, "%s_%d", "CUTE", ++NbEdges);
+ Sprintf(name, "%s_%d", "CUTE", ++NbEdges);
DBRep::Set(name, it.Value());
}
}
for (; it.More(); it.Next())
{
const TopoDS_Shape& OS = it.Key();
- sprintf(name, "SK_%d", ++IK);
+ Sprintf(name, "SK_%d", ++IK);
#ifdef DRAW
DBRep::Set(name, OS);
#endif
Standard_Integer IV = 1;
for (; itl.More(); itl.Next())
{
- sprintf(name, "SV_%d_%d", IK, IV++);
+ Sprintf(name, "SV_%d_%d", IK, IV++);
#ifdef DRAW
DBRep::Set(name, NS);
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "c1_%d", ++nbb);
+ Sprintf(name, "c1_%d", ++nbb);
DrawTrSurf::Set(name, afirstcurve);
- sprintf(name, "c2_%d", nbb);
+ Sprintf(name, "c2_%d", nbb);
DrawTrSurf::Set(name, asecondcurve);
- sprintf(name, "p%d", nbb);
+ Sprintf(name, "p%d", nbb);
DrawTrSurf::Set(name, apoint);
- sprintf(name, "b%d", nbb);
+ Sprintf(name, "b%d", nbb);
DrawTrSurf::Set(name, thebisector);
}
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "c1_%d", ++nbb);
+ Sprintf(name, "c1_%d", ++nbb);
DrawTrSurf::Set(name, afirstcurve);
- sprintf(name, "c2_%d", nbb);
+ Sprintf(name, "c2_%d", nbb);
DrawTrSurf::Set(name, asecondpoint->Pnt2d());
- sprintf(name, "p%d", nbb);
+ Sprintf(name, "p%d", nbb);
DrawTrSurf::Set(name, apoint);
- sprintf(name, "b%d", nbb);
+ Sprintf(name, "b%d", nbb);
DrawTrSurf::Set(name, thebisector);
}
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "c1_%d", ++nbb);
+ Sprintf(name, "c1_%d", ++nbb);
DrawTrSurf::Set(name, afirstpoint->Pnt2d());
- sprintf(name, "c2_%d", nbb);
+ Sprintf(name, "c2_%d", nbb);
DrawTrSurf::Set(name, asecondcurve);
- sprintf(name, "p%d", nbb);
+ Sprintf(name, "p%d", nbb);
DrawTrSurf::Set(name, apoint);
- sprintf(name, "b%d", nbb);
+ Sprintf(name, "b%d", nbb);
DrawTrSurf::Set(name, thebisector);
}
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "c1_%d", ++nbb);
+ Sprintf(name, "c1_%d", ++nbb);
DrawTrSurf::Set(name, afirstpoint->Pnt2d());
- sprintf(name, "c2_%d", nbb);
+ Sprintf(name, "c2_%d", nbb);
DrawTrSurf::Set(name, asecondpoint->Pnt2d());
- sprintf(name, "p%d", nbb);
+ Sprintf(name, "p%d", nbb);
DrawTrSurf::Set(name, apoint);
- sprintf(name, "b%d", nbb);
+ Sprintf(name, "b%d", nbb);
DrawTrSurf::Set(name, thebisector);
}
#endif
#ifdef DRAW
if (Affich)
{
- sprintf(name, "i1_%d", ++nbint);
+ Sprintf(name, "i1_%d", ++nbint);
DrawTrSurf::Set(name, Bis1);
- sprintf(name, "i2_%d", nbint);
+ Sprintf(name, "i2_%d", nbint);
DrawTrSurf::Set(name, Bis2);
if (IsDone() && !IsEmpty())
{
for (Standard_Integer k = 1; k <= NbPoints(); k++)
{
gp_Pnt2d P = Point(k).Value();
- sprintf(name, "ip_%d_%d", nbint, k);
+ Sprintf(name, "ip_%d_%d", nbint, k);
DrawTrSurf::Set(name, P);
}
}
curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(anitem));
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "c%d", anitem);
+ Sprintf(name, "c%d", anitem);
DrawTrSurf::Set(name, curve);
delete[] name;
#endif
curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(item));
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "c%d", item);
+ Sprintf(name, "c%d", item);
DrawTrSurf::Set(name, curve);
delete[] name;
#endif
curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(anitem));
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "c%d", anitem);
+ Sprintf(name, "c%d", anitem);
DrawTrSurf::Set(name, curve);
delete[] name;
#endif
curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(item));
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "c%d", item);
+ Sprintf(name, "c%d", item);
DrawTrSurf::Set(name, curve);
delete[] name;
#endif
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "b%d", theNumberOfBisectors);
+ Sprintf(name, "b%d", theNumberOfBisectors);
DrawTrSurf::Set(name, bisector.Value());
Dump(abisector->BisectorNumber(), 1);
delete[] name;
Handle(Bisector_BisecAna)::DownCast(bisector.Value()->BasisCurve())->Geom2dCurve();
#ifdef DRAW
char* name = new char[100];
- sprintf(name, "BISSEC_%d", abisector->BisectorNumber());
+ Sprintf(name, "BISSEC_%d", abisector->BisectorNumber());
DrawTrSurf::Set(name, BasisCurve);
delete[] name;
#endif
else if (nbP3d != 0) LineTool::Value(Line, i, tabP);
for (j = 1; j <= nbP3d; j++) {
- sprintf(solname, "%s%i%s_%i", "p", j, "3d", i);
+ Sprintf(solname, "%s%i%s_%i", "p", j, "3d", i);
char* Temp = solname;
DrawTrSurf::Set(Temp, tabP(j));
// DrawTrSurf::Set(solname, tabP(j));
if (i == firstP || i == lastP) {
- sprintf(mytext, "%s%i", " ", i);
+ Sprintf(mytext, "%s%i", " ", i);
T3D = new Draw_Text3D(tabP(j), mytext, Draw_vert);
dout << T3D;
}
}
for (j = 1; j <= nbP2d; j++) {
- sprintf(solname, "%s%i%s_%i", "p", j, "2d", i);
+ Sprintf(solname, "%s%i%s_%i", "p", j, "2d", i);
char* Temp = solname;
DrawTrSurf::Set(Temp, tabP2d(j));
// DrawTrSurf::Set(solname, tabP2d(j));
if (i == firstP || i == lastP) {
- sprintf(mytext, "%s%i", " ", i);
+ Sprintf(mytext, "%s%i", " ", i);
T2D = new Draw_Text2D(tabP2d(j), mytext, Draw_vert);
dout << T2D;
}
if (Ok) {
for (j = 1; j <= nbP3d; j++) {
- sprintf(solname, "%s%i%s_%i", "t", j, "3d", i);
+ Sprintf(solname, "%s%i%s_%i", "t", j, "3d", i);
L3d = new Geom_Line(tabP(j), gp_Dir(TabV(j)));
L3dt = new Geom_TrimmedCurve(L3d, 0.0, 0.3);
char* Temp = solname;
// DrawTrSurf::Set(solname, L3dt);
}
for (j = 1; j <= nbP2d; j++) {
- sprintf(solname, "%s%i%s_%i", "t", j, "2d", i);
+ Sprintf(solname, "%s%i%s_%i", "t", j, "2d", i);
L2d = new Geom2d_Line(tabP2d(j), gp_Dir2d(TabV2d(j)));
L2dt = new Geom2d_TrimmedCurve(L2d, 0.0, 0.3);
char* Temp = solname;
if (C.Dimension(i) == 3) {
C.Curve(i, tabPoles);
BSp = new Geom_BSplineCurve(tabPoles, Knots, Mults, deg);
- sprintf(solname, "%s%i%s_%i", "c", i, "3d", nbappel);
+ Sprintf(solname, "%s%i%s_%i", "c", i, "3d", nbappel);
char* Temp = solname;
DrawTrSurf::Set(Temp, BSp);
// DrawTrSurf::Set(solname, BSp);
else {
C.Curve(i, tabPoles2d);
BSp2d = new Geom2d_BSplineCurve(tabPoles2d, Knots, Mults, deg);
- sprintf(solname, "%s%i%s_%i", "c", i, "2d", nbappel);
+ Sprintf(solname, "%s%i%s_%i", "c", i, "2d", nbappel);
char* Temp = solname;
DrawTrSurf::Set(Temp, BSp2d);
// DrawTrSurf::Set(solname, BSp2d);
if (C.Dimension(i) == 3) {
C.Curve(i, tabPoles);
BSp = new Geom_BezierCurve(tabPoles);
- sprintf(solname, "%s%i%s_%i", "c", i, "3d", nbappel);
+ Sprintf(solname, "%s%i%s_%i", "c", i, "3d", nbappel);
#ifdef DRAW
char* Temp = solname;
DrawTrSurf::Set(Temp, BSp);
else {
C.Curve(i, tabPoles2d);
BSp2d = new Geom2d_BezierCurve(tabPoles2d);
- sprintf(solname, "%s%i%s_%i", "c", i, "2d", nbappel);
+ Sprintf(solname, "%s%i%s_%i", "c", i, "2d", nbappel);
#ifdef DRAW
char* Temp = solname;
DrawTrSurf::Set(Temp, BSp2d);
theMultiCurve.Curve(1, aPoles);
#ifdef DRAW
Handle(Geom_Curve) theBezier = new Geom_BezierCurve(aPoles);
- sprintf(name, "bc3d_%d_%d", indc, nbbc);
+ Sprintf(name, "bc3d_%d_%d", indc, nbbc);
DrawTrSurf::Set(name, theBezier);
#endif
gp_Vec FirstVec, SecondVec;
{
LineTool::Value(theLine, ipoint, tabP);
gp_Pnt aPnt = tabP(1);
- sprintf(name, "p%d", ipoint);
+ Sprintf(name, "p%d", ipoint);
DrawTrSurf::Set(name, aPnt);
}
#endif
theMultiCurve.Curve(1, aPoles2d);
#ifdef DRAW
Handle(Geom2d_Curve) theBezier2d = new Geom2d_BezierCurve(aPoles2d);
- sprintf(name, "bc2d_%d_%d", indc, nbbc);
+ Sprintf(name, "bc2d_%d_%d", indc, nbbc);
DrawTrSurf::Set(name, theBezier2d);
#endif
const Standard_Real aSqNormToler = Epsilon(1.0)*Epsilon(1.0);
{
LineTool::Value(theLine, ipoint, tabP2d);
gp_Pnt2d aPnt2d = tabP2d(1);
- sprintf(name, "p%d", ipoint);
+ Sprintf(name, "p%d", ipoint);
DrawTrSurf::Set(name, aPnt2d);
}
#endif
Handle(Adaptor2d_Curve2d) IC2d = new Geom2dAdaptor_Curve(GAC);
#ifdef OCCT_DEBUG
// char name [100];
-// sprintf(name,"%s_%d","build",compteur++);
+// Sprintf(name,"%s_%d","build",compteur++);
// DrawTrSurf::Set(name,myBSpline);
#endif
return IC2d;
(unsigned int)(255.0f * theColor.g()),
(unsigned int)(255.0f * theColor.b())};
char aBytes[8];
- sprintf(aBytes, "%02X%02X%02X", aColor[0], aColor[1], aColor[2]);
+ Sprintf(aBytes, "%02X%02X%02X", aColor[0], aColor[1], aColor[2]);
theKey += aBytes;
}
}
for (Standard_Integer anIt = 0; anIt <= aCurAspect.TickmarksNumber(); ++anIt)
{
- sprintf(aTextValue, "%g", theGridAxes.Ticks[theIndex].GetData()[theIndex] + anIt * aStep);
+ Sprintf(aTextValue, "%g", theGridAxes.Ticks[theIndex].GetData()[theIndex] + anIt * aStep);
OpenGl_Vec3 aPos(theGridAxes.Ticks[theIndex]
+ anAxis.Direction * (Standard_ShortReal)(anIt * aStep)
+ aDir * (Standard_ShortReal)(theDpix * anOffset));
(unsigned int)(255.0f * theColor.g()),
(unsigned int)(255.0f * theColor.b())};
char aBytes[8];
- sprintf(aBytes, "%02X%02X%02X", aColor[0], aColor[1], aColor[2]);
+ Sprintf(aBytes, "%02X%02X%02X", aColor[0], aColor[1], aColor[2]);
aKey += aBytes;
}
: (0.5 * (GetIntervalValue(theIndex - 1) + GetIntervalValue(theIndex)));
char aBuf[1024];
- sprintf(aBuf, myFormat.ToCString(), aVal);
+ Sprintf(aBuf, myFormat.ToCString(), aVal);
return TCollection_ExtendedString(aBuf);
}
Graphic3d_Vec3d myColorHlsMin; //!< HLS color corresponding to minimum value
Graphic3d_Vec3d myColorHlsMax; //!< HLS color corresponding to maximum value
TCollection_ExtendedString myTitle; //!< optional title string
- TCollection_AsciiString myFormat; //!< sprintf() format for generating label from value
+ TCollection_AsciiString myFormat; //!< Sprintf() format for generating label from value
Standard_Integer myNbIntervals; //!< number of intervals
Aspect_TypeOfColorScaleData myColorType; //!< color type
Aspect_TypeOfColorScaleData myLabelType; //!< label type
{
Standard_Real angle = UnitsAPI::CurrentFromLS(Abs(OppParam), "PLANE ANGLE");
char res[80];
- sprintf(res, "%g", angle);
+ Sprintf(res, "%g", angle);
txt = TCollection_ExtendedString(res);
}
//-----------------------------------------------------------------
const gp_Pnt& OffsetPoint)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
const DsgPrs_ArrowSide ArrowPrs)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const gp_Pnt& OffsetPoint)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const DsgPrs_ArrowSide ArrowPrs)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const gp_Pnt& OffsetPoint)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
TCollection_AsciiString valas(valcar);
TCollection_ExtendedString aText(valas);
Standard_Boolean& HasCircle)
{
char valcar[80];
- sprintf(valcar, "%5.2f", theval);
+ Sprintf(valcar, "%5.2f", theval);
Standard_Real FirstParCirc, LastParCirc;
Standard_Boolean SpecCase;
//! Returns arrow tail size.
Standard_Real ArrowTailSize() const { return myArrowTailSize; }
- //! Sets "sprintf"-syntax format for formatting dimension value labels.
+ //! Sets "Sprintf"-syntax format for formatting dimension value labels.
void SetValueStringFormat(const TCollection_AsciiString& theFormat)
{
myValueStringFormat = theFormat;
}
else
{
- // format value string using "sprintf"
+ // format value string using "Sprintf"
TCollection_AsciiString aFormatStr = myDrawer->DimensionAspect()->ValueStringFormat();
char aFmtBuffer[256];
- sprintf(aFmtBuffer, aFormatStr.ToCString(), ValueToDisplayUnits());
+ Sprintf(aFmtBuffer, aFormatStr.ToCString(), ValueToDisplayUnits());
aValueStr = TCollection_ExtendedString(aFmtBuffer);
}