|
From: | Paul Eggert |
Subject: | Re: etags test is broken on MS-Windows |
Date: | Thu, 21 May 2015 09:37:02 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 05/21/2015 09:31 AM, Eli Zaretskii wrote:
I think etags should use teh same code in Unix as well. I mean this fragment: if (c == '\n') { if (p > buffer && p[-1] == '\r') { p -= 1; #ifdef DOS_NT /* Assume CRLF->LF translation will be performed by Emacs when loading this file, so CRs won't appear in the buffer. It would be cleaner to compensate within Emacs; however, Emacs does not know how many CRs were deleted before any given point in the file. */ chars_deleted = 1; #else chars_deleted = 2; #endif }
Sorry, I'm a little lost. Would it actually work with an Emacs on a GNUish host if we simply set chars_deleted = 1 here?
If etags is locale-agnostic, its output files must contain byte counts and not character counts. This is because etags doesn't even know where the characters are. And if the output files contain byte counts, surely they need to count the CR bytes as well as the LF bytes, at least on a GNU or POSIXish host.
[Prev in Thread] | Current Thread | [Next in Thread] |