File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,11 @@ package body VSS.Text_Streams.File_Input is
98
98
-- ------------
99
99
100
100
procedure Get_Line
101
- (Self : in out File_Input_Text_Stream'Class;
102
- Line : out VSS.Strings.Virtual_String'Class;
103
- Success : out Boolean)
101
+ (Self : in out File_Input_Text_Stream'Class;
102
+ Line : out VSS.Strings.Virtual_String'Class;
103
+ Success : out Boolean;
104
+ Terminators : VSS.Strings.Line_Terminator_Set :=
105
+ VSS.Strings.New_Line_Function)
104
106
is
105
107
106
108
use type VSS.Characters.Virtual_Character;
@@ -120,7 +122,9 @@ package body VSS.Text_Streams.File_Input is
120
122
At_EOL : Boolean := False;
121
123
begin
122
124
loop
123
- if Last_Character.Element = VSS.Characters.Latin.Line_Feed then
125
+ if Self.Buffer.Slice (First_Character, Last_Character)
126
+ .Ends_With (Terminators)
127
+ then
124
128
At_EOL := True;
125
129
exit ;
126
130
end if ;
Original file line number Diff line number Diff line change @@ -34,9 +34,11 @@ package VSS.Text_Streams.File_Input is
34
34
-- Encoding can be set only when file is not open.
35
35
36
36
procedure Get_Line
37
- (Self : in out File_Input_Text_Stream'Class;
38
- Line : out VSS.Strings.Virtual_String'Class;
39
- Success : out Boolean);
37
+ (Self : in out File_Input_Text_Stream'Class;
38
+ Line : out VSS.Strings.Virtual_String'Class;
39
+ Success : out Boolean;
40
+ Terminators : VSS.Strings.Line_Terminator_Set :=
41
+ VSS.Strings.New_Line_Function);
40
42
41
43
procedure Close (Self : in out File_Input_Text_Stream'Class);
42
44
-- Close file.
You can’t perform that action at this time.
0 commit comments