2006-10-11 Denis Pilat <denis.pilat@st.com>
* tui/tui-source.c (tui_set_source_content): handle source files that contain non unix end-of-line.
This commit is contained in:
parent
bff368bd19
commit
861cf606cb
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-10-11 Denis Pilat <denis.pilat@st.com>
|
||||
|
||||
* tui/tui-source.c (tui_set_source_content): handle source
|
||||
files that contain non unix end-of-line.
|
||||
|
||||
2006-10-10 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* ser-mingw.c (free_pipe_state, pipe_wait_handle): Update
|
||||
|
|
|
@ -194,6 +194,14 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
|||
chars until we do */
|
||||
while (c != EOF && c != '\n' && c != '\r')
|
||||
c = fgetc (stream);
|
||||
/* Handle non-'\n' end-of-line. */
|
||||
if (c == '\r' &&
|
||||
(c = fgetc (stream)) != '\n' && c != EOF)
|
||||
{
|
||||
ungetc (c, stream);
|
||||
c = '\r';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
while (c != EOF && c != '\n' && c != '\r' &&
|
||||
|
|
Loading…
Add table
Reference in a new issue