--
-- PAGER_SUPPORT by Richard Conn, TI Ada Technology Branch
--
package Pager_Support is

    File_Name_Length : constant := 80;
    Input_File_Name : String (1 .. File_Name_Length);
    Input_File_Name_Length : Natural;
    Comment_Prefix : Boolean := False;
    Include_File_Prefix : Boolean := True;
    Include_File_Prefix_Char : constant Character := '@';
    Verbose : Boolean := True;
    --
    -- INPUT_FILE_NAME and INPUT_FILE_NAME_LENGTH are set by the
    --  function COMMAND
    --
    -- COMMENT_PREFIX is available to be set externally if desired;
    --  if COMMENT_PREFIX is TRUE, all files created by PAGE will
    --  present file indicators as comments; else, file indicators
    --  will be presented in the UNIX standard form:
    --      ::::::::::
    --      filename
    --      ::::::::::
    --
    -- INCLUDE_FILE_PREFIX is available to be set externally if desired;
    --  if INCLUDE_FILE_PREFIX is TRUE, all include files referenced during
    --  the PAGE command will be included as a prefix to their contents;
    --  if FALSE, only the contents of the include files and not the include
    --  files themselves will be included
    -- INCLUDE_FILE_PREFIX_CHAR is the character prefixed to a file name to
    --  designate it as an include file
    --

    procedure Page (Output_File_Name : String);
    --
    -- PAGE prompts the user for the names of files and creates a paged
    --  output file containing the indicated files
    --

    procedure Unpage (Input_File_Name : String);
    --
    -- UNPAGE extracts the files from a paged file
    --

    procedure Ada_Check (Input_File_Name : String);
    --
    -- ADA_CHECK computes and displays the number of Ada statements, Ada
    --  comments, text lines, and a checksum hash code for the indicated file
    --


    procedure Scanpage (Input_File_Name : String);
    --
    -- SCANPAGE lists the names of the files in a paged file
    --

    function Command return Character;
    --
    -- COMMAND inputs a command line from the user and returns the first
    --  character in this line as a command letter.  It returns this character
    --  in upper-case.  It also does a simple parse of the command line
    --  and fills the INPUT_FILE_NAME and INPUT_FILE_NAME_LENGTH values, where
    --  the command line may be of the following two forms:
    --
    --     command_text
    --     command_text file_name
    --

end Pager_Support;
