On Jan 22, 11:09 pm, Dominique Pellé <[email protected]>
wrote:
>
> My patch also did not address the buggy removal of BOM as
> you indicated...
>
> The BOM bug can be reproduced ...

Perhaps more relevant in practice, CR before NL removal has the same
problem and can be demonstrated with a line of 199 characters ending
in CR NL, such as a file with ff=dos.

> I aimed at touching as little as possible
> in the patch, as I found the existing implementation difficult
> to understand.

I was provoked into a rewrite, but ended up with marginally more
readable code, and using the same, arguably ugly, tricks.

> Reading by buffer of 200 bytes makes f_readfile() complicated.
> I think we're better off reading byte by byte using fgetc(fd),
> which is buffered in libc anyway so performance should be
> close to reading by 200 bytes at a time with fread(...)

I'll think about that.  However, summer has finally arrived and for a
week I'm off to a beach where there's no electricity or cellphone
coverage.

Regards, John

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui