562
563
564
565
566
567
568
569
570
571
572
573
574
575
|
procedure Escape
(Value : in Octet;
Result : in out Atom;
Pos : in Offset);
Size : Count;
Last_Non_NL : Offset := Data'Last;
procedure Escape
(Value : in Octet;
Result : in out Atom;
Pos : in Offset) is
begin
Result (Pos) := Encodings.Escape;
|
>
|
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
|
procedure Escape
(Value : in Octet;
Result : in out Atom;
Pos : in Offset);
Size : Count;
Last_Non_NL : Offset := Data'Last;
Expected_Cursor : Screen_Offset := Output.Cursor;
procedure Escape
(Value : in Octet;
Result : in out Atom;
Pos : in Offset) is
begin
Result (Pos) := Encodings.Escape;
|
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
(Value,
Output.Param.Hex_Casing,
Result (Pos + 2),
Result (Pos + 3));
end case;
end Escape;
begin
declare
Discarded_Cursor : Screen_Offset := Output.Cursor;
begin
Quoted_Lengths
(Data,
Output.Param.Char_Encoding,
Output.Param.Width,
Output.Param.Newline,
Single_Line,
Size,
Discarded_Cursor);
end;
while Last_Non_NL in Data'Range
and then (Data (Last_Non_NL) = Encodings.CR
or Data (Last_Non_NL) = Encodings.LF)
loop
Last_Non_NL := Last_Non_NL - 1;
end loop;
|
<
<
<
|
|
|
|
|
|
|
|
<
|
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
(Value,
Output.Param.Hex_Casing,
Result (Pos + 2),
Result (Pos + 3));
end case;
end Escape;
begin
Quoted_Lengths
(Data,
Output.Param.Char_Encoding,
Output.Param.Width,
Output.Param.Newline,
Single_Line,
Size,
Expected_Cursor);
while Last_Non_NL in Data'Range
and then (Data (Last_Non_NL) = Encodings.CR
or Data (Last_Non_NL) = Encodings.LF)
loop
Last_Non_NL := Last_Non_NL - 1;
end loop;
|
754
755
756
757
758
759
760
761
762
763
764
765
766
767
|
end loop;
pragma Assert (O = Result'Last);
Result (O) := Encodings.Quoted_Atom_End;
Write_Raw (Printer'Class (Output), Result);
end;
end Write_Quoted;
procedure Write_Verbatim (Output : in out Printer; Data : in Atom) is
Length_Image : constant String := Count'Image (Data'Length);
Prefix : Atom (0 .. Length_Image'Length - 1);
begin
|
>
>
|
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
|
end loop;
pragma Assert (O = Result'Last);
Result (O) := Encodings.Quoted_Atom_End;
Write_Raw (Printer'Class (Output), Result);
end;
pragma Assert (Output.Cursor = Expected_Cursor);
end Write_Quoted;
procedure Write_Verbatim (Output : in out Printer; Data : in Atom) is
Length_Image : constant String := Count'Image (Data'Length);
Prefix : Atom (0 .. Length_Image'Length - 1);
begin
|