Ejemplo n.º 1
0
void mergepass(struct node a[20],struct node a2[20],int l,int n)
//Ò»Ì˹鲢
{
	int j,i,h1,mid,h2;
	i=0;
	while((n-i)>=2*l)
	{
		h1=i;
		mid=h1+l-1;
		h2=i+2*l-1;
		merges(a,a2,h1,mid,h2);
		i=i+2*l;
	}
	if((n-i)<=l)
		for(j=i;j<=n;j++)
			a2[j].key=a[j].key;
	else
	{
		h1=i;
		mid=h1+l-1;
		h2=n-1;
		merges(a,a2,h1,mid,h2);
	}
}//mergepass end
Ejemplo n.º 2
0
void CCSVWriter::Write ( const CCachedLogInfo& cache
                       , const TFileName& fileName)
{
	std::ofstream authors ((fileName + _T(".authors.csv")).c_str());
	WriteStringList (authors, cache.GetLogInfo().GetAuthors());
	std::ofstream userRevPropNames ((fileName + _T(".revpropnames.csv")).c_str());
	WriteStringList (userRevPropNames, cache.GetLogInfo().GetUserRevProps());
	std::ofstream paths ((fileName + _T(".paths.csv")).c_str());
	WritePathList (paths, cache.GetLogInfo().GetPaths());

	std::ofstream changes ((fileName + _T(".changes.csv")).c_str());
	WriteChanges (changes, cache);
	std::ofstream merges ((fileName + _T(".merges.csv")).c_str());
	WriteMerges (merges, cache);
	std::ofstream userRevProps ((fileName + _T(".userrevprops.csv")).c_str());
	WriteRevProps (userRevProps, cache);

	std::ofstream revisions ((fileName + _T(".revisions.csv")).c_str());
	WriteRevisions (revisions, cache);
	std::ofstream skipranges ((fileName + _T(".skipranges.csv")).c_str());
    WriteSkipRanges (skipranges, cache);
}