From 5ae60b51d328009fe10ccb173ad3413a662f7d76 Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry Date: Sun, 17 Aug 2025 12:45:30 +0100 Subject: [PATCH] Coding - Moving to Sprintf call (#675) - Updates function calls from `sprintf` to `Sprintf` across the entire codebase - Updates comments and documentation references to reflect the new function name - Adds format attribute annotations to the `Sprintf` function declaration for better compiler validation --- .../TKCDF/LDOM/LDOM_CharReference.cxx | 5 +- .../TKCDF/LDOM/LDOM_XmlWriter.cxx | 4 +- .../TPrsStd/TPrsStd_ConstraintTools.cxx | 2 +- .../BRepToIGES/BRepToIGES_BREntity.cxx | 2 +- .../IGESAppli_ToolElementResults.cxx | 6 +- .../IGESControl/IGESControl_Reader.cxx | 18 +++--- .../TKDEIGES/IGESData/IGESData.cxx | 2 +- .../IGESData/IGESData_GlobalSection.cxx | 32 +++++----- .../TKDEIGES/IGESData/IGESData_IGESEntity.cxx | 2 +- .../TKDEIGES/IGESData/IGESData_IGESModel.cxx | 4 +- .../TKDEIGES/IGESData/IGESData_IGESWriter.cxx | 16 ++--- .../IGESData/IGESData_ParamReader.cxx | 20 +++---- .../IGESDefs/IGESDefs_ToolAttributeDef.cxx | 16 ++--- .../IGESDimen/IGESDimen_ToolGeneralNote.cxx | 6 +- .../IGESDimen_ToolNewGeneralNote.cxx | 10 ++-- .../IGESDraw/IGESDraw_ToolViewsVisible.cxx | 2 +- .../IGESDraw_ToolViewsVisibleWithAttr.cxx | 2 +- .../IGESGeom/IGESGeom_ToolBoundary.cxx | 2 +- .../IGESSelect/IGESSelect_Activator.cxx | 4 +- .../IGESSelect/IGESSelect_AddFileComment.cxx | 2 +- .../IGESSelect/IGESSelect_ChangeLevelList.cxx | 8 +-- .../IGESSelect_ChangeLevelNumber.cxx | 4 +- .../IGESSelect_CounterOfLevelNumber.cxx | 4 +- .../TKDEIGES/IGESSelect/IGESSelect_Dumper.cxx | 6 +- .../IGESSelect/IGESSelect_IGESTypeForm.cxx | 8 +-- .../IGESSelect_SelectLevelNumber.cxx | 2 +- .../IGESSelect/IGESSelect_SelectName.cxx | 2 +- .../IGESSelect_SetGlobalParameter.cxx | 6 +- .../IGESSelect/IGESSelect_SignLevelNumber.cxx | 6 +- .../IGESSelect/IGESSelect_SignStatus.cxx | 2 +- .../IGESSolid/IGESSolid_ToolBooleanTree.cxx | 2 +- .../IGESToBRep/IGESToBRep_TopoCurve.cxx | 4 +- .../APIHeaderSection_MakeHeader.cxx | 2 +- ...StepBasic_RWUncertaintyMeasureWithUnit.cxx | 2 +- .../STEPCAFControl/STEPCAFControl_Reader.cxx | 2 +- .../STEPConstruct_ContextTool.cxx | 2 +- .../TKDESTEP/StepData/StepData_Protocol.cxx | 4 +- .../TKDESTEP/StepData/StepData_StepDumper.cxx | 2 +- .../TKDESTEP/StepData/StepData_StepModel.cxx | 6 +- .../StepData/StepData_StepReaderData.cxx | 58 +++++++++---------- .../TKDESTEP/StepData/StepData_StepWriter.cxx | 12 ++-- .../StepToTopoDS/StepToTopoDS_Builder.cxx | 2 +- .../IFSelect/IFSelect_CheckCounter.cxx | 10 ++-- .../IFSelect/IFSelect_DispPerSignature.cxx | 2 +- .../IFSelect/IFSelect_GraphCounter.cxx | 2 +- .../IFSelect/IFSelect_ModelCopier.cxx | 4 +- .../IFSelect/IFSelect_SelectAnyList.cxx | 8 +-- .../IFSelect/IFSelect_SelectExplore.cxx | 2 +- .../IFSelect/IFSelect_SelectRange.cxx | 8 +-- .../TKXSBase/IFSelect/IFSelect_SelectSent.cxx | 4 +- .../IFSelect/IFSelect_SelectSuite.cxx | 2 +- .../IFSelect/IFSelect_SessionFile.cxx | 34 +++++------ .../TKXSBase/IFSelect/IFSelect_ShareOut.cxx | 6 +- .../TKXSBase/IFSelect/IFSelect_Signature.cxx | 2 +- .../IFSelect/IFSelect_TransformStandard.cxx | 6 +- .../Interface/Interface_CheckTool.cxx | 2 +- .../Interface/Interface_FloatWriter.hxx | 4 +- .../TKXSBase/Interface/Interface_MSG.cxx | 14 ++--- .../TKXSBase/Interface/Interface_MSG.hxx | 12 ++-- .../XSControl/XSControl_FuncShape.cxx | 34 +++++------ .../XSControl_SignTransferStatus.cxx | 2 +- .../XSControl/XSControl_TransferReader.cxx | 16 ++--- .../TKDraw/DrawTrSurf/DrawTrSurf_Debug.cxx | 4 +- src/Draw/TKQADraw/QABugs/QABugs_19.cxx | 10 ++-- .../BOPTest/BOPTest_CheckCommands.cxx | 18 +++--- .../BOPTest/BOPTest_DebugCommands.cxx | 24 ++++---- .../BOPTest/BOPTest_MkConnectedCommands.cxx | 4 +- .../BOPTest/BOPTest_PeriodicityCommands.cxx | 4 +- .../GeometryTest_TestProjCommands.cxx | 2 +- .../TKXSDRAWIGES/XSDRAWIGES/XSDRAWIGES.cxx | 2 +- .../NCollection/NCollection_UBTreeFiller.hxx | 2 +- .../TKernel/OSD/OSD_Environment.cxx | 2 +- .../TKernel/OSD/OSD_Error.cxx | 2 +- .../TKernel/OSD/OSD_Host.cxx | 2 +- .../TKernel/OSD/OSD_signal.cxx | 4 +- .../Standard/Standard_CLocaleSentry.hxx | 2 +- .../TKernel/Standard/Standard_CString.hxx | 24 ++++++-- .../TKernel/Standard/Standard_GUID.cxx | 2 +- .../TKBool/BRepAlgo/BRepAlgo.cxx | 2 +- .../TKBool/BRepAlgo/BRepAlgo_Loop.cxx | 10 ++-- .../TKBool/BRepFill/BRepFill_Evolved.cxx | 36 ++++++------ .../TKBool/BRepFill/BRepFill_MultiLine.cxx | 6 +- .../TKBool/BRepFill/BRepFill_NSections.cxx | 4 +- .../TKBool/BRepFill/BRepFill_OffsetWire.cxx | 10 ++-- .../TKBool/BRepFill/BRepFill_PipeShell.cxx | 2 +- .../TKBool/BRepFill/BRepFill_Sweep.cxx | 34 +++++------ .../TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx | 10 ++-- .../BRepFill/BRepFill_TrimSurfaceTool.cxx | 14 ++--- .../TopOpeBRepTool_CurveTool.cxx | 18 +++--- .../BRepFeat/BRepFeat_MakeLinearForm.cxx | 8 +-- .../BRepBlend/BRepBlend_CSWalking.cxx | 2 +- .../BRepBlend/BRepBlend_RstRstLineBuilder.cxx | 2 +- .../BRepBlend_SurfRstLineBuilder.cxx | 2 +- .../TKFillet/BRepBlend/BRepBlend_Walking.cxx | 34 +++++------ .../TKFillet/ChFi3d/ChFi3d_Builder_6.cxx | 4 +- .../TKFillet/ChFi3d/ChFi3d_Debug.cxx | 2 +- .../ApproxInt/ApproxInt_MultiLine.gxx | 4 +- .../GeomFill/GeomFill_CircularBlendFunc.cxx | 6 +- .../GeomFill/GeomFill_CorrectedFrenet.cxx | 2 +- .../GeomFill/GeomFill_EvolvedSection.cxx | 2 +- .../GeomFill/GeomFill_NSections.cxx | 2 +- .../TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx | 4 +- .../GeomFill_SweepSectionGenerator.cxx | 4 +- .../GeomFill/GeomFill_UniformSection.cxx | 2 +- .../GeomPlate/GeomPlate_BuildPlateSurface.cxx | 14 ++--- .../IntCurveSurface_Polygon.gxx | 2 +- .../IntPatch/IntPatch_ALineToWLine.cxx | 2 +- .../BRepOffset/BRepOffset_Inter2d.cxx | 8 +-- .../BRepOffset/BRepOffset_MakeLoops.cxx | 2 +- .../BRepOffset/BRepOffset_MakeOffset.cxx | 22 +++---- .../TKOffset/BRepOffset/BRepOffset_Offset.cxx | 8 +-- .../TKOffset/BRepOffset/BRepOffset_Tool.cxx | 34 +++++------ .../BRepOffsetAPI_MakeOffset.cxx | 2 +- .../TKOffset/BiTgte/BiTgte_Blend.cxx | 6 +- .../BRepBuilderAPI/BRepBuilderAPI_Collect.cxx | 4 +- .../TKTopAlgo/Bisector/Bisector_Bisec.cxx | 32 +++++----- .../TKTopAlgo/Bisector/Bisector_Inter.cxx | 6 +- .../TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx | 12 ++-- .../Approx/Approx_BSplComputeLine.gxx | 16 ++--- .../TKGeomBase/Approx/Approx_ComputeLine.gxx | 12 ++-- .../ProjLib_ComputeApproxOnPolarSurface.cxx | 2 +- .../TKOpenGl/OpenGl/OpenGl_AspectsSprite.cxx | 2 +- .../OpenGl/OpenGl_GraduatedTrihedron.cxx | 2 +- .../Graphic3d/Graphic3d_MarkerImage.cxx | 2 +- .../TKV3d/AIS/AIS_ColorScale.cxx | 2 +- .../TKV3d/AIS/AIS_ColorScale.hxx | 2 +- .../TKV3d/DsgPrs/DsgPrs_AnglePresentation.cxx | 12 ++-- .../DsgPrs_FilletRadiusPresentation.cxx | 2 +- .../TKV3d/Prs3d/Prs3d_DimensionAspect.hxx | 2 +- .../TKV3d/PrsDim/PrsDim_Dimension.cxx | 4 +- 130 files changed, 522 insertions(+), 503 deletions(-) diff --git a/src/ApplicationFramework/TKCDF/LDOM/LDOM_CharReference.cxx b/src/ApplicationFramework/TKCDF/LDOM/LDOM_CharReference.cxx index 145626872f..f4baf767a3 100644 --- a/src/ApplicationFramework/TKCDF/LDOM/LDOM_CharReference.cxx +++ b/src/ApplicationFramework/TKCDF/LDOM/LDOM_CharReference.cxx @@ -14,6 +14,9 @@ // commercial license or contractual agreement. #include + +#include + #include #include #include @@ -194,7 +197,7 @@ char* LDOM_CharReference::Encode(const char* theSrc, *ptrDest++ = *ptrSrc; else if (aCode == CHAR_REF) { // character reference - sprintf(ptrDest, "&#x%02x;", iSrc); + Sprintf(ptrDest, "&#x%02x;", iSrc); ptrDest += 6; } else // predefined entity reference diff --git a/src/ApplicationFramework/TKCDF/LDOM/LDOM_XmlWriter.cxx b/src/ApplicationFramework/TKCDF/LDOM/LDOM_XmlWriter.cxx index ffb058902e..8205392e76 100644 --- a/src/ApplicationFramework/TKCDF/LDOM/LDOM_XmlWriter.cxx +++ b/src/ApplicationFramework/TKCDF/LDOM/LDOM_XmlWriter.cxx @@ -425,7 +425,7 @@ void LDOM_XmlWriter::WriteAttribute(Standard_OStream& theOStream, const LDOM_Nod myABuffer = new char[aLength + 1]; myABufferLen = aLength; } - sprintf(myABuffer, + Sprintf(myABuffer, "%c%s%c%c%d%c", chSpace, aName, @@ -461,7 +461,7 @@ void LDOM_XmlWriter::WriteAttribute(Standard_OStream& theOStream, const LDOM_Nod myABufferLen = aLength; } - sprintf(myABuffer, + Sprintf(myABuffer, "%c%s%c%c%s%c", chSpace, aName, diff --git a/src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_ConstraintTools.cxx b/src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_ConstraintTools.cxx index c4bf0358d5..aff0661348 100644 --- a/src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_ConstraintTools.cxx +++ b/src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_ConstraintTools.cxx @@ -182,7 +182,7 @@ void TPrsStd_ConstraintTools::ComputeTextAndValue(const Handle(TDataXtd_Constrai outvalue = UnitsAPI::CurrentFromLS(val, "LENGTH"); } char res[1000]; - sprintf(res, "%g", outvalue); + Sprintf(res, "%g", outvalue); txt = TCollection_ExtendedString(res); if (VAL->IsCaptured()) diff --git a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx index a96cecb6da..ef15d38159 100644 --- a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx +++ b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx @@ -143,7 +143,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BREntity::TransferShape( // the following function forces indirect surfaces to // direct surfaces (mandatory in IGES) // theShape = ShapeCustom::DirectFaces(start); - // sprintf(Name,"res_%d",Nb++); + // Sprintf(Name,"res_%d",Nb++); // DBRep::Set(Name,theShape); if (start.ShapeType() == TopAbs_FACE) diff --git a/src/DataExchange/TKDEIGES/IGESAppli/IGESAppli_ToolElementResults.cxx b/src/DataExchange/TKDEIGES/IGESAppli/IGESAppli_ToolElementResults.cxx index ff7526e79a..4d99e047d3 100644 --- a/src/DataExchange/TKDEIGES/IGESAppli/IGESAppli_ToolElementResults.cxx +++ b/src/DataExchange/TKDEIGES/IGESAppli/IGESAppli_ToolElementResults.cxx @@ -427,18 +427,18 @@ void IGESAppli_ToolElementResults::OwnCheck(const Handle(IGESAppli_ElementResult ach->AddFail("One of the Data Layer Flags not in [0-4]"); if (dlf < 4 && ent->NbLayers(i) != 1) { - sprintf(mess, "Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]", i); + Sprintf(mess, "Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]", i); ach->AddFail(mess); } if (rrf == 1 || rrf == 2) if (nrl != 1 || ent->ResultDataLoc(i, 1) != 0) { - sprintf(mess, "Result Data Locs n0.%d incorrect for Result Report = 1 or 2", i); + Sprintf(mess, "Result Data Locs n0.%d incorrect for Result Report = 1 or 2", i); ach->AddFail(mess); } if (ent->NbResults(i) != (nv * nl * nrl)) { - sprintf(mess, "Nb. of results for Element n0.%d incorrect, should be %d", i, nv * nl * nrl); + Sprintf(mess, "Nb. of results for Element n0.%d incorrect, should be %d", i, nv * nl * nrl); ach->AddFail(mess); } } diff --git a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Reader.cxx b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Reader.cxx index 2e97b5ef11..4a2861e150 100644 --- a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Reader.cxx +++ b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Reader.cxx @@ -147,7 +147,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, { char mess[300]; const Handle(Transfer_Binder)& aBinder = iterTrans.Value(); - sprintf(mess, "\t%s", aBinder->ResultTypeName()); + Sprintf(mess, "\t%s", aBinder->ResultTypeName()); if (aMapCountResult.IsBound(mess)) aMapCountResult.ChangeFind(mess)++; else @@ -160,7 +160,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, const Handle(Transfer_Binder)& aBinder = iterTrans.Value(); DeclareAndCast(IGESData_IGESEntity, igesEnt, iterTrans.Starting()); - sprintf(mess, + Sprintf(mess, "%d\t%d\t%s\t%s", igesEnt->TypeNumber(), igesEnt->FormNumber(), @@ -188,7 +188,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, Standard_Integer nw = aCheck->NbWarnings(), nf = aCheck->NbFails(), i; for (i = 1; (failsonly == IFSelect_FailAndWarn) && (i <= nw); i++) { - sprintf(mess, "\t W\t%d\t%d\t%s", type, form, aCheck->CWarning(i)); + Sprintf(mess, "\t W\t%d\t%d\t%s", type, form, aCheck->CWarning(i)); if (aMapCount.IsBound(mess)) aMapCount.ChangeFind(mess)++; else @@ -206,7 +206,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, } for (i = 1; i <= nf; i++) { - sprintf(mess, "\t F\t%d\t%d\t%s", type, form, aCheck->CFail(i)); + Sprintf(mess, "\t F\t%d\t%d\t%s", type, form, aCheck->CFail(i)); // TF << mess << std::endl; if (aMapCount.IsBound(mess)) aMapCount.ChangeFind(mess)++; @@ -270,18 +270,18 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, Message_Msg msg3035("IGES_3035"); TF->Send(msg3035, Message_Info); char line[80]; - sprintf(line, "\t\t\t"); + Sprintf(line, "\t\t\t"); aSender << line; Standard_Integer nbInLine = 0; for (Standard_Integer i = 1; i <= length; i++) { // IDT_Out << (entityList->Value(i)) << " "; - sprintf(line, "\t %d", entityList->Value(i)); + Sprintf(line, "\t %d", entityList->Value(i)); aSender << line; if (++nbInLine == 6) { nbInLine = 0; - sprintf(line, "\n\t\t\t"); + Sprintf(line, "\n\t\t\t"); aSender << line; } } @@ -331,7 +331,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, { char mess[300]; - sprintf(mess, + Sprintf(mess, "%d\t%d \t%s\t%s", root->TypeNumber(), root->FormNumber(), @@ -350,7 +350,7 @@ void IGESControl_Reader::PrintTransferInfo(const IFSelect_PrintFail failsonly, for (; aMapCountIter.More(); aMapCountIter.Next()) { char mess[80]; - sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value()); + Sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value()); // clang-format off TF->SendInfo() << mess << std::endl; //dicoCountIter.Value() << dicoCountIter.Name() << std::endl; // clang-format on diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData.cxx index bb0cd8432a..22c5fafc18 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData.cxx @@ -190,7 +190,7 @@ void IGESData::Init() IGESData_GlobalSection GS; // #58 rln 28.12.98 changing default values for Global Section char procver[80]; - sprintf(procver, XSTEP_PROCESSOR_VERSION, "IGES"); + Sprintf(procver, XSTEP_PROCESSOR_VERSION, "IGES"); Handle(TCollection_HAsciiString) gsys = new TCollection_HAsciiString(procver); Interface_Static::Init("XSTEP", "write.iges.header.product", 't', procver); diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalSection.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalSection.cxx index 515dd99d29..61849ee43b 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalSection.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalSection.cxx @@ -53,7 +53,7 @@ static void MakeHollerith(const Handle(TCollection_HAsciiString)& astr, Standard_Integer ln = astr->Length(); if (ln == 0) return; - sprintf(text, "%dH%s", ln, astr->ToCString()); + Sprintf(text, "%dH%s", ln, astr->ToCString()); lt = ln + 2; if (ln >= 10) lt++; @@ -415,51 +415,51 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params() const MakeHollerith(theInterfaceVersion, text, lt); res->Append(text, lt, Interface_ParamText, 0); - sprintf(nombre, "%d", theIntegerBits); + Sprintf(nombre, "%d", theIntegerBits); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); - sprintf(nombre, "%d", theMaxPower10Single); + Sprintf(nombre, "%d", theMaxPower10Single); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); - sprintf(nombre, "%d", theMaxDigitsSingle); + Sprintf(nombre, "%d", theMaxDigitsSingle); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); - sprintf(nombre, "%d", theMaxPower10Double); + Sprintf(nombre, "%d", theMaxPower10Double); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); - sprintf(nombre, "%d", theMaxDigitsDouble); + Sprintf(nombre, "%d", theMaxDigitsDouble); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); MakeHollerith(theReceiveName, text, lt); res->Append(text, lt, Interface_ParamText, 0); Interface_FloatWriter::Convert(theScale, nombre, Standard_True, 0., 0., "%f", "%f"); - // sprintf(nombre,"%f",theScale); + // Sprintf(nombre,"%f",theScale); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0); - sprintf(nombre, "%d", theUnitFlag); + Sprintf(nombre, "%d", theUnitFlag); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); MakeHollerith(theUnitName, text, lt); res->Append(text, lt, Interface_ParamText, 0); - sprintf(nombre, "%d", theLineWeightGrad); + Sprintf(nombre, "%d", theLineWeightGrad); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); Interface_FloatWriter::Convert(theMaxLineWeight, nombre, Standard_True, 0., 0., "%f", "%f"); - // sprintf(nombre,"%f",theMaxLineWeight); + // Sprintf(nombre,"%f",theMaxLineWeight); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0); MakeHollerith(theDate, text, lt); res->Append(text, lt, Interface_ParamText, 0); Interface_FloatWriter::Convert(theResolution, nombre, Standard_True, 0., 0., "%g", "%g"); - // sprintf(nombre,"%f",theResolution); + // Sprintf(nombre,"%f",theResolution); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0); if (hasMaxCoord) Interface_FloatWriter::Convert(theMaxCoord, nombre, Standard_True, 0., 0., "%f", "%f"); - // sprintf(nombre,"%f",theMaxCoord); + // Sprintf(nombre,"%f",theMaxCoord); else nombre[0] = '\0'; res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamReal, 0); @@ -470,10 +470,10 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params() const MakeHollerith(theCompanyName, text, lt); res->Append(text, lt, Interface_ParamText, 0); - sprintf(nombre, "%d", theIGESVersion); + Sprintf(nombre, "%d", theIGESVersion); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); - sprintf(nombre, "%d", theDraftingStandard); + Sprintf(nombre, "%d", theDraftingStandard); res->Append(nombre, (Standard_Integer)strlen(nombre), Interface_ParamInteger, 0); if (!theLastChangeDate.IsNull()) @@ -757,14 +757,14 @@ Handle(TCollection_HAsciiString) IGESData_GlobalSection::NewDateString( } Standard_Integer date1 = (an) * 10000 + moi * 100 + jou; Standard_Integer date2 = (heur + 100) * 10000 + minut * 100 + second; - sprintf(madate, "%d%d", date1, date2); + Sprintf(madate, "%d%d", date1, date2); madate[(mode == 0 ? 6 : 8)] = '.'; if (!dizaine) madate[0] = '0'; } else if (mode == 1) { - sprintf(madate, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", anne, moi, jou, heur, minut, second); + Sprintf(madate, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", anne, moi, jou, heur, minut, second); } return new TCollection_HAsciiString(madate); } diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx index 2b7910e069..6526cc0d61 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx @@ -481,7 +481,7 @@ Handle(TCollection_HAsciiString) IGESData_IGESEntity::NameValue() const if (theSubScriptN < 0) return theShortLabel; char lenom[50]; - sprintf(lenom, "%s(%d)", theShortLabel->ToCString(), theSubScriptN); + Sprintf(lenom, "%s(%d)", theShortLabel->ToCString(), theSubScriptN); nom = new TCollection_HAsciiString(lenom); } else if (nbname > 0) diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx index be6ffd82ac..10857f4b81 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx @@ -639,9 +639,9 @@ Handle(TCollection_HAsciiString) IGESData_IGESModel::StringLabel( char text[20]; Standard_Integer num = Number(ent); if (num > 0) - sprintf(text, "D%d", 2 * num - 1); + Sprintf(text, "D%d", 2 * num - 1); else - sprintf(text, "D0..."); + Sprintf(text, "D0..."); label = new TCollection_HAsciiString(text); } return label; diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx index 486ae8f8bb..bd757b8805 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx @@ -352,7 +352,7 @@ void IGESData_IGESWriter::OwnParams(const Handle(IGESData_IGESEntity)& anent) throw Interface_InterfaceError("IGESWriter : OwnParams"); thepnum.SetValue(themodel->Number(anent), thepars->Length() + 1); thecurr.Clear(); - sprintf(text, "%d", anent->TypeNumber()); + Sprintf(text, "%d", anent->TypeNumber()); AddString(text); thestep = IGESData_ReadOwn; } @@ -464,7 +464,7 @@ void IGESData_IGESWriter::Send(const Standard_Integer val) { char text[20]; AddChar(thesep); - sprintf(text, "%d", val); + Sprintf(text, "%d", val); AddString(text); } @@ -609,7 +609,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const for (i = 1; i <= nbs; i++) { char finlin[20]; - sprintf(finlin, "S%7.7d", i); + Sprintf(finlin, "S%7.7d", i); line = thestar->Value(i); if (fnes) @@ -634,7 +634,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const for (i = 1; i <= nbg && isGood; i++) { char finlin[20]; - sprintf(finlin, "G%7.7d", i); + Sprintf(finlin, "G%7.7d", i); line = thehead->Value(i); if (fnes) @@ -688,7 +688,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const num); v[1] = thepnum.Value(i); // start in P v[15] = thepnum.Value(i + 1) - thepnum.Value(i); // nb of lines in P - sprintf(ligne, + Sprintf(ligne, "%8d%8d%8d%8d%8d%8d%8d%8d%2.2d%2.2d%2.2d%2.2dD%7.7d", v[0], v[1], @@ -708,7 +708,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const else S << ligne; S << "\n"; - sprintf(ligne, + Sprintf(ligne, "%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d", v[0], v[13], @@ -745,7 +745,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const for (Standard_Integer j = thepnum.Value(i); j < thepnum.Value(i + 1); j++) { char finlin[32]; - sprintf(finlin, " %7.7dP%7.7d", 2 * i - 1, j); + Sprintf(finlin, " %7.7dP%7.7d", 2 * i - 1, j); line = thepars->Value(j); // line->LeftJustify(MaxcarsP,' '); replaced by more economical ! : @@ -774,7 +774,7 @@ Standard_Boolean IGESData_IGESWriter::Print(Standard_OStream& S) const if (!isGood) return isGood; // Terminal Section (pas trop compliquee, ma foi) - sprintf(ligne, + Sprintf(ligne, "S%7dG%7dD%7dP%7d T0000001", nbs, nbg, diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx index bd9558ae40..426e1b0f24 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx @@ -436,7 +436,7 @@ Standard_Boolean IGESData_ParamReader::ReadBoolean(const IGESData_ParamCursor& P if (flag != 0 && flag != 1) { char ssem[100]; - sprintf(ssem, " : Value is not 0/1, but %s", FP.CValue()); + Sprintf(ssem, " : Value is not 0/1, but %s", FP.CValue()); if (exact) { AddFail(mess, ssem, " : Value is not 0/1, but %s"); @@ -858,7 +858,7 @@ Standard_Boolean IGESData_ParamReader::ReadInts(const IGESData_ParamCursor& else { char ssem[100]; - sprintf(ssem, " : not an Integer, rank %d", i); + Sprintf(ssem, " : not an Integer, rank %d", i); AddFail(mess, ssem, " : not an Integer, rank %d"); return Standard_False; } @@ -1135,12 +1135,12 @@ Standard_Boolean IGESData_ParamReader::ReadEnts(const Handle(IGESData_IGESReader char mest[80]; if (nbneg > 0) { - sprintf(mest, "Skipped Negative Pointer(s), count %d", nbneg); + Sprintf(mest, "Skipped Negative Pointer(s), count %d", nbneg); AddWarning(mest, "Skipped Negative Pointer(s), count %d"); } if (nbnul > 0) { - sprintf(mest, "Skipped Null Type Entity(ies), count %d", nbnul); + Sprintf(mest, "Skipped Null Type Entity(ies), count %d", nbnul); AddWarning(mest, "Skipped Null Type Entity(ies), count %d"); } return Standard_True; @@ -1247,7 +1247,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S { // char ssem[100]; pbrealint = num; - // sprintf(ssem,": Integer converted to Real, 1st rank=%d",num); + // Sprintf(ssem,": Integer converted to Real, 1st rank=%d",num); // AddWarning (mess,ssem,"At least one Integer converted to Real, 1st rank=%d"); } } @@ -1279,7 +1279,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S { // char ssem[100]; pbrealform = num; - // sprintf(ssem,"Real with no decimal point (added), 1st rank=%d",num); + // Sprintf(ssem,"Real with no decimal point (added), 1st rank=%d",num); // AddWarning (mess,ssem,"Real with no decimal point (added), 1st rank=%d"); } } @@ -1297,7 +1297,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, S else { // char ssem[100]; - // sprintf(ssem,": not given as Real, rank %d",num); + // Sprintf(ssem,": not given as Real, rank %d",num); // AddFail (mess,ssem,": not given as Real, rank %d"); /* TCollection_AsciiString mess = amsg.Value(); if ((mess.Search("ter %d"))||(mess.Search("tre %d"))) @@ -1325,7 +1325,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, { char ssem[100]; pbrealint = num; - sprintf(ssem, ": Integer converted to Real, 1st rank=%d", num); + Sprintf(ssem, ": Integer converted to Real, 1st rank=%d", num); AddWarning(mess, ssem, "At least one Integer converted to Real, 1st rank=%d"); } } @@ -1357,7 +1357,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, { char ssem[100]; pbrealform = num; - sprintf(ssem, "Real with no decimal point (added), 1st rank=%d", num); + Sprintf(ssem, "Real with no decimal point (added), 1st rank=%d", num); AddWarning(mess, ssem, "Real with no decimal point (added), 1st rank=%d"); } } @@ -1376,7 +1376,7 @@ Standard_Boolean IGESData_ParamReader::ReadingReal(const Standard_Integer num, { val = 0.0; // DEFAULT char ssem[100]; - sprintf(ssem, ": not given as Real, rank %d", num); + Sprintf(ssem, ": not given as Real, rank %d", num); AddFail(mess, ssem, ": not given as Real, rank %d"); return Standard_False; } diff --git a/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_ToolAttributeDef.cxx b/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_ToolAttributeDef.cxx index 2d0f7521af..b47a9da13c 100644 --- a/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_ToolAttributeDef.cxx +++ b/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_ToolAttributeDef.cxx @@ -444,13 +444,13 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en char mess[80]; if (ent->AttributeType(i) < 0 || ent->AttributeType(i) > 9999) { - sprintf(mess, "Attribute Type n0.%d not in <0 - 9999>", ent->AttributeType(i)); + Sprintf(mess, "Attribute Type n0.%d not in <0 - 9999>", ent->AttributeType(i)); ach->AddFail(mess); } Standard_Integer aty = ent->AttributeValueDataType(i); if (aty < 0 || aty > 6) { - sprintf(mess, "Attribute Value Data Type n0.%d not in <0 - 6>", aty); + Sprintf(mess, "Attribute Value Data Type n0.%d not in <0 - 6>", aty); ach->AddFail(mess); } if (ent->AttributeValueCount(i) <= 0) @@ -460,7 +460,7 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en { if (aty == 0 || aty == 5) continue; - sprintf(mess, "Form Number > 0 and Attribute Value List n0.%d undefined", aty); + Sprintf(mess, "Form Number > 0 and Attribute Value List n0.%d undefined", aty); ach->AddFail(mess); continue; } @@ -472,31 +472,31 @@ void IGESDefs_ToolAttributeDef::OwnCheck(const Handle(IGESDefs_AttributeDef)& en case 1: if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger))) { - sprintf(mess, "Attribute List n0.%d (Integers) badly defined", aty); + Sprintf(mess, "Attribute List n0.%d (Integers) badly defined", aty); } break; case 2: if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal))) { - sprintf(mess, "Attribute List n0.%d (Reals) badly defined", aty); + Sprintf(mess, "Attribute List n0.%d (Reals) badly defined", aty); } break; case 3: if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString))) { - sprintf(mess, "Attribute List n0.%d (Strings) badly defined", aty); + Sprintf(mess, "Attribute List n0.%d (Strings) badly defined", aty); } break; case 4: if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity))) { - sprintf(mess, "Attribute List n0.%d (IGES Pointers) badly defined", aty); + Sprintf(mess, "Attribute List n0.%d (IGES Pointers) badly defined", aty); } break; case 6: if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger))) { - sprintf(mess, "Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty); + Sprintf(mess, "Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty); } break; default: diff --git a/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolGeneralNote.cxx b/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolGeneralNote.cxx index 2e534fcada..1e85c27e9b 100644 --- a/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolGeneralNote.cxx +++ b/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolGeneralNote.cxx @@ -335,21 +335,21 @@ void IGESDimen_ToolGeneralNote::OwnCheck(const Handle(IGESDimen_GeneralNote)& en if (ent->NbCharacters(i) != ent->Text(i)->Length()) { char mess[80]; - sprintf(mess, "%d : Number of Characters != Length of Text String", i); + Sprintf(mess, "%d : Number of Characters != Length of Text String", i); ach->AddFail(mess); } Standard_Integer mflag = ent->MirrorFlag(i); if ((mflag < 0) || (mflag > 2)) { char mess[80]; - sprintf(mess, "%d : Mirror flag != 0, 1, 2", i); + Sprintf(mess, "%d : Mirror flag != 0, 1, 2", i); ach->AddFail(mess); } Standard_Integer rflag = ent->RotateFlag(i); if ((rflag < 0) || (rflag > 1)) { char mess[80]; - sprintf(mess, "%d : Rotate flag != 0, 1", i); + Sprintf(mess, "%d : Rotate flag != 0, 1", i); ach->AddFail(mess); } } diff --git a/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx b/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx index 2eabd17e98..3b0f66b902 100644 --- a/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx +++ b/src/DataExchange/TKDEIGES/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx @@ -471,7 +471,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot if (ent->NbCharacters(i) != ent->Text(i)->Length()) { char mess[80]; - sprintf(mess, "%d : Number of Characters != Length of Text String", i); + Sprintf(mess, "%d : Number of Characters != Length of Text String", i); ach->AddFail(mess); } @@ -479,7 +479,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot if ((charcode >= 0) && (charcode != 1) && ((charcode < 1001) || (charcode > 1003))) { char mess[80]; - sprintf(mess, "%d : Character Set Code != 1, 1001, 1002, 1003", i); + Sprintf(mess, "%d : Character Set Code != 1, 1001, 1002, 1003", i); ach->AddFail(mess); } @@ -487,7 +487,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot if ((chardisp < 0) || (chardisp > 1)) { char mess[80]; - sprintf(mess, "%d : Character Display != 0, 1", i); + Sprintf(mess, "%d : Character Display != 0, 1", i); ach->AddFail(mess); } @@ -495,7 +495,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot if ((mflag < 0) || (mflag > 2)) { char mess[80]; - sprintf(mess, "%d : Mirror flag != 0, 1, 2", i); + Sprintf(mess, "%d : Mirror flag != 0, 1, 2", i); ach->AddFail(mess); } @@ -503,7 +503,7 @@ void IGESDimen_ToolNewGeneralNote::OwnCheck(const Handle(IGESDimen_NewGeneralNot if ((rflag < 0) || (rflag > 1)) { char mess[80]; - sprintf(mess, "%d : Rotate flag != 0, 1", i); + Sprintf(mess, "%d : Rotate flag != 0, 1", i); ach->AddFail(mess); } } diff --git a/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisible.cxx b/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisible.cxx index d69608bfc7..4cb692140a 100644 --- a/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisible.cxx +++ b/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisible.cxx @@ -226,7 +226,7 @@ void IGESDraw_ToolViewsVisible::OwnCheck(const Handle(IGESDraw_ViewsVisible)& en if (!res) return; char mess[80]; - sprintf(mess, "Mismatch for %d Entities displayed", res); + Sprintf(mess, "Mismatch for %d Entities displayed", res); ach->AddFail(mess, "Mismatch for %d Entities displayed"); } diff --git a/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx b/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx index eedfae343a..b14147bc61 100644 --- a/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx +++ b/src/DataExchange/TKDEIGES/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx @@ -360,7 +360,7 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck(const Handle(IGESDraw_ViewsVisi if (!res) return; char mess[80]; - sprintf(mess, "Mismatch for %d Entities displayed", res); + Sprintf(mess, "Mismatch for %d Entities displayed", res); ach->AddFail(mess, "Mismatch for %d Entities displayed"); } diff --git a/src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ToolBoundary.cxx b/src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ToolBoundary.cxx index 2790842a60..1ddb25cf8e 100644 --- a/src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ToolBoundary.cxx +++ b/src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ToolBoundary.cxx @@ -407,7 +407,7 @@ void IGESGeom_ToolBoundary::OwnCheck(const Handle(IGESGeom_Boundary)& ent, if (ent->NbParameterCurves(i) != 0) { char mess[80]; - sprintf(mess,"Nb. Parameter Space Curve %d !=0 while Boundary Type=0",i); + Sprintf(mess,"Nb. Parameter Space Curve %d !=0 while Boundary Type=0",i); ach.SendFail(mess); } */ diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx index 344aba2d07..96d6e5585f 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx @@ -212,9 +212,9 @@ IFSelect_ReturnStatus IGESSelect_Activator::Do(const Standard_Integer } char signature[20]; if (argc == 2) - sprintf(signature, "%s", arg1); + Sprintf(signature, "%s", arg1); else - sprintf(signature, "%s %s", arg1, arg2); + Sprintf(signature, "%s %s", arg1, arg2); Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature(new IGESSelect_IGESTypeForm, signature, (argc > 2)); return pilot->RecordItem(sel); diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx index 1b4777ee7c..9d2f8ced67 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx @@ -72,6 +72,6 @@ TCollection_AsciiString IGESSelect_AddFileComment::Label() const { Standard_Integer nb = NbLines(); char labl[80]; - sprintf(labl, "Add %d Comment Lines (Start Section)", nb); + Sprintf(labl, "Add %d Comment Lines (Start Section)", nb); return TCollection_AsciiString(labl); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelList.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelList.cxx index 1a52382e48..6d527bf5e8 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelList.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelList.cxx @@ -119,14 +119,14 @@ TCollection_AsciiString IGESSelect_ChangeLevelList::Label() const newl = thenew->Value(); if (yaold) - sprintf(labl, "Changes Level Lists containing %d", oldl); + Sprintf(labl, "Changes Level Lists containing %d", oldl); else - sprintf(labl, "Changes all Level Lists in D.E. %d", oldl); + Sprintf(labl, "Changes all Level Lists in D.E. %d", oldl); TCollection_AsciiString label(labl); if (yanew) - sprintf(labl, " to Number %d", newl); + Sprintf(labl, " to Number %d", newl); else - sprintf(labl, " to Number = first value in List"); + Sprintf(labl, " to Number = first value in List"); label.AssignCat(labl); return label; } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelNumber.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelNumber.cxx index e1a74623b0..d3ac8471e3 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelNumber.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ChangeLevelNumber.cxx @@ -103,8 +103,8 @@ TCollection_AsciiString IGESSelect_ChangeLevelNumber::Label() const newl = thenew->Value(); if (yaold) - sprintf(labl, "Changes Level Number %d to %d", oldl, newl); + Sprintf(labl, "Changes Level Number %d to %d", oldl, newl); else - sprintf(labl, "Changes all Level Numbers positive and zero to %d", newl); + Sprintf(labl, "Changes all Level Numbers positive and zero to %d", newl); return TCollection_AsciiString(labl); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_CounterOfLevelNumber.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_CounterOfLevelNumber.cxx index 12c714379f..e21e7fbb1f 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_CounterOfLevelNumber.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_CounterOfLevelNumber.cxx @@ -92,7 +92,7 @@ void IGESSelect_CounterOfLevelNumber::AddLevel(const Handle(Standard_Transient)& // if (level == 0) Add(ent," NO LEVEL"); // else { char signature[30]; - sprintf(signature, "%7d", level); + Sprintf(signature, "%7d", level); Add(ent, signature); // } } @@ -140,7 +140,7 @@ Handle(TCollection_HAsciiString) IGESSelect_CounterOfLevelNumber::Sign( if (level < 0) return new TCollection_HAsciiString("LEVEL LIST"); char signature[30]; - sprintf(signature, "%7d", level); + Sprintf(signature, "%7d", level); return new TCollection_HAsciiString(signature); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Dumper.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Dumper.cxx index 36b607138b..14fb8d0c74 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Dumper.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Dumper.cxx @@ -127,7 +127,7 @@ Standard_Boolean IGESSelect_Dumper::WriteOwn(IFSelect_SessionFile& f Standard_Integer np = sp->GlobalNumber(); Handle(TCollection_HAsciiString) val = sp->Value(); char intext[10]; - sprintf(intext, "%d", np); + Sprintf(intext, "%d", np); file.SendText(intext); file.SendItem(val); return Standard_True; @@ -198,9 +198,9 @@ Standard_Boolean IGESSelect_Dumper::ReadOwn(IFSelect_SessionFile& file, // Attention, 2 termes possibles pour la signature char sig[40]; if (file.NbParams() == 2) - sprintf(sig, "%s", file.ParamValue(2).ToCString()); + Sprintf(sig, "%s", file.ParamValue(2).ToCString()); else - sprintf(sig, "%s %s", file.ParamValue(2).ToCString(), file.ParamValue(3).ToCString()); + Sprintf(sig, "%s %s", file.ParamValue(2).ToCString(), file.ParamValue(3).ToCString()); // item = new IGESSelect_SelectIGESTypeForm(sig,exact); // return Standard_True; } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_IGESTypeForm.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_IGESTypeForm.cxx index dd420a6a1a..ec5a30f9d4 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_IGESTypeForm.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_IGESTypeForm.cxx @@ -58,16 +58,16 @@ Standard_CString IGESSelect_IGESTypeForm::Value( if (unk) { if (theform) - sprintf(typeval, "%d %d (?)", typenum, formnum); + Sprintf(typeval, "%d %d (?)", typenum, formnum); else - sprintf(typeval, "%d (?)", typenum); + Sprintf(typeval, "%d (?)", typenum); } else { if (theform) - sprintf(typeval, "%d %d", typenum, formnum); + Sprintf(typeval, "%d %d", typenum, formnum); else - sprintf(typeval, "%d", typenum); + Sprintf(typeval, "%d", typenum); } return &typeval[0]; } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectLevelNumber.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectLevelNumber.cxx index 9abfad817c..433d09b4ff 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectLevelNumber.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectLevelNumber.cxx @@ -72,6 +72,6 @@ TCollection_AsciiString IGESSelect_SelectLevelNumber::ExtractLabel() const if (numlev == 0) return TCollection_AsciiString("IGES Entity attached to no Level"); - sprintf(labl, "IGES Entity, Level Number admitting %d", numlev); + Sprintf(labl, "IGES Entity, Level Number admitting %d", numlev); return TCollection_AsciiString(labl); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectName.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectName.cxx index 41cc47fbb9..9a8c5b5989 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectName.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SelectName.cxx @@ -75,7 +75,7 @@ TCollection_AsciiString IGESSelect_SelectName::ExtractLabel() const char labl[50]; if (!thename.IsNull()) { - sprintf(labl, "IGES Entity, Name : %s", thename->ToCString()); + Sprintf(labl, "IGES Entity, Name : %s", thename->ToCString()); return TCollection_AsciiString(labl); } else diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SetGlobalParameter.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SetGlobalParameter.cxx index 0c37dd3a67..73496598da 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SetGlobalParameter.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SetGlobalParameter.cxx @@ -60,7 +60,7 @@ void IGESSelect_SetGlobalParameter::Performing(IFSelect_ContextModif& if (thenum <= 0 || thenum > oldset->NbParams()) { char mess[80]; - sprintf(mess, "Set IGES Global Parameter : Number %d incorrect", thenum); + Sprintf(mess, "Set IGES Global Parameter : Number %d incorrect", thenum); ctx.CCheck()->AddFail(mess); return; } @@ -77,8 +77,8 @@ TCollection_AsciiString IGESSelect_SetGlobalParameter::Label() const { char mess[80]; if (theval.IsNull()) - sprintf(mess, "Set IGES Global Parameter (undefined)"); + Sprintf(mess, "Set IGES Global Parameter (undefined)"); else - sprintf(mess, "Set IGES Global Parameter Number %d to %s", thenum, theval->ToCString()); + Sprintf(mess, "Set IGES Global Parameter Number %d to %s", thenum, theval->ToCString()); return TCollection_AsciiString(mess); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignLevelNumber.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignLevelNumber.cxx index a6da2baf9f..ecc528ba54 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignLevelNumber.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignLevelNumber.cxx @@ -59,9 +59,9 @@ Standard_CString IGESSelect_SignLevelNumber::Value( // if (level < 0) return (thecountmode ? " NO LEVEL" : "/0/"); laval.Clear(); if (thecountmode) - sprintf(carlev, "%7d", level); + Sprintf(carlev, "%7d", level); else - sprintf(carlev, "/%d/", level); + Sprintf(carlev, "/%d/", level); laval.AssignCat(carlev); } else if (thecountmode) @@ -73,7 +73,7 @@ Standard_CString IGESSelect_SignLevelNumber::Value( laval.AssignCat("LIST:/"); for (i = 1; i <= nblev; i++) { - sprintf(carlev, "%d/", levelist->LevelNumber(i)); + Sprintf(carlev, "%d/", levelist->LevelNumber(i)); laval.AssignCat(carlev); } } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignStatus.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignStatus.cxx index 1215c8c8de..4a1d8c791f 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignStatus.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_SignStatus.cxx @@ -40,7 +40,7 @@ Standard_CString IGESSelect_SignStatus::Value( j = igesent->SubordinateStatus(); k = igesent->UseFlag(); l = igesent->HierarchyStatus(); - sprintf(theval, "%d,%d,%d,%d", i, j, k, l); + Sprintf(theval, "%d,%d,%d,%d", i, j, k, l); return theval; } diff --git a/src/DataExchange/TKDEIGES/IGESSolid/IGESSolid_ToolBooleanTree.cxx b/src/DataExchange/TKDEIGES/IGESSolid/IGESSolid_ToolBooleanTree.cxx index 1fa3763156..2e32e4aaa1 100644 --- a/src/DataExchange/TKDEIGES/IGESSolid/IGESSolid_ToolBooleanTree.cxx +++ b/src/DataExchange/TKDEIGES/IGESSolid/IGESSolid_ToolBooleanTree.cxx @@ -181,7 +181,7 @@ void IGESSolid_ToolBooleanTree::OwnCheck(const Handle(IGESSolid_BooleanTree)& en if (ent->Operation(i) < 1 || ent->Operation(i) > 3) { char mess[80]; - sprintf(mess, "Item no. %d Incorrect", i); + Sprintf(mess, "Item no. %d Incorrect", i); ach->AddFail(mess); } } diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoCurve.cxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoCurve.cxx index 3e14de0142..d6dc526765 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoCurve.cxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoCurve.cxx @@ -236,7 +236,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferCompositeCurveGeneral( // clang-format on Msg1045.Arg(i); SendWarning(start, Msg1045); - // sprintf (mess, "The entities of the CompositeCurve are the same: %d & %d", i-1, i); + // Sprintf (mess, "The entities of the CompositeCurve are the same: %d & %d", i-1, i); // AddWarning (start, mess); continue; } @@ -298,7 +298,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferCompositeCurveGeneral( Msg1050.Arg(i); SendWarning(start, Msg1050); - // sprintf(mess, "Curve %dd needs to be reversed : %d", ( is2d ? 2 : 3 ), i);//:13 + // Sprintf(mess, "Curve %dd needs to be reversed : %d", ( is2d ? 2 : 3 ), i);//:13 // AddWarning(start, mess); } if (distmin > precision) diff --git a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx index 9c5272f6f5..6bd55df3a7 100644 --- a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx +++ b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx @@ -109,7 +109,7 @@ void APIHeaderSection_MakeHeader::Init(const Standard_CString nameval) fn->SetOrganization(org); char procver[80]; - sprintf(procver, XSTEP_PROCESSOR_VERSION, "STEP"); + Sprintf(procver, XSTEP_PROCESSOR_VERSION, "STEP"); Handle(TCollection_HAsciiString) pv = new TCollection_HAsciiString(procver); // Handle(TCollection_HAsciiString) pv = // new TCollection_HAsciiString(XSTEP_VERSION); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx index a003a01871..41b5bbe1d2 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx @@ -134,7 +134,7 @@ void RWStepBasic_RWUncertaintyMeasureWithUnit::WriteStep( // Interface_FloatWriter::Convert // (Interface_MSG::Intervalled(ent->ValueComponent()*0.98,5,Standard_True), // lmv,Standard_True, 10.,0.1,"%E","%E"); - // sprintf (lm,"LENGTH_MEASURE(%s)",lmv); + // Sprintf (lm,"LENGTH_MEASURE(%s)",lmv); // SW.SendString(lm); // SW.AddString("LENGTH_MEASURE"); diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx index 3caba822f6..f8e6a39f74 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -696,7 +696,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer(STEPControl_Reader& for ( Standard_Integer k=0; mainfile[k]; k++ ) if ( mainfile[k] == '/' ) slash = k; strncpy ( fullname, mainfile, slash ); - sprintf ( &fullname[slash], "%s%s", ( mainfile[0] ? "/" : "" ), filename ); + Sprintf ( &fullname[slash], "%s%s", ( mainfile[0] ? "/" : "" ), filename ); */ // get and check PD associated with the current extern ref diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ContextTool.cxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ContextTool.cxx index c3ae230924..4e2fb2b494 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ContextTool.cxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ContextTool.cxx @@ -389,7 +389,7 @@ Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetProductName() con { PdtName->AssignCat((char*)(i > 1 ? "." : " ")); char buf[100]; - sprintf(buf, "%d", myLevel.Value(i)); + Sprintf(buf, "%d", myLevel.Value(i)); PdtName->AssignCat(buf); } diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx index c623a2a4b6..f54650bc74 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx @@ -111,7 +111,7 @@ void StepData_Protocol::AddDescr(const Handle(StepData_EDescr)& adescr, const St if (!sd.IsNull()) thedscnam.Bind(sd->TypeName(), sd); char fonom[10]; - sprintf(fonom, "%d", CN); + Sprintf(fonom, "%d", CN); thedscnam.Bind(fonom, adescr); } @@ -126,7 +126,7 @@ Handle(StepData_EDescr) StepData_Protocol::Descr(const Standard_Integer num) con if (thedscnam.IsEmpty()) return dsc; char fonom[10]; - sprintf(fonom, "%d", num); + Sprintf(fonom, "%d", num); Handle(Standard_Transient) aTDsc; if (thedscnam.Find(fonom, aTDsc)) dsc = Handle(StepData_EDescr)::DownCast(aTDsc); diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepDumper.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepDumper.cxx index a1d6a86210..53a7b0c1df 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepDumper.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepDumper.cxx @@ -210,7 +210,7 @@ Standard_Boolean StepData_StepDumper::Dump(Standard_OStream& S, { if (ids.Value(i) <= 0 || ids.Value(i) == i) continue; - sprintf(unid, "%d:#%d", i, ids.Value(i)); + Sprintf(unid, "%d:#%d", i, ids.Value(i)); nbc = (Standard_Integer)strlen(unid); nbr = ((80 - nbc) % 4) + 2; nbl += nbc; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepModel.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepModel.cxx index acba66a967..86fc2ac704 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepModel.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepModel.cxx @@ -206,11 +206,11 @@ Handle(TCollection_HAsciiString) StepData_StepModel::StringLabel( Standard_Integer nid = (!num ? 0 : theidnums->Value(num)); if (nid > 0) - sprintf(text, "#%d", nid); + Sprintf(text, "#%d", nid); else if (num > 0) - sprintf(text, "(#%d)", num); + Sprintf(text, "(#%d)", num); else - sprintf(text, "(#0..)"); + Sprintf(text, "(#0..)"); label = new TCollection_HAsciiString(text); return label; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx index ab7be2be1b..d41e97139d 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx @@ -376,7 +376,7 @@ StepData_StepReaderData::StepData_StepReaderData(const Standard_Integer nbhea if (initstr) return; // for (Standard_Integer i = 0; i < Maxlst; i ++) { - // sprintf(textnum,"$%d",i+1); + // Sprintf(textnum,"$%d",i+1); // subl[i].AssignCat(textnum); // } initstr = Standard_True; @@ -596,21 +596,21 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString NamedForComplex(name, num0, n, ach); // on a rembobine // Not in alphabetical order: loop Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST"); - sprintf(txtmes, errmess->ToCString(), num0, name); + Sprintf(txtmes, errmess->ToCString(), num0, name); for (n = num0; n > 0; n = NextForComplex(n)) { if (!strcmp(RecordType(n).ToCString(), name)) { num = n; errmess = new String("Complex Record n0.%d, member type %s not in alphabetic order"); - sprintf(txtmes, errmess->ToCString(), num0, name); + Sprintf(txtmes, errmess->ToCString(), num0, name); ach->AddWarning(txtmes, errmess->ToCString()); return Standard_False; } } num = 0; errmess = new String("Complex Record n0.%d, member type %s not found"); - sprintf(txtmes, errmess->ToCString(), num0, name); + Sprintf(txtmes, errmess->ToCString(), num0, name); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -635,7 +635,7 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString // entities are not in alphabetical order Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST"); - sprintf(txtmes, errmess->ToCString(), num0, theName); + Sprintf(txtmes, errmess->ToCString(), num0, theName); for (n = num0; n > 0; n = NextForComplex(n)) { if (!strcmp(RecordType(n).ToCString(), theName) @@ -643,14 +643,14 @@ Standard_Boolean StepData_StepReaderData::NamedForComplex(const Standard_CString { num = n; errmess = new String("Complex Record n0.%d, member type %s not in alphabetic order"); - sprintf(txtmes, errmess->ToCString(), num0, theName); + Sprintf(txtmes, errmess->ToCString(), num0, theName); ach->AddWarning(txtmes, errmess->ToCString()); return Standard_False; } } num = 0; errmess = new String("Complex Record n0.%d, member type %s not found"); - sprintf(txtmes, errmess->ToCString(), num0, theName); + Sprintf(txtmes, errmess->ToCString(), num0, theName); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -671,7 +671,7 @@ Standard_Boolean StepData_StepReaderData::CheckNbParams(const Standard_Integer errmess = new String("Count of Parameters is not %d"); else errmess = new String("Count of Parameters is not %d for %s"); - sprintf(txtmes, errmess->ToCString(), nbreq, mess); + Sprintf(txtmes, errmess->ToCString(), nbreq, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -694,7 +694,7 @@ Standard_Boolean StepData_StepReaderData::ReadSubList(const Standard_Integer n if (aNbParams == 0) { Handle(String) anErrMess = new String("Parameter n0.%d (%s) is an empty LIST"); - sprintf(txtmes, anErrMess->ToCString(), nump, mess); + Sprintf(txtmes, anErrMess->ToCString(), nump, mess); ach->AddWarning(txtmes, anErrMess->ToCString()); } return Standard_True; @@ -706,7 +706,7 @@ Standard_Boolean StepData_StepReaderData::ReadSubList(const Standard_Integer n return Standard_False; Handle(String) errmess = new String("Parameter n0.%d (%s) not a LIST"); - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (acceptvoid && isvoid) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1033,7 +1033,7 @@ Standard_Boolean StepData_StepReaderData::ReadMember(const Standard_Integer return res; // changement -> refus Handle(String) errmess = new String("Parameter n0.%d (%s) : does not match SELECT clause"); - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1354,7 +1354,7 @@ Standard_Boolean StepData_StepReaderData::ReadXY(const Standard_Integer num, if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1401,7 +1401,7 @@ Standard_Boolean StepData_StepReaderData::ReadXYZ(const Standard_Integer num, if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1428,7 +1428,7 @@ Standard_Boolean StepData_StepReaderData::ReadReal(const Standard_Integer num, if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1483,7 +1483,7 @@ Standard_Boolean StepData_StepReaderData::ReadEntity(const Standard_Integer if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1551,7 +1551,7 @@ Standard_Boolean StepData_StepReaderData::ReadEntity(const Standard_Integer nu if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1592,7 +1592,7 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer n if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1631,7 +1631,7 @@ Standard_Boolean StepData_StepReaderData::ReadBoolean(const Standard_Integer n if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1668,7 +1668,7 @@ Standard_Boolean StepData_StepReaderData::ReadLogical(const Standard_Integer n if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1710,7 +1710,7 @@ Standard_Boolean StepData_StepReaderData::ReadString(const Standard_Integer if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1749,7 +1749,7 @@ Standard_Boolean StepData_StepReaderData::ReadEnumParam(const Standard_Integer if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1765,7 +1765,7 @@ void StepData_StepReaderData::FailEnumValue(const Standard_Integer /* num */, Handle(Interface_Check)& ach) const { Handle(String) errmess = new String("Parameter n0.%d (%s) : Incorrect Enumeration Value"); - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); } @@ -1808,7 +1808,7 @@ Standard_Boolean StepData_StepReaderData::ReadEnum(const Standard_Integer num, if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -1840,7 +1840,7 @@ Standard_Boolean StepData_StepReaderData::ReadTypedParam(const Standard_Integer if (mustbetyped) { errmess = new String("Parameter n0.%d (%s) : single, not typed"); - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1857,7 +1857,7 @@ Standard_Boolean StepData_StepReaderData::ReadTypedParam(const Standard_Integer if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } @@ -1886,7 +1886,7 @@ Standard_Boolean StepData_StepReaderData::CheckDerived(const Standard_Integer if (errmess.IsNull()) return Standard_True; - sprintf(txtmes, errmess->ToCString(), nump, mess); + Sprintf(txtmes, errmess->ToCString(), nump, mess); if (warn) ach->AddWarning(txtmes, errmess->ToCString()); else @@ -2076,7 +2076,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap) } char failmess[100]; // ... Build the Check ... - sprintf(failmess, "Unresolved Reference, Ent.Id.#%d Param.n0 %d (Id.#%d)", ident, na, id); + Sprintf(failmess, "Unresolved Reference, Ent.Id.#%d Param.n0 %d (Id.#%d)", ident, na, id); thecheck->AddFail(failmess, "Unresolved Reference"); // ... And output a more complete message sout << "*** ERR StepReaderData *** Entite #" << ident << "\n Type:" << RecordType(num) @@ -2166,7 +2166,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap) { // We are inside: report it char ligne[80]; - sprintf(ligne, "Ident defined SEVERAL TIMES : #%d", ident); + Sprintf(ligne, "Ident defined SEVERAL TIMES : #%d", ident); thecheck->AddFail(ligne, "Ident defined SEVERAL TIMES : #%d"); sout << "StepReaderData : SetEntityNumbers, " << ligne << std::endl; } @@ -2430,7 +2430,7 @@ void StepData_StepReaderData::SetEntityNumbers(const Standard_Boolean withmap) } } // ... Build the Check ... - sprintf(failmess, + Sprintf(failmess, "Unresolved Reference, Ent.n0 %d (Id.#%d) Param.n0 %d (Id.#%d)", nument, ident, diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx index 190cd7fb4d..fa94ab856d 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx @@ -299,9 +299,9 @@ void StepData_StepWriter::SendEntity(const Standard_Integer num, const StepData_ if (idnum == 0) idnum = num; if (thelabmode < 2 || idnum == idtrue) - sprintf(lident, "#%d = ", idnum); // skl 29.01.2003 + Sprintf(lident, "#%d = ", idnum); // skl 29.01.2003 else - sprintf(lident, "%d:#%d = ", idnum, idtrue); // skl 29.01.2003 + Sprintf(lident, "%d:#%d = ", idnum, idtrue); // skl 29.01.2003 // SendIdent reused, lident has just been calculated thecurr.Clear(); @@ -444,7 +444,7 @@ void StepData_StepWriter::Indent(const Standard_Boolean onent) void StepData_StepWriter::SendIdent(const Standard_Integer ident) { char lident[12]; - sprintf(lident, "#%d =", ident); + Sprintf(lident, "#%d =", ident); thecurr.Clear(); thecurr.Add(lident); themult = Standard_False; @@ -806,7 +806,7 @@ void StepData_StepWriter::Send(const Standard_Integer val) { char lval[12]; AddParam(); - sprintf(lval, "%d", val); + Sprintf(lval, "%d", val); AddString(lval, (Standard_Integer)strlen(lval)); } @@ -947,9 +947,9 @@ void StepData_StepWriter::Send(const Handle(Standard_Transient)& val) if (idnum == 0) idnum = num; if (thelabmode < 2 || idnum == idtrue) - sprintf(lident, "#%d", idnum); + Sprintf(lident, "#%d", idnum); else - sprintf(lident, "%d:#%d", idnum, idtrue); + Sprintf(lident, "%d:#%d", idnum, idtrue); AddParam(); AddString(lident, (Standard_Integer)strlen(lident)); } diff --git a/src/DataExchange/TKDESTEP/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/DataExchange/TKDESTEP/StepToTopoDS/StepToTopoDS_Builder.cxx index a95789ef76..73c83222f9 100644 --- a/src/DataExchange/TKDESTEP/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/DataExchange/TKDESTEP/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -697,7 +697,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_GeometricSet)& if (ent.IsNull()) { char buff[100]; - sprintf(buff, "Entity %d is a Null entity", i); + Sprintf(buff, "Entity %d is a Null entity", i); TP->AddWarning(GCS, buff); continue; } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_CheckCounter.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_CheckCounter.cxx index edda72cfeb..122dba092f 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_CheckCounter.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_CheckCounter.cxx @@ -52,7 +52,7 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list { Standard_Integer i, nb, num, nbe = (model.IsNull() ? 0 : model->NbEntities()); char mess[300]; - sprintf(mess, "Check %s", list.Name()); + Sprintf(mess, "Check %s", list.Name()); SetName(mess); for (list.Start(); list.More(); list.Next()) { @@ -76,9 +76,9 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list for (i = 1; i <= nb; i++) { if (ent.IsNull()) - sprintf(mess, "F: %s", check->CFail(i, original)); + Sprintf(mess, "F: %s", check->CFail(i, original)); else - sprintf(mess, "F:%s: %s", tystr, check->CFail(i, original)); + Sprintf(mess, "F:%s: %s", tystr, check->CFail(i, original)); Add(ent, mess); } nb = 0; @@ -87,9 +87,9 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list for (i = 1; i <= nb; i++) { if (ent.IsNull()) - sprintf(mess, "W: %s", check->CWarning(i, original)); + Sprintf(mess, "W: %s", check->CWarning(i, original)); else - sprintf(mess, "W:%s: %s", tystr, check->CWarning(i, original)); + Sprintf(mess, "W:%s: %s", tystr, check->CWarning(i, original)); Add(ent, mess); } } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_DispPerSignature.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_DispPerSignature.cxx index 315124a93a..796d9f437b 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_DispPerSignature.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_DispPerSignature.cxx @@ -47,7 +47,7 @@ Standard_CString IFSelect_DispPerSignature::SignName() const TCollection_AsciiString IFSelect_DispPerSignature::Label() const { char lab[50]; - sprintf(lab, "One File per Signature %s", SignName()); + Sprintf(lab, "One File per Signature %s", SignName()); return TCollection_AsciiString(lab); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_GraphCounter.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_GraphCounter.cxx index 735b07e6a0..928313eba6 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_GraphCounter.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_GraphCounter.cxx @@ -88,7 +88,7 @@ void IFSelect_GraphCounter::AddWithGraph(const Handle(TColStd_HSequenceOfTransie Add(ent, "9"); break; default: - sprintf(val, "%d", n); + Sprintf(val, "%d", n); Add(ent, val); break; } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx index 7f289ca15c..6ac105666e 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx @@ -199,7 +199,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendCopied(const Handle(IFSelect_W if (!res) { char mess[100]; - sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i); + Sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i); checks.CCheck(0)->AddFail(mess); Message::SendInfo() << " ** Sending File n0." << i << " has failed, abandon **" << std::endl; @@ -267,7 +267,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Sending(IFSelect_ShareOutResult& if (!res) { char mess[100]; - sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i); + Sprintf(mess, "Split Send (WriteFile) abandon on file n0.%d", i); checks.CCheck(0)->AddFail(mess); Message::SendInfo() << " ** Sending File " << filename << " has failed, abandon **" << std::endl; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectAnyList.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectAnyList.cxx index 07469f0e25..675efd33d2 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectAnyList.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectAnyList.cxx @@ -126,13 +126,13 @@ TCollection_AsciiString IFSelect_SelectAnyList::Label() const if (HasUpper()) rankto = UpperValue(); if (rankfrom == rankto) - sprintf(lab, " (no %d)", rankfrom); + Sprintf(lab, " (no %d)", rankfrom); else if (rankfrom == 0) - sprintf(lab, " (-> %d)", rankfrom); + Sprintf(lab, " (-> %d)", rankfrom); else if (rankto == 0) - sprintf(lab, " (%d ->)", rankto); + Sprintf(lab, " (%d ->)", rankto); else - sprintf(lab, " (%d -> %d)", rankfrom, rankto); + Sprintf(lab, " (%d -> %d)", rankfrom, rankto); TCollection_AsciiString labl("In List "); labl.AssignCat(ListLabel()); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectExplore.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectExplore.cxx index ef25682fef..57a8ab0c96 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectExplore.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectExplore.cxx @@ -111,7 +111,7 @@ TCollection_AsciiString IFSelect_SelectExplore::Label() const else if (thelevel > 0) { char lab[30]; - sprintf(lab, "(Level %d)", thelevel); + Sprintf(lab, "(Level %d)", thelevel); labl.AssignCat(lab); } labl.AssignCat(ExploreLabel()); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectRange.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectRange.cxx index cec064a1cd..befe7a1f42 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectRange.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectRange.cxx @@ -104,13 +104,13 @@ TCollection_AsciiString IFSelect_SelectRange::ExtractLabel() const if (!theupper.IsNull()) rankto = theupper->Value(); if (rankfrom == rankto) - sprintf(lab, "Rank no %d", rankfrom); + Sprintf(lab, "Rank no %d", rankfrom); else if (rankfrom == 0) - sprintf(lab, "Until no %d", rankto); + Sprintf(lab, "Until no %d", rankto); else if (rankto == 0) - sprintf(lab, "From no %d", rankto); + Sprintf(lab, "From no %d", rankto); else - sprintf(lab, "From %d Until %d", rankfrom, rankto); + Sprintf(lab, "From %d Until %d", rankfrom, rankto); return TCollection_AsciiString(lab); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSent.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSent.cxx index 4b0f6cfacc..33c96c9c15 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSent.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSent.cxx @@ -88,9 +88,9 @@ TCollection_AsciiString IFSelect_SelectSent::ExtractLabel() const if (thecnt > 2) { if (thelst) - sprintf(lb, "Sent at least %d times entities", thecnt); + Sprintf(lb, "Sent at least %d times entities", thecnt); else - sprintf(lb, "Sent just %d times entities", thecnt); + Sprintf(lb, "Sent just %d times entities", thecnt); lab.AssignCat(lb); } return lab; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx index b6374b2026..0bc77c449d 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx @@ -92,7 +92,7 @@ TCollection_AsciiString IFSelect_SelectSuite::Label() const if (thelab.Length() > 0) return thelab; char txt[100]; - sprintf(txt, "Suite of %d Selections", NbItems()); + Sprintf(txt, "Suite of %d Selections", NbItems()); TCollection_AsciiString lab(txt); return lab; } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx index 66eef9cdd7..6c86c0598b 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx @@ -206,11 +206,11 @@ Standard_Integer IFSelect_SessionFile::WriteSession() } // ... ECRITURE - sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name()); + Sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name()); WriteLine(laligne, '\n'); - sprintf(laligne, "!GENERALS"); + Sprintf(laligne, "!GENERALS"); WriteLine(laligne, '\n'); - sprintf(laligne, "ErrorHandle %d", (thesess->ErrorHandle() ? 1 : 0)); + Sprintf(laligne, "ErrorHandle %d", (thesess->ErrorHandle() ? 1 : 0)); WriteLine(laligne, '\n'); Handle(TColStd_HSequenceOfInteger) idents; Standard_Integer nb; @@ -230,10 +230,10 @@ Standard_Integer IFSelect_SessionFile::WriteSession() { thenewnum++; idents->SetValue(i, thenewnum); - sprintf(laligne, " #%d %d", thenewnum, P->Value()); + Sprintf(laligne, " #%d %d", thenewnum, P->Value()); } else - sprintf(laligne, " %s %d", name->ToCString(), P->Value()); + Sprintf(laligne, " %s %d", name->ToCString(), P->Value()); WriteLine(laligne, '\n'); } @@ -250,10 +250,10 @@ Standard_Integer IFSelect_SessionFile::WriteSession() { thenewnum++; thenums->SetValue(i, thenewnum); - sprintf(laligne, " #%d %s", thenewnum, P->ToCString()); + Sprintf(laligne, " #%d %s", thenewnum, P->ToCString()); } else - sprintf(laligne, " %s %s", name->ToCString(), P->ToCString()); + Sprintf(laligne, " %s %s", name->ToCString(), P->ToCString()); WriteLine(laligne, '\n'); } @@ -271,7 +271,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession() DeclareAndCast(IFSelect_SelectExtract, sxt, P); if (!sxt.IsNull()) { - sprintf(laligne, " %c", (sxt->IsDirect() ? 'D' : 'R')); + Sprintf(laligne, " %c", (sxt->IsDirect() ? 'D' : 'R')); WriteLine(laligne); } DeclareAndCast(IFSelect_SelectAnyList, sli, P); @@ -300,9 +300,9 @@ Standard_Integer IFSelect_SessionFile::WriteSession() continue; name = thesess->Name(P); if (name.IsNull()) - sprintf(laligne, " #%d %d", thenums->Value(i), nbs); + Sprintf(laligne, " #%d %d", thenums->Value(i), nbs); else - sprintf(laligne, " %s %d", name->ToCString(), nbs); + Sprintf(laligne, " %s %d", name->ToCString(), nbs); WriteLine(laligne); for (Standard_Integer k = 1; k <= nbs; k++) SendItem(thesess->Source(P, k)); @@ -394,7 +394,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession() namingpart = P->RootName(); SetOwn(Standard_False); SendItem(P); - sprintf(laligne, " %s", namingpart->ToCString()); + Sprintf(laligne, " %s", namingpart->ToCString()); WriteLine(laligne, ' '); WriteLine("", '\n'); } @@ -975,10 +975,10 @@ void IFSelect_SessionFile::NewItem(const Standard_Integer ident, { thenewnum++; thenums->SetValue(ident, thenewnum); - sprintf(laligne, " #%d %s", thenewnum, par->DynamicType()->Name()); + Sprintf(laligne, " #%d %s", thenewnum, par->DynamicType()->Name()); } else - sprintf(laligne, " %s %s", thesess->Name(par)->ToCString(), par->DynamicType()->Name()); + Sprintf(laligne, " %s %s", thesess->Name(par)->ToCString(), par->DynamicType()->Name()); WriteLine(laligne); } @@ -1014,17 +1014,17 @@ void IFSelect_SessionFile::SendItem(const Handle(Standard_Transient)& par) //// if (theownflag) WriteLine(" :"); //// else WriteLine(" "); if (filenum < 0) - sprintf(laligne, " :%s", thesess->Name(par)->ToCString()); + Sprintf(laligne, " :%s", thesess->Name(par)->ToCString()); else - sprintf(laligne, " #%d", filenum); + Sprintf(laligne, " #%d", filenum); WriteLine(laligne); } void IFSelect_SessionFile::SendText(const Standard_CString text) { char laligne[100]; - //// if (theownflag) sprintf(laligne," :%s",text); - sprintf(laligne, " %s", text); + //// if (theownflag) Sprintf(laligne," :%s",text); + Sprintf(laligne, " %s", text); WriteLine(laligne); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ShareOut.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ShareOut.cxx index bd7cabb922..b5a486c8e1 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ShareOut.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ShareOut.cxx @@ -396,17 +396,17 @@ TCollection_AsciiString IFSelect_ShareOut::FileName(const Standard_Integer dnum, } if (nbch > 1) { - sprintf(format, "_ %d.%dd", nbch, nbch); + Sprintf(format, "_ %d.%dd", nbch, nbch); format[1] = '%'; } else if (npac >= num || num >= 1) { - sprintf(format, "_ d"); + Sprintf(format, "_ d"); format[1] = '%'; } if (format[1] == '%') { - sprintf(suffixe, format, num); + Sprintf(suffixe, format, num); res.AssignCat(suffixe); } } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx index 6b17ba940a..43c3ef1d5c 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx @@ -163,6 +163,6 @@ Standard_CString IFSelect_Signature::IntValue(const Standard_Integer val) default: break; } - sprintf(intval, "%d", val); + Sprintf(intval, "%d", val); return intval; } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_TransformStandard.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_TransformStandard.cxx index f3ed52468e..e6d5021e85 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_TransformStandard.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_TransformStandard.cxx @@ -234,11 +234,11 @@ TCollection_AsciiString IFSelect_TransformStandard::Label() const labl.AssignCat("On the spot Edition"); Standard_Integer nb = NbModifiers(); if (nb == 0) - sprintf(lab, " (no Modifier)"); + Sprintf(lab, " (no Modifier)"); if (nb == 1) - sprintf(lab, " - %s", Modifier(1)->Label().ToCString()); + Sprintf(lab, " - %s", Modifier(1)->Label().ToCString()); if (nb > 1) - sprintf(lab, " - %d Modifiers", nb); + Sprintf(lab, " - %d Modifiers", nb); labl.AssignCat(lab); return labl; } diff --git a/src/DataExchange/TKXSBase/Interface/Interface_CheckTool.cxx b/src/DataExchange/TKXSBase/Interface/Interface_CheckTool.cxx index 34e715a15d..7e903d9623 100644 --- a/src/DataExchange/TKXSBase/Interface/Interface_CheckTool.cxx +++ b/src/DataExchange/TKXSBase/Interface/Interface_CheckTool.cxx @@ -41,7 +41,7 @@ static int errh = 1; static void raisecheck(Standard_Failure& theException, Handle(Interface_Check)& ach) { char mess[100]; - sprintf(mess, "** Exception Raised during Check : %s **", theException.DynamicType()->Name()); + Sprintf(mess, "** Exception Raised during Check : %s **", theException.DynamicType()->Name()); ach->AddFail(mess); #ifdef _WIN32 if (theException.IsKind(STANDARD_TYPE(OSD_Exception))) diff --git a/src/DataExchange/TKXSBase/Interface/Interface_FloatWriter.hxx b/src/DataExchange/TKXSBase/Interface/Interface_FloatWriter.hxx index 744be29d3f..aa838b15c9 100644 --- a/src/DataExchange/TKXSBase/Interface/Interface_FloatWriter.hxx +++ b/src/DataExchange/TKXSBase/Interface/Interface_FloatWriter.hxx @@ -26,11 +26,11 @@ //! This class converts a floating number (Real) to a string //! It can be used if the standard C-C++ output functions -//! (sprintf or std::cout<<) are not convenient. That is to say : +//! (Sprintf or std::cout<<) are not convenient. That is to say : //! - to suppress trailing '0' and 'E+00' (if desired) //! - to control exponent output and floating point output //! -//! Formats are given in the form used by printf-sprintf +//! Formats are given in the form used by printf-Sprintf class Interface_FloatWriter { public: diff --git a/src/DataExchange/TKXSBase/Interface/Interface_MSG.cxx b/src/DataExchange/TKXSBase/Interface/Interface_MSG.cxx index 81d61634e0..e9993eaf9f 100644 --- a/src/DataExchange/TKXSBase/Interface/Interface_MSG.cxx +++ b/src/DataExchange/TKXSBase/Interface/Interface_MSG.cxx @@ -43,7 +43,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, const Standard_Integer theval(NULL) { char mess[300]; - sprintf(mess, Interface_MSG::Translated(thekey), i1); + Sprintf(mess, Interface_MSG::Translated(thekey), i1); theval = new char[strlen(mess) + 1]; strcpy(theval, mess); } @@ -55,7 +55,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, theval(NULL) { char mess[300]; - sprintf(mess, Interface_MSG::Translated(thekey), i1, i2); + Sprintf(mess, Interface_MSG::Translated(thekey), i1, i2); theval = new char[strlen(mess) + 1]; strcpy(theval, mess); } @@ -67,7 +67,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, theval(NULL) { char mess[300]; - sprintf(mess, + Sprintf(mess, Interface_MSG::Translated(thekey), (intervals < 0 ? r1 : Interface_MSG::Intervalled(r1, intervals))); theval = new char[strlen(mess) + 1]; @@ -79,7 +79,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, const Standard_CString theval(NULL) { char mess[300]; - sprintf(mess, Interface_MSG::Translated(thekey), str); + Sprintf(mess, Interface_MSG::Translated(thekey), str); theval = new char[strlen(mess) + 1]; strcpy(theval, mess); } @@ -91,7 +91,7 @@ Interface_MSG::Interface_MSG(const Standard_CString key, theval(NULL) { char mess[300]; - sprintf(mess, Interface_MSG::Translated(thekey), val, str); + Sprintf(mess, Interface_MSG::Translated(thekey), val, str); theval = new char[strlen(mess) + 1]; strcpy(theval, mess); } @@ -423,9 +423,9 @@ void Interface_MSG::TDate(const Standard_CString text, } char* pText = (char*)text; if (!format || format[0] == '\0') - sprintf(pText, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", y2, m2, d2, h2, n2, s2); + Sprintf(pText, "%4.4d-%2.2d-%2.2d:%2.2d-%2.2d-%2.2d", y2, m2, d2, h2, n2, s2); else if ((format[0] == 'c' || format[0] == 'C') && format[1] == ':') - sprintf(pText, &format[2], y2, m2, d2, h2, n2, s2); + Sprintf(pText, &format[2], y2, m2, d2, h2, n2, s2); } Standard_Boolean Interface_MSG::NDate(const Standard_CString text, diff --git a/src/DataExchange/TKXSBase/Interface/Interface_MSG.hxx b/src/DataExchange/TKXSBase/Interface/Interface_MSG.hxx index c206ded227..8e44e7d63b 100644 --- a/src/DataExchange/TKXSBase/Interface/Interface_MSG.hxx +++ b/src/DataExchange/TKXSBase/Interface/Interface_MSG.hxx @@ -58,18 +58,18 @@ public: //! Translates a message which contains one integer variable //! It is just a help which avoid the following : - //! char mess[100]; sprintf(mess,Interface_MSG("code"),ival); + //! char mess[100]; Sprintf(mess,Interface_MSG("code"),ival); //! then AddFail(mess); //! replaced by AddFail (Interface_MSG("code",ival)); //! - //! The basic message is intended to be in C-sprintf format, + //! The basic message is intended to be in C-Sprintf format, //! with one %d form in it Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_Integer i1); //! Translates a message which contains two integer variables //! As for one integer, it is just a writing help //! - //! The basic message is intended to be in C-sprintf format + //! The basic message is intended to be in C-Sprintf format //! with two %d forms in it Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_Integer i1, @@ -80,7 +80,7 @@ public: //! interval (see below, method Intervals) //! As for one integer, it is just a writing help //! - //! The basic message is intended to be in C-sprintf format + //! The basic message is intended to be in C-Sprintf format //! with one %f form (or equivalent : %e etc) in it Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_Real r1, @@ -89,7 +89,7 @@ public: //! Translates a message which contains one string variable //! As for one integer, it is just a writing help //! - //! The basic message is intended to be in C-sprintf format + //! The basic message is intended to be in C-Sprintf format //! with one %s form in it Standard_EXPORT Interface_MSG(const Standard_CString key, const Standard_CString str); @@ -98,7 +98,7 @@ public: //! As for one integer, it is just a writing help //! Used for instance to say "Param n0. i.e. 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, diff --git a/src/DataExchange/TKXSBase/XSControl/XSControl_FuncShape.cxx b/src/DataExchange/TKXSBase/XSControl/XSControl_FuncShape.cxx index c3b35ee30e..7fd3b0afd2 100644 --- a/src/DataExchange/TKXSBase/XSControl/XSControl_FuncShape.cxx +++ b/src/DataExchange/TKXSBase/XSControl/XSControl_FuncShape.cxx @@ -214,20 +214,20 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot if (nbvar == 0) { if (argc > 3 && mode > 0) - sprintf(nomvar, "%s", arg3); + Sprintf(nomvar, "%s", arg3); else if (argc > 2 && mode == 0) - sprintf(nomvar, "%s", arg2); + Sprintf(nomvar, "%s", arg2); else - sprintf(nomvar, "tp_%d", i); + Sprintf(nomvar, "tp_%d", i); } else { if (argc > 3 && mode > 0) - sprintf(nomvar, "%s_%d", arg3, nbvar); + Sprintf(nomvar, "%s_%d", arg3, nbvar); else if (argc > 2 && mode == 0) - sprintf(nomvar, "%s_%d", arg2, nbvar); + Sprintf(nomvar, "%s_%d", arg2, nbvar); else - sprintf(nomvar, "tp_%d", i); + Sprintf(nomvar, "tp_%d", i); } sout << " -> 1 DRAW Shape: " << nomvar << std::endl; XSControl::Vars(pilot)->SetShape(nomvar, sh); @@ -257,11 +257,11 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot continue; } if (argc > 3 && mode > 0) - sprintf(nomvar, "%s_%d", arg3, nbvar); + Sprintf(nomvar, "%s_%d", arg3, nbvar); else if (argc > 2 && mode == 0) - sprintf(nomvar, "%s_%d", arg2, nbvar); + Sprintf(nomvar, "%s_%d", arg2, nbvar); else - sprintf(nomvar, "tp_%d_%d", i, nbvar); + Sprintf(nomvar, "tp_%d_%d", i, nbvar); sout << " " << nomvar; XSControl::Vars(pilot)->SetShape(nomvar, sh); } @@ -288,20 +288,20 @@ static IFSelect_ReturnStatus XSControl_tpdraw(const Handle(IFSelect_SessionPilot if (nbvar == 0) { if (argc > 3 && mode > 0) - sprintf(nomvar, "%s", arg3); + Sprintf(nomvar, "%s", arg3); else if (argc > 2 && mode == 0) - sprintf(nomvar, "%s", arg2); + Sprintf(nomvar, "%s", arg2); else - sprintf(nomvar, "tp_%d", i); + Sprintf(nomvar, "tp_%d", i); } else { if (argc > 3 && mode > 0) - sprintf(nomvar, "%s_%d", arg3, nbvar); + Sprintf(nomvar, "%s_%d", arg3, nbvar); else if (argc > 2 && mode == 0) - sprintf(nomvar, "%s_%d", arg2, nbvar); + Sprintf(nomvar, "%s_%d", arg2, nbvar); else - sprintf(nomvar, "tp_%d", i); + Sprintf(nomvar, "tp_%d", i); } char* nomv = nomvar; XSControl::Vars(pilot)->Set(nomv, geom); @@ -863,7 +863,7 @@ static IFSelect_ReturnStatus XSControl_trimport(const Handle(IFSelect_SessionPil else { char nomsh[50]; - sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs); + Sprintf(nomsh, "%s_%d", rnom.ToCString(), nbs); XSControl::Vars(pilot)->SetShape(nomsh, sh); } } @@ -1060,7 +1060,7 @@ Standard_Integer XSControl_FuncShape::MoreShapes(const Handle(XSControl_WorkSess for (i = n1; i <= n2; i++) { const char* nomshh = &nomsh[0]; - sprintf(nomsh, "%s%d", nom, i); + Sprintf(nomsh, "%s%d", nom, i); TopoDS_Shape Shape = session->Vars()->GetShape(nomshh); if (Shape.IsNull()) continue; diff --git a/src/DataExchange/TKXSBase/XSControl/XSControl_SignTransferStatus.cxx b/src/DataExchange/TKXSBase/XSControl/XSControl_SignTransferStatus.cxx index 48540eab69..d8a31fe395 100644 --- a/src/DataExchange/TKXSBase/XSControl/XSControl_SignTransferStatus.cxx +++ b/src/DataExchange/TKXSBase/XSControl/XSControl_SignTransferStatus.cxx @@ -132,7 +132,7 @@ Standard_CString XSControl_SignTransferStatus::Value( } bnd = bnd->NextResult(); } - // if (stat == 11) sprintf(themes,"Result:%s",binder->ResultTypeName()); + // if (stat == 11) Sprintf(themes,"Result:%s",binder->ResultTypeName()); if (stat == 12) themes().AssignCat("/Warning"); if (stat == 13) diff --git a/src/DataExchange/TKXSBase/XSControl/XSControl_TransferReader.cxx b/src/DataExchange/TKXSBase/XSControl/XSControl_TransferReader.cxx index 5e2e0cb738..572662d525 100644 --- a/src/DataExchange/TKXSBase/XSControl/XSControl_TransferReader.cxx +++ b/src/DataExchange/TKXSBase/XSControl/XSControl_TransferReader.cxx @@ -1122,7 +1122,7 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char mess[0] = '\0'; if (binder.IsNull()) { - sprintf(mess, "(no data recorded)"); + Sprintf(mess, "(no data recorded)"); return 0; } Interface_CheckStatus cst = binder->Check()->Status(); @@ -1130,10 +1130,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char { stat = 11; if (binder->HasResult()) - sprintf(mess, "%s", binder->ResultTypeName()); + Sprintf(mess, "%s", binder->ResultTypeName()); else { - sprintf(mess, "(no result)"); + Sprintf(mess, "(no result)"); stat = 1; } } @@ -1141,10 +1141,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char { stat = 12; if (binder->HasResult()) - sprintf(mess, "%s (+ warning)", binder->ResultTypeName()); + Sprintf(mess, "%s (+ warning)", binder->ResultTypeName()); else { - sprintf(mess, "(warning)"); + Sprintf(mess, "(warning)"); stat = 2; } } @@ -1152,10 +1152,10 @@ static Standard_Integer BinderStatus(const Handle(Transfer_Binder)& binder, char { stat = 13; if (binder->HasResult()) - sprintf(mess, "%s (+ FAIL)", binder->ResultTypeName()); + Sprintf(mess, "%s (+ FAIL)", binder->ResultTypeName()); else { - sprintf(mess, "(FAIL)"); + Sprintf(mess, "(FAIL)"); stat = 3; } } @@ -1359,7 +1359,7 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP TCollection_AsciiString mest(model->TypeName(ent, Standard_False)); mest.AssignCat(" -> "); mest.AssignCat(mess); - // sprintf(mest,"%s -> %s",model->TypeName(ent,Standard_False),mess); + // Sprintf(mest,"%s -> %s",model->TypeName(ent,Standard_False),mess); counter->Add(ent, mest.ToCString()); } } diff --git a/src/Draw/TKDraw/DrawTrSurf/DrawTrSurf_Debug.cxx b/src/Draw/TKDraw/DrawTrSurf/DrawTrSurf_Debug.cxx index 82488af9a1..a5a6813f35 100644 --- a/src/Draw/TKDraw/DrawTrSurf/DrawTrSurf_Debug.cxx +++ b/src/Draw/TKDraw/DrawTrSurf/DrawTrSurf_Debug.cxx @@ -68,7 +68,7 @@ Standard_EXPORT const char* DrawTrSurf_SetPnt(const char* theNameStr, void* theP { const gp_Pnt& aP = *(gp_Pnt*)thePntPtr; static char buff[256]; - sprintf(buff, + Sprintf(buff, "Point (%.16g, %.16g, %.16g) set to DRAW variable %.80s", aP.X(), aP.Y(), @@ -94,7 +94,7 @@ Standard_EXPORT const char* DrawTrSurf_SetPnt2d(const char* theNameStr, void* th { const gp_Pnt2d& aP = *(gp_Pnt2d*)thePnt2dPtr; static char buff[256]; - sprintf(buff, "Point (%.16g, %.16g) set to DRAW variable %.80s", aP.X(), aP.Y(), theNameStr); + Sprintf(buff, "Point (%.16g, %.16g) set to DRAW variable %.80s", aP.X(), aP.Y(), theNameStr); DrawTrSurf::Set(theNameStr, aP); return buff; } diff --git a/src/Draw/TKQADraw/QABugs/QABugs_19.cxx b/src/Draw/TKQADraw/QABugs/QABugs_19.cxx index e35017fea3..c936417aa2 100644 --- a/src/Draw/TKQADraw/QABugs/QABugs_19.cxx +++ b/src/Draw/TKQADraw/QABugs/QABugs_19.cxx @@ -4045,10 +4045,10 @@ static Standard_Integer OCC26407(Draw_Interpretor& theDI, } DBRep::Set(theArgVec[1], face); char buf[256]; - sprintf(buf, "isos %s 0", theArgVec[1]); + Sprintf(buf, "isos %s 0", theArgVec[1]); theDI.Eval(buf); - sprintf(buf, "triangles %s", theArgVec[1]); + Sprintf(buf, "triangles %s", theArgVec[1]); theDI.Eval(buf); theDI.Eval("smallview; fit"); @@ -4104,7 +4104,7 @@ static Standard_Integer OCC26485(Draw_Interpretor& theDI, if (aNormal.X() == 0 && aNormal.Y() == 0 && aNormal.Z() == 1) { char buf[256]; - sprintf(buf, "fail_%d", i + 1); + Sprintf(buf, "fail_%d", i + 1); theDI << "Failed. Point " << buf << ": " << aPoint.X() << " " << aPoint.Y() << " " << aPoint.Z() << "\n"; @@ -4450,14 +4450,14 @@ Standard_Integer OCC26525(Draw_Interpretor& di, Standard_Integer n, const char** } aNbPoints = aHInter.NbPoints(); - sprintf(buf, " Number of intersection points found: %d", aNbPoints); + Sprintf(buf, " Number of intersection points found: %d", aNbPoints); di << buf << "\n"; for (i = 1; i <= aNbPoints; ++i) { const IntCurveSurface_IntersectionPoint& aIP = aHInter.Point(i); aIP.Values(aP, aU, aV, aT, aTC); // - sprintf(buf, "point %s_%d %lg %lg %lg ", a[1], i, aP.X(), aP.Y(), aP.Z()); + Sprintf(buf, "point %s_%d %lg %lg %lg ", a[1], i, aP.X(), aP.Y(), aP.Z()); di << buf << "\n"; } diff --git a/src/Draw/TKTopTest/BOPTest/BOPTest_CheckCommands.cxx b/src/Draw/TKTopTest/BOPTest/BOPTest_CheckCommands.cxx index 37c98c844c..9594ff3d2c 100644 --- a/src/Draw/TKTopTest/BOPTest/BOPTest_CheckCommands.cxx +++ b/src/Draw/TKTopTest/BOPTest/BOPTest_CheckCommands.cxx @@ -318,17 +318,17 @@ Standard_Integer bopcheck(Draw_Interpretor& di, Standard_Integer n, const char** iT = aBI.Type(); di << aInterfTypes[iT] << ": "; // - sprintf(aName1, "x%d", n1); - // sprintf(aName1, "x%d", iCnt); + Sprintf(aName1, "x%d", n1); + // Sprintf(aName1, "x%d", iCnt); DBRep::Set(aName1, aS1); // ++iCnt; - sprintf(aName2, "x%d", n2); - // sprintf(aName2, "x%d", iCnt); + Sprintf(aName2, "x%d", n2); + // Sprintf(aName2, "x%d", iCnt); DBRep::Set(aName2, aS2); ++iCnt; // - sprintf(buf, "%s %s \n", aName1, aName2); + Sprintf(buf, "%s %s \n", aName1, aName2); di << buf; } // @@ -1273,9 +1273,9 @@ Standard_Integer checkcurveonsurf(Draw_Interpretor& di, Standard_Integer n, cons ++aFCounter; } // - sprintf(anEName, "e_%d", nE); - sprintf(aFName, "f_%d", nF); - sprintf(buf, + Sprintf(anEName, "e_%d", nE); + Sprintf(aFName, "f_%d", nF); + Sprintf(buf, "edge %s on face %s (max dist: %3.16f, parameter on curve: %3.16f)\n", anEName, aFName, @@ -1311,7 +1311,7 @@ Standard_Integer checkcurveonsurf(Draw_Interpretor& di, Standard_Integer n, cons // aTolE = aDMETol.Find(aE); aTolE *= 1.001; - sprintf(buf, "settolerance %s_%d %3.16f;\n", a[1], anECounter, aTolE); + Sprintf(buf, "settolerance %s_%d %3.16f;\n", a[1], anECounter, aTolE); di << buf; } } diff --git a/src/Draw/TKTopTest/BOPTest/BOPTest_DebugCommands.cxx b/src/Draw/TKTopTest/BOPTest/BOPTest_DebugCommands.cxx index b0e979db99..618b35616a 100644 --- a/src/Draw/TKTopTest/BOPTest/BOPTest_DebugCommands.cxx +++ b/src/Draw/TKTopTest/BOPTest/BOPTest_DebugCommands.cxx @@ -522,7 +522,7 @@ Standard_Integer bopwho(Draw_Interpretor& di, Standard_Integer n, const char** a di << " FF points: "; bFound = Standard_True; } - sprintf(buf, "(%d, %d) ", n1, n2); + Sprintf(buf, "(%d, %d) ", n1, n2); di << buf; } } // for (k=0; kShape(nSp); @@ -793,11 +793,11 @@ Standard_Integer bopsc(Draw_Interpretor& di, Standard_Integer n, const char** a) } if (!iX) { - sprintf(buf, "[%d %d] section vertices: ", nF1, nF2); + Sprintf(buf, "[%d %d] section vertices: ", nF1, nF2); di << buf; iX = 1; } - sprintf(buf, "p_%d_%d", k, nSp); + Sprintf(buf, "p_%d_%d", k, nSp); di << buf; // const TopoDS_Shape& aSp = pDS->Shape(nSp); @@ -1263,7 +1263,7 @@ Standard_Integer bopimage(Draw_Interpretor& di, Standard_Integer n, const char** } // di << i << " images found\n"; - sprintf(buf, "%s_im", a[1]); + Sprintf(buf, "%s_im", a[1]); DBRep::Set(buf, aC); di << buf << "\n"; // @@ -1303,7 +1303,7 @@ Standard_Integer boporigin(Draw_Interpretor& di, Standard_Integer n, const char* } // char buf[32]; - sprintf(buf, "%s_or", a[1]); + Sprintf(buf, "%s_or", a[1]); // const TopTools_ListOfShape& aLSx = aDMI.Find(aS); if (aLSx.Extent() == 1) @@ -1396,7 +1396,7 @@ Standard_Integer bopfsd(Draw_Interpretor& di, Standard_Integer n, const char** a // di << i << " SD shapes found\n"; // - sprintf(buf, "%s_sd", a[1]); + Sprintf(buf, "%s_sd", a[1]); DBRep::Set(buf, aC); // di << buf << "\n"; @@ -1464,7 +1464,7 @@ Standard_Integer bopbface(Draw_Interpretor& di, Standard_Integer n, const char** for (i = 1; aIt.More(); aIt.Next(), ++i) { const TopoDS_Shape& aFR = aIt.Value(); - sprintf(buf, "%s_%d", a[1], i); + Sprintf(buf, "%s_%d", a[1], i); DBRep::Set(buf, aFR); di << " " << buf; } @@ -1534,7 +1534,7 @@ Standard_Integer bopbsolid(Draw_Interpretor& di, Standard_Integer n, const char* for (i = 1; aIt.More(); aIt.Next(), ++i) { const TopoDS_Shape& aSR = aIt.Value(); - sprintf(buf, "%s_%d", a[1], i); + Sprintf(buf, "%s_%d", a[1], i); DBRep::Set(buf, aSR); di << " " << buf; } @@ -1690,7 +1690,7 @@ void SearchNewIndex(const char* theCType, } // anInt.Indices(n1, n2); - sprintf(buf, "(%d, %d) ", n1, n2); + Sprintf(buf, "(%d, %d) ", n1, n2); di << buf; } } diff --git a/src/Draw/TKTopTest/BOPTest/BOPTest_MkConnectedCommands.cxx b/src/Draw/TKTopTest/BOPTest/BOPTest_MkConnectedCommands.cxx index 9681fd6d34..628a7b58e8 100644 --- a/src/Draw/TKTopTest/BOPTest/BOPTest_MkConnectedCommands.cxx +++ b/src/Draw/TKTopTest/BOPTest/BOPTest_MkConnectedCommands.cxx @@ -194,7 +194,7 @@ Standard_Integer MakePeriodic(Draw_Interpretor& theDI, } char cDirName[2]; - sprintf(cDirName, "%c", theArgv[i][1]); + Sprintf(cDirName, "%c", theArgv[i][1]); Standard_Real aPeriod = 0; if (theArgc > i + 1) @@ -281,7 +281,7 @@ Standard_Integer RepeatShape(Draw_Interpretor& theDI, } char cDirName[2]; - sprintf(cDirName, "%c", theArgv[i][1]); + Sprintf(cDirName, "%c", theArgv[i][1]); Standard_Integer aTimes = 0; if (theArgc > i + 1) diff --git a/src/Draw/TKTopTest/BOPTest/BOPTest_PeriodicityCommands.cxx b/src/Draw/TKTopTest/BOPTest/BOPTest_PeriodicityCommands.cxx index 25596ab11c..ae167c5cff 100644 --- a/src/Draw/TKTopTest/BOPTest/BOPTest_PeriodicityCommands.cxx +++ b/src/Draw/TKTopTest/BOPTest/BOPTest_PeriodicityCommands.cxx @@ -135,7 +135,7 @@ Standard_Integer MakePeriodic(Draw_Interpretor& theDI, } char cDirName[2]; - sprintf(cDirName, "%c", theArgv[iDir][1]); + Sprintf(cDirName, "%c", theArgv[iDir][1]); if (theArgc == (i + 1)) { @@ -254,7 +254,7 @@ Standard_Integer RepeatShape(Draw_Interpretor& theDI, } char cDirName[2]; - sprintf(cDirName, "%c", theArgv[i][1]); + Sprintf(cDirName, "%c", theArgv[i][1]); Standard_Integer aTimes = 0; if (theArgc > i + 1) diff --git a/src/Draw/TKTopTest/GeometryTest/GeometryTest_TestProjCommands.cxx b/src/Draw/TKTopTest/GeometryTest/GeometryTest_TestProjCommands.cxx index e42bc5077f..e170a97a36 100644 --- a/src/Draw/TKTopTest/GeometryTest/GeometryTest_TestProjCommands.cxx +++ b/src/Draw/TKTopTest/GeometryTest/GeometryTest_TestProjCommands.cxx @@ -370,7 +370,7 @@ static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const di << "Attention (critical value of tolerance) :"; } char aMsg[256]; - sprintf(aMsg, " T=%lg\tD=%lg\n", aT, aD); + Sprintf(aMsg, " T=%lg\tD=%lg\n", aT, aD); di << aMsg; // aMr = new Draw_Marker3D(aP, Draw_Plus, aColor, iSize); diff --git a/src/Draw/TKXSDRAWIGES/XSDRAWIGES/XSDRAWIGES.cxx b/src/Draw/TKXSDRAWIGES/XSDRAWIGES/XSDRAWIGES.cxx index 8ca1292764..cbce082ae7 100644 --- a/src/Draw/TKXSDRAWIGES/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/Draw/TKXSDRAWIGES/XSDRAWIGES/XSDRAWIGES.cxx @@ -58,7 +58,7 @@ void WriteShape(const TopoDS_Shape& shape, const Standard_Integer number) { char fname[110]; - sprintf(fname, "Shape_%d", number); + Sprintf(fname, "Shape_%d", number); std::ofstream f(fname, std::ios::out | std::ios::binary); std::cout << "Output file name : " << fname << std::endl; f << "DBRep_DrawableShape\n"; diff --git a/src/FoundationClasses/TKernel/NCollection/NCollection_UBTreeFiller.hxx b/src/FoundationClasses/TKernel/NCollection/NCollection_UBTreeFiller.hxx index 98f4afcd28..0092b979db 100644 --- a/src/FoundationClasses/TKernel/NCollection/NCollection_UBTreeFiller.hxx +++ b/src/FoundationClasses/TKernel/NCollection/NCollection_UBTreeFiller.hxx @@ -189,7 +189,7 @@ Standard_Integer NCollection_UBTreeFiller::CheckTree( const Standard_Real aLen1 = sqrt(aLen / num); const Standard_Real aLen0 = log(num) / log(2.); char buf[128]; - sprintf(buf, "Checking UBTree:%8d leaves, balance =%7.2f", aNumber, aLen1 / aLen0); + Sprintf(buf, "Checking UBTree:%8d leaves, balance =%7.2f", aNumber, aLen1 / aLen0); theStream << buf << std::endl; return aNumber; } diff --git a/src/FoundationClasses/TKernel/OSD/OSD_Environment.cxx b/src/FoundationClasses/TKernel/OSD/OSD_Environment.cxx index 265f2a0e8e..46119e5672 100644 --- a/src/FoundationClasses/TKernel/OSD/OSD_Environment.cxx +++ b/src/FoundationClasses/TKernel/OSD/OSD_Environment.cxx @@ -173,7 +173,7 @@ void OSD_Environment::Build() // create a new entry in the buffer and add it to environment buffer[index] = (char*)malloc(len + myValue.Length() + 2); - sprintf(buffer[index], "%s=%s", myName.ToCString(), myValue.ToCString()); + Sprintf(buffer[index], "%s=%s", myName.ToCString(), myValue.ToCString()); putenv(buffer[index]); // then (and only then!) free old entry, if existed diff --git a/src/FoundationClasses/TKernel/OSD/OSD_Error.cxx b/src/FoundationClasses/TKernel/OSD/OSD_Error.cxx index 089077028c..cdf08c4852 100755 --- a/src/FoundationClasses/TKernel/OSD/OSD_Error.cxx +++ b/src/FoundationClasses/TKernel/OSD/OSD_Error.cxx @@ -457,7 +457,7 @@ void OSD_Error::Perror() default: { Standard_Character buf[255]; // - sprintf(buf, "%sUnknowm error #%d", buffer.ToCString(), myErrno); + Sprintf(buf, "%sUnknowm error #%d", buffer.ToCString(), myErrno); TCollection_AsciiString interm(buf); buffer = interm; extCode = ERR_UNKNOWN; diff --git a/src/FoundationClasses/TKernel/OSD/OSD_Host.cxx b/src/FoundationClasses/TKernel/OSD/OSD_Host.cxx index 57a263f084..4ca2ff2288 100644 --- a/src/FoundationClasses/TKernel/OSD/OSD_Host.cxx +++ b/src/FoundationClasses/TKernel/OSD/OSD_Host.cxx @@ -152,7 +152,7 @@ TCollection_AsciiString OSD_Host::InternetAddress() b = (unsigned char)internet_address.h_addr_list[0][1]; c = (unsigned char)internet_address.h_addr_list[0][2]; d = (unsigned char)internet_address.h_addr_list[0][3]; - sprintf(buffer, "%d.%d.%d.%d", a, b, c, d); + Sprintf(buffer, "%d.%d.%d.%d", a, b, c, d); result = buffer; return (result); } diff --git a/src/FoundationClasses/TKernel/OSD/OSD_signal.cxx b/src/FoundationClasses/TKernel/OSD/OSD_signal.cxx index 0545d7496d..642fd1e1d6 100644 --- a/src/FoundationClasses/TKernel/OSD/OSD_signal.cxx +++ b/src/FoundationClasses/TKernel/OSD/OSD_signal.cxx @@ -938,7 +938,7 @@ static void SegvHandler(const int theSignal, void* anAddress = theSigInfo->si_addr; { char aMsg[100]; - sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx.", (long)anAddress); + Sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx.", (long)anAddress); const int aStackLength = OSD_SignalStackTraceLength; const int aStackBufLen = Max(aStackLength * 200, 2048); @@ -975,7 +975,7 @@ static void SegvHandler(const int theSignal, unsigned long anOffset = ((struct sigcontext*)theContext)->sc_sl.sl_ss.ss_cr21; { char aMsg[100]; - sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx", anOffset); + Sprintf(aMsg, "SIGSEGV 'segmentation violation' detected. Address %lx", anOffset); OSD_SIGSEGV::NewInstance(aMsg)->Jump(); } } diff --git a/src/FoundationClasses/TKernel/Standard/Standard_CLocaleSentry.hxx b/src/FoundationClasses/TKernel/Standard/Standard_CLocaleSentry.hxx index 31539484ae..5b292810a5 100755 --- a/src/FoundationClasses/TKernel/Standard/Standard_CLocaleSentry.hxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_CLocaleSentry.hxx @@ -46,7 +46,7 @@ //! This class intended to temporary switch C locale and logically equivalent to setlocale(LC_ALL, //! "C"). It is intended to format text regardless of user locale settings (for import/export -//! functionality). Thus following calls to sprintf, atoi and other functions will use "C" locale. +//! functionality). Thus following calls to Sprintf, atoi and other functions will use "C" locale. //! Destructor of this class will return original locale. //! //! Notice that this functionality is platform dependent and intended only to workaround alien code diff --git a/src/FoundationClasses/TKernel/Standard/Standard_CString.hxx b/src/FoundationClasses/TKernel/Standard/Standard_CString.hxx index d3a691c98c..6f5f72f2aa 100644 --- a/src/FoundationClasses/TKernel/Standard/Standard_CString.hxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_CString.hxx @@ -58,13 +58,25 @@ extern "C" Standard_EXPORT double Strtod(const char* theStr, char** theNextPtr); //! Equivalent of standard C function printf() that always uses C locale - Standard_EXPORT int Printf(const char* theFormat, ...); + Standard_EXPORT int Printf(const char* theFormat, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 1, 2))) +#endif + ; //! Equivalent of standard C function fprintf() that always uses C locale - Standard_EXPORT int Fprintf(FILE* theFile, const char* theFormat, ...); + Standard_EXPORT int Fprintf(FILE* theFile, const char* theFormat, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif + ; //! Equivalent of standard C function sprintf() that always uses C locale - Standard_EXPORT int Sprintf(char* theBuffer, const char* theFormat, ...); + Standard_EXPORT int Sprintf(char* theBuffer, const char* theFormat, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif + ; //! Equivalent of standard C function vsprintf() that always uses C locale. //! Note that this function does not check buffer bounds and should be used with precaution @@ -73,7 +85,11 @@ extern "C" //! @param[in] theFormat format to apply //! @param[in] theArgList argument list for specified format //! @return the total number of characters written, or a negative number on error - Standard_EXPORT int Vsprintf(char* theBuffer, const char* theFormat, va_list theArgList); + Standard_EXPORT int Vsprintf(char* theBuffer, const char* theFormat, va_list theArgList) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 0))) +#endif + ; #ifdef __cplusplus } diff --git a/src/FoundationClasses/TKernel/Standard/Standard_GUID.cxx b/src/FoundationClasses/TKernel/Standard/Standard_GUID.cxx index faa2ba16a1..37f793d3f4 100644 --- a/src/FoundationClasses/TKernel/Standard/Standard_GUID.cxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_GUID.cxx @@ -316,7 +316,7 @@ void Standard_GUID::Assign(const Standard_UUID& theUUID) void Standard_GUID::ToCString(const Standard_PCharacter aStrGuid) const { - sprintf(aStrGuid, + Sprintf(aStrGuid, "%.8x-%.4x-%.4x-%.4x-%.2x%.2x%.2x%.2x%.2x%.2x", my32b, (unsigned short)my16b1, diff --git a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo.cxx b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo.cxx index cbcfabfbff..332d420f1f 100644 --- a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo.cxx @@ -688,7 +688,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) // Temporary // char* name = new char[100]; - // sprintf(name, "c%d", i); + // Sprintf(name, "c%d", i); // DrawTrSurf::Set(name, tab(i-1)); if (i > 1) diff --git a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx index 9044404f9b..67e250d795 100644 --- a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx @@ -550,7 +550,7 @@ void BRepAlgo_Loop::Perform() std::cout << "NewLoop" << std::endl; NbLoops++; #ifdef DRAW - sprintf(name, "FLoop_%d", NbLoops); + Sprintf(name, "FLoop_%d", NbLoops); DBRep::Set(name, myFace); Standard_Integer NbEdges = 1; #endif @@ -558,7 +558,7 @@ void BRepAlgo_Loop::Perform() { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); #ifdef DRAW - sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); + Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); DBRep::Set(name, E); #endif } @@ -566,7 +566,7 @@ void BRepAlgo_Loop::Perform() { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); #ifdef DRAW - sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); + Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); DBRep::Set(name, E); #endif } @@ -632,7 +632,7 @@ void BRepAlgo_Loop::Perform() TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (Done.Add(E)) { - sprintf(name, "EEC_%d_%d", NbLoops, NbEdges++); + Sprintf(name, "EEC_%d_%d", NbLoops, NbEdges++); DBRep::Set(name, E); } } @@ -763,7 +763,7 @@ void BRepAlgo_Loop::Perform() #ifdef DRAW if (AffichLoop) { - sprintf(name, "NW_%d_%d", NbLoops, NbWires++); + Sprintf(name, "NW_%d_%d", NbLoops, NbWires++); DBRep::Set(name, NW); } #endif diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx index 82c7f22ecb..31350e8dd1 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx @@ -647,7 +647,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "PROFIL_%d", ++NbPROFILS); + Sprintf(name, "PROFIL_%d", ++NbPROFILS); DBRep::Set(name, Pr); } #endif @@ -962,7 +962,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "ARCEDGE_%d_%d_%d", i, vv, Ti); + Sprintf(name, "ARCEDGE_%d_%d_%d", i, vv, Ti); DBRep::Set(name, CurrentEdge); } #endif @@ -1141,7 +1141,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); + Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); DBRep::Set(name, aSeqOfShape.Value(k)); } #endif @@ -1185,7 +1185,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); + Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); DBRep::Set(name, aSeqOfShape.Value(k)); } #endif @@ -1278,7 +1278,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, { std::cout << " End of construction of an elementary volevo." << std::endl; char name[100]; - sprintf(name, "VEVO_%d", ++NbVEVOS); + Sprintf(name, "VEVO_%d", ++NbVEVOS); DBRep::Set(name, myShape); } #endif @@ -1391,7 +1391,7 @@ void BRepFill_Evolved::PlanarPerform(const TopoDS_Face& Sp, for (; it.More(); it.Next()) { char name[100]; - sprintf(name, "PARALI_%d", ++k); + Sprintf(name, "PARALI_%d", ++k); DBRep::Set(name, it.Value()); } } @@ -1501,7 +1501,7 @@ void BRepFill_Evolved::VerticalPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "PARALI_%d", ++NbVEVOS); + Sprintf(name, "PARALI_%d", ++NbVEVOS); DBRep::Set(name, Base); } #endif @@ -1511,7 +1511,7 @@ void BRepFill_Evolved::VerticalPerform(const TopoDS_Face& Sp, if (AffichEdge) { char name[100]; - sprintf(name, "PRISM_%d", NbVEVOS); + Sprintf(name, "PRISM_%d", NbVEVOS); DBRep::Set(name, PS.Shape()); } #endif @@ -1803,7 +1803,7 @@ void BRepFill_Evolved::PrepareSpine(TopoDS_Face& WorkSpine, if (AffichEdge) { char name[100]; - sprintf(name, "workspine"); + Sprintf(name, "workspine"); DBRep::Set(name, WorkSpine); } #endif @@ -2280,9 +2280,9 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, const gp_Ax3& AxeRef) if (AffichGeom) { char name[100]; - sprintf(name, "EVOLBASE_%d", ++NbFACES); + Sprintf(name, "EVOLBASE_%d", ++NbFACES); DBRep::Set(name, SE); - sprintf(name, "EVOLPROF_%d", NbFACES); + Sprintf(name, "EVOLPROF_%d", NbFACES); DBRep::Set(name, GenProf); } #endif @@ -2294,7 +2294,7 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, const gp_Ax3& AxeRef) if (AffichGeom) { char name[100]; - sprintf(name, "EVOL_%d", ++NbFACES); + Sprintf(name, "EVOL_%d", ++NbFACES); DBRep::Set(name, Pipe.Shape()); } #endif @@ -2367,13 +2367,13 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE, if (AffichGeom) { char name[100]; - sprintf(name, "EVOLBASE_%d", ++NbFACES); + Sprintf(name, "EVOLBASE_%d", ++NbFACES); DrawTrSurf::Set(name, new Geom_Line(AxeRev)); // DrawTrSurf::Set(name,new Geom_Line(AxeRev)); - sprintf(name, "EVOLPROF_%d", NbFACES); + Sprintf(name, "EVOLPROF_%d", NbFACES); DBRep::Set(name, GenProf); - sprintf(name, "EVOL_%d", NbFACES); + Sprintf(name, "EVOL_%d", NbFACES); DBRep::Set(name, Rev.Shape()); } #endif @@ -2463,10 +2463,10 @@ void BRepFill_Evolved::TransformInitWork(const TopLoc_Location& LS, const TopLoc if (AffichEdge) { char name[100]; - sprintf(name, "movedspine"); + Sprintf(name, "movedspine"); TopoDS_Face SL = mySpine; DBRep::Set(name, SL); - sprintf(name, "movedprofile"); + Sprintf(name, "movedprofile"); TopoDS_Wire PL = myProfile; DBRep::Set(name, PL); } @@ -2673,7 +2673,7 @@ void TrimFace(const TopoDS_Face& Face, std::cout << " : " << NB << " edges within the restriction" << std::endl; for (Standard_Integer j = 1; j <= NB; j++) { - sprintf(name, "TRIMEDGE_%d_%d", NbTRIMFACES, j); + Sprintf(name, "TRIMEDGE_%d_%d", NbTRIMFACES, j); DBRep::Set(name, TopoDS::Edge(TheEdges.Value(j))); } } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx index 40d0182974..95a3ed9d0b 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx @@ -502,11 +502,11 @@ void BRepFill_MultiLine::Curves(Handle(Geom_Curve)& Curve, if (AffichCurve) { char name[100]; - sprintf(name, "C2_%d", NbProj); + Sprintf(name, "C2_%d", NbProj); DrawTrSurf::Set(name, TLine); - sprintf(name, "C3_%d", NbProj); + Sprintf(name, "C3_%d", NbProj); DrawTrSurf::Set(name, Curve); - sprintf(name, "SS_%d", NbProj); + Sprintf(name, "SS_%d", NbProj); DrawTrSurf::Set(name, Plane); NbProj++; } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx index b23c2188ff..19a02959cb 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx @@ -380,7 +380,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S, { NBSECT++; char name[256]; - sprintf(name, "WIRE_%d", NBSECT); + Sprintf(name, "WIRE_%d", NBSECT); DBRep::Set(name, TopoDS::Wire(S.Value(i))); } #endif @@ -562,7 +562,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal& P, const Standard_Bo if (Affich) { char* name = new char[100]; - sprintf(name, "Ref_Surf"); + Sprintf(name, "Ref_Surf"); DrawTrSurf::Set(name, mySurface); } #endif diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx index 53cd272eb0..e29885a1e7 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx @@ -824,7 +824,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine, if (AffichGeom) { char name[256]; - sprintf(name, "BISSEC_%d", NbBISSEC++); + Sprintf(name, "BISSEC_%d", NbBISSEC++); DrawTrSurf::Set(name, Bisec.Value()); } #endif @@ -2052,7 +2052,7 @@ void MakeCircle(const TopoDS_Edge& E, if (AffichGeom && !OE.IsNull()) { char name[256]; - sprintf(name, "OFFSET_%d", ++NbOFFSET); + Sprintf(name, "OFFSET_%d", ++NbOFFSET); DBRep::Set(name, OE); } #endif @@ -2182,7 +2182,7 @@ void MakeOffset(const TopoDS_Edge& E, if (AffichGeom && !OE.IsNull()) { char name[256]; - sprintf(name, "OFFSET_%d", ++NbOFFSET); + Sprintf(name, "OFFSET_%d", ++NbOFFSET); DBRep::Set(name, OE); // Standard_Real ii = 0; } @@ -2443,7 +2443,7 @@ void TrimEdge(const TopoDS_Edge& E, if (AffichEdge) { char name[256]; - sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES); + Sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES); DBRep::Set(name, NewEdge); } if (Affich2d) @@ -2454,7 +2454,7 @@ void TrimEdge(const TopoDS_Edge& E, Handle(Geom2d_Curve) C; BRep_Tool::CurveOnSurface(NewEdge, C, Surf, L, f, l); char name[256]; - sprintf(name, "OFFSET2d_%d", NbTRIMEDGES++); + Sprintf(name, "OFFSET2d_%d", NbTRIMEDGES++); Handle(Geom2d_TrimmedCurve) C2d = new Geom2d_TrimmedCurve(C, f, l); Handle(DrawTrSurf_Curve2d) dr = new DrawTrSurf_Curve2d(C2d, Standard_False); dr->SetColor(Draw_bleu); diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx index 7c85d8a90b..42e5d7e215 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx @@ -1107,7 +1107,7 @@ void BRepFill_PipeShell::Prepare() for (Standard_Integer i = 1; i <= WSeq.Length(); i++) { NBSECT++; - sprintf(name, "WSeq_%d", NBSECT); + Sprintf(name, "WSeq_%d", NBSECT); DBRep::Set(name, TopoDS::Wire(WSeq.Value(i))); } } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx index 16fd3a8a1c..1e4b561a03 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx @@ -798,11 +798,11 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d, { // Error of construction !! #ifdef DRAW char name[100]; - sprintf(name, "firstvertex_error"); + Sprintf(name, "firstvertex_error"); DBRep::Set(name, VF); - sprintf(name, "lastvertex_error"); + Sprintf(name, "lastvertex_error"); DBRep::Set(name, VL); - sprintf(name, "curve3d_error"); + Sprintf(name, "curve3d_error"); char* Temp = name; DrawTrSurf::Set(Temp, C3d); // DrawTrSurf::Set(name, C3d); @@ -1573,11 +1573,11 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, { // Erreur de construction !! #ifdef DRAW char name[100]; - sprintf(name, "firstvertex_error"); + Sprintf(name, "firstvertex_error"); DBRep::Set(name, VFirst); - sprintf(name, "lastvertex_error"); + Sprintf(name, "lastvertex_error"); DBRep::Set(name, VLast); - sprintf(name, "curve3d_error"); + Sprintf(name, "curve3d_error"); char* Temp = name; DrawTrSurf::Set(Temp, Iso); // DrawTrSurf::Set(name,Iso); @@ -2129,11 +2129,11 @@ Standard_Boolean BRepFill_Sweep::BuildWire(const BRepFill_TransitionStyle /*Tran { // Error of construction !! #ifdef DRAW char name[100]; - sprintf(name, "firstvertex_error"); + Sprintf(name, "firstvertex_error"); DBRep::Set(name, myVEdges->Value(1, ipath)); - sprintf(name, "lastvertex_error"); + Sprintf(name, "lastvertex_error"); DBRep::Set(name, myVEdges->Value(1, ipath + 1)); - sprintf(name, "curve3d_error"); + Sprintf(name, "curve3d_error"); char* Temp = name; DrawTrSurf::Set(Temp, Iso); // DrawTrSurf::Set(name,Iso); @@ -2145,11 +2145,11 @@ Standard_Boolean BRepFill_Sweep::BuildWire(const BRepFill_TransitionStyle /*Tran #ifdef DRAW if (Affich) { - sprintf(name, "Surf_%d", ipath); + Sprintf(name, "Surf_%d", ipath); char* Temp = name; DrawTrSurf::Set(Temp, S); // DrawTrSurf::Set(name, S); - sprintf(name, "Edge_%d", ipath); + Sprintf(name, "Edge_%d", ipath); DBRep::Set(name, E); } #endif @@ -2292,7 +2292,7 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra #ifdef DRAW if (Affich) { - sprintf(name, "Surf_%d_%d", isec, IPath); + Sprintf(name, "Surf_%d_%d", isec, IPath); char* Temp = name; DrawTrSurf::Set(Temp, TabS(isec, ipath)); } @@ -2869,7 +2869,7 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra { for (isec = 1; isec <= NbLaw + 1; isec++) { - sprintf(name, "uedge_%d_%d", isec, IPath); + Sprintf(name, "uedge_%d_%d", isec, IPath); DBRep::Set(name, UEdge(isec, ipath)); } } @@ -2878,13 +2878,13 @@ Standard_Boolean BRepFill_Sweep::BuildShell(const BRepFill_TransitionStyle /*Tra { for (isec = 1; isec <= NbLaw; isec++) { - sprintf(name, "vedge_%d_%d", isec, IPath); + Sprintf(name, "vedge_%d_%d", isec, IPath); DBRep::Set(name, VEdge(isec, ipath)); } for (isec = 1; isec <= NbLaw + 1; isec++) { - sprintf(name, "vertex_%d_%d", isec, IPath); + Sprintf(name, "vertex_%d_%d", isec, IPath); DBRep::Set(name, Vertex(isec, ipath)); } } @@ -3675,9 +3675,9 @@ Standard_Boolean BRepFill_Sweep::PerformCorner(const Standard_Integer char name[100]; DBRep::Set("TrimmedShell", TheShape); for (jj=1; jj <=myFaces->ColLength(); jj++){ - sprintf(name,"Tfaces_%d_%d", jj, I1); + Sprintf(name,"Tfaces_%d_%d", jj, I1); DBRep::Set(name, myFaces->Value(jj, I1)); - sprintf(name,"Tfaces_%d_%d", jj, I2); + Sprintf(name,"Tfaces_%d_%d", jj, I2); DBRep::Set(name, myFaces->Value(jj, I2)); } } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx index 13e1cb28c8..a15db88eca 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -331,19 +331,19 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, f = AC1.FirstParameter(); l = AC1.LastParameter(); char name[32]; - sprintf(name, "C1_%d", ++intind); + Sprintf(name, "C1_%d", ++intind); DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C1, f, l)); f = AC2.FirstParameter(); l = AC2.LastParameter(); - sprintf(name, "C2_%d", intind); + Sprintf(name, "C2_%d", intind); DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C2, f, l)); f = myBis.FirstParameter(); l = myBis.LastParameter(); - sprintf(name, "BIS%d", intind); + Sprintf(name, "BIS%d", intind); DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(myBis.Curve(), f, l)); - sprintf(name, "E1_%d", intind); + Sprintf(name, "E1_%d", intind); DBRep::Set(name, Edge1); - sprintf(name, "E2_%d", intind); + Sprintf(name, "E2_%d", intind); DBRep::Set(name, Edge2); } #endif diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx index 177d64e168..f28ae362dd 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx @@ -97,19 +97,19 @@ BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& B #ifdef DRAW char name[256]; - sprintf(name, "FACE1_%d", NBCALL); + Sprintf(name, "FACE1_%d", NBCALL); DBRep::Set(name, myFace1); - sprintf(name, "FACE2_%d", NBCALL); + Sprintf(name, "FACE2_%d", NBCALL); DBRep::Set(name, myFace2); - sprintf(name, "EDGE1_%d", NBCALL); + Sprintf(name, "EDGE1_%d", NBCALL); DBRep::Set(name, myEdge1); - sprintf(name, "EDGE2_%d", NBCALL); + Sprintf(name, "EDGE2_%d", NBCALL); DBRep::Set(name, myEdge2); - sprintf(name, "BISSEC_%d", NBCALL); + Sprintf(name, "BISSEC_%d", NBCALL); DrawTrSurf::Set(name, myBis); #endif } @@ -403,10 +403,10 @@ void BRepFill_TrimSurfaceTool::IntersectWith(const TopoDS_Edge& EdgeOnF1, { char name[256]; Standard_Integer i1 = 0, i2 = 2; - sprintf(name, "EdgeOnF1_%d_%d", i1, NBCALL); + Sprintf(name, "EdgeOnF1_%d_%d", i1, NBCALL); DBRep::Set(name, EdgeOnF1); - sprintf(name, "EdgeOnF2_%d_%d", i2, NBCALL); + Sprintf(name, "EdgeOnF2_%d_%d", i2, NBCALL); DBRep::Set(name, EdgeOnF2); } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx index 8f277d4937..71072f4ae9 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx @@ -330,11 +330,11 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real #ifdef IFV char name[16]; char* nm = &name[0]; - sprintf(name, "C3D_%d", ++NbCalls); + Sprintf(name, "C3D_%d", ++NbCalls); DrawTrSurf::Set(nm, C3D); - sprintf(name, "PC1_%d", NbCalls); + Sprintf(name, "PC1_%d", NbCalls); DrawTrSurf::Set(nm, PC1); - sprintf(name, "PC2_%d", NbCalls); + Sprintf(name, "PC2_%d", NbCalls); DrawTrSurf::Set(nm, PC2); #endif //*/ @@ -515,13 +515,13 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real iparmax = NbPol; #ifdef IFV - sprintf(name, "C3Dmod_%d", NbCalls); + Sprintf(name, "C3Dmod_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, C3D); - sprintf(name, "PC1mod_%d", NbCalls); + Sprintf(name, "PC1mod_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, PC1); - sprintf(name, "PC2mod_%d", NbCalls); + Sprintf(name, "PC2mod_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, PC2); #endif @@ -743,18 +743,18 @@ Standard_Boolean TopOpeBRepTool_CurveTool::MakeCurves(const Standard_Real } #ifdef IFV - sprintf(name, "C3Dnew_%d", NbCalls); + Sprintf(name, "C3Dnew_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, C3Dnew); if (CompPC1) { - sprintf(name, "PC1new_%d", NbCalls); + Sprintf(name, "PC1new_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, PC1new); } if (CompPC2) { - sprintf(name, "PC2new_%d", NbCalls); + Sprintf(name, "PC2new_%d", NbCalls); nm = &name[0]; DrawTrSurf::Set(nm, PC2new); } diff --git a/src/ModelingAlgorithms/TKFeat/BRepFeat/BRepFeat_MakeLinearForm.cxx b/src/ModelingAlgorithms/TKFeat/BRepFeat/BRepFeat_MakeLinearForm.cxx index 221efdf6f0..002536439d 100644 --- a/src/ModelingAlgorithms/TKFeat/BRepFeat/BRepFeat_MakeLinearForm.cxx +++ b/src/ModelingAlgorithms/TKFeat/BRepFeat/BRepFeat_MakeLinearForm.cxx @@ -984,14 +984,14 @@ void BRepFeat_MakeLinearForm::Perform() Standard_Integer ii = 0; for(; expr.More(); expr.Next()) { ii++; - sprintf(nom1, "faceinitial_%d", ii); + Sprintf(nom1, "faceinitial_%d", ii); DBRep::Set(nom1, expr.Current()); Standard_Integer jj = 0; const TopTools_ListOfShape& list = Modified(expr.Current()); TopTools_ListIteratorOfListOfShape ite(list); for(; ite.More(); ite.Next()) { jj++; - sprintf(nom2, "facemodifie_%d_%d", ii, jj); + Sprintf(nom2, "facemodifie_%d_%d", ii, jj); DBRep::Set(nom2, ite.Value()); } } @@ -1000,14 +1000,14 @@ void BRepFeat_MakeLinearForm::Perform() ii=0; for(; expr.More(); expr.Next()) { ii++; - sprintf(nom1, "edgeinitial_%d", ii); + Sprintf(nom1, "edgeinitial_%d", ii); DBRep::Set(nom1, expr.Current()); Standard_Integer jj = 0; const TopTools_ListOfShape& genf = Generated(expr.Current()); TopTools_ListIteratorOfListOfShape ite(genf); for(; ite.More(); ite.Next()) { jj++; - sprintf(nom2, "egdegeneree_%d_%d", ii, jj); + Sprintf(nom2, "egdegeneree_%d_%d", ii, jj); DBRep::Set(nom2, ite.Value()); } } diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx index 313c2ebf09..d02162dd76 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx @@ -85,7 +85,7 @@ static void Drawsect(const Handle(Adaptor3d_Surface)& surf, // POP pour NT // char name[100]; char* name = new char[100]; - sprintf(name, "%s_%d", "Section", IndexOfSection); + Sprintf(name, "%s_%d", "Section", IndexOfSection); #ifdef DRAW DrawTrSurf::Set(name, sect); #endif diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index b5de50a9fe..c147a12d2a 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -153,7 +153,7 @@ static void Drawsect(const Standard_Real param, Blend_RstRstFunction& Func) #ifdef DRAW char tname[100]; Standard_CString name = tname; - sprintf(name, "%s_%d", "Section", IndexOfSection); + Sprintf(name, "%s_%d", "Section", IndexOfSection); DrawTrSurf::Set(name, sect); #endif } diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index a246e6ade9..dfce93b2c6 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -139,7 +139,7 @@ static void Drawsect(const Standard_Real param, Blend_SurfRstFunction& Func) #ifdef DRAW char tname[100]; Standard_CString name = tname; - sprintf(name, "%s_%d", "Section", IndexOfSection); + Sprintf(name, "%s_%d", "Section", IndexOfSection); DrawTrSurf::Set(name, sect); #endif } diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx index 897862606c..a893565674 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx @@ -103,12 +103,12 @@ static void Drawsect(const Handle(Adaptor3d_Surface)& surf1, if ((State == Blend_StepTooLarge) || (State == Blend_SamePoints)) { IndexOfRejection++; - sprintf(name, "%s_%d", "Rejection", IndexOfRejection); + Sprintf(name, "%s_%d", "Rejection", IndexOfRejection); } else { IndexOfSection++; - sprintf(name, "%s_%d", "Section", IndexOfSection); + Sprintf(name, "%s_%d", "Section", IndexOfSection); } #ifdef DRAW Handle(DrawTrSurf_BSplineCurve) BS = new (DrawTrSurf_BSplineCurve)(sect); @@ -2251,11 +2251,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, #ifdef DRAW Standard_Integer nbpts = line->NbPoints(); char name[100]; - sprintf(name, "pg%d", nbpts); + Sprintf(name, "pg%d", nbpts); DrawTrSurf::Set(name, PtOnGuide); - sprintf(name, "p1_%d", nbpts); + Sprintf(name, "p1_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS1()); - sprintf(name, "p2_%d", nbpts); + Sprintf(name, "p2_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS2()); #endif @@ -2327,11 +2327,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, #ifdef DRAW Standard_Integer nbpts = line->NbPoints(); char name[100]; - sprintf(name, "pg%d", nbpts); + Sprintf(name, "pg%d", nbpts); DrawTrSurf::Set(name, PtOnGuide); - sprintf(name, "p1_%d", nbpts); + Sprintf(name, "p1_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS1()); - sprintf(name, "p2_%d", nbpts); + Sprintf(name, "p2_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS2()); #endif @@ -2374,11 +2374,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, #ifdef DRAW Standard_Integer nbpts = line->NbPoints(); char name[100]; - sprintf(name, "pg%d", nbpts); + Sprintf(name, "pg%d", nbpts); DrawTrSurf::Set(name, PtOnGuide); - sprintf(name, "p1_%d", nbpts); + Sprintf(name, "p1_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS1()); - sprintf(name, "p2_%d", nbpts); + Sprintf(name, "p2_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS2()); #endif @@ -2410,11 +2410,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, #ifdef DRAW Standard_Integer nbpts = line->NbPoints(); char name[100]; - sprintf(name, "pg%d", nbpts); + Sprintf(name, "pg%d", nbpts); DrawTrSurf::Set(name, PtOnGuide); - sprintf(name, "p1_%d", nbpts); + Sprintf(name, "p1_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS1()); - sprintf(name, "p2_%d", nbpts); + Sprintf(name, "p2_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS2()); #endif @@ -2446,11 +2446,11 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, #ifdef DRAW Standard_Integer nbpts = line->NbPoints(); char name[100]; - sprintf(name, "pg%d", nbpts); + Sprintf(name, "pg%d", nbpts); DrawTrSurf::Set(name, PtOnGuide); - sprintf(name, "p1_%d", nbpts); + Sprintf(name, "p1_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS1()); - sprintf(name, "p2_%d", nbpts); + Sprintf(name, "p2_%d", nbpts); DrawTrSurf::Set(name, previousP.PointOnS2()); #endif diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx index 22b65ece23..d3d22d2963 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx @@ -445,7 +445,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData(Handle(ChFiDS_SurfData)& D IndexOfConge++; // char name[100]; char* name = new char[100]; - sprintf(name, "%s_%d", "Surf", IndexOfConge); + Sprintf(name, "%s_%d", "Surf", IndexOfConge); DrawTrSurf::Set(name, Surfcoin); } #endif @@ -757,7 +757,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data IndexOfConge++; // char name[100]; char* name = new char[100]; - sprintf(name, "%s_%d", "Surf", IndexOfConge); + Sprintf(name, "%s_%d", "Surf", IndexOfConge); DrawTrSurf::Set(name, Surf); } #endif diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx index 4abb018bd2..ebb58e60e9 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx @@ -368,7 +368,7 @@ void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr, #ifdef DRAW // char name[100]; char* name = new char[100]; - sprintf(name, "fillet_%d", NbSD++); + Sprintf(name, "fillet_%d", NbSD++); DBRep::Set(name, F); #endif } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/ApproxInt/ApproxInt_MultiLine.gxx b/src/ModelingAlgorithms/TKGeomAlgo/ApproxInt/ApproxInt_MultiLine.gxx index 39ff4ae06a..b8066f0e17 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/ApproxInt/ApproxInt_MultiLine.gxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/ApproxInt/ApproxInt_MultiLine.gxx @@ -688,10 +688,10 @@ Standard_Boolean { const IntSurf_PntOn2S& thePoint = ResultPntOn2SLine->Value(i); gp_Pnt curPnt = thePoint.Value(); - sprintf(name, "p%d_%d", indc, i); + Sprintf(name, "p%d_%d", indc, i); DrawTrSurf::Set(name, curPnt); gp_Pnt2d curPnt2d = thePoint.ValueOnSurface(onfirst); - sprintf(name, "pp%d_%d", indc, i); + Sprintf(name, "pp%d_%d", indc, i); DrawTrSurf::Set(name, curPnt2d); } #endif diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx index 563810b21b..47a59b52fa 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -191,9 +191,9 @@ void GeomFill_CircularBlendFunc::Discret() myCurve1->D0(T, P1); myCurve2->D0(T, P2); /* - sprintf(name,"PNT_%d",NbSections++); + Sprintf(name,"PNT_%d",NbSections++); DrawTrSurf::Set(name, P1); - sprintf(name,"PNT_%d",NbSections++); + Sprintf(name,"PNT_%d",NbSections++); DrawTrSurf::Set(name, P2);*/ myPath->D0(T, Center); ns1.SetXYZ(Center.XYZ() - P1.XYZ()); @@ -296,7 +296,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::D0(const Standard_Real Param, #ifdef DRAW // Handle(Geom_BSplineCurve) BS = // new Geom_BSplineCurve(Poles,Weights,Knots,Mults,Degree); -// sprintf(name,"SECT_%d",NbSections++); +// Sprintf(name,"SECT_%d",NbSections++); // DrawTrSurf::Set(name,BS); #endif return Standard_True; diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx index c597d90918..c8a9fc0c14 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -427,7 +427,7 @@ void GeomFill_CorrectedFrenet::Init() } char tname[100]; Standard_CString name = tname; - sprintf(name, "Binorm_%d", ++CorrNumber); + Sprintf(name, "Binorm_%d", ++CorrNumber); Handle(Geom_BSplineCurve) BS = new (Geom_BSplineCurve)(TabP, TI, M, 1); // DrawTrSurf::Set(&name[0], BS); DrawTrSurf::Set(name, BS); diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx index 9855a4c281..37d21999c3 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx @@ -61,7 +61,7 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C, if (Affich) { char name[256]; - sprintf(name, "UnifSect_%d", ++NumSec); + Sprintf(name, "UnifSect_%d", ++NumSec); DrawTrSurf::Set(name, myCurve); } #endif diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx index 06c84f7673..0d4903b23a 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx @@ -680,7 +680,7 @@ void GeomFill_NSections::ComputeSurface() { #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 diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx index 18649599a8..495a2f0a2a 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx @@ -1050,7 +1050,7 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) 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 } @@ -1086,7 +1086,7 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) 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 } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx index 2c0d1e1950..3204ff8033 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -559,7 +559,7 @@ void GeomFill_SweepSectionGenerator::Section(const Standard_Integer P, if (Affich) { char name[256]; - sprintf(name, "SECTION_%d", ++NbSECTIONS); + Sprintf(name, "SECTION_%d", ++NbSECTIONS); DrawTrSurf::Set(name, myFirstSect->Transformed(cumulTR)); } #endif @@ -647,7 +647,7 @@ void GeomFill_SweepSectionGenerator::Section(const Standard_Integer P, if (Affich) { char name[256]; - sprintf(name, "SECTION_%d", ++NbSECTIONS); + Sprintf(name, "SECTION_%d", ++NbSECTIONS); DrawTrSurf::Set(name, BS); } #endif diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx index dccfba7454..43e411dcdf 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx @@ -62,7 +62,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C, if (Affich) { char name[256]; - sprintf(name, "UnifSect_%d", ++NumSec); + Sprintf(name, "UnifSect_%d", ++NumSec); DrawTrSurf::Set(name, myCurve); } #endif diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx index f149d19c58..d9e408c188 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -301,7 +301,7 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Adap if (Affich) { char name[256]; - sprintf(name, "proj_%d", ++NbProj); + Sprintf(name, "proj_%d", ++NbProj); DrawTrSurf::Set(name, Curve2d); } #endif @@ -1681,7 +1681,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t if (Affich) { char name[256]; - sprintf(name, "planinit_%d", NbPlan + 1); + Sprintf(name, "planinit_%d", NbPlan + 1); DrawTrSurf::Set(name, mySurfInit); } #endif @@ -1777,7 +1777,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t if (Affich) { char name[256]; - sprintf(name, "surfinit_%d", ++NbPlan); + Sprintf(name, "surfinit_%d", ++NbPlan); DrawTrSurf::Set(name, mySurfInit); } #endif @@ -2001,7 +2001,7 @@ void GeomPlate_BuildPlateSurface::Intersect(Handle(GeomPlate_HArray1OfSequenceOf { 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 @@ -2500,7 +2500,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface::VerifSurface(const Standard_Intege 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); @@ -2511,7 +2511,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface::VerifSurface(const Standard_Intege 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); } @@ -2531,7 +2531,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface::VerifSurface(const Standard_Intege 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 diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_Polygon.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_Polygon.gxx index d5aa2bab4a..8cec315e39 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_Polygon.gxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_Polygon.gxx @@ -231,7 +231,7 @@ void IntCurveSurface_Polygon::Dump(void) const { 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 : "<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; diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx index 10e1904338..4bf7912bfe 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx @@ -408,9 +408,9 @@ static void EdgeInter(const TopoDS_Face& F, 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 @@ -691,9 +691,9 @@ static void RefEdgeInter(const TopoDS_Face& F, 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 diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx index f30c9e67bd..699f9bb956 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx @@ -498,7 +498,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, if (Affich) { char name[256]; - sprintf(name, "CF_%d", NbF++); + Sprintf(name, "CF_%d", NbF++); DBRep::Set(name, F); } #endif diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx index e3e874a457..cc58452d18 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx @@ -143,7 +143,7 @@ static void DEBVerticesControl(const TopTools_IndexedMapOfShape& NewEdges, #ifdef DRAW if (AffichInt2d) { - sprintf(name, "VP_%d", NVP++); + Sprintf(name, "VP_%d", NVP++); DBRep::Set(name, it1LE.Value()); } #endif @@ -154,7 +154,7 @@ static void DEBVerticesControl(const TopTools_IndexedMapOfShape& NewEdges, #ifdef DRAW if (AffichInt2d) { - sprintf(name, "VM_%d", NVM++); + Sprintf(name, "VM_%d", NVM++); DBRep::Set(name, it1LE.Value()); } #endif @@ -164,7 +164,7 @@ static void DEBVerticesControl(const TopTools_IndexedMapOfShape& NewEdges, #ifdef DRAW if (AffichInt2d) { - sprintf(name, "VN_%d", NVN++); + Sprintf(name, "VN_%d", NVN++); DBRep::Set(name, it1LE.Value()); } #endif @@ -1557,7 +1557,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AF_%d", NbAF++); + Sprintf(name, "AF_%d", NbAF++); DBRep::Set(name, OFE); } #endif @@ -1570,7 +1570,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, COE); COES.Add(COE); } @@ -1602,7 +1602,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AF_%d", NbAF++); + Sprintf(name, "AF_%d", NbAF++); DBRep::Set(name, OF); } #endif @@ -1624,7 +1624,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, COE); COES.Add(COE); } @@ -1647,7 +1647,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, OE); COES.Add(OE); } @@ -1672,7 +1672,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, COE); COES.Add(COE); } @@ -1798,7 +1798,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, COE); COES.Add(COE); } @@ -1825,7 +1825,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR #ifdef DRAW if (AffichInt2d) { - sprintf(name, "AE_%d", NbAE++); + Sprintf(name, "AE_%d", NbAE++); DBRep::Set(name, OE); COES.Add(OE); } diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx index 3e16c63cbd..67c4d76d46 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx @@ -1454,14 +1454,14 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, { 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); @@ -1524,7 +1524,7 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, // char name[100]; if (Affich) { - sprintf(name, "SPHERE_%d", NbOFFSET); + Sprintf(name, "SPHERE_%d", NbOFFSET); DrawTrSurf::Set(name, S); } Standard_Integer CO = 1; @@ -1546,7 +1546,7 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, #ifdef DRAW if (Affich) { - sprintf(name, "CURVE_%d_%d", NbOFFSET, CO); + Sprintf(name, "CURVE_%d_%d", NbOFFSET, CO); DrawTrSurf::Set(name, C); CO++; } diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx index 1a8e966945..686bf02fff 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx @@ -720,9 +720,9 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1, 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 @@ -777,7 +777,7 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1, if (AffichInter) { char name[256]; - sprintf(name, "EI_%d", NbNewEdges++); + Sprintf(name, "EI_%d", NbNewEdges++); DBRep::Set(name, E.Oriented(O1)); } #endif @@ -1391,9 +1391,9 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, 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 @@ -1535,7 +1535,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, if (AffichInter) { char name[256]; - sprintf(name, "EI_%d", NbNewEdges++); + Sprintf(name, "EI_%d", NbNewEdges++); DBRep::Set(name, anEdge.Oriented(O1)); } #endif @@ -1869,9 +1869,9 @@ Standard_Boolean BRepOffset_Tool::TryProject(const TopoDS_Face& F1, 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 @@ -1923,7 +1923,7 @@ Standard_Boolean BRepOffset_Tool::TryProject(const TopoDS_Face& F1, if (AffichInter) { char name[256]; - sprintf(name, "EI_%d", NbNewEdges++); + Sprintf(name, "EI_%d", NbNewEdges++); DBRep::Set(name, CurE.Oriented(O1)); } #endif @@ -1946,9 +1946,9 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1, 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 @@ -2004,7 +2004,7 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1, if (AffichInter) { char name[256]; - sprintf(name, "EI_%d", NbNewEdges++); + Sprintf(name, "EI_%d", NbNewEdges++); DBRep::Set(name, E.Oriented(O1)); } #endif @@ -2093,11 +2093,11 @@ static void ExtentEdge(const TopoDS_Face& F, 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 @@ -3601,7 +3601,7 @@ void BRepOffset_Tool::ExtentFace(const TopoDS_Face& F, if (AffichInter) { char name[256]; - sprintf(name, "FTE_%d", NbFTE++); + Sprintf(name, "FTE_%d", NbFTE++); DBRep::Set(name, F); } #endif @@ -4099,7 +4099,7 @@ void BRepOffset_Tool::ExtentFace(const TopoDS_Face& F, if (AffichInter) { char name[256]; - sprintf(name, "FOB_%d", NbFOB++); + Sprintf(name, "FOB_%d", NbFOB++); DBRep::Set(name, NF); } #endif diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index ddc1780e66..ee328895b1 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -249,7 +249,7 @@ static void BuildDomains(TopoDS_Face& myFace, { char name[32]; ns++; - sprintf(name, "FR%d", ns); + Sprintf(name, "FR%d", ns); BRepTools::Write(FR.Current(), name); } #endif diff --git a/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx b/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx index fa78e4f202..b1820e7dff 100644 --- a/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx +++ b/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx @@ -2234,7 +2234,7 @@ void BiTgte_Blend::ComputeSurfaces() #ifdef DRAW if (Affich) { - sprintf(name, "%s_%d", "SURF", nbc); + Sprintf(name, "%s_%d", "SURF", nbc); DBRep::Set(name, AnOffset.Face()); nbc++; } @@ -2276,7 +2276,7 @@ void BiTgte_Blend::ComputeSurfaces() #ifdef DRAW if (Affich) { - sprintf(name, "%s_%d", "SURF", nbc); + Sprintf(name, "%s_%d", "SURF", nbc); DBRep::Set(name, OFT.Face()); nbc++; } @@ -2310,7 +2310,7 @@ void BiTgte_Blend::ComputeShape() 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()); } } diff --git a/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx b/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx index b761968683..51c237f4ba 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx @@ -175,7 +175,7 @@ static void DEBControl(const TopTools_DataMapOfShapeListOfShape& MG) 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 @@ -183,7 +183,7 @@ static void DEBControl(const TopTools_DataMapOfShapeListOfShape& MG) 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 diff --git a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx index 6120295092..f66cd564bd 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx @@ -251,13 +251,13 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve, #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 @@ -404,13 +404,13 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve, #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 @@ -554,13 +554,13 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint, #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 @@ -602,13 +602,13 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint, #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 diff --git a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx index 97e8f6d2a2..b99ab15a7d 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx @@ -331,16 +331,16 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)& CBis1, #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); } } diff --git a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx index 5b043cc759..7b10679208 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx @@ -216,7 +216,7 @@ Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem, 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 @@ -227,7 +227,7 @@ Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem, 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 @@ -266,7 +266,7 @@ Standard_Integer MAT2d_Tool2d::TangentAfter(const Standard_Integer anitem, 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 @@ -282,7 +282,7 @@ Standard_Integer MAT2d_Tool2d::TangentAfter(const Standard_Integer anitem, 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 @@ -426,7 +426,7 @@ void MAT2d_Tool2d::CreateBisector(const Handle(MAT_Bisector)& abisector) #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; @@ -446,7 +446,7 @@ void MAT2d_Tool2d::CreateBisector(const Handle(MAT_Bisector)& abisector) 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 diff --git a/src/ModelingData/TKGeomBase/Approx/Approx_BSplComputeLine.gxx b/src/ModelingData/TKGeomBase/Approx/Approx_BSplComputeLine.gxx index 7740c9d871..aad8c67801 100644 --- a/src/ModelingData/TKGeomBase/Approx/Approx_BSplComputeLine.gxx +++ b/src/ModelingData/TKGeomBase/Approx/Approx_BSplComputeLine.gxx @@ -85,23 +85,23 @@ static void DUMP(const MultiLine& Line) 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; } @@ -118,7 +118,7 @@ static void DUMP(const MultiLine& Line) 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; @@ -126,7 +126,7 @@ static void DUMP(const MultiLine& Line) // 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; @@ -161,7 +161,7 @@ static void DUMP(const AppParCurves_MultiBSpCurve& C) 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); @@ -169,7 +169,7 @@ static void DUMP(const AppParCurves_MultiBSpCurve& C) 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); diff --git a/src/ModelingData/TKGeomBase/Approx/Approx_ComputeLine.gxx b/src/ModelingData/TKGeomBase/Approx/Approx_ComputeLine.gxx index 938ba47033..62558df238 100644 --- a/src/ModelingData/TKGeomBase/Approx/Approx_ComputeLine.gxx +++ b/src/ModelingData/TKGeomBase/Approx/Approx_ComputeLine.gxx @@ -99,7 +99,7 @@ static void DUMP(const AppParCurves_MultiCurve& C) { 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); @@ -109,7 +109,7 @@ static void DUMP(const AppParCurves_MultiCurve& C) { 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); @@ -165,7 +165,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC 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; @@ -213,7 +213,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC { 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 @@ -299,7 +299,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC 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); @@ -344,7 +344,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC { 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 diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 75405d157b..92a8ab2f0c 100644 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -1639,7 +1639,7 @@ Handle(Adaptor2d_Curve2d) ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve 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; diff --git a/src/Visualization/TKOpenGl/OpenGl/OpenGl_AspectsSprite.cxx b/src/Visualization/TKOpenGl/OpenGl/OpenGl_AspectsSprite.cxx index a37bf631e8..643c60a600 100644 --- a/src/Visualization/TKOpenGl/OpenGl/OpenGl_AspectsSprite.cxx +++ b/src/Visualization/TKOpenGl/OpenGl/OpenGl_AspectsSprite.cxx @@ -372,7 +372,7 @@ void OpenGl_AspectsSprite::spriteKeys(const Handle(Graphic3d_MarkerImage)& theMa (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; } } diff --git a/src/Visualization/TKOpenGl/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/Visualization/TKOpenGl/OpenGl/OpenGl_GraduatedTrihedron.cxx index c37d765364..8430ed8c49 100755 --- a/src/Visualization/TKOpenGl/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/Visualization/TKOpenGl/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -528,7 +528,7 @@ void OpenGl_GraduatedTrihedron::renderTickmarkLabels(const Handle(OpenGl_Workspa 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)); diff --git a/src/Visualization/TKService/Graphic3d/Graphic3d_MarkerImage.cxx b/src/Visualization/TKService/Graphic3d/Graphic3d_MarkerImage.cxx index 3b8fb7a3b7..1661ff9fee 100755 --- a/src/Visualization/TKService/Graphic3d/Graphic3d_MarkerImage.cxx +++ b/src/Visualization/TKService/Graphic3d/Graphic3d_MarkerImage.cxx @@ -416,7 +416,7 @@ Handle(Graphic3d_MarkerImage) Graphic3d_MarkerImage::StandardMarker( (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; } diff --git a/src/Visualization/TKV3d/AIS/AIS_ColorScale.cxx b/src/Visualization/TKV3d/AIS/AIS_ColorScale.cxx index d9982dd592..afea862db2 100644 --- a/src/Visualization/TKV3d/AIS/AIS_ColorScale.cxx +++ b/src/Visualization/TKV3d/AIS/AIS_ColorScale.cxx @@ -158,7 +158,7 @@ TCollection_ExtendedString AIS_ColorScale::GetLabel(const Standard_Integer theIn : (0.5 * (GetIntervalValue(theIndex - 1) + GetIntervalValue(theIndex))); char aBuf[1024]; - sprintf(aBuf, myFormat.ToCString(), aVal); + Sprintf(aBuf, myFormat.ToCString(), aVal); return TCollection_ExtendedString(aBuf); } diff --git a/src/Visualization/TKV3d/AIS/AIS_ColorScale.hxx b/src/Visualization/TKV3d/AIS/AIS_ColorScale.hxx index 8a8fbfb303..9f356a3068 100644 --- a/src/Visualization/TKV3d/AIS/AIS_ColorScale.hxx +++ b/src/Visualization/TKV3d/AIS/AIS_ColorScale.hxx @@ -494,7 +494,7 @@ private: 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 diff --git a/src/Visualization/TKV3d/DsgPrs/DsgPrs_AnglePresentation.cxx b/src/Visualization/TKV3d/DsgPrs/DsgPrs_AnglePresentation.cxx index 820c0bec51..19a23683c6 100644 --- a/src/Visualization/TKV3d/DsgPrs/DsgPrs_AnglePresentation.cxx +++ b/src/Visualization/TKV3d/DsgPrs/DsgPrs_AnglePresentation.cxx @@ -142,7 +142,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati { Standard_Real angle = UnitsAPI::CurrentFromLS(Abs(OppParam), "PLANE ANGLE"); char res[80]; - sprintf(res, "%g", angle); + Sprintf(res, "%g", angle); txt = TCollection_ExtendedString(res); } //----------------------------------------------------------------- @@ -247,7 +247,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati 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(); @@ -366,7 +366,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati 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()); @@ -481,7 +481,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati 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()); @@ -617,7 +617,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati 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()); @@ -733,7 +733,7 @@ void DsgPrs_AnglePresentation::Add(const Handle(Prs3d_Presentation)& aPresentati 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); diff --git a/src/Visualization/TKV3d/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx b/src/Visualization/TKV3d/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx index 95589d10fb..2b06ce8092 100644 --- a/src/Visualization/TKV3d/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx +++ b/src/Visualization/TKV3d/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx @@ -53,7 +53,7 @@ void DsgPrs_FilletRadiusPresentation::Add(const Handle(Prs3d_Presentation)& aPre Standard_Boolean& HasCircle) { char valcar[80]; - sprintf(valcar, "%5.2f", theval); + Sprintf(valcar, "%5.2f", theval); Standard_Real FirstParCirc, LastParCirc; Standard_Boolean SpecCase; diff --git a/src/Visualization/TKV3d/Prs3d/Prs3d_DimensionAspect.hxx b/src/Visualization/TKV3d/Prs3d/Prs3d_DimensionAspect.hxx index a73c23bce8..873a30f044 100644 --- a/src/Visualization/TKV3d/Prs3d/Prs3d_DimensionAspect.hxx +++ b/src/Visualization/TKV3d/Prs3d/Prs3d_DimensionAspect.hxx @@ -120,7 +120,7 @@ public: //! 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; diff --git a/src/Visualization/TKV3d/PrsDim/PrsDim_Dimension.cxx b/src/Visualization/TKV3d/PrsDim/PrsDim_Dimension.cxx index 10b8d6055c..bdc880bba3 100644 --- a/src/Visualization/TKV3d/PrsDim/PrsDim_Dimension.cxx +++ b/src/Visualization/TKV3d/PrsDim/PrsDim_Dimension.cxx @@ -246,11 +246,11 @@ TCollection_ExtendedString PrsDim_Dimension::GetValueString(Standard_Real& theWi } 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); } -- 2.39.5