void AppendAxisY(const Standard_Integer i,const Standard_Integer v);
void AppendAxisZ(const Standard_Integer i,const Standard_Integer v);
- void Add(long unsigned t) { int o=t&31; int k=t>>5; p[k]|=_P2[o]; }
- int Val(long unsigned t) { int o=t&31; int k=t>>5; return(p[k]&_P2[o]); }
- void Raz(long unsigned t) { int o=t&31; int k=t>>5; p[k]&= ~(_P2[o]); }
+ void Add(Standard_Integer t) { int o=t&31; int k=t>>5; p[k]|=_P2[o]; }
+ unsigned long Val(Standard_Integer t) { int o=t&31; int k=t>>5; return(p[k]&_P2[o]); }
+// void Raz(long unsigned t) { int o=t&31; int k=t>>5; p[k]&= ~(_P2[o]); }
Standard_Integer NbAxisX(const Standard_Integer i) { return(axisX[0][i]); }
Standard_Integer NbAxisY(const Standard_Integer i) { return(axisY[0][i]); }
for (lacaseX=firstcaseX; lacaseX<=lastcaseX; lacaseX++) {
for (lacaseY=firstcaseY; lacaseY<=lastcaseY; lacaseY++) {
for (lacaseZ=firstcaseZ; lacaseZ<=lastcaseZ; lacaseZ++) {
- long unsigned t=Map->GrilleInteger(lacaseX-1,lacaseY-1,lacaseZ-1);
+ Standard_Integer t=Map->GrilleInteger(lacaseX-1,lacaseY-1,lacaseZ-1);
Map->Add(t);
}
}
for (theGapX=firstGapX; theGapX<=lastGapX; theGapX++) {
for (theGapY=firstGapY; theGapY<=lastGapY; theGapY++) {
for (theGapZ=firstGapZ; theGapZ<=lastGapZ; theGapZ++) {
- long unsigned t=Map->GrilleInteger(theGapX-1,theGapY-1,theGapZ-1);
+ Standard_Integer t=Map->GrilleInteger(theGapX-1,theGapY-1,theGapZ-1);
Map->Add(t);
}
}
for(Standard_Integer i=i0; touch==Standard_False && i<=i1;i++) {
for(Standard_Integer j=j0; touch==Standard_False && j<=j1;j++) {
for(Standard_Integer k=k0; touch==Standard_False && k<=k1;k++) {
- long unsigned t=Map->GrilleInteger(i,j,k);
+ Standard_Integer t=Map->GrilleInteger(i,j,k);
if(Map->Val(t)) {
touch = Standard_True;
}
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
+ if ( (result = (int)read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
else
{ /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
+ long offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
myStream))
Storage_StreamWriteError::Raise();
- myHeader.binfo = ftell(myStream);
+ myHeader.binfo = (Standard_Integer)ftell(myStream);
WriteHeader();
return Storage_VSOk;
Storage_Error FSD_BinaryFile::EndWriteInfoSection()
{
- myHeader.einfo = ftell(myStream);
+ myHeader.einfo = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::BeginWriteCommentSection()
{
- myHeader.bcomment = ftell(myStream);
+ myHeader.bcomment = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::EndWriteCommentSection()
{
- myHeader.ecomment = ftell(myStream);
+ myHeader.ecomment = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::BeginWriteTypeSection()
{
- myHeader.btype = ftell(myStream);
+ myHeader.btype = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::EndWriteTypeSection()
{
- myHeader.etype = ftell(myStream);
+ myHeader.etype = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::BeginWriteRootSection()
{
- myHeader.broot = ftell(myStream);
+ myHeader.broot = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::EndWriteRootSection()
{
- myHeader.eroot = ftell(myStream);
+ myHeader.eroot = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::BeginWriteRefSection()
{
- myHeader.bref = ftell(myStream);
+ myHeader.bref = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::EndWriteRefSection()
{
- myHeader.eref = ftell(myStream);
+ myHeader.eref = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::BeginWriteDataSection()
{
- myHeader.bdata = ftell(myStream);
+ myHeader.bdata = (Standard_Integer)ftell(myStream);
return Storage_VSOk;
}
Storage_Error FSD_BinaryFile::EndWriteDataSection()
{
- myHeader.edata = ftell(myStream);
+ myHeader.edata = (Standard_Integer)ftell(myStream);
fseek(myStream,myHeader.binfo,SEEK_SET);
WriteHeader();
//! @return glyphs number in this font.
inline Standard_Integer GlyphsNumber() const
{
- return myFTFace->num_glyphs;
+ return (Standard_Integer)myFTFace->num_glyphs;
}
//! Retrieve glyph bitmap rectangle
for(si=-1; si<= 1 && nb<LIM; si++) {
for(sj=-1; sj<= 1 && nb<LIM; sj++) {
for(sk=-1; sk<= 1 && nb<LIM; sk++) {
- long unsigned lu=GrilleInteger(i+si,j+sj,k+sk);
+ Standard_Integer lu=GrilleInteger(i+si,j+sj,k+sk);
if(M1.Val(lu) && M2.Val(lu)) {
nb++;
}
for(sj=-1; sj<= 1; sj++) {
for(sk=-1; sk<= 1; sk++) {
if(si || sj || sk) {
- long unsigned lu=GrilleInteger(i+si,j+sj,k+sk);
+ Standard_Integer lu=GrilleInteger(i+si,j+sj,k+sk);
M1.Raz(lu);
}
}
Standard_Integer r=((Standard_Integer *) p)[k] & ((Standard_Integer *) Oth.p)[k];
if(r)
{
- unsigned long int c=0;
+ unsigned int c=0;
do
{
if(r&1)
const Cell& theCellMin, const Cell& theCellMax,
const Target& theTarget)
{
- int start = theCellMin.index[idim];
- int end = theCellMax.index[idim];
- for (int i=start; i <= end; i++) {
+ long start = theCellMin.index[idim];
+ long end = theCellMax.index[idim];
+ for (long i=start; i <= end; i++) {
theCell.index[idim] = i;
if ( idim ) // recurse
iterateAdd (idim-1, theCell, theCellMin, theCellMax, theTarget);
const Cell& theCellMin, const Cell& theCellMax,
const Target& theTarget)
{
- int start = theCellMin.index[idim];
- int end = theCellMax.index[idim];
- for (int i=start; i <= end; i++) {
+ long start = theCellMin.index[idim];
+ long end = theCellMax.index[idim];
+ for (long i=start; i <= end; i++) {
theCell.index[idim] = i;
if ( idim ) // recurse
iterateRemove (idim-1, theCell, theCellMin, theCellMax, theTarget);
const Cell& theCellMin, const Cell& theCellMax,
Inspector& theInspector)
{
- int start = theCellMin.index[idim];
- int end = theCellMax.index[idim];
- for (int i=start; i <= end; i++) {
+ long start = theCellMin.index[idim];
+ long end = theCellMax.index[idim];
+ for (long i=start; i <= end; i++) {
theCell.index[idim] = i;
if ( idim ) // recurse
iterateInspect (idim-1, theCell, theCellMin, theCellMax, theInspector);
private: //! @name unicode magic numbers
- static const unsigned char UTF8_BYTES_MINUS_ONE[256];
- static const unsigned long offsetsFromUTF8[6];
- static const unsigned char UTF8_FIRST_BYTE_MARK[7];
- static const unsigned long UTF8_BYTE_MASK;
- static const unsigned long UTF8_BYTE_MARK;
- static const unsigned long UTF16_SURROGATE_HIGH_START;
- static const unsigned long UTF16_SURROGATE_HIGH_END;
- static const unsigned long UTF16_SURROGATE_LOW_START;
- static const unsigned long UTF16_SURROGATE_LOW_END;
- static const unsigned long UTF16_SURROGATE_HIGH_SHIFT;
- static const unsigned long UTF16_SURROGATE_LOW_BASE;
- static const unsigned long UTF16_SURROGATE_LOW_MASK;
- static const unsigned long UTF32_MAX_BMP;
- static const unsigned long UTF32_MAX_LEGAL;
+ static const unsigned char UTF8_BYTES_MINUS_ONE[256];
+ static const Standard_Utf32Char offsetsFromUTF8[6];
+ static const unsigned char UTF8_FIRST_BYTE_MARK[7];
+ static const Standard_Utf32Char UTF8_BYTE_MASK;
+ static const Standard_Utf32Char UTF8_BYTE_MARK;
+ static const Standard_Utf32Char UTF16_SURROGATE_HIGH_START;
+ static const Standard_Utf32Char UTF16_SURROGATE_HIGH_END;
+ static const Standard_Utf32Char UTF16_SURROGATE_LOW_START;
+ static const Standard_Utf32Char UTF16_SURROGATE_LOW_END;
+ static const Standard_Utf32Char UTF16_SURROGATE_HIGH_SHIFT;
+ static const Standard_Utf32Char UTF16_SURROGATE_LOW_BASE;
+ static const Standard_Utf32Char UTF16_SURROGATE_LOW_MASK;
+ static const Standard_Utf32Char UTF32_MAX_BMP;
+ static const Standard_Utf32Char UTF32_MAX_LEGAL;
private: //! @name private fields
//! This table contains as many values as there might be trailing bytes
//! in a UTF-8 sequence.
template<typename Type>
-const unsigned long NCollection_UtfIterator<Type>::offsetsFromUTF8[6] =
+const Standard_Utf32Char NCollection_UtfIterator<Type>::offsetsFromUTF8[6] =
{
0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL
}
// magic numbers
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF8_BYTE_MASK = 0xBF;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF8_BYTE_MARK = 0x80;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_START = 0xD800;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_END = 0xDBFF;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_START = 0xDC00;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_END = 0xDFFF;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_SHIFT = 10;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_BASE = 0x0010000UL;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_MASK = 0x3FFUL;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF32_MAX_BMP = 0x0000FFFFUL;
-template<typename Type> const unsigned long NCollection_UtfIterator<Type>::UTF32_MAX_LEGAL = 0x0010FFFFUL;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF8_BYTE_MASK = 0xBF;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF8_BYTE_MARK = 0x80;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_START = 0xD800;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_END = 0xDBFF;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_START = 0xDC00;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_END = 0xDFFF;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_HIGH_SHIFT = 10;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_BASE = 0x0010000UL;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF16_SURROGATE_LOW_MASK = 0x3FFUL;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF32_MAX_BMP = 0x0000FFFFUL;
+template<typename Type> const Standard_Utf32Char NCollection_UtfIterator<Type>::UTF32_MAX_LEGAL = 0x0010FFFFUL;
// =======================================================================
// function : readUTF16
if (aChar2 >= UTF16_SURROGATE_LOW_START
&& aChar2 <= UTF16_SURROGATE_LOW_END)
{
- aChar = ((aChar - UTF16_SURROGATE_HIGH_START) << UTF16_SURROGATE_HIGH_SHIFT)
- + (aChar2 - UTF16_SURROGATE_LOW_START) + UTF16_SURROGATE_LOW_BASE;
+ aChar = ((aChar - (Standard_Utf32Char)UTF16_SURROGATE_HIGH_START) << (Standard_Utf32Char)UTF16_SURROGATE_HIGH_SHIFT)
+ + (aChar2 - (Standard_Utf32Char)UTF16_SURROGATE_LOW_START) + (Standard_Utf32Char)UTF16_SURROGATE_LOW_BASE;
++myPosNext;
}
}
struct statvfs buffer;
if ( statvfs(DiskName.ToCString(),&buffer) == 0 ){
- int BSize512 = buffer.f_frsize / 512 ;
+ int BSize512 = (int)(buffer.f_frsize / 512) ;
return buffer.f_blocks * BSize512 ;
}
else {
struct statvfs buffer;
if ( statvfs (DiskName.ToCString(),&buffer) == 0 ){
- int BSize512 = buffer.f_frsize / 512 ;
+ int BSize512 = (int)(buffer.f_frsize / 512) ;
return buffer.f_bavail * BSize512 ;
}
else {
void OSD_File::Read(TCollection_AsciiString& Buffer,
const Standard_Integer Nbyte){
Standard_PCharacter readbuf;
- int status;
if ( OSD_File::KindOfFile ( ) == OSD_DIRECTORY ) {
Standard_ProgramError::Raise("OSD_File::Read : it is a directory");
TCollection_AsciiString transfert(Nbyte,' ');
readbuf = (Standard_PCharacter)transfert.ToCString();
- status = read (myFileChannel, readbuf, Nbyte);
+ ssize_t status = read (myFileChannel, readbuf, Nbyte);
//
Buffer = transfert; // Copy transfert to Buffer
const Standard_Integer Nbyte,
Standard_Integer& Readbyte)
{
- int status;
-
Readbyte = 0;
if ( OSD_File::KindOfFile ( ) == OSD_DIRECTORY ) {
Standard_ProgramError::Raise("OSD_File::Read : it is a directory");
if (Buffer == NULL)
Standard_ProgramError::Raise("OSD_File::Read : Buffer is null");
- status = read (myFileChannel, (char*) Buffer, Nbyte);
+ ssize_t status = read (myFileChannel, (char*) Buffer, Nbyte);
if (status == -1) myError.SetValue (errno, Iam, "Read");
else{
if ( status < Nbyte ) myIO = EOF;
- Readbyte = status;
+ Readbyte = (Standard_Integer)status;
}
}
const Standard_Integer Nbyte){
Standard_CString writebuf;
- int status;
-
if ( OSD_File::KindOfFile ( ) == OSD_DIRECTORY ) {
Standard_ProgramError::Raise("OSD_File::Write : it is a directory");
}
writebuf = Buffer.ToCString();
- status = write (myFileChannel, writebuf, Nbyte);
+ ssize_t status = write (myFileChannel, writebuf, Nbyte);
if ( status == -1) myError.SetValue (errno, Iam, "Write");
else
void OSD_File::Write(const Standard_Address Buffer,
const Standard_Integer Nbyte)
{
-
- int status;
-
if (myFileChannel == -1)
Standard_ProgramError::Raise("OSD_File::Write : file is not open");
if (Nbyte <= 0)
Standard_ProgramError::Raise("OSD_File::Write : Nbyte is null");
- status = write (myFileChannel, (const char *)Buffer, Nbyte);
+ ssize_t status = write (myFileChannel, (const char *)Buffer, Nbyte);
if ( status == -1) myError.SetValue (errno, Iam, "Write");
else
const int BUFSIZE=4096;
char buf[BUFSIZE];
- int n=0;
- while ( ( n = read ( fds, buf, BUFSIZE )) >0 )
+ ssize_t n=0;
+ while ( ( n = (int)read ( fds, buf, BUFSIZE )) >0 )
{
if ( write ( fdo, buf, n ) != n ) { // writing error
if ( ! errno )
#include <Standard_Type.hxx>
#ifdef _WIN32
-#include <windows.h>
+ #include <windows.h>
#else
-typedef struct {
- unsigned long Data1 ;
- unsigned short Data2 ;
- unsigned short Data3 ;
- unsigned char Data4[8] ;
-} GUID ;
+ typedef struct
+ {
+ unsigned int Data1;
+ unsigned short Data2;
+ unsigned short Data3;
+ unsigned char Data4[8];
+ } GUID;
#endif
-typedef GUID Standard_UUID ;
+typedef GUID Standard_UUID;
#endif
-
-