Index: src/natools-smaz_generic-tools.adb ================================================================== --- src/natools-smaz_generic-tools.adb +++ src/natools-smaz_generic-tools.adb @@ -373,10 +373,20 @@ Offsets => Offsets, Values => Values, Hash => Smaz_Tools.Dummy_Hash'Access); end; end To_Dictionary; + + function To_String_List (Dict : in Dictionary) return String_Lists.List is + Result : String_Lists.List; + begin + for Code in Dictionary_Code'First .. Dict.Last_Code loop + String_Lists.Append (Result, Dict_Entry (Dict, Code)); + end loop; + + return Result; + end To_String_List; --------------------------- -- Dictionary Evaluation -- Index: src/natools-smaz_generic-tools.ads ================================================================== --- src/natools-smaz_generic-tools.ads +++ src/natools-smaz_generic-tools.ads @@ -38,10 +38,13 @@ with Pre => String_Lists.Length (List) in 1 .. Ada.Containers.Count_Type (Ada.Streams.Stream_Element'Last); -- Build a Dictionary object from a string list -- Note that Hash is set to a placeholder which unconditionnally -- raises Program_Error when called. + + function To_String_List (Dict : in Dictionary) return String_Lists.List; + -- Convert a dictionary back to the corresponding list of words generic with procedure Put_Line (Line : String); procedure Print_Dictionary_In_Ada (Dict : in Dictionary;