
  TYPE
*IF NOT $true(osv$unix)
    clt$block_kind = (clc$block_block, clc$case_block, clc$check_block,
          clc$command_block, clc$command_proc_block, clc$for_block,
          clc$function_block, clc$function_proc_block, clc$if_block,
          clc$input_block, clc$loop_block, clc$repeat_block,
          clc$sub_parameters_block, clc$task_block, clc$utility_block,
          clc$when_block, clc$while_block);
*ELSE
    clt$block_kind = (clc$command_block, clc$function_block, clc$input_block,
          clc$task_block, clc$utility_block);
*IFEND

  TYPE
    clt$block_kinds = set of clt$block_kind;

  TYPE
    clt$block = record
      access_count: ALIGNED [0 MOD 8] integer,
      assignment_counter: integer,
      previous_block: ^clt$block,
*IF NOT $true(osv$unix)
      static_link: ^clt$block,
      started_application: boolean,
      application_info: ^clt$application_info,
      caller_ring: ost$valid_ring,
      active_capabilities: avt$conditional_capabilities,
*IFEND
      interpreter_mode: clt$interpreter_modes,
*IF NOT $true(osv$unix)
      variables: clt$variables,
*IFEND
      parameters: clt$parameters,
      source: clt$command_or_function_source,
      use_command_search_mode: boolean,
      prompting_requested: boolean,
*IF NOT $true(osv$unix)
      established_handler_info: clt$established_handler_info,
*IFEND
      environment_object_info: ^clt$environment_object_info,
      line_identifier: clt$line_identifier,
      line_parse: clt$parse_state,
*IF NOT $true(osv$unix)
      input_can_be_echoed: boolean,
*IFEND
      being_exited: boolean,
      exit_position: record
        case defined: boolean of
*IF $true(osv$unix)
        = FALSE =
          ,
*IFEND
        = TRUE =
          line_identifier: clt$line_identifier,
          line_parse: clt$parse_state,
        casend,
      recend,
      inheriting_block: ^clt$block,
      label: ost$name,
      kind_name: string (14) {longest is "sub_parameters"} ,
      kind_end_name: string (18) {longest is "sub_parameters_end"} ,
      case kind: clt$block_kind of
*IF NOT $true(osv$unix)
      = clc$block_block =
        ,
      = clc$case_block =
        case_selection_value: ^clt$internal_data_value,
        case_selection_encounterred: boolean,
        case_selection_made: boolean,
        case_else_allowed: boolean,
      = clc$check_block =
        check_status: ost$status,
*IFEND
      = clc$command_block =
        command_kind: clt$command_kind,
*IF NOT $true(osv$unix)
        command_logging_completed: boolean,
        command_echoing_completed: boolean,
*IFEND
        help_output_file: ^fst$file_reference,
        help_output_options: clt$parameter_help_options,
*IF NOT $true(osv$unix)
        edited_parameters_max_size: clt$string_size,
        edited_parameters: ^clt$data_representation,
      = clc$command_proc_block, clc$function_proc_block, clc$input_block,
            clc$when_block =
*ELSE
      = clc$input_block =
*IFEND
        inherited_input: record
          case found: boolean of
          = TRUE =
            block: ^clt$block,
            in_current_task: boolean,
          casend,
        recend,
        input: record
          internal: boolean,
          prompting_input: boolean,
          line: clt$expandable_string,
          pushed_line: ^clt$pushed_line,
          case kind: (clc$line_input, clc$file_input, clc$sequence_input) of
          = clc$file_input, clc$sequence_input =
*IF NOT $true(osv$unix)
            local_file_name: fst$path_handle_name,
*ELSE
            local_file_name: fst$path,
*IFEND
            file_id: amt$file_identifier,
            line_layout: clt$line_layout,
            get_command_line: ^procedure
                   (VAR parse: clt$parse_state;
                    VAR end_of_input: boolean;
                    VAR status: ost$status),
            get_line: ^procedure (    line_kind: clt$input_line_kind;
                                      prompt_string: clt$prompt_string;
                                  VAR status: ost$status),
            data_line: clt$expandable_string,
            line_address_is_for_previous: boolean,
            line_address: amt$file_byte_address,
            record_number: amt$file_byte_address,
            data: ^clt$input_data,
            file_rereadable: boolean,
            interactive_device: boolean,
            device_class: rmt$device_class,
            base_prompt_string: ift$prompt_string,
            current_prompt_string: ift$prompt_string,
            case state: clt$input_state of
            = clc$reset_input =
              reset_line_identifier: clt$line_identifier,
              reset_line_parse: clt$parse_state,
            casend,
          casend,
        recend,
        previous_command: clt$expandable_string,
        previous_command_name: clt$command_name,
        previous_command_status: ost$status,
