Re: text file formats

Daniel Jacobowitz
2006-04-06T04:29:20Z

On Thu, Apr 06, 2006 at 06:47:42AM +0300, Eli Zaretskii wrote:
> > Well, usually. In search and reverse search it sometimes uses a
> > similar but slightly simpler algorithm: ignore '\r' if followed by
> > '\n'. I'm not sure why those are done in binary mode.
>
> I think it's because GDB counts characters and then lseeks to the
> point it thinks it should display. If the library's text-mode I/O
> converts \r\n to \n, this seeks will only work reliably in binary
> mode, since most DOS/Windows libraries don't seek to the correct place
> (the only exception from this rule I know of is the DJGPP library).

Oh, thanks. That's surely it.

--
Daniel Jacobowitz
CodeSourcery