?? PUSH (LISTEXT := ON) ??
*copyc clp$put_job_command_response
*copyc clp$put_job_output
*copyc i#move
*copyc osp$format_message
*copyc pmp$log
*copyc oss$job_paged_literal
?? POP ??

  PROCEDURE [INLINE] display
    (    display_line: string ( * <= 255));

    VAR
      length: integer,
      working_string: string (256),
      status: ost$status;

    STRINGREP (working_string, length, ' ', display_line);
    clp$put_job_command_response (working_string (1, length), status);
  PROCEND display;
?? SKIP := 5 ??

   PROCEDURE [INLINE] display_boolean
    (    descriptor: string ( * <= 128);
         value: boolean);

    VAR
      total_length: integer,
      working_string: string (150);

    STRINGREP (working_string, total_length, descriptor, ' ', value);
    display (working_string (1, total_length));

   PROCEND;
?? SKIP := 5 ??
  PROCEDURE display_bytes
    (    address: ^cell;
         length: integer);

    VAR
      hex_digits: [STATIC,oss$job_paged_literal,READ] array [0 .. 15] of char :=
            ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c',
            'd', 'e', 'f'];

    VAR
      data: ^string ( * ),
      data_index: integer,
      line: string (72),
      line_index: integer;

    line_index := 1;
    PUSH data: [length];
    i#move (address, data, length);
    line := ' ';
    FOR data_index := 1 TO length DO
      line (line_index) := hex_digits [$INTEGER (data^ (data_index)) DIV 16];
      line (line_index + 1) := hex_digits [$INTEGER (data^ (data_index)) MOD
            16];
      IF (data_index MOD 8) = 0 THEN
        line (line_index + 2) := ' ';
        line_index := line_index + 1;
      IFEND;
      line_index := line_index + 2;
      IF (line_index > 67) OR (data_index = length) THEN
        display (line (1, (line_index - 1)));
        line := ' ';
        line_index := 1;
      IFEND;
    FOREND;
  PROCEND display_bytes;
?? SKIP := 5 ??
  PROCEDURE [INLINE] display_integer
    (    descriptor: string ( * <= 127);
         number: integer);

    VAR
      descriptor_length: integer,
      number_length: integer,
      total_length: integer,
      working_string: string (150);

    working_string := descriptor;
    descriptor_length := STRLENGTH (descriptor);
    STRINGREP (working_string ((descriptor_length + 2), * ), number_length,
          number);
    total_length := number_length + descriptor_length + 2;
    display (working_string (1, total_length));
  PROCEND display_integer;
?? SKIP := 5 ??
   PROCEDURE [INLINE] display_pva
     (    descriptor: string ( * <= 127);
          pva: ^cell);

    VAR
      descriptor_length: integer,
      length: integer,
      working_string: string (150);

     STRINGREP (working_string, length, descriptor, ' ', pva);
     display (working_string (1, length));
  PROCEND;
?? SKIP := 5 ??

  PROCEDURE display_real
       (    descriptor: string ( * );
         number: real);

    VAR
      descriptor_length: integer,
      length: integer,
      working_string: string (150);

     STRINGREP (working_string, length, ' ', descriptor, ' ', number );
     display (working_string (1, length));
  PROCEND;
?? SKIP := 5 ??
  PROCEDURE display_status
    (    status: ost$status);

    VAR
      line_count: ost$status_message_line_count,
      message: ost$status_message,
      p_line_count: ^ost$status_message_line_count,
      p_line_size: ^ost$status_message_line_size,
      p_message: ^ost$status_message,
      p_message_line: ^string ( * ),
      request_status: ost$status;

    request_status.normal := TRUE;
    IF status.normal THEN
      display (' STATUS NORMAL ');
      RETURN;
    ELSE
      display (' STATUS abnormal');
      display_integer (' condition ', status.condition);
      display (status.text.value (1, status.text.size));
    IFEND;
    p_message := ^message;
    RESET p_message;
    osp$format_message (status, osc$full_message_level, osc$max_string_size,
          p_message^, request_status);
    IF NOT request_status.normal THEN
      display (' unable to display status ');
      RETURN;
    IFEND;
    RESET p_message;
    NEXT p_line_count IN p_message;
    IF p_line_count^ > 0 THEN
      FOR line_count := 1 TO (p_line_count^) DO
        NEXT p_line_size IN p_message;
        NEXT p_message_line: [p_line_size^] IN p_message;
        display (p_message_line^);
      FOREND;
    IFEND;
  PROCEND display_status;

?? SKIP := 5 ??
 PROCEDURE display_trace_back;

  TYPE
    sfsa_type = record
      fill1: 0 .. 0ffff(16),
      p: ^cell,
      a0: integer,
      a1: integer,
      fill2: 0 .. 0ffff(16),
      a2: ^sfsa_type, {previous save area pointer}
    recend;

    VAR
     length: integer,
     message: string (80),
     stack: integer,
     sfsa_p: ^sfsa_type; {pointer to previous stack frame save area};

      sfsa_p := #previous_save_area ();

     /display_calls/
      FOR stack := 0 to 20 do
        stringrep (message, length, ' Stack ', stack, ' P= ', sfsa_p^.p);
        display (message (1, length));
        sfsa_p := sfsa_p^.a2; { move to next previous sfsa }
        IF sfsa_p = NIL THEN
           EXIT /display_calls/;
        IFEND;
     FOREND;
  PROCEND;
?? SKIP := 5 ??
  PROCEDURE display_unformatted_status
    (    status: ost$status);

    IF status.normal THEN
      display (' STATUS NORMAL ');
    ELSE
      display (' STATUS abnormal');
      display_integer (' condition ', status.condition);
      display (status.text.value (1, status.text.size));
    IFEND;
  PROCEND display_unformatted_status;

