From 171548c9d708fc13f5b6d3edde30630ee04bd06e Mon Sep 17 00:00:00 2001 From: gingold Date: Tue, 22 Nov 2005 16:09:10 +0000 Subject: more optimizations + bug fixes --- libraries/std/textio_body.vhdl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libraries/std') diff --git a/libraries/std/textio_body.vhdl b/libraries/std/textio_body.vhdl index 0362ef61a..cf81036a9 100644 --- a/libraries/std/textio_body.vhdl +++ b/libraries/std/textio_body.vhdl @@ -453,12 +453,16 @@ package body textio is loop untruncated_text_read (f, str, len); exit when len = 0; - if str (len) = LF then + if str (len) = LF or str (len) = CR then -- LRM 14.3 -- The representation of the line does not contain the representation -- of the end of the line. is_eol := true; len := len - 1; + -- End of line is any of LF/CR/CR+LF/LF+CR. + if len > 0 and (str (len) = LF or str (len) = CR) then + len := len - 1; + end if; else is_eol := false; end if; -- cgit v1.2.3