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
 | |
| 
 |