Natools

Diff
Login

Differences From Artifact [c932ff0009]:

To Artifact [e22ccc7ac2]:


321
322
323
324
325
326
327
328


329
330
331
332
333
334
335
321
322
323
324
325
326
327

328
329
330
331
332
333
334
335
336







-
+
+







        (List : in String_Lists.List;
         Variable_Length_Verbatim : in Boolean)
        return Dictionary;

      with function Worst_Element
        (Dict : in Dictionary;
         Counts : in Dictionary_Counts;
         Method : in Methods)
         Method : in Methods;
         First, Last : in Dictionary_Entry)
        return Dictionary_Entry;

   package Dictionary_Subprograms is

      package Holders is new Ada.Containers.Indefinite_Holders (Dictionary);

      function Adjust_Dictionary
451
452
453
454
455
456
457
458



459
460
461
462
463
464
465
452
453
454
455
456
457
458

459
460
461
462
463
464
465
466
467
468







-
+
+
+







               end if;
            end loop;

            for Word of Handler.Forced_Words loop
               if not Is_In_Dict (Actual_Dict, Word) then
                  declare
                     Worst_Index : constant Dictionary_Entry
                       := Worst_Element (Actual_Dict, Counts, Method);
                       := Worst_Element
                          (Actual_Dict, Counts, Method,
                           Dictionary_Entry'First, Last_Code (Actual_Dict));
                     New_Dict : constant Dictionary
                       := Replace_Element (Current.Element, Worst_Index, Word);
                  begin
                     Ada.Text_IO.Put_Line
                       (Ada.Text_IO.Current_Error,
                        "Removing"
                        & Counts (Worst_Index)'Img & "x "
560
561
562
563
564
565
566
567



568
569
570
571
572
573
574
563
564
565
566
567
568
569

570
571
572
573
574
575
576
577
578
579







-
+
+
+







         Updated : out Boolean)
      is
         use type Ada.Streams.Stream_Element_Offset;

         New_Value : Ada.Strings.Unbounded.Unbounded_String;
         New_Position : String_Lists.Cursor;
         Worst_Index : constant Dictionary_Entry
           := Worst_Element (Dict.Element, Counts, Method);
           := Worst_Element
              (Dict.Element, Counts, Method,
               Dictionary_Entry'First, Last_Code (Dict.Element));
         Worst_Value : constant String
           := Dict_Entry (Dict.Element, Worst_Index);
         Worst_Count : constant String_Count := Counts (Worst_Index);
         Base : constant Dictionary
           := Remove_Element (Dict.Element, Worst_Index);
         Old_Score : constant Ada.Streams.Stream_Element_Count := Score;
      begin