with File_Name_Package;
package List_Package is

    --==============================================================
    -- This package provides the user with the necessary           =
    -- operations to support an abstract data type for a list of   =
    -- files. These operations include getting the list of files   =
    -- from the user, getting a file from the list of files, and   =
    -- determining whether there are more files in the list.       =
    --                                                             =
    -- written  by  GER  with  help  from  b**2  and  JM           =
    --==============================================================

    type List_Of_File_Names is limited private;
    --  Objects of this type will be used to store lists
    --  of file names

    End_Of_List : exception;
    --  This exception is raised when there are no more file
    --  names to get from the list of file names.

    procedure Get_List_Of_Files (This_List : out List_Of_File_Names);
    --  Gets a list of file names from the user

    procedure Get_File_Name_From_List
                 (From_List : in out List_Of_File_Names;
                  Into_File_Name : out File_Name_Package.File_Name);
    -- Gets a file name from a list of file names.  If there are no
    -- more file names to get, then the End_Of_List
    -- exception is raised.

    function More_File_Names (In_List : in List_Of_File_Names) return Boolean;
    -- Returns true if there are more file names in the list of file
    -- names and false otherwise

private
    Max_Number_Of_File_Names : constant := 10;
    type Whole_List is range 0 .. Max_Number_Of_File_Names;
    subtype List_Index is Whole_List range 1 .. Max_Number_Of_File_Names;
    type List_Type is array (List_Index) of File_Name_Package.File_Name;

    -- List_Type_Of_File_Names will be a queue-like structure.
    -- File_Names will be added at the top and removed from the
    -- bottom. Top_Of_List is a pointer to the top of the queue
    --.Top_Of_List will be incremented by one when new File_Names
    -- need to be added. Bottom_Of_List is a pointer which is used
    -- when taking File_Names off the queue.

    type List_Of_File_Names is
        record
            List : List_Type;
            Top_Of_List : Whole_List := 0;
            Bottom_Of_List : Whole_List := 0;
        end record;

end List_Package;