*IF NOT $true(osv$unix)
        proc_name: ost$name,
        command_proc_status: ^ost$status,
        command_proc_logging_completed: boolean,
        command_proc_echoing_completed: boolean,
        function_proc_result: ^clt$internal_data_value,
        expected_function_proc_type: ^clt$type_specification,
        when_condition: ^clt$when_condition_descriptor,
*IFEND
        associated_utility: ^clt$block,
        line_preprocessor_specified: boolean,
*IF NOT $true(osv$unix)
      = clc$for_block =
        for_variable: ^clt$variable_ref_expression,
        for_control: record
          case style: (clc$for_control_incremental, clc$for_control_list) of
          = clc$for_control_incremental =
            value: clt$integer,
            limit: integer,
            increment: integer,
          = clc$for_control_list =
            list: ^clt$internal_data_value,
          casend,
        recend,
*IFEND
      = clc$function_block =
        expected_function_type: ^clt$type_description,
*IF NOT $true(osv$unix)
      = clc$if_block =
        if_condition_met: boolean,
        if_else_allowed: boolean,
      = clc$loop_block =
        ,
      = clc$repeat_block, clc$while_block =
        expression_area: ^SEQ ( * ),
        expression_parse: clt$parse_state,
      = clc$sub_parameters_block =
        sub_parameters_work_area_ptr: ^^clt$work_area,
        sub_parameters_work_area: ^clt$work_area,
        lookup_functions_and_variables: boolean,
*IFEND
      = clc$task_block =
        task_id: pmt$task_id,
        task_kind: (clc$job_monitor_task, clc$task_statement_task,
              clc$other_task),
        task_link: ^clt$block,
*IF NOT $true(osv$unix)
        application_task_link: ^clt$block,
*IFEND
        parent: ^clt$block,
        current_block: ^clt$block,
*IF NOT $true(osv$unix)
        display_log_indices: clt$display_log_indices,
*IFEND
        synchronous_with_job: boolean,
        case synchronous_with_parent: boolean of
        = FALSE =
          command_file: fst$path_handle_name,
          named_task_list: ^clt$named_task,
*IF NOT $true(osv$unix)
          default_session_file: ^fst$file_reference,
*IFEND
        = TRUE =
          ,
        casend,
      = clc$utility_block =
        notify_before_command_read: ^procedure
               (VAR status: ost$status),
        command_environment: clt$utility_command_environment,
        command_search_mode: clt$command_search_modes,
        interactive_include_processor: clt$utility_interactive_in_desc,
        libraries: ^array [1 .. * ] of fst$path,
        line_preprocessor: clt$utility_line_preproc_desc,
        online_manual_name: ost$online_manual_name,
        prompt: clt$utility_prompt,
        termination_command_found: boolean,
        include_processor_active: boolean,
*IF NOT $true(osv$unix)
        active_sou_capabilities: record
          case saved: boolean of
          = TRUE =
            value: avt$conditional_capabilities,
          casend,
        recend,
*IFEND
      casend,
    recend;

*IF NOT $true(osv$unix)
*copyc amt$file_byte_address
*copyc amt$file_identifier
*IFEND
*copyc avt$conditional_capabilities
*copyc clt$application_info
*copyc clt$command_kind
*copyc clt$command_name
*copyc clt$command_or_function_source
*copyc clt$command_search_modes
*copyc clt$data_representation
*IF NOT $true(osv$unix)
*copyc clt$display_log_indices
*IFEND
*copyc clt$environment_object_info
*IF NOT $true(osv$unix)
*copyc clt$established_handler_info
*IFEND
*copyc clt$expandable_string
*copyc clt$integer
*copyc clt$internal_data_value
*copyc clt$interpreter_modes
*copyc clt$input_data
*copyc clt$input_line_kind
*copyc clt$input_state
*copyc clt$line_identifier
*copyc clt$line_layout
*copyc clt$named_task
*copyc clt$parameters
*copyc clt$parameter_help_options
*copyc clt$parameter_name
*copyc clt$parse_state
*copyc clt$prompt_string
*copyc clt$pushed_line
*copyc clt$string_size
*copyc clt$type_description
*copyc clt$type_specification
*copyc clt$utility_attribute
*copyc clt$utility_command_environment
*copyc clt$utility_interactive_in_desc
*copyc clt$utility_line_preproc_desc
*copyc clt$utility_prompt
*IF NOT $true(osv$unix)
*copyc clt$value_qualifiers
*copyc clt$variables
*copyc clt$variable_name
*copyc clt$variable_ref_expression
*copyc clt$when_condition_descriptor
*IFEND
*copyc clt$work_area
*copyc fst$file_reference
*copyc fst$path
*IF NOT $true(osv$unix)
*copyc fst$path_handle_name
*copyc ift$terminal_connection_types
*copyc osd$virtual_address
*IFEND
*copyc ost$name
*copyc ost$online_manual_name
*copyc ost$status
*IF NOT $true(osv$unix)
*copyc pmt$task_id
*IFEND
*copyc rmt$device_class

