3d2dbf1fe6
git-svn-id: svn://10.65.10.50/trunk@247 c028cbd2-c16b-5b4b-a496-9718f37d4682
51 lines
869 B
C++
Executable File
51 lines
869 B
C++
Executable File
#include <syscursor.h>
|
|
#include <extcdecl.h>
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TSystem_cursor
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
void TSystem_cursor::mark_deleted(bool deleted)
|
|
|
|
{
|
|
const TRecnotype nitem = items();
|
|
|
|
for (operator=(0); pos() < nitem; operator++())
|
|
{
|
|
const TRecnotype nrec = readrec();
|
|
if (deleted && curr().valid())
|
|
{
|
|
curr().discard();
|
|
CWrite(&file()->filehnd()->f, curr().string(), nrec, _nolock);
|
|
}
|
|
else
|
|
if (curr().isdeleted())
|
|
{
|
|
curr().recall();
|
|
CWrite(&file()->filehnd()->f, curr().string(), nrec, _nolock);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
TSystem_cursor::~TSystem_cursor()
|
|
|
|
{
|
|
TLocalisamfile* f = file();
|
|
const int num = f->num();
|
|
|
|
f->close();
|
|
{
|
|
TSystemisamfile s(num);
|
|
s.packfile();
|
|
}
|
|
f->open();
|
|
|
|
}
|
|
|
|
// *** EOF syscursor.cpp
|
|
|