Differences From Artifact [de5cce5c1a]:
- File
src/natools-smaz_implementations-base_64.adb
— part of check-in
[210677c061]
at
2017-01-07 22:53:28
on branch trunk
— smaz_implementations-base_64: rewrite variable-length verbatim code
At some point in the development I changed the base-64 scheme, but failed to propagate it everywhere. Mostly I intend to use only one mode in base-64, and the other one is merely a place-holder, which explains how it got neglected. Now at least it works, even if it's useless. (user: nat, size: 11052) [annotate] [blame] [check-ins using]
To Artifact [d47cc06763]:
- File src/natools-smaz_implementations-base_64.adb — part of check-in [6c1f9bd682] at 2017-02-27 21:27:58 on branch trunk — smaz_implementations-base_64: check end-of-input in Read_Code (user: nat, size: 11232) [annotate] [blame] [check-ins using]
1 | ------------------------------------------------------------------------------ | | | 1 2 3 4 5 6 7 8 9 | ------------------------------------------------------------------------------ -- Copyright (c) 2016-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- |
︙ | ︙ | |||
32 33 34 35 36 37 38 39 | Code : out Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit; Verbatim_Length : out Natural; Last_Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit; Variable_Length_Verbatim : in Boolean) is Ignored : String (1 .. 2); Offset_Backup : Ada.Streams.Stream_Element_Offset; begin | > | > > > > > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | Code : out Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit; Verbatim_Length : out Natural; Last_Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit; Variable_Length_Verbatim : in Boolean) is Ignored : String (1 .. 2); Offset_Backup : Ada.Streams.Stream_Element_Offset; Finished : Boolean; begin Tools.Next_Digit_Or_End (Input, Offset, Code, Finished); if Finished then Code := Base_64_Tools.Base_64_Digit'Last; Verbatim_Length := 0; return; end if; if Code <= Last_Code then Verbatim_Length := 0; elsif Variable_Length_Verbatim then if Code < 63 then Verbatim_Length := 63 - Natural (Code); |
︙ | ︙ |