SetPolygonOffsets ( me : mutable;
anObj : InteractiveObject from AIS;
aMode : Integer from Standard;
- aFactor : Real from Standard = 1.0;
- aUnits : Real from Standard = 0.0;
+ aFactor : ShortReal from Standard = 1.0;
+ aUnits : ShortReal from Standard = 0.0;
updateviewer : Boolean from Standard = Standard_True ) is static;
---Purpose: Sets up polygon offsets for the given AIS_InteractiveObject.
-- It simply calls anObj->SetPolygonOffsets()
PolygonOffsets ( me;
anObj : InteractiveObject from AIS;
aMode : out Integer from Standard;
- aFactor : out Real from Standard;
- aUnits : out Real from Standard ) is static;
+ aFactor : out ShortReal from Standard;
+ aUnits : out ShortReal from Standard ) is static;
---Level: Public
---Purpose: Retrieves current polygon offsets settings for <anObj>.
---Category: Inquire methods
void AIS_InteractiveContext::SetPolygonOffsets(
const Handle(AIS_InteractiveObject)& anObj,
const Standard_Integer aMode,
- const Standard_Real aFactor,
- const Standard_Real aUnits,
+ const Standard_ShortReal aFactor,
+ const Standard_ShortReal aUnits,
const Standard_Boolean updateviewer)
{
if ( anObj.IsNull() )
void AIS_InteractiveContext::PolygonOffsets(
const Handle(AIS_InteractiveObject)& anObj,
Standard_Integer& aMode,
- Standard_Real& aFactor,
- Standard_Real& aUnits) const
+ Standard_ShortReal& aFactor,
+ Standard_ShortReal& aUnits) const
{
if ( HasPolygonOffsets( anObj ) )
anObj->PolygonOffsets( aMode, aFactor, aUnits );
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
SetPolygonOffsets ( me : mutable;
aMode : Integer from Standard;
- aFactor : Real from Standard = 1.0;
- aUnits : Real from Standard = 0.0 ) is virtual;
+ aFactor : ShortReal from Standard = 1.0;
+ aUnits : ShortReal from Standard = 0.0 ) is virtual;
---Level: Public
---Purpose: Sets up polygon offsets for this object.
-- It modifies all existing presentations of <anObj> (if any),
PolygonOffsets ( me;
aMode : out Integer from Standard;
- aFactor : out Real from Standard;
- aUnits : out Real from Standard ) is virtual;
+ aFactor : out ShortReal from Standard;
+ aUnits : out ShortReal from Standard ) is virtual;
---Level: Public
---Purpose: Retrieves current polygon offsets settings from <myDrawer>.
---Category: Inquire methods
//function : SetPolygonOffsets
//purpose :
//=======================================================================
-void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
- const Standard_Real aFactor,
- const Standard_Real aUnits)
+void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
+ const Standard_ShortReal aFactor,
+ const Standard_ShortReal aUnits)
{
if ( !HasPolygonOffsets() )
myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
//function : PolygonOffsets
//purpose :
//=======================================================================
-void AIS_InteractiveObject::PolygonOffsets(Standard_Integer& aMode,
- Standard_Real& aFactor,
- Standard_Real& aUnits) const
+void AIS_InteractiveObject::PolygonOffsets(Standard_Integer& aMode,
+ Standard_ShortReal& aFactor,
+ Standard_ShortReal& aUnits) const
{
if( HasPolygonOffsets() )
myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode, aFactor, aUnits );
if (HasPolygonOffsets())
{
Standard_Integer aMode;
- Standard_Real aFactor, aUnits;
+ Standard_ShortReal aFactor, aUnits;
PolygonOffsets(aMode, aFactor, aUnits);
myAspect->SetPolygonOffsets(aMode, aFactor, aUnits);
}
mySections.Clear();
myPAtt.Init();
Handle(TDF_Data) aData = new TDF_Data();
- Standard_Integer aDocumentPos = -1;
+ streampos aDocumentPos = -1;
// 2b. Read the TOC of Sections
if (aFileVer >= 3) {
} // end of reading Sections or shape section
// Return to read of the Document structure
- anIS.seekg((streampos) aDocumentPos);
+ anIS.seekg(aDocumentPos);
// read the header (tag) of the root label
Standard_Integer aTag;
IS.getline(vers,100,'\n');
// BUC60769 PTV 18.10.2000: remove possible '\r' at the end of the line
- for (Standard_Integer lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--)
+ for (Standard_Size lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--)
vers[lv] = '\0';
} while ( ! IS.fail() && strcmp(vers,Version_1) && strcmp(vers,Version_2) &&
if (val > 0 && val <= 3)
BinTools::GetReal(IS, p1);
} else {
- Standard_Integer aPos = IS.tellg();
+ streampos aPos = IS.tellg();
BinTools::GetReal(IS, p1);
val = (Standard_Integer)IS.get();//case {0|1|2|3}
#ifdef MDTV_DEB
{
register Long *pt = pi, i, k;
Long red, green, blue, nc, ncol;
- unsigned short run, packed;
+ Long run, packed;
Long last, lastred, lastgreen, lastblue;
static Long nx, ny;
static Prec lprec;
{
Storage_Error s;
TCollection_AsciiString l;
- Standard_Integer len = strlen(DDF_IOStream::MagicNumber());
+ Standard_Integer len = (Standard_Integer) strlen(DDF_IOStream::MagicNumber());
// Added because of Draw:
// It don't go to next line after reading its own header line information!
if (s == Storage_VSOk) {
TCollection_AsciiString l;
- Standard_Integer len = strlen(DDF_IOStream::MagicNumber());
+ Standard_Integer len = (Standard_Integer) strlen(DDF_IOStream::MagicNumber());
f.ReadChar(l,len);
if (myInterp==NULL) Init();
CData* C = new CData(f,this);
- Standard_Integer length, num_slashes, ii, jj, kk;
+ Standard_Size length, num_slashes, ii, jj, kk;
Tcl_CreateCommand(myInterp,pN,CommandCmd, (ClientData) C, CommandDelete);
// add the help
Standard_SStream& Draw_Interpretor::Log ()
{
return myLog;
-}
\ No newline at end of file
+}
OS.precision(15);
#else
long form = OS.setf(ios::scientific);
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
#endif
gp_Pnt P = N->Point();
if (N->Is3D()) {
OS.precision(15);
#else
long form = OS.setf(ios::scientific);
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
#endif
Poly::Write(T->Triangulation(),OS);
#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX)
OS.precision(15);
#else
long form = OS.setf(ios::scientific);
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
#endif
Poly::Write(T->Polygon3D(),OS);
#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX)
OS.precision(15);
#else
long form = OS.setf(ios::scientific);
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
#endif
Poly::Write(T->Polygon2D(),OS);
#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX)
S.precision(15);
#else
long form = S.setf(ios::scientific);
- int prec = S.precision(15);
+ std::streamsize prec = S.precision(15);
#endif
if (is3D)
S << "Point : " << myPoint.X() << ", " << myPoint.Y() << ", " << myPoint.Z() <<endl;
void GeomTools_Curve2dSet::Write(Standard_OStream& OS)const
{
- int prec = OS.precision(17);
+ std::streamsize prec = OS.precision(17);
Standard_Integer i, nbsurf = myMap.Extent();
OS << "Curve2ds "<< nbsurf << "\n";
void GeomTools_CurveSet::Write(Standard_OStream& OS)const
{
- int prec = OS.precision(17);
+ std::streamsize prec = OS.precision(17);
Standard_Integer i, nbcurve = myMap.Extent();
OS << "Curves "<< nbcurve << "\n";
void GeomTools_SurfaceSet::Write(Standard_OStream& OS)const
{
- int prec = OS.precision(17);
+ std::streamsize prec = OS.precision(17);
Standard_Integer i, nbsurf = myMap.Extent();
OS << "Surfaces "<< nbsurf << "\n";
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
SetPolygonOffsets ( me : mutable;
aMode : Integer from Standard;
- aFactor : Real from Standard = 1.0;
- aUnits : Real from Standard = 0.0 );
+ aFactor : ShortReal from Standard = 1.0;
+ aUnits : ShortReal from Standard = 0.0 );
---Level: Public
---Purpose: Sets up OpenGL polygon offsets mechanism.
-- <aMode> parameter can contain various combinations of
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
PolygonOffsets ( me;
aMode : out Integer from Standard;
- aFactor : out Real from Standard;
- aUnits : out Real from Standard );
+ aFactor : out ShortReal from Standard;
+ aUnits : out ShortReal from Standard );
---Level: Public
---Purpose: Returns current polygon offsets settings.
---Category: Inquire methods
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
-- polygon offsets
MyPolygonOffsetMode : Integer from Standard;
- MyPolygonOffsetFactor : Real from Standard;
- MyPolygonOffsetUnits : Real from Standard;
+ MyPolygonOffsetFactor : ShortReal from Standard;
+ MyPolygonOffsetUnits : ShortReal from Standard;
end AspectFillArea3d;
}
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
-void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer aMode,
- const Standard_Real aFactor,
- const Standard_Real aUnits) {
+void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer aMode,
+ const Standard_ShortReal aFactor,
+ const Standard_ShortReal aUnits) {
MyPolygonOffsetMode = ( aMode & Aspect_POM_Mask );
MyPolygonOffsetFactor = aFactor;
MyPolygonOffsetUnits = aUnits;
}
-void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer& aMode,
- Standard_Real& aFactor,
- Standard_Real& aUnits) const {
+void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer& aMode,
+ Standard_ShortReal& aFactor,
+ Standard_ShortReal& aUnits) const {
aMode = MyPolygonOffsetMode;
aFactor = MyPolygonOffsetFactor;
aUnits = MyPolygonOffsetUnits;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
Standard_Integer aPolyMode;
- Standard_Real aPolyFactor, aPolyUnits;
+ Standard_ShortReal aPolyFactor, aPolyUnits;
CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
MyCGroup.ContextFillArea.PolygonOffsetMode = aPolyMode;
MyCGroup.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
MyCGroup.ContextText.ColorSubTitle.g = float (Gs);
MyCGroup.ContextText.ColorSubTitle.b = float (Bs);
MyCGroup.ContextText.TextZoomable = ATextZoomable;
- MyCGroup.ContextText.TextAngle = ATextAngle;
+ MyCGroup.ContextText.TextAngle = float (ATextAngle);
MyCGroup.ContextText.TextFontAspect = (int)ATextFontAspect;
MyCGroup.ContextText.IsDef = 1;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
Standard_Integer aPolyMode;
- Standard_Real aPolyFactor, aPolyUnits;
+ Standard_ShortReal aPolyFactor, aPolyUnits;
CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
MyCGroup.ContextFillArea.PolygonOffsetMode = aPolyMode;
MyCGroup.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
MyCGroup.ContextText.ColorSubTitle.g = float (Gs);
MyCGroup.ContextText.ColorSubTitle.b = float (Bs);
MyCGroup.ContextText.TextZoomable = ATextZoomable;
- MyCGroup.ContextText.TextAngle = ATextAngle;
+ MyCGroup.ContextText.TextAngle = float (ATextAngle);
MyCGroup.ContextText.TextFontAspect = (int)ATextFontAspect;
MyCGroup.ContextText.IsDef = 1;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
Standard_Integer aPolyMode;
- Standard_Real aPolyFactor, aPolyUnits;
+ Standard_ShortReal aPolyFactor, aPolyUnits;
CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
MyCStructure.ContextFillArea.PolygonOffsetMode = aPolyMode;
MyCStructure.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
MyCStructure.ContextText.ColorSubTitle.g = float (Gs);
MyCStructure.ContextText.ColorSubTitle.b = float (Bs);
MyCStructure.ContextText.TextZoomable = ATextZoomable;
- MyCStructure.ContextText.TextAngle = ATextAngle;
+ MyCStructure.ContextText.TextAngle = float (ATextAngle);
MyCStructure.ContextText.TextFontAspect = (int)ATextFontAspect;
MyCStructure.ContextText.IsDef = 1;
if (IsDeleted ()) return;
MyCStructure.TransformPersistence.Flag = AFlag;
- MyCStructure.TransformPersistence.Point.x = APoint.X();
- MyCStructure.TransformPersistence.Point.y = APoint.Y();
- MyCStructure.TransformPersistence.Point.z = APoint.Z();
+ MyCStructure.TransformPersistence.Point.x = float (APoint.X());
+ MyCStructure.TransformPersistence.Point.y = float (APoint.Y());
+ MyCStructure.TransformPersistence.Point.z = float (APoint.Z());
//MyStructureManager->Update ();
//Update();
MyGraphicDriver->ContextStructure( MyCStructure );
MyCStructure.ContextText.ColorSubTitle.g = float (Gs);
MyCStructure.ContextText.ColorSubTitle.b = float (Bs);
MyCStructure.ContextText.TextZoomable = ATextZoomable;
- MyCStructure.ContextText.TextAngle = ATextAngle;
+ MyCStructure.ContextText.TextAngle = float (ATextAngle);
MyCStructure.ContextText.TextFontAspect = (int)ATextFontAspect;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
Standard_Integer aPolyMode;
- Standard_Real aPolyFactor, aPolyUnits;
+ Standard_ShortReal aPolyFactor, aPolyUnits;
CTXF->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
MyCStructure.ContextFillArea.PolygonOffsetMode = aPolyMode;
MyCStructure.ContextFillArea.PolygonOffsetFactor = aPolyFactor;
Standard_Integer lng = shn.Length();
if (lng > 0) thenames->SetItem (shortname,num);
if (lng > themaxsh) themaxsh = lng;
- lng = strlen (typval->Name());
+ lng = (Standard_Integer) strlen (typval->Name());
if (lng > themaxco) themaxco = lng;
- lng = strlen (typval->Label());
+ lng = (Standard_Integer) strlen (typval->Label());
if (lng > themaxla) themaxla = lng;
thenames->SetItem (typval->Name(),num);
static char blank[] =
" ";
-static Standard_Integer maxblank = strlen(blank);
+static Standard_Integer maxblank = (Standard_Integer) strlen(blank);
Interface_MSG::Interface_MSG (const Standard_CString key)
{
char mess[300];
sprintf (mess, Interface_MSG::Translated(thekey), i1);
- theval = new char (strlen (mess)+1 );
+ theval = new char[strlen (mess) + 1];
strcpy (theval,mess);
}
{
char mess[300];
sprintf (mess, Interface_MSG::Translated(thekey), i1,i2);
- theval = new char (strlen (mess)+1 );
+ theval = new char[strlen (mess) + 1];
strcpy (theval,mess);
}
char mess[300];
sprintf (mess, Interface_MSG::Translated(thekey),
(intervals < 0 ? r1 : Interface_MSG::Intervalled(r1,intervals)) );
- theval = new char (strlen (mess)+1 );
+ theval = new char[strlen (mess) + 1];
strcpy (theval,mess);
}
{
char mess[300];
sprintf (mess, Interface_MSG::Translated(thekey), str);
- theval = new char (strlen (mess)+1 );
+ theval = new char[strlen (mess) + 1];
strcpy (theval,mess);
}
{
char mess[300];
sprintf (mess, Interface_MSG::Translated(thekey), val, str);
- theval = new char (strlen (mess)+1 );
+ theval = new char[strlen (mess) + 1];
strcpy (theval,mess);
}
Standard_CString Interface_MSG::Blanks (const Standard_CString val,
const Standard_Integer max)
{
- Standard_Integer lng = strlen(val);
+ Standard_Integer lng = (Standard_Integer) strlen(val);
if (lng > maxblank || lng > max) return "";
return &blank [maxblank - max + lng];
}
const Standard_Integer just)
{
if (max > maxblank) { Print(S,val,maxblank,just); return; }
- Standard_Integer lng = strlen (val);
+ Standard_Integer lng = (Standard_Integer) strlen (val);
if (lng > max) { S << val; return; }
Standard_Integer m1 = (max-lng) /2;
Standard_Integer m2 = max-lng - m1;
myVal.ptr = NULL;
} else {
myType = LDOM_AsciiFree;
- Standard_Integer aLen = strlen (aValue) + 1;
+ Standard_Size aLen = strlen (aValue) + 1;
myVal.ptr = new char [aLen];
memcpy (myVal.ptr, aValue, aLen);
}
myVal.ptr = NULL;
} else {
myType = LDOM_AsciiDoc;
- Standard_Integer aLen = strlen (aValue) + 1;
+ Standard_Integer aLen = (Standard_Integer) strlen (aValue) + 1;
myVal.ptr = aDoc -> Allocate (aLen);
memcpy (myVal.ptr, aValue, aLen);
}
switch (myType) {
case LDOM_AsciiFree:
if (anOther.myVal.ptr) {
- Standard_Integer aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
+ Standard_Size aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
myVal.ptr = new char [aLen];
memcpy (myVal.ptr, anOther.myVal.ptr, aLen);
break;
switch (myType) {
case LDOM_AsciiFree:
if (anOther.myVal.ptr) {
- Standard_Integer aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
+ Standard_Size aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
myVal.ptr = new char [aLen];
memcpy (myVal.ptr, anOther.myVal.ptr, aLen);
break;
// convert Unicode to Extended String
ptr += 2;
- Standard_Integer aLength = (strlen(ptr) / 4), j = 0;
+ Standard_Size aLength = (strlen(ptr) / 4), j = 0;
Standard_ExtCharacter * aResult = new Standard_ExtCharacter[aLength--];
while (aLength--) {
ptr += 4;
// Read the full buffer and reset start and end buffer pointers
myPtr = &myBuffer[0];
- Standard_Integer aNBytes;
+ Standard_Size aNBytes;
if (myFileDes != FILE_NONVALUE)
aNBytes = read (myFileDes, &myBuffer[aBytesRest],
XML_BUFFER_SIZE - aBytesRest);
{
const char * str = aString.GetString();
if (str) {
- const Standard_Integer aLen = strlen (str);
+ const Standard_Size aLen = strlen (str);
if (aLen > 0) fwrite (str, aLen, 1, myFile);
}
}
//=======================================================================
inline LDOM_XmlWriter& LDOM_XmlWriter::operator << (const LXMLCh * aString)
{
- unsigned int aLength = strlen (aString);
+ Standard_Size aLength = strlen (aString);
if (aLength > 0) fwrite ((void *) aString, aLength, 1, myFile);
return * this;
}
if (aValueStr.Type() == LDOMBasicString::LDOM_Integer) {
Standard_Integer anIntValue;
aValueStr.GetInteger (anIntValue);
- aLength = 20 + strlen (aName);
+ aLength = (Standard_Integer) (20 + strlen (aName));
if (aLength > myABufferLen) {
if (myABuffer != NULL) delete [] myABuffer;
myABuffer = new char [aLength+1];
}
sprintf (myABuffer, "%c%s%c%c%d%c", chSpace, aName,
chEqual, chDoubleQuote, anIntValue, chDoubleQuote);
- aLength = strlen (myABuffer);
+ aLength = (Standard_Integer) strlen (myABuffer);
// String attribute value
} else {
char * encStr;
if (aValueStr.Type() == LDOMBasicString::LDOM_AsciiDocClear) {
encStr = (char *) aValue;
- aLength = 4 + strlen (aValue) + strlen (aName);
+ aLength = (Standard_Integer) (4 + strlen (aValue) + strlen (aName));
} else {
encStr = LDOM_CharReference::Encode (aValue, aLength, Standard_True);
- aLength += 4 + strlen (aName);
+ aLength += (Standard_Integer) (4 + strlen (aName));
}
if (aLength > myABufferLen) {
if (myABuffer != NULL) delete [] myABuffer;
return *this;
// print string according to format
- char * sStringBuffer = new char [Max (strlen(theString)+1, 1024)];
+ char * sStringBuffer = new char [Max ((Standard_Integer)strlen(theString)+1, 1024)];
sprintf (sStringBuffer, aFormat.ToCString(), theString);
TCollection_ExtendedString aStr ( sStringBuffer );
delete [] sStringBuffer;
(void * theItem, const size_t theItemSize) const
{
const ptrdiff_t anOffset = (char *) theItem - (char *) myData;
- const Standard_Integer anIndex = anOffset / theItemSize;
+ const Standard_Integer anIndex = (Standard_Integer) (anOffset / theItemSize);
#ifdef DEB
if (anOffset < 0 || anOffset != Standard_Integer (anIndex * theItemSize)
|| anIndex > Standard_Integer (myLength))
// ---------- PRIVATE FIELDS ----------
Handle_NIS_Drawer myDrawer;
- Standard_Size myID;
+ Standard_Integer myID;
NIS_Drawer::DrawType myDrawType : 3;
NIS_Drawer::DrawType myBaseType : 3;
Standard_Boolean myIsHidden : 1;
if ( !Failed () ) {
- memSize = ms.dwAvailPageFile;
+ memSize = (Standard_Integer) ms.dwAvailPageFile;
if ( WSAStartup ( MAKEWORD( 1, 1 ), &wd ) ) {
MyFaceSize = -1;
else
//TODO catch exeption
- MyFaceSize = str.Token( "-", 7 ).RealValue();
+ MyFaceSize = str.Token( "-", 7 ).IntegerValue();
//detect aspect
if ( str.Token("-", 3).IsEqual( "bold" ) )
myNewStr (0),
myStrPtr (&theStr[0])
{
- const Standard_Integer aStrLen = wcslen(theStr); // Length of the original string
+ const Standard_Integer aStrLen = (Standard_Integer) wcslen(theStr); // Length of the original string
Standard_Integer aNextCRChar = 0; // Character after '\r' (Carriage Return) '\x00\x0D'
Standard_Integer aHTNum = 0; // Number of '\t' (Horizontal Tabulation) '\x00\x09'
Standard_Integer aDumpNum = 0; // Number of '\a', '\b', '\v' and '\f'
// Create : from a CString
//-----------------------------------------------------------------------
PCollection_HAsciiString::PCollection_HAsciiString(const Standard_CString S)
- : Data(strlen(S))
+ : Data((Standard_Integer) strlen(S))
{
for( Standard_Integer i = 0 ; i < Data.Length() ; i++)
Data.SetValue(i, S[i]) ;
// Create : from a CString
//-----------------------------------------------------------------------
PCollection_HExtendedString::PCollection_HExtendedString(const Standard_CString S)
- : Data(strlen(S))
+ : Data((Standard_Integer) strlen(S))
{
for( Standard_Integer i = 0 ; i < Data.Length() ; i++) {
Standard_ExtCharacter val = ToExtCharacter(S[i]);
myAppX2 = Standard_ShortReal(X1);
myAppY2 = Standard_ShortReal(Y1);
if (myX1>=myX2)
- myAppX2=myAppX2+(theDist+theRad)/APPENDIXLEN;
+ myAppX2=Standard_ShortReal( myAppX2+(theDist+theRad)/APPENDIXLEN );
else
- myAppX2=myAppX2-(theDist+theRad)/APPENDIXLEN;
+ myAppX2=Standard_ShortReal( myAppX2-(theDist+theRad)/APPENDIXLEN );
if ( myAppX2 < myMinX ) myMinX = myAppX2;
if ( myAppY2 < myMinY ) myMinY = myAppY2;
for (i = 1; i <= nb; i ++) {
if (ids.Value(i) <= 0 || ids.Value(i) == i) continue;
sprintf (unid,"%d:#%d",i,ids.Value(i));
- nbc = strlen (unid); nbr = ((80-nbc) %4) +2;
+ nbc = (Standard_Integer) strlen (unid); nbr = ((80-nbc) %4) +2;
nbl += nbc;
if (nbl+nbr0 > 79) { nbl = nbc; S<<endl; }
else { nbl += nbr0; for (; nbr0 > 0; nbr0 --) S << " "; }
void StepData_StepWriter::SendComment (const Standard_CString text)
{
if (!thecomm) Interface_InterfaceMismatch::Raise("StepWriter : Comment");
- AddString(text,strlen(text));
+ AddString(text,(Standard_Integer) strlen(text));
}
void StepData_StepWriter::OpenTypedSub (const Standard_CString subtype)
{
AddParam();
- if (subtype[0] != '\0') AddString (subtype,strlen(subtype));
+ if (subtype[0] != '\0') AddString (subtype,(Standard_Integer) strlen(subtype));
AddString(textlist);
thefirst = Standard_True;
thelevel ++;
char lval[12];
AddParam();
sprintf(lval,"%d",val);
- AddString(lval,strlen(lval));
+ AddString(lval,(Standard_Integer) strlen(lval));
}
if (thelabmode < 2 || idnum == idtrue) sprintf(lident,"#%d",idnum);
else sprintf(lident,"%d:#%d",idnum,idtrue);
AddParam();
- AddString(lident,strlen(lident));
+ AddString(lident,(Standard_Integer) strlen(lident));
}
}
void StepData_StepWriter::SendString (const Standard_CString val)
{
AddParam();
- AddString(val,strlen(val));
+ AddString(val,(Standard_Integer) strlen(val));
}
// SendEnum : attention, on envoie un intitule d'Enum ... donc entre . .
if (periodic) OS<<"periodic, ";
OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
- for (i = 1,OS<<"poles : ",l = strlen("poles : ") + 1,n = nbpoles;
+ //l = strlen("poles : ") + 1
+ for (i = 1,OS<<"poles : ",l = 9,n = nbpoles;
i<=n;
i++) {
if (!compact) { if (i == 1) lb = 0; else lb = l; }
OS<<endl;
}
- for (i = 1,OS<<"knots : ",l = strlen("knots : ") + 1,n = nbknots;
+ //l = strlen("knots : ") + 1
+ for (i = 1,OS<<"knots : ",l = 9,n = nbknots;
i<=n;
i++) {
if (!compact) { if (i == 1) lb = 0; else lb = l; }
if (periodic) OS<<"periodic, ";
OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
- for (i = 1,OS<<"poles : ",l = strlen("poles : ") + 1,n = nbpoles;
+ //l = strlen("poles : ") + 1
+ for (i = 1,OS<<"poles : ",l = 9,n = nbpoles;
i<=n;
i++) {
if (!compact) { if (i == 1) lb = 0; else lb = l; }
OS<<endl;
}
- for (i = 1,OS<<"knots : ",l = strlen("knots : ") + 1,n = nbknots;
+ //l = strlen("knots : ") + 1
+ for (i = 1,OS<<"knots : ",l = 9,n = nbknots;
i<=n;
i++) {
if (!compact) { if (i == 1) lb = 0; else lb = l; }
void TopTools_LocationSet::Write(Standard_OStream& OS) const
{
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
Standard_Integer i, nbLoc = myMap.Extent();
OS << "Locations " << nbLoc << "\n";
// on positionne LC_NUMERIC a "C" (point decimal)
setlocale(LC_NUMERIC, "C") ;
- int prec = OS.precision(15);
+ std::streamsize prec = OS.precision(15);
// write the copyright
if (myFormatNb == 2)
//if(pm = strchr(vers,'\r'))
// *pm ='\0';
- for (Standard_Integer lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--)
+ for (Standard_Size lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--)
vers[lv] = '\0';
} while ( ! IS.fail() && strcmp(vers,Version) && strcmp(vers,Version2) );
char *Oper = oper ;
char *Coeff = coeff ;
#endif
- Standard_Integer fr,i;
+ Standard_Integer fr;
+ Standard_Size i;
Standard_Real value;
Handle(Units_Token) token;
struct stat buf;
//for(i=0; i<=255; i++)line[i]=0;
while(file.getline(line,255)) {
- int len = strlen( line ) ;
+ Standard_Size len = strlen( line ) ;
if(len == 1) continue; //skl - ???
for ( i = 0 ; i < 30 ; i++ ) {
if ( i < len )
{
TCollection_AsciiString tstr = str[0];
Standard_Boolean IsPoint = Standard_False;
- Standard_Integer len = strlen(str);
- for(Standard_Integer in=1; in < len; in++) {
+ Standard_Size len = strlen(str);
+ for(Standard_Size in=1; in < len; in++) {
if( str[in]=='0' || str[in]=='1' || str[in]=='2' || str[in]=='3' ||
str[in]=='4' || str[in]=='5' || str[in]=='6' || str[in]=='7' ||
str[in]=='8' || str[in]=='9' ) {
file.getline(line,255);
if (!file)
break;
- fr = strlen(line);
+ fr = (Standard_Integer) strlen(line);
if(fr <= 1)
continue;
//if( !file || line[0] == '.') { //skl
//if(!file) break; //skl
file.getline(line,255);
file.getline(line,255);
- fr = strlen(line);
+ fr = (Standard_Integer) strlen(line);
#if 0 // skl for OCC13438
//for(i=0; i<80; i++)name[i] = 0;
<< "Convert" << Convert << endl
<< "Unit2" << Unit2 << endl ;
#else
- int len = strlen( line ) ;
+ Standard_Integer len = (Standard_Integer) strlen( line ) ;
for ( i=0 ; i<51 ; i++ ) {
if ( i<len )
fr = sscanf(&line[i],"%c",&unite[i]);
if(convert[0] == '[') {
coeff = 1.;
- i = strlen(convert);
+ i = (Standard_Integer) strlen(convert);
convert[i-1] = 0;
ismove = Standard_True;
charnumber = 1;
}
if(convert[charnumber] == '(') {
- i = strlen(convert);
+ i = (Standard_Integer) strlen(convert);
convert[i-1] = 0;
Units_MathSentence mathsentence(&convert[charnumber+1]);
if(ismove)
}
Standard_Integer aMode;
- Standard_Real aFactor, aUnits;
+ Standard_ShortReal aFactor, aUnits;
if (argc == 5)
{
aMode = atoi(argv[2]);
- aFactor = atof(argv[3]);
- aUnits = atof(argv[4]);
+ aFactor = (Standard_ShortReal) atof(argv[3]);
+ aUnits = (Standard_ShortReal) atof(argv[4]);
anInterObj->SetPolygonOffsets(aMode, aFactor, aUnits);
aContext->UpdateCurrentViewer();
if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
// Match the name with the current word in the stream
if (theName) {
- const Standard_Integer aNameLen = strlen(theName);
+ const Standard_Size aNameLen = strlen(theName);
if (strncmp (theBuffer.LinePtr, theName, aNameLen))
aStatus = VrmlData_VrmlFormatError;
else
aStatus = VrmlData_UnrecoverableError;
else {
for (size_t i = 0; i < aNbBlocks; i++)
- anArray[i] = vecIndice(i);
+ anArray[i] = vecIndice((Standard_Integer)i);
theNBlocks = aNbBlocks;
theArray = anArray;
}
} u;
- n = strlen ( aString );
+ n = (Standard_Integer) strlen ( aString );
if ( n > 0 ) {
<<" Ident : "<<lab->ToCString()
<< Interface_MSG::Blanks(14 - lab->Length())<<"******\n";
sout << "****** Type : "<<theModel->TypeName(ent,Standard_False)
- << Interface_MSG::Blanks(44 - strlen(theModel->TypeName(ent,Standard_False)))
+ << Interface_MSG::Blanks((Standard_Integer) (44 - strlen(theModel->TypeName(ent,Standard_False))))
<< "******";
sout<<"\n*******************************************************************\n";
}
if (!first || first[0] == '\0') {
char ligne[80]; ligne[0] = '\0'; char truc;
// cin.clear(); cin.get (ligne,79,'\n');
- cin >> ligne; int ln = strlen(ligne);
+ cin >> ligne; Standard_Size ln = strlen(ligne);
char *ff = &ligne[0], *ss = NULL;
cin.get(truc); if (truc != '\n') { cin>>&ligne[ln+1]; ss = &ligne[ln+1]; }
return XSDRAW::GetList (ff,ss);