[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I revised a 2.7 based version to handle mac & windows eols
From: |
amores perros |
Subject: |
I revised a 2.7 based version to handle mac & windows eols |
Date: |
Sun, 19 Oct 2003 02:05:43 +0000 |
In WinMerge (sf.net/projects/winmerge) we use a backend comprised of a
2.7.x version of gnudiff. I've revised it somewhat to handle mac and windows
lines the same as unix lines (well, with an additional option as to whether
or
not to treat a difference in only eol chars as significant).
Primarily I removed the assumption that all lines end in \n. This wasn't so
difficult because the line array actually stores the length of each line, so
in
the line_cmp function I used length tests instead of \n tests.
Also in the hash, I made some changes -- revising line terminations to a
standard (\n of course) if the option to treat eol difference as significant
is off.
I mention it here in case any gnudiff maintainer would be interested in
incorporating some version of this into the gnudiff trunk. I imagine that I
would
need to port my changes to a 2.8.x version of gnudiff to make that more
reasonable. I don't yet understand the tab expansion code which I saw when I
was diffing our version to a 2.8 based version, so I'd have to figure out
the
tab expansion stuff first.
BTW, in the 2.7 base we have, the full buffer is terminated with a 0
character
(that is, an extra 0 character is added to the end), but not a \n character,
so I wonder if there is a bug in handling the last line, due to the line_cmp
assumption (I think) that all lines end in \n. But I've not followed this
up,
because our code base doesn't use that assumption anymore.
Cordially,
Perry
PS:
I notice that the bug-gnu-utils mailing list looks somewhat inundated with
spam.
If someone would wish to trust me with an administrative password to the
list
archives, I would be willing to go through once making a delete sweep to
knock off a bunch of the spam messages.
_________________________________________________________________
Send instant messages to anyone on your contact list with MSN Messenger
6.0. Try it now FREE! http://msnmessenger-download.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- I revised a 2.7 based version to handle mac & windows eols,
amores perros <=