lace.text.forge: Rid 'CR' from line endings.
This commit is contained in:
@@ -22,8 +22,17 @@ is
|
||||
|
||||
while not end_of_File (the_File)
|
||||
loop
|
||||
append (Pad, get_Line (the_File)
|
||||
& ada.Characters.Latin_1.LF);
|
||||
declare
|
||||
use ada.Characters;
|
||||
Line : constant String := get_Line (the_File);
|
||||
begin
|
||||
if Line (Line'Last) = latin_1.CR
|
||||
then
|
||||
append (Pad, Line (Line'First .. Line'Last - 1) & latin_1.LF);
|
||||
else
|
||||
append (Pad, Line & latin_1.LF);
|
||||
end if;
|
||||
end;
|
||||
end loop;
|
||||
|
||||
close (the_File);
|
||||
|
||||
@@ -10,8 +10,8 @@ is
|
||||
|
||||
type Filename is new String;
|
||||
|
||||
function to_String (Filename : in forge.Filename) return String;
|
||||
function to_Text (Filename : in forge.Filename) return Item;
|
||||
function to_String (Filename : in forge.Filename) return String; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
function to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
|
||||
|
||||
--------------
|
||||
|
||||
Reference in New Issue
Block a user