Re: '\r' only end-of-line

Eli Zaretskii
2006-10-11T17:36:17Z

> Date: Wed, 11 Oct 2006 12:08:07 +0200
> From: Denis PILAT <denis.pilat@st.com>
> Cc: gdb-patches@sourceware.org
> >
> >As for the \r case, don't such files fail in many more places? It
> >looks like you need to test for \r in every place where we currently
> >test for \n, or am I missing something?
> >
> >
> Well, I thought reading your previous email on the other patch you just
> accepted
> ( "What happens with a file that ends in a sole `\r'?"),
> that MacOs files were supported by GDB. So I did some tests
> with such a file and found that there were a problem in the TUI that
> did not allow user to scroll these kind of source files. There are also
> problem in gdb command line. Both tell that the source file contains
> only 1 line.
>
> My patch just fixes this problem and allow scrolling of sources file in
> the TUI, not more.
>
> It does NOT aims at globally supporting MACOS files , as you said, there
> should
> be plenty of failures elsewhere, and there are.
> I don't want to go into such a yard
> so let's forget about my patch if you think it's useless.

It's not useless to make GDB seamlessly work with all 3 types of
end-of-line formats, but that's a lot of work, so if you don't have
the resources to do that, it doesn't make sense to fix only this one
place, because, as you saw, it will fail in many others.