Corretti alcuni subdoli errori per windows.
git-svn-id: svn://10.65.10.50/trunk@296 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4777de77d9
commit
6d6524fea4
@ -27,6 +27,8 @@ public:
|
|||||||
class TTestFile : public TBaseisamfile
|
class TTestFile : public TBaseisamfile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
TTestFile(int ln,bool lt=TRUE) : TBaseisamfile(ln,lt) {}
|
||||||
|
virtual ~TTestFile() {}
|
||||||
int close() {return _close();}
|
int close() {return _close();}
|
||||||
int open(unsigned int mode = _manulock) {return _open(mode);}
|
int open(unsigned int mode = _manulock) {return _open(mode);}
|
||||||
const char * file_name() const {return filename();}
|
const char * file_name() const {return filename();}
|
||||||
@ -39,7 +41,7 @@ protected:
|
|||||||
virtual void handler(WINDOW w, EVENT *e);
|
virtual void handler(WINDOW w, EVENT *e);
|
||||||
void update_text() {set_mode(M_COPY); check_stop();}
|
void update_text() {set_mode(M_COPY); check_stop();}
|
||||||
public:
|
public:
|
||||||
WriteW(short x, short y, const char* line) {stringat(x,y,line);update_text();do_events();}
|
void WriteW(short x, short y, const char* line) {stringat(x,y,line);update_text();do_events();}
|
||||||
TTestWin();
|
TTestWin();
|
||||||
~TTestWin() {};
|
~TTestWin() {};
|
||||||
};
|
};
|
||||||
@ -51,7 +53,7 @@ class TTestProc
|
|||||||
TTestWin * _win; // Output window
|
TTestWin * _win; // Output window
|
||||||
long * _randseq; // Random sequence
|
long * _randseq; // Random sequence
|
||||||
long _ntest; // number of test in progress
|
long _ntest; // number of test in progress
|
||||||
long _nfile; // number of file being tested
|
int _nfile; // number of file being tested
|
||||||
long _kriminal; // number of record incriminated (Debug)
|
long _kriminal; // number of record incriminated (Debug)
|
||||||
int _nkeys; // # of keys defined for current file
|
int _nkeys; // # of keys defined for current file
|
||||||
bool _block; // is test blocked ?
|
bool _block; // is test blocked ?
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
|
|
||||||
|
#if XVT_OS!=XVT_OS_SCOUNIX
|
||||||
|
#include <direct.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ba1300.h"
|
#include "ba1300.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -143,7 +147,7 @@ void TTestProc::do_random(long eod)
|
|||||||
cbits++;
|
cbits++;
|
||||||
}
|
}
|
||||||
scale=(unsigned int)0x8000;
|
scale=(unsigned int)0x8000;
|
||||||
for (i=1;i<=cbits;i++)
|
for (i=1;i<=(long)cbits;i++)
|
||||||
{
|
{
|
||||||
scale=scale>>1;
|
scale=scale>>1;
|
||||||
scale |= 0x8000;
|
scale |= 0x8000;
|
||||||
@ -157,7 +161,7 @@ void TTestProc::do_random(long eod)
|
|||||||
{
|
{
|
||||||
rnd=rand();
|
rnd=rand();
|
||||||
rnd&=scale;
|
rnd&=scale;
|
||||||
for (j=1;j<=(16-cbits);j++)
|
for (j=1;j<=(long)(16-cbits);j++)
|
||||||
rnd=rnd>>1;
|
rnd=rnd>>1;
|
||||||
if (((long) rnd)>=eod) // Difficile che accada...
|
if (((long) rnd)>=eod) // Difficile che accada...
|
||||||
rnd=(unsigned int) eod-1;
|
rnd=(unsigned int) eod-1;
|
||||||
@ -335,7 +339,7 @@ void TTestProc::DumpReport(int err, long i, long x, int key)
|
|||||||
#if XVT_OS==XVT_OS_SCOUNIX
|
#if XVT_OS==XVT_OS_SCOUNIX
|
||||||
mkdir("test",0777);
|
mkdir("test",0777);
|
||||||
#else
|
#else
|
||||||
mkdir("test");
|
_mkdir("test");
|
||||||
#endif
|
#endif
|
||||||
RandomFile.format("test%crnd%d.dat",Separator,rnum++);
|
RandomFile.format("test%crnd%d.dat",Separator,rnum++);
|
||||||
if ((fp=fopen((const char*)RandomFile,"w"))!=NULL)
|
if ((fp=fopen((const char*)RandomFile,"w"))!=NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user