From:	SCOVCB::GALVIN_FX    31-JAN-1989 09:04
To:	ARISIA::EVERHART
Subj:	

with text_io; use text_io;

package body UTILITY is

   task OUTPT is
      entry CONTROL;
      entry RELEASE;
   end OUTPT;

   use real_io;

   task body OUTPT is
   begin
      loop
         select
            accept CONTROL;
            accept RELEASE;
         or
            terminate;
         end select;
      end loop;
   end OUTPT;


   procedure CONTROL_OUTPUT is
   begin
      OUTPT.CONTROL;
   end CONTROL_OUTPUT;


   procedure RELEASE_OUTPUT_CONTROL is
   begin
      OUTPT.RELEASE;
   end RELEASE_OUTPUT_CONTROL;


   procedure OUTPUT_TRACE (NUMBER : in float; NAME : in CHAR_STRING;
                           TEXT : in string;  LF_FLAG : in LF_TYPE) is
   begin
      put (NUMBER); put ("   " & NAME & "   " & TEXT);
      if LF_FLAG = LF then
         new_line;
      end if;
   end OUTPUT_TRACE;


   procedure OUTPUT_TRACE (TEXT : in string;  LF_FLAG : in LF_TYPE) is
   begin
      put ("                          " & TEXT);
      if LF_FLAG = LF then
         new_line;
      end if;
   end OUTPUT_TRACE;


   function STRING_MATCH (NAME : in string; SIZE : in integer)
                         return string is

     BLANKS : string (1..132) := "                                "
             & "                                                  "
             & "                                                  ";

      begin

         if SIZE < 1 or SIZE > 132 then
            raise constraint_error;
         end if;

         if NAME'LENGTH >= SIZE then
            return NAME (1..SIZE);
         else
            return NAME & BLANKS (1..SIZE-NAME'LENGTH);
         end if;
   end STRING_MATCH;
end UTILITY;
