mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023274: MSVC++ warnings issued during compilation for 64bits
Replacing Standard_Integer with Standard_Size to avoid warnings.
This commit is contained in:
parent
8ad8260234
commit
fb8a73581a
@ -33,7 +33,7 @@ generic class Dictionary from Dico (TheItem as any) inherits TShared
|
|||||||
-- size of TheItem class if it is not identified by Handle) : if
|
-- size of TheItem class if it is not identified by Handle) : if
|
||||||
-- this size is big, it can cause problems of memory spending
|
-- this size is big, it can cause problems of memory spending
|
||||||
|
|
||||||
uses OStream, Integer, Boolean, Character, AsciiString --, Iterator
|
uses Size, OStream, Integer, Boolean, Character, AsciiString --, Iterator
|
||||||
|
|
||||||
raises NoSuchObject
|
raises NoSuchObject
|
||||||
|
|
||||||
@ -275,14 +275,14 @@ is
|
|||||||
SetNext (me : mutable; acell : mutable Dictionary) is static private;
|
SetNext (me : mutable; acell : mutable Dictionary) is static private;
|
||||||
---Purpose : Defines next cell
|
---Purpose : Defines next cell
|
||||||
|
|
||||||
SearchCell (me; name : CString; lmax : Integer;
|
SearchCell (me; name : CString; lmax : Size;
|
||||||
car : Character; level : Integer;
|
car : Character; level : Size;
|
||||||
acell : out mutable Dictionary; reslev : out Integer;
|
acell : out mutable Dictionary; reslev : out Size;
|
||||||
stat : out Integer) is static private;
|
stat : out Integer) is static private;
|
||||||
---Purpose : Internal method used to get an entry from a given name
|
---Purpose : Internal method used to get an entry from a given name
|
||||||
|
|
||||||
NewCell (me : mutable; name : CString; namlen : Integer;
|
NewCell (me : mutable; name : CString; namlen : Size;
|
||||||
acell : in out mutable Dictionary; reslev,stat : Integer)
|
acell : in out mutable Dictionary; reslev : Size; stat : Integer)
|
||||||
is static private;
|
is static private;
|
||||||
---Purpose : Internal method used to create a new entry for a name
|
---Purpose : Internal method used to create a new entry for a name
|
||||||
|
|
||||||
|
@ -53,7 +53,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
(const Standard_CString name, const Standard_Boolean exact) const
|
(const Standard_CString name, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) return Standard_False;
|
if (stat != 0 || reslev != 0) return Standard_False;
|
||||||
if (acell->HasIt()) return Standard_True;
|
if (acell->HasIt()) return Standard_True;
|
||||||
@ -65,7 +66,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
|
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) return Standard_False;
|
if (stat != 0 || reslev != 0) return Standard_False;
|
||||||
if (acell->HasIt()) return Standard_True;
|
if (acell->HasIt()) return Standard_True;
|
||||||
@ -79,7 +81,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
(const Standard_CString name, const Standard_Boolean exact) const
|
(const Standard_CString name, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0)
|
if (stat != 0 || reslev != 0)
|
||||||
Standard_NoSuchObject::Raise("Dictionary : Item");
|
Standard_NoSuchObject::Raise("Dictionary : Item");
|
||||||
@ -93,7 +96,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
|
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0)
|
if (stat != 0 || reslev != 0)
|
||||||
Standard_NoSuchObject::Raise("Dictionary : Item");
|
Standard_NoSuchObject::Raise("Dictionary : Item");
|
||||||
@ -110,7 +114,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
TheItem& anitem, const Standard_Boolean exact) const
|
TheItem& anitem, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) return Standard_False;
|
if (stat != 0 || reslev != 0) return Standard_False;
|
||||||
if (acell->HasIt()) { anitem = acell->It(); return Standard_True; }
|
if (acell->HasIt()) { anitem = acell->It(); return Standard_True; }
|
||||||
@ -124,7 +129,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
TheItem& anitem, const Standard_Boolean exact) const
|
TheItem& anitem, const Standard_Boolean exact) const
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) return Standard_False;
|
if (stat != 0 || reslev != 0) return Standard_False;
|
||||||
if (acell->HasIt()) { anitem = acell->It(); return Standard_True; }
|
if (acell->HasIt()) { anitem = acell->It(); return Standard_True; }
|
||||||
@ -140,8 +146,9 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
const TheItem& anitem, const Standard_Boolean exact)
|
const TheItem& anitem, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
Standard_Integer namlen = strlen(name);
|
Standard_Size reslev;
|
||||||
|
Standard_Size namlen = strlen(name);
|
||||||
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
|
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
|
||||||
if (!exact && !acell->HasIt())
|
if (!exact && !acell->HasIt())
|
||||||
{ if (acell->Complete(acell)) { acell->SetIt(anitem); return; } }
|
{ if (acell->Complete(acell)) { acell->SetIt(anitem); return; } }
|
||||||
@ -156,7 +163,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
const TheItem& anitem, const Standard_Boolean exact)
|
const TheItem& anitem, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
Standard_CString namval = name.ToCString();
|
Standard_CString namval = name.ToCString();
|
||||||
Standard_Integer namlen = name.Length();
|
Standard_Integer namlen = name.Length();
|
||||||
SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
|
SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
|
||||||
@ -175,8 +183,9 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
Standard_Boolean& isvalued, const Standard_Boolean exact)
|
Standard_Boolean& isvalued, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
Standard_Integer namlen = strlen(name);
|
Standard_Size reslev;
|
||||||
|
Standard_Size namlen = strlen(name);
|
||||||
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
|
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
|
||||||
if (stat == 0 && reslev == 0) {
|
if (stat == 0 && reslev == 0) {
|
||||||
isvalued = acell->HasIt(); // ancien statut
|
isvalued = acell->HasIt(); // ancien statut
|
||||||
@ -200,7 +209,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
Standard_Boolean& isvalued, const Standard_Boolean exact)
|
Standard_Boolean& isvalued, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
Standard_Integer namlen = name.Length();
|
Standard_Integer namlen = name.Length();
|
||||||
Standard_CString namval = name.ToCString();
|
Standard_CString namval = name.ToCString();
|
||||||
SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
|
SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
|
||||||
@ -227,7 +237,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
const Standard_Boolean cln, const Standard_Boolean exact)
|
const Standard_Boolean cln, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
|
||||||
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
|
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
|
||||||
if (stat != 0) return Standard_False;
|
if (stat != 0) return Standard_False;
|
||||||
@ -243,7 +254,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
const Standard_Boolean cln, const Standard_Boolean exact)
|
const Standard_Boolean cln, const Standard_Boolean exact)
|
||||||
{
|
{
|
||||||
Handle(Dico_Dictionary) acell;
|
Handle(Dico_Dictionary) acell;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
|
||||||
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
|
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
|
||||||
if (stat != 0) return Standard_False;
|
if (stat != 0) return Standard_False;
|
||||||
@ -338,17 +350,18 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
// .... SearchCell ....
|
// .... SearchCell ....
|
||||||
|
|
||||||
void Dico_Dictionary::SearchCell
|
void Dico_Dictionary::SearchCell
|
||||||
(const Standard_CString name, const Standard_Integer lmax,
|
(const Standard_CString name, const Standard_Size lmax,
|
||||||
const Standard_Character car, const Standard_Integer level,
|
const Standard_Character car, const Standard_Size level,
|
||||||
Handle(Dico_Dictionary)& acell,
|
Handle(Dico_Dictionary)& acell,
|
||||||
Standard_Integer& reslev, Standard_Integer& stat) const
|
Standard_Size& reslev, Standard_Integer& stat) const
|
||||||
{
|
{
|
||||||
reslev = lmax - level;
|
reslev = lmax - level;
|
||||||
if (car > thecars[0]) {
|
if (car > thecars[0]) {
|
||||||
if (thecars[3] == '\0') { acell = this; stat = 1; return; }
|
if (thecars[3] == '\0') { acell = this; stat = 1; return; }
|
||||||
else { // ici, HasNext
|
else { // ici, HasNext
|
||||||
if (thecars[3] > car) { acell = this; stat = 1; return; }
|
if (thecars[3] > car) { acell = this; stat = 1; return; }
|
||||||
Standard_Integer lev2,stat2;
|
Standard_Integer stat2;
|
||||||
|
Standard_Size lev2;
|
||||||
thenext->SearchCell (name,lmax,car,level,acell,lev2,stat2);
|
thenext->SearchCell (name,lmax,car,level,acell,lev2,stat2);
|
||||||
if (stat2 < 0) { acell = this; stat = 1; return; }
|
if (stat2 < 0) { acell = this; stat = 1; return; }
|
||||||
else { stat = stat2; reslev = lev2; return; }
|
else { stat = stat2; reslev = lev2; return; }
|
||||||
@ -360,7 +373,8 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
else {
|
else {
|
||||||
Standard_Character carsub = name[level]; // caractere no (level+1);
|
Standard_Character carsub = name[level]; // caractere no (level+1);
|
||||||
if (thecars[2] > carsub) { acell = this; stat = 0; return; }
|
if (thecars[2] > carsub) { acell = this; stat = 0; return; }
|
||||||
Standard_Integer lev2,stat2;
|
Standard_Integer stat2;
|
||||||
|
Standard_Size lev2;
|
||||||
thesub->SearchCell (name,lmax,carsub,level+1,acell,lev2,stat2);
|
thesub->SearchCell (name,lmax,carsub,level+1,acell,lev2,stat2);
|
||||||
if (stat2 < 0) { acell = this; stat = 0; return; }
|
if (stat2 < 0) { acell = this; stat = 0; return; }
|
||||||
else { stat = stat2; reslev = lev2; return; }
|
else { stat = stat2; reslev = lev2; return; }
|
||||||
@ -373,11 +387,11 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
// .... NewCell ....
|
// .... NewCell ....
|
||||||
|
|
||||||
void Dico_Dictionary::NewCell
|
void Dico_Dictionary::NewCell
|
||||||
(const Standard_CString name, const Standard_Integer namlen,
|
(const Standard_CString name, const Standard_Size namlen,
|
||||||
Handle(Dico_Dictionary)& acell,
|
Handle(Dico_Dictionary)& acell,
|
||||||
const Standard_Integer reslev, const Standard_Integer stat)
|
const Standard_Size reslev, const Standard_Integer stat)
|
||||||
{
|
{
|
||||||
Standard_Integer level = namlen - reslev;
|
Standard_Size level = namlen - reslev;
|
||||||
if (stat > 0) { // Creer une cellule next
|
if (stat > 0) { // Creer une cellule next
|
||||||
Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
|
Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
|
||||||
newcell->SetChar( name[level-1] ); // caractere no level
|
newcell->SetChar( name[level-1] ); // caractere no level
|
||||||
@ -386,7 +400,7 @@ Dico_Dictionary::Dico_Dictionary ()
|
|||||||
acell = newcell;
|
acell = newcell;
|
||||||
}
|
}
|
||||||
// A present, voir les sous-niveaux
|
// A present, voir les sous-niveaux
|
||||||
for (Standard_Integer i = level+1; i <= namlen; i ++) {
|
for (Standard_Size i = level+1; i <= namlen; i ++) {
|
||||||
Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
|
Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
|
||||||
newcell->SetChar(name[i-1]);
|
newcell->SetChar(name[i-1]);
|
||||||
if (acell->HasSub()) newcell->SetNext(acell->Sub());
|
if (acell->HasSub()) newcell->SetNext(acell->Sub());
|
||||||
|
@ -38,7 +38,8 @@ Dico_Iterator::Dico_Iterator (const Handle(Dico_Dictionary)& acell)
|
|||||||
thebase = acell;
|
thebase = acell;
|
||||||
} else {
|
} else {
|
||||||
thename = basename;
|
thename = basename;
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
acell->SearchCell(basename.ToCString(),basename.Length(),basename.Value(1),
|
acell->SearchCell(basename.ToCString(),basename.Length(),basename.Value(1),
|
||||||
1, thebase,reslev,stat);
|
1, thebase,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) thebase.Nullify(); // loupe
|
if (stat != 0 || reslev != 0) thebase.Nullify(); // loupe
|
||||||
@ -57,7 +58,8 @@ Dico_Iterator::Dico_Iterator (const Handle(Dico_Dictionary)& acell)
|
|||||||
thebase = acell;
|
thebase = acell;
|
||||||
} else {
|
} else {
|
||||||
thename.AssignCat(basename);
|
thename.AssignCat(basename);
|
||||||
Standard_Integer reslev,stat;
|
Standard_Integer stat;
|
||||||
|
Standard_Size reslev;
|
||||||
acell->SearchCell (basename,thename.Length(),basename[0],1,
|
acell->SearchCell (basename,thename.Length(),basename[0],1,
|
||||||
thebase,reslev,stat);
|
thebase,reslev,stat);
|
||||||
if (stat != 0 || reslev != 0) thebase.Nullify(); // loupe
|
if (stat != 0 || reslev != 0) thebase.Nullify(); // loupe
|
||||||
|
@ -306,7 +306,7 @@ is
|
|||||||
returns CString from Standard is private;
|
returns CString from Standard is private;
|
||||||
---C++: return const
|
---C++: return const
|
||||||
|
|
||||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
|
||||||
---Purpose: read <rsize> character from the current position.
|
---Purpose: read <rsize> character from the current position.
|
||||||
|
|
||||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||||
|
@ -61,7 +61,7 @@ Storage_Error FSD_BinaryFile::IsGoodFileType(const TCollection_AsciiString& aNam
|
|||||||
|
|
||||||
if (s == Storage_VSOk) {
|
if (s == Storage_VSOk) {
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_BinaryFile::MagicNumber());
|
Standard_Size len = strlen(FSD_BinaryFile::MagicNumber());
|
||||||
|
|
||||||
f.ReadChar(l,len);
|
f.ReadChar(l,len);
|
||||||
|
|
||||||
@ -156,10 +156,10 @@ const Standard_CString FSD_BinaryFile::MagicNumber()
|
|||||||
//purpose : read <rsize> character from the current position.
|
//purpose : read <rsize> character from the current position.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void FSD_BinaryFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
|
void FSD_BinaryFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
Standard_Integer ccount = 0;
|
Standard_Size ccount = 0;
|
||||||
|
|
||||||
buffer.Clear();
|
buffer.Clear();
|
||||||
|
|
||||||
@ -487,7 +487,7 @@ Storage_Error FSD_BinaryFile::BeginReadInfoSection()
|
|||||||
{
|
{
|
||||||
Storage_Error s = Storage_VSOk;
|
Storage_Error s = Storage_VSOk;
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_BinaryFile::MagicNumber());
|
Standard_Size len = strlen(FSD_BinaryFile::MagicNumber());
|
||||||
|
|
||||||
ReadChar(l,len);
|
ReadChar(l,len);
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ is
|
|||||||
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
||||||
---Purpose: write from the current position to the end of line.
|
---Purpose: write from the current position to the end of line.
|
||||||
|
|
||||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
|
||||||
---Purpose: read <rsize> character from the current position.
|
---Purpose: read <rsize> character from the current position.
|
||||||
|
|
||||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||||
|
@ -68,7 +68,7 @@ Storage_Error FSD_CmpFile::IsGoodFileType(const TCollection_AsciiString& aName)
|
|||||||
|
|
||||||
if (s == Storage_VSOk) {
|
if (s == Storage_VSOk) {
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_CmpFile::MagicNumber());
|
Standard_Size len = strlen(FSD_CmpFile::MagicNumber());
|
||||||
|
|
||||||
f.ReadChar(l,len);
|
f.ReadChar(l,len);
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ void FSD_CmpFile::ReadLine(TCollection_AsciiString& buffer)
|
|||||||
Buffer[0] = '\0';
|
Buffer[0] = '\0';
|
||||||
//myStream.get(Buffer,8192,'\n');
|
//myStream.get(Buffer,8192,'\n');
|
||||||
myStream.getline(Buffer,8192,'\n');
|
myStream.getline(Buffer,8192,'\n');
|
||||||
for (Standard_Integer lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
|
for (Standard_Size lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
|
||||||
Buffer[lv] = '\0';
|
Buffer[lv] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,10 +332,10 @@ void FSD_CmpFile::ReadExtendedLine(TCollection_ExtendedString& buffer)
|
|||||||
//purpose : read <rsize> character from the current position.
|
//purpose : read <rsize> character from the current position.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void FSD_CmpFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
|
void FSD_CmpFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
Standard_Integer ccount = 0;
|
Standard_Size ccount = 0;
|
||||||
|
|
||||||
buffer.Clear();
|
buffer.Clear();
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ void FSD_CmpFile::ReadString(TCollection_AsciiString& buffer)
|
|||||||
Buffer[0] = '\0';
|
Buffer[0] = '\0';
|
||||||
//myStream.get(Buffer,8192,'\n');
|
//myStream.get(Buffer,8192,'\n');
|
||||||
myStream.getline(Buffer,8192,'\n');
|
myStream.getline(Buffer,8192,'\n');
|
||||||
for (Standard_Integer lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
|
for (Standard_Size lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
|
||||||
Buffer[lv] = '\0';
|
Buffer[lv] = '\0';
|
||||||
}
|
}
|
||||||
bpos = Buffer;
|
bpos = Buffer;
|
||||||
@ -792,7 +792,7 @@ Storage_Error FSD_CmpFile::BeginReadInfoSection()
|
|||||||
{
|
{
|
||||||
Storage_Error s;
|
Storage_Error s;
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_CmpFile::MagicNumber());
|
Standard_Size len = strlen(FSD_CmpFile::MagicNumber());
|
||||||
|
|
||||||
ReadChar(l,len);
|
ReadChar(l,len);
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ is
|
|||||||
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
||||||
---Purpose: write from the current position to the end of line.
|
---Purpose: write from the current position to the end of line.
|
||||||
|
|
||||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
|
||||||
---Purpose: read <rsize> character from the current position.
|
---Purpose: read <rsize> character from the current position.
|
||||||
|
|
||||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||||
|
@ -50,7 +50,7 @@ Storage_Error FSD_File::IsGoodFileType(const TCollection_AsciiString& aName)
|
|||||||
|
|
||||||
if (s == Storage_VSOk) {
|
if (s == Storage_VSOk) {
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_File::MagicNumber());
|
Standard_Size len = strlen(FSD_File::MagicNumber());
|
||||||
|
|
||||||
f.ReadChar(l,len);
|
f.ReadChar(l,len);
|
||||||
|
|
||||||
@ -267,10 +267,10 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
|
|||||||
//purpose : read <rsize> character from the current position.
|
//purpose : read <rsize> character from the current position.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void FSD_File::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
|
void FSD_File::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
Standard_Integer ccount = 0;
|
Standard_Size ccount = 0;
|
||||||
|
|
||||||
buffer.Clear();
|
buffer.Clear();
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ Storage_Error FSD_File::BeginReadInfoSection()
|
|||||||
{
|
{
|
||||||
Storage_Error s;
|
Storage_Error s;
|
||||||
TCollection_AsciiString l;
|
TCollection_AsciiString l;
|
||||||
Standard_Integer len = strlen(FSD_File::MagicNumber());
|
Standard_Size len = strlen(FSD_File::MagicNumber());
|
||||||
|
|
||||||
ReadChar(l,len);
|
ReadChar(l,len);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
Standard_EXPORT void Clear ();
|
Standard_EXPORT void Clear ();
|
||||||
|
|
||||||
//! Returns number of currently contained items
|
//! Returns number of currently contained items
|
||||||
Standard_Integer Size () const { return mySize; }
|
Standard_Size Size () const { return mySize; }
|
||||||
|
|
||||||
//! Check whether the value at given index is set
|
//! Check whether the value at given index is set
|
||||||
Standard_EXPORT Standard_Boolean HasValue (const Standard_Integer theIndex) const;
|
Standard_EXPORT Standard_Boolean HasValue (const Standard_Integer theIndex) const;
|
||||||
|
@ -58,7 +58,8 @@ Units_Sentence::Units_Sentence(const Handle(Units_Lexicon)& alexicon,
|
|||||||
const Standard_CString astring)
|
const Standard_CString astring)
|
||||||
{
|
{
|
||||||
Standard_Integer index;
|
Standard_Integer index;
|
||||||
Standard_Integer i,k,l,limchain;
|
Standard_Integer k,l;
|
||||||
|
Standard_Size i,limchain;
|
||||||
char chain[255];
|
char chain[255];
|
||||||
Handle(Units_Token) token;
|
Handle(Units_Token) token;
|
||||||
Handle(Units_Token) referencetoken;
|
Handle(Units_Token) referencetoken;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user