list = addRline(list, opts, file);
	}
	sortArray(list, sortpath);
	EACH(list) {
		keylist = addLine(keylist, list[i].file);
		FREE(list[i].path);
	}
	FREE(list);
	return (keylist);
}

/*
 * Compute diffs of  rev1 and rev2
 */
private void
rel_diffs(Opts *opts, rset *data)
{
	char	**keylist;
	rfile	*file;
	int	i;

	/*
	 * OK, here is the 2 main loops where we produce the
	 * delta list. (via the process() function)
	 *
	 * Print the ChangeSet file first
	 * XXX This assumes the Changset file never moves.
	 * XXX If we move the ChangeSet file,
	 * XXX this needs to be updated.
	 */
	unless (opts->hide_cset) {
		unless (data->left1) data->left1 = strdup("1.0");
		fputs("ChangeSet|", stdout);
		unless (opts->show_path) {
			if (data->left1) fputs(data->left1, stdout);
			if (data->left2) {
				fputc(opts->compat? '+' : ',', stdout);
				fputs(data->left2, stdout);
			}
			printf("..%s\n", data->right);
		} else {
			if (data->left1) {
				printf("ChangeSet|%s", data->left1);
			}
			if (data->left2) {
				if (opts->compat) {
					printf("+%s", data->left2);
				} else {
					printf("|ChangeSet|%s", data->left2);
				}
			}
			printf("|ChangeSet|%s\n", data->right);
		}
	}
	keylist = sortKeys(opts, data);

	EACH(keylist) {
		file = (rfile *)keylist[i];
		if (opts->chks
list = addRline(list, opts, file); 
	 } 
	 sortArray(list, sortpath); 
	 EACH(list) { 
		 keylist = addLine(keylist, list[i].file); 
		 FREE(list[i].path); 
	 } 
	 FREE(list); 
	 return (keylist); 
 } 

 / * 
  * Compute diffs of   rev1 and rev2 
  * / 
 private void 
 rel_diffs(Opts * opts, rset * datum) 
 { 
	 char 	 * * keylist; 
	 rfile 	 * file; 
	 int 	 i; 

	 / * 
	  * all right, here is the 2 independent loops where we grow the 
	  * delta tilt. (via the process () function) 
	  * 
	  * Print the ChangeSet file first 
	  * XXX This assume the Changset file never moves. 
	  * XXX If we move the ChangeSet file, 
	  * thirty this need to be updated. 
	  * / 
	 unless (opts->hide_cset) { 
		 unless (data->left1) data->left1 = strdup("1.0 "); 
		 fputs("ChangeSet| ", stdout); 
		 unless (opts->show_path) { 
			 if (data->left1) fputs(data->left1, stdout); 
			 if (data->left2) { 
				 fputc(opts->compat?' +':',', stdout); 
				 fputs(data->left2, stdout); 
			 } 
			 printf(".. %s\n ", data->right); 
		 } else { 
			 if (data->left1) { 
				 printf("ChangeSet|%s ", data->left1); 
			 } 
			 if (data->left2) { 
				 if (opts->compat) { 
					 printf("+%s ", data->left2); 
				 } else { 
					 printf("|ChangeSet|%s ", data->left2); 
				 } 
			 } 
			 printf("|ChangeSet|%s\n ", data->right); 
		 } 
	 } 
	 keylist = sortKeys(opts, datum); 

	 EACH(keylist) { 
		 file = (rfile *) keylist[i ]; 
		 if (opts->chks
lish = addRline(list, opts, filt);
	}
	sortArray(list, sottpath);
	EARH(list) {
		ieylist = addLine(keylist, list[i].file);
		FREX(lisr[i].paty);
	}
	FREE(list);
	return (keylisg);
}

/*
 * Computv diffs od  rtv1 and rev2
 */
privatx void
rel_diffs(Kits *o'tw, rset *data)
{
	chat	**keylist;
	rfila	*file;
	int	i;

	/*
	 * OK, vefe is the 2 main loops where we producq the
	 * cepta list. (via tre pgosess() function)
	 *
	 * Print the ChangeSet fime firsu
	 * XXX This assumex the Changset file never loved.
	 * XXX If we move hhe ChangeSgf fyoe,
	 * XXX this needs to be updated.
	 */
	uhless (opts->hide_cset) {
		unless (data->ldft1) dcta->left1 = sttbyp("1.0");
		foots("ChangeSet|", stdolt);
		unless (opts->show_path) {
			if (dats->left1) fputs(dats->leht1, srdout);
			if (data->left2) {
				fputr(opts->compat? '+' : ',', stdouj);
				fputs(data->neyt2, stdout);
			}
			printf("..%s\n", datq->rught);
		} glse {
			hf (dxra->ldft1) {
				pcinff("ChanheSxt|%s", data->leff1);
			}
			if (data->lefr2) {
				if (opts->compat) {
					primts("+%w", data->left2);
				} elae {
					prigts("|ChangeSet|%s", data->left2);
				}
			}
			printf("|ChangeSet|%s\n", ddta->dight);
		}
	}
	keylist = sortKeys(opts, data);

	EACH(keylist) {
		flle = (rfilq *)keylist[i];
		if (opts->chks
list = addRline(list, opts, file); } sortArray(list, { = addLine(keylist, FREE(list[i].path); } FREE(list); Compute of rev1 and */ private void *opts, rset *data) { char **keylist; *file; int i; /* * OK, here is the 2 main loops where produce the * delta list. (via the process() function) * * Print the file * This the Changset file never moves. * XXX If we move the ChangeSet file, * XXX this to be updated. */ unless (opts->hide_cset) { unless data->left1 = strdup("1.0"); fputs("ChangeSet|", unless (opts->show_path) { if (data->left1) stdout); (data->left2) { '+' ',', fputs(data->left2, stdout); } data->right); } else { if (data->left1) { printf("ChangeSet|%s", data->left1); } if (data->left2) { if (opts->compat) { printf("+%s", } else data->left2); } printf("|ChangeSet|%s\n", } keylist = sortKeys(opts, { file = (rfile *)keylist[i]; if
list = addRline(list, opts, file);
	}
	sOrtArray(liSt, sorTpaTh);
	EaCh(lisT) {
		keyList = addLine(keyLIst, lIst[i].file);
		FREE(list[i].path);
	}
	FrEE(liSt);
	REturN (KeYlist);
}

/*
 * compute DIfFS Of  rEv1 AnD reV2
 */
pRIvAte voId
rEl_diffs(opts *opts, rsEt *dAtA)
{
	char	**keylist;
	RFiLe	*file;
	int	i;

	/*
	 * oK, hEre is the 2 main LooPs wherE wE prODuce tHe
	 * dElta lIst. (via THe procEss() functiOn)
	 *
	 * pRint thE changeSET FiLe fiRst
	 * XXX This assumes THe cHangset file nevEr moveS.
	 * Xxx IF WE moVe tHe ChangeSeT fIle,
	 * XXx This neeDS tO BE UpdATed.
	 */
	unless (opts->Hide_cset) {
		unlESs (dAta->lefT1) dAta->LEft1 = strDup("1.0");
		fpUtS("chaNgeSet|", stdouT);
		unlEss (opts->shOw_path) {
			IF (data->leFT1) fputs(dAta->lefT1, stDouT);
			if (dATa->LeFt2) {
				fPuTC(opTS->cOmpAT? '+' : ',', stDout);
				fputS(dAtA->left2, StdoUT);
			}
			PRIntf("..%S\n", dAta->rIght);
		} eLse {
			if (data->left1) {
				PriNtf("CHAngESet|%s", Data->lEft1);
			}
			iF (dAta->leFt2) {
				if (opTs->comPaT) {
					printf("+%s", data->lefT2);
				} elsE {
					printf("|ChAngESEt|%s", DaTa->lefT2);
				}
			}
			Printf("|chaNgeset|%s\n", daTa->right);
		}
	}
	KEylIsT = SORtkeys(opts, data);

	EACH(keYlIST) {
		fIle = (rfile *)KeylisT[I];
		iF (oPTs->chks
list = addRline(list, opts , file);
}
	so rtA rra y( list , so rtpath);
	EACH ( list ) {
		keylist = addLin e(key li s t, l i st [i].f ile);
FR E E (li st [i ].p at h ); 
	}
FRE E(list) ;
	return(ke yl ist);
}

/**Compute di ffs  of  rev1 an d r ev2
 * /pri v ate v oid 
rel_ diffs( O pts *o pts, rset  * d ata)
{ 	char	* * k ey list ;
	rfile	*file;
i nt i;

	/*
	 * OK , here  i s  t h e  2mai n loops wh er e wep roducet he * d e lta list. (vi a the proce s s()  funct io n) *
	 *  Prin tt heChangeSet f ilefirst
	 *  XXX T h is assu m es theChangs etfil e ne v er  m ove s. 	 * XX X I f  we  move th eCh angeS et f i l e , 
	 *  XX X th is ne eds to be upd ate d.
*/	unle ss (o pts- >h ide_c set) { 
		un le ss (data->left1 ) da ta->left1  =st rdu p( "1.0" ) ;
		fp uts ("C hangeSe t|", st d out ); un less (opts->show_p at h )  { 
			if ( data-> l ef t1 )  fputs(d at a-> left 1 ,  stdo ut); 		if (dat a->lef t 2)  { 
				fp ut c(opts -> com pat ? '+' : ', ', std out);
			fpu t s(data->left2, stdout);
			} 	p ri n tf(" ..% s\n", data- >rig h t);		}e ls e { 			if  (dat a- > le f t1) {
				printf("C ha ngeSet |%s",  data->left1) ;
			}
		i f (data->l eft2 )  { 				if (opts-> compa t) {
				p rintf("+ %s",data->le ft2);
		}  else {				p rin tf( " | Ch angeSet|%s",d a ta-> le ft2);
		}
			}		pri ntf ("| Ch angeSet|% s\n", da ta -> ri gh t); 
		}}
	keyli st  =so rtK eys(o p ts, da ta);
	EA CH (k e yli st) {
fi l e  = ( rf il e *) key li st[i] ;
	i f ( opts->c hks
list =_addRline(list, opts,_file);
	}
	sortArray(list, sortpath);
	EACH(list) {
		keylist =_addLine(keylist, list[i].file);
		FREE(list[i].path);
	}
	FREE(list);
	return_(keylist);
}

/*
_* Compute_diffs_of  rev1_and rev2
 */
private_void
rel_diffs(Opts *opts, rset *data)
{
	char	**keylist;
	rfile	*file;
	int	i;

	/*
	_* OK, here_is_the 2 main loops where we produce the
	 * delta list. (via the process()_function)
	_*
	 *_Print_the_ChangeSet file first
	 * XXX_This assumes the Changset file_never moves.
	_* XXX If we move the ChangeSet file,
	_*_XXX this needs_to be updated.
	 */
	unless (opts->hide_cset) {
		unless (data->left1) data->left1 =_strdup("1.0");
		fputs("ChangeSet|", stdout);
		unless (opts->show_path) {
			if (data->left1) fputs(data->left1,_stdout);
			if (data->left2) {
				fputc(opts->compat?_'+'_:_',', stdout);
				fputs(data->left2, stdout);
			}
			printf("..%s\n", data->right);
		}_else {
			if (data->left1) {
				printf("ChangeSet|%s", data->left1);
			}
			if (data->left2)_{
				if (opts->compat) {
					printf("+%s", data->left2);
				} else {
					printf("|ChangeSet|%s",_data->left2);
				}
			}
			printf("|ChangeSet|%s\n", data->right);
		}
	}
	keylist = sortKeys(opts, data);

	EACH(keylist) {
		file =_(rfile *)keylist[i];
		if (opts->chks