Natools

Check-in [528e853e08]
Login
Overview
Comment:s_expressions-printers-pretty: fix quoted encoding size estimation on inserted newlines
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 528e853e084a42b643c4bb0578b10882fa3a3458
User & Date: nat on 2014-02-06 22:20:13
Other Links: manifest | tags
Context
2014-02-07
21:50
s_expressions-printers-pretty-tests: new test for correctness of token encoding end markers check-in: a450c7e1d4 user: nat tags: trunk
2014-02-06
22:20
s_expressions-printers-pretty: fix quoted encoding size estimation on inserted newlines check-in: 528e853e08 user: nat tags: trunk
2014-02-05
19:22
s_expressions-printers-pretty-tests: new test for newline output formats check-in: d002179746 user: nat tags: trunk
Changes

Modified src/natools-s_expressions-printers-pretty.adb from [e2efaff8cb] to [b778534f67].

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

         if not Single_Line
           and then Width > 0
           and then Cursor > 1
           and then (New_Cursor > Width + 1
             or else (New_Cursor = Width + 1
               and then I + 1 in Data'Range
               and then not Is_Newline (Data, I, Newline)))
         then
            case Newline is
               when CR | LF =>
                  Size := Size + 2;
               when CR_LF | LF_CR =>
                  Size := Size + 3;
            end case;







|







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

         if not Single_Line
           and then Width > 0
           and then Cursor > 1
           and then (New_Cursor > Width + 1
             or else (New_Cursor = Width + 1
               and then I + 1 in Data'Range
               and then not Is_Newline (Data, I + 1, Newline)))
         then
            case Newline is
               when CR | LF =>
                  Size := Size + 2;
               when CR_LF | LF_CR =>
                  Size := Size + 3;
            end case;