Natools

Diff
Login

Differences From Artifact [c7513de8cf]:

To Artifact [978118703a]:


345
346
347
348
349
350
351


352




353
354
355
356
357
358
359
               if Single_Line
                 or else I > Last_Non_NL
                 or else not Is_Newline (Data, I, Newline)
               then
                  Size := Size + 2;
                  Cursor := Cursor + 2;
               else


                  Size := Size + 1;




                  Cursor := 1;
               end if;
            when 0 .. 7 | 14 .. 31 =>
               Size := Size + 4;
               Cursor := Cursor + 4;
            when 16#80# .. 16#FF# =>
               case Encoding is







>
>
|
>
>
>
>







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
               if Single_Line
                 or else I > Last_Non_NL
                 or else not Is_Newline (Data, I, Newline)
               then
                  Size := Size + 2;
                  Cursor := Cursor + 2;
               else
                  case Newline is
                     when LF | CR =>
                        Size := Size + 1;
                     when CR_LF | LF_CR =>
                        Size := Size + 2;
                        I := I + 1;
                  end case;
                  Cursor := 1;
               end if;
            when 0 .. 7 | 14 .. 31 =>
               Size := Size + 4;
               Cursor := Cursor + 4;
            when 16#80# .. 16#FF# =>
               case Encoding is
626
627
628
629
630
631
632







633
634
635
636
637
638
639
                     Result (O + 1) := Character'Pos ('n');
                     O := O + 2;
                     Output.Cursor := Output.Cursor + 2;
                  else
                     Result (O) := Data (I);
                     O := O + 1;
                     Output.Cursor := 1;







                  end if;
               when 11 =>
                  Result (O) := Encodings.Escape;
                  Result (O + 1) := Character'Pos ('v');
                  O := O + 2;
                  Output.Cursor := Output.Cursor + 2;
               when 12 =>







>
>
>
>
>
>
>







632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
                     Result (O + 1) := Character'Pos ('n');
                     O := O + 2;
                     Output.Cursor := Output.Cursor + 2;
                  else
                     Result (O) := Data (I);
                     O := O + 1;
                     Output.Cursor := 1;
                     if Output.Param.Newline = CR_LF
                       or Output.Param.Newline = LF_CR
                     then
                        I := I + 1;
                        Result (O) := Data (I);
                        O := O + 1;
                     end if;
                  end if;
               when 11 =>
                  Result (O) := Encodings.Escape;
                  Result (O + 1) := Character'Pos ('v');
                  O := O + 2;
                  Output.Cursor := Output.Cursor + 2;
               when 12 =>
650
651
652
653
654
655
656







657
658
659
660
661
662
663
                     Result (O + 1) := Character'Pos ('r');
                     O := O + 2;
                     Output.Cursor := Output.Cursor + 2;
                  else
                     Result (O) := Data (I);
                     O := O + 1;
                     Output.Cursor := 1;







                  end if;
               when Encodings.Quoted_Atom_End | Encodings.Escape =>
                  Result (O) := Encodings.Escape;
                  Result (O + 1) := Data (I);
                  O := O + 2;
                  Output.Cursor := Output.Cursor + 2;
               when 0 .. 7 | 14 .. 31 =>







>
>
>
>
>
>
>







663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
                     Result (O + 1) := Character'Pos ('r');
                     O := O + 2;
                     Output.Cursor := Output.Cursor + 2;
                  else
                     Result (O) := Data (I);
                     O := O + 1;
                     Output.Cursor := 1;
                     if Output.Param.Newline = CR_LF
                       or Output.Param.Newline = LF_CR
                     then
                        I := I + 1;
                        Result (O) := Data (I);
                        O := O + 1;
                     end if;
                  end if;
               when Encodings.Quoted_Atom_End | Encodings.Escape =>
                  Result (O) := Encodings.Escape;
                  Result (O + 1) := Data (I);
                  O := O + 2;
                  Output.Cursor := Output.Cursor + 2;
               when 0 .. 7 | 14 .. 31 =>