Index: src/natools-smaz-tools.adb ================================================================== --- src/natools-smaz-tools.adb +++ src/natools-smaz-tools.adb @@ -49,10 +49,22 @@ ---------------------- -- Public Interface -- ---------------------- + + function Linear_Search (Value : String) return Natural is + Result : Ada.Streams.Stream_Element := 0; + begin + for S of List_For_Linear_Search loop + exit when S = Value; + Result := Result + 1; + end loop; + + return Natural (Result); + end Linear_Search; + procedure Print_Dictionary_In_Ada (Dict : in Dictionary; Hash_Image : in String := "TODO"; Max_Width : in Positive := 70; Index: src/natools-smaz-tools.ads ================================================================== --- src/natools-smaz-tools.ads +++ src/natools-smaz-tools.ads @@ -59,6 +59,11 @@ -- is added beyond Prefix before values continued on another line. -- Frist_Prefix is used instead of Prefix on the first line. -- All the defaults value are what was used to generate the constant -- in Natools.Smaz.Original. + List_For_Linear_Search : String_Lists.List; + function Linear_Search (Value : String) return Natural; + -- Function and data source for inefficient but dynamic function + -- that can be used with Dictionary.Hash. + end Natools.Smaz.Tools;