Text File Comparison

new topic     » topic index » view thread      » older message » newer message

Looking for a source file comparison utility - must be written in
Euphoria or a source I can translate.

Thinking out loud, it seems non-trivial to report the smallest
possible number of changed lines, which is what I want.

At the moment I'm struggling with DOS fc utility but I'd like an
output similar to:

function fred()
sequence result
>integer i
	result={}
<	for i = 1 to 10
<		if skip[i]=0 then
>	i=1
>	while i <= 10
>		if skip[i]>0 then
>			i+=skip[i]
>		else
			result&=i
>			i+=1
		end if
<	end for
>	end while
	return result
end procedure

whereby ">" lines have been added & "<" removed.

Hopefully someone out there in the Linux world has the source of
"diff" I think it is which I suspect handles this alot better than I
could starting from scratch.

Using fc I get alot of false realigns on "end if" causing the output
to be much larger than it ought to be. Raw performance is unlikely to
be an issue.

Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu