#ifdef HAVE_TBB
+// On Windows, function TryEnterCriticalSection has appeared in Windows NT
+// and is surrounded by #ifdef in MS VC++ 7.1 headers.
+// Thus to use it we need to define appropriate macro saying that we wil
+// run on Windows NT 4.0 at least
+#if ((defined(_WIN32) || defined(__WIN32__)) && !defined(_WIN32_WINNT))
+ #define _WIN32_WINNT 0x0501
+#endif
#include <tbb/tbb.h>
using namespace tbb;
#define flexible_range blocked_range
#define flexible_for parallel_for
-
#else // not HAVE_TBB
#define flexible_range serial_range
// for null derivatives
static Standard_Real BSplSLib_zero[3] = {0.0, 0.0, 0.0};
-#ifdef WNT
-#define M_SQRT2 1.4142135623730950488016887
-#endif
//=======================================================================
//struct : BSplCLib_DataContainer
myIStream->get(c);
check++;
// if (!(check % 2)) Storage_StreamExtCharParityError::Raise();
- i = 0; j = 0;
- i += (Standard_ExtCharacter)c;
+ i = (Standard_ExtCharacter)c;
if (c == '\0') fin = Standard_True;
i = (i << 8);
check++;
// if ((check % 2) != 0) Storage_StreamExtCharParityError::Raise();
// cout << check << endl;
- j += (Standard_ExtCharacter)c;
+ j = (Standard_ExtCharacter)c;
if (c != '\n') fin = Standard_False;
i |= (0x00FF & j);
buffer += (Standard_ExtCharacter)i;
if (c == tg[count]) count++;
else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) {
- i = 0; j = 0;
- i += (Standard_ExtCharacter)c;
+ j = 0;
+ i = (Standard_ExtCharacter)c;
if (c == '\0') fin = Standard_True;
i = (i << 8);
if (c == tg[count]) count++;
else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) {
- j += (Standard_ExtCharacter)c;
+ j = (Standard_ExtCharacter)c;
if (c != '\n') {
fin = Standard_False;
i |= (0x00FF & j);
aBitOn = anAlphaValue > theAlphaValue;
}
- aBitMap->ChangeValue (aNumOfBytesInRow * aRow + aColumn / 8) += aBitOn ? (0x80 >> (aColumn % 8)) : 0;
+ Standard_Integer anIndex = aNumOfBytesInRow * aRow + aColumn / 8;
+ aBitMap->SetValue (anIndex, (Standard_Byte)(aBitMap->Value (anIndex) +
+ (aBitOn ? (0x80 >> (aColumn % 8)) : 0)));
}
}
char val;
for (Standard_Integer i = 0; i < 80; i ++) {
if (ligne[i] == '\0') return;
- val = ligne[i] ^ (150 + (i & 3));
+ val = (char)(ligne[i] ^ (150 + (i & 3)));
S << val;
}
}
Standard_Integer i; // svv Jan11 2000 : porting on DEC
for (i = 0; i < MaxcarsG; i ++) blancs[i] = ' ';
blancs[MaxcarsG] = '\0';
- if (fnes) for (i = 0; i < MaxcarsG; i ++) blancs[i] = blancs[i] ^ (150 + (i & 3));
+ if (fnes)
+ {
+ for (i = 0; i < MaxcarsG; i ++)
+ blancs[i] = (char)(blancs[i] ^ (150 + (i & 3)));
+ }
if (thesect != 4) Interface_InterfaceError::Raise
("IGESWriter not ready for Print");
}
}
if ((ligne[0] & 128)&&modefnes) {
- for (i = 0; i < 80; i ++) ligne[i] = ligne[i] ^ (150 + (i & 3));
+ for (i = 0; i < 80; i ++)
+ ligne[i] = (char)(ligne[i] ^ (150 + (i & 3)));
}
}
if (feof(lefic)) return 0;
code = IOR_LEFT;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
#ifdef DEB
- cout << "Warning: ShapeFix_ComposeShell::ComputeCode: lost intersection point" << cout;
+ cout << "Warning: ShapeFix_ComposeShell::ComputeCode: lost intersection point" << endl;
#endif
}
return code;
result.Data1 = my32b ;
result.Data2 = my16b1 ;
result.Data3 = my16b2 ;
- result.Data4[0] = my16b3 >> 8 ;
- result.Data4[1] = (char ) my16b3 ;
+ result.Data4[0] = (unsigned char)(my16b3 >> 8);
+ result.Data4[1] = (char) my16b3;
result.Data4[2] = my8b1 ;
result.Data4[3] = my8b2 ;
result.Data4[4] = my8b3 ;
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
-// -------------------------------------------------------------------------
-// Definition des fonctions mathematiques hyperboliques: acosh, asinh, atanh
-// pour Windows/NT uniquement.
-// -------------------------------------------------------------------------
-#ifdef WNT
-#include <math.h>
#include <Standard_math.hxx>
-#ifndef _Standard_MacroHeaderFile
-# include <Standard_Macro.hxx>
-#endif // _Standard_MacroHeaderFile
+// MSVC versions prior to 12 did not provided acosh, asinh, atanh functions in standard library
+#if defined(_MSC_VER) && (_MSC_VER < 1800)
Standard_EXPORT double __cdecl acosh( double X)
{
res = log((1 + X) / (1 - X)) / 2;
return res;
};
+
#endif
#include <Standard_Macro.hxx>
#endif
-#ifdef WNT
+#ifdef _MSC_VER
-# ifndef __MATH_WNT_H
-# define __MATH_WNT_H
+#define _USE_MATH_DEFINES
+#include <math.h>
+// MSVC versions prior to 12 did not provided acosh, asinh, atanh functions in standard library
+#if _MSC_VER < 1800
__Standard_API double __cdecl acosh ( double );
__Standard_API double __cdecl asinh ( double );
__Standard_API double __cdecl atanh ( double );
+#endif
-# ifdef M_SQRT1_2
-# undef M_SQRT1_2
-# endif
-# define M_SQRT1_2 0.707106781186547524401
-
-# ifdef M_PI_2
-# undef M_PI_2
-# endif
-# define M_PI_2 1.57079632679489661923
-
-# ifdef M_PI
-# undef M_PI
-# endif
-# define M_PI 3.14159265358979323846
-
-# endif /* __MATH_WNT_H */
-
-#endif /* WNT */
+#endif /* _MSC_VER */
anOS << myValue;
//
anOS <<"\nAttribute fields: ";
- anOS << TDF_Attribute::Dump(anOS);
+ TDF_Attribute::Dump(anOS);
return anOS;
}
if(!transok) {
cout<<"States found by classifier :"<<endl;
- cout<<"Before :"<<TopAbs::Print(stb, cout)<<"After :"<<TopAbs::Print(sta, cout)<<endl;
+ cout << "Before :";
+ TopAbs::Print(stb, cout);
+ cout << "After :";
+ TopAbs::Print(sta, cout);
+ cout << endl;
}
return transok;
while (len) {
for(int j = 0,k=3; j<4; j++,k--) {
unsigned short v = *(p+i) & mask[j];//x000
- v = v >> (4*k);
+ v = (unsigned short)(v >> (4*k));
if(v < 10)
v |= 0x30;
else