Example #1
0
void FileList::MoveSelection(FileListItem **ListData,long FileCount,
                             FileListItem **OldData,long OldFileCount)
{
	FileListItem **OldPtr;
	SelFileCount=0;
	SelFileSize=0;
	CacheSelIndex=-1;
	CacheSelClearIndex=-1;
	qsortex(reinterpret_cast<char*>(OldData),OldFileCount,sizeof(*OldData),SortSearchList,nullptr);

	while (FileCount--)
	{
		OldPtr=(FileListItem **)bsearchex(ListData,(void *)OldData,
		                                OldFileCount,sizeof(*ListData),SortSearchList,nullptr);

		if (OldPtr)
		{
			if (OldPtr[0]->ShowFolderSize)
			{
				ListData[0]->ShowFolderSize=2;
				ListData[0]->FileSize=OldPtr[0]->FileSize;
				ListData[0]->AllocationSize=OldPtr[0]->AllocationSize;
			}

			Select(ListData[0],OldPtr[0]->Selected);
			ListData[0]->PrevSelected=OldPtr[0]->PrevSelected;
		}

		ListData++;
	}
}
Example #2
0
void BaseFarArray::InternalSort( BaseCmpExFunc cmpFunc, void * user )
{
	qsortex( (void *)fItems, fCount, fItemSize, (comp_t*)cmpFunc, (void *)user );
//	FarSF::qsort( fItems, fCount, fItemSize, cmpFunc, user );
}