Natools

Diff
Login

Differences From Artifact [7fddb024b2]:

To Artifact [a9ae89461f]:


94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
               when others => null;
            end case;
            exit;
         end if;

         --  Read a single octet from source

         if P.Override_Pos < P.Override.Length then
            P.Override_Pos := P.Override_Pos + 1;
            O := P.Override.Element (P.Override_Pos);

            if P.Override_Pos >= P.Override.Length then
               P.Override.Hard_Reset;
               P.Override_Pos := 0;
            end if;
         else
            Input.Read (Item, Last);
            if Last not in Item'Range then
               P.Latest := Events.End_Of_Input;
               exit;
            end if;
            O := Item (Last);







|
<
<
<
<
|
<
<







94
95
96
97
98
99
100
101




102


103
104
105
106
107
108
109
               when others => null;
            end case;
            exit;
         end if;

         --  Read a single octet from source

         if P.Override.Length > 0 then




            P.Override.Pop (O);


         else
            Input.Read (Item, Last);
            if Last not in Item'Range then
               P.Latest := Events.End_Of_Input;
               exit;
            end if;
            O := Item (Last);
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
               then
                  P.Buffer.Append
                    (Encodings.Decode_Base64 (P.Internal.Chunk.Data
                                          (0 .. P.Internal.Chunk.Length - 1)));
                  if P.Internal.State = Base64_Atom then
                     P.Latest := Events.Add_Atom;
                  else
                     P.Override.Append (P.Buffer.Data);
                     P.Buffer.Soft_Reset;
                  end if;
                  P.Internal := (State => Waiting);
               end if;

            when Hex_Atom =>
               if Encodings.Is_Hex_Digit (O) then







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
               then
                  P.Buffer.Append
                    (Encodings.Decode_Base64 (P.Internal.Chunk.Data
                                          (0 .. P.Internal.Chunk.Length - 1)));
                  if P.Internal.State = Base64_Atom then
                     P.Latest := Events.Add_Atom;
                  else
                     P.Override.Append_Reverse (P.Buffer.Data);
                     P.Buffer.Soft_Reset;
                  end if;
                  P.Internal := (State => Waiting);
               end if;

            when Hex_Atom =>
               if Encodings.Is_Hex_Digit (O) then