-- $Date: 2004/01/13 02:15:47 $
-- $Revision: 1.4 $
-- $Author: jcrocholl $

with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

package Messages is

   -- Print a message to error output, followed by a newline.
   procedure Debug
     (Text : in String); -- Print this message.

   -- Print a message to error output, no newline.
   procedure Debug2
     (Text : in String); -- Print this message.

   -- If not in quiet mode, print the program name (if non-empty) and
   -- the message text to error output, followed by a newline.
   procedure Message
     (Text : in String); -- Print this message.

   -- Print the program name (if non-empty) and the error message text
   -- to error output, followed by a newline. Set exit status to
   -- failure.
   procedure Error
     (Text : in String); -- Print this error message.

   -- Print an error message, telling the user to try --help.
   procedure Try_Help;

   -- The option with the given argument is invalid.
   procedure Invalid_Option
     (Index : in Positive); -- Print the argument at this index.

   -- There are not enough command line options.
   procedure Too_Few_Arguments;

   function "-"
     (This : in String)
     return Unbounded_String
     renames To_Unbounded_String;

   -- Unconstrained array of strings.
   type String_Array is array(Positive range <>) of Unbounded_String;

   No_Strings : String_Array(1 .. 0);

   -- Handling for common options like -v and -h.
   procedure User_Friendly
     (Program_Name    : in String;       -- Name of executable.
      Parameters      : in String;       -- List of parameters.
      Description     : in String_Array-- What does the program do?
      Parameters_Text : in String_Array-- Text for parameters.
      Extra_Options   : in String_Array-- Options beyond -h, -v, -q.
      Index           : out Positive;    -- First unhandled parameter.
      Exit_Now        : out Boolean);    -- Exit program instantly.

end Messages;