*copyc OSD$DEFAULT_PRAGMATS
MODULE iim$st_update_actual_attributes;
?? TITLE := 'MODULE iim$st_update_actual_attributes' ??

?? PUSH (LISTEXT := ON) ??
*copyc iiv$connection_desc_ptr
*copyc pmp$log
?? POP ??

?? NEWTITLE := 'PROCEDURE iip$st_update_actual_attributes', EJECT ??

  PROCEDURE [XDCL, #GATE] iip$st_update_actual_attributes (connection_desc_ptr: ^iit$connection_description;
        new_attributes: ift$connection_attributes;
        source: ift$connection_attribute_source);

{  Update the actual_connection_attributes field of the terminal connection table with
{  the new_attributes array.

    VAR
      status: ost$status,
      cdp: ^iit$connection_attributes,
      i: integer;

      cdp := ^connection_desc_ptr^.actual_connection_attributes;
      FOR i := LOWERBOUND (new_attributes) TO UPPERBOUND (new_attributes) DO
        IF ($INTEGER(new_attributes [i].key) >=
          $INTEGER(ifc$attention_character_action))
          AND ($INTEGER(new_attributes [i].key) <=
            $INTEGER(ifc$trans_timeout_mode)) THEN
        CASE new_attributes [i].key OF

        = ifc$attention_character_action =
          cdp^.attention_character_action.value := new_attributes [i].attention_character_action;
          IF source <> ifc$undefined_attribute THEN
            cdp^.attention_character_action.source := source;
          IFEND;

        = ifc$break_key_action =
          cdp^.break_key_action.value := new_attributes [i].break_key_action;
          IF source <> ifc$undefined_attribute THEN
            cdp^.break_key_action.source := source;
          IFEND;

        = ifc$end_of_information =
          cdp^.end_of_information.value := new_attributes [i].end_of_information;
          IF source <> ifc$undefined_attribute THEN
            cdp^.end_of_information.source := source;
          IFEND;

        = ifc$input_block_size =
          cdp^.input_block_size.value := new_attributes [i].input_block_size;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_block_size.source := source;
          IFEND;

        = ifc$input_editing_mode =
          cdp^.input_editing_mode.value := new_attributes [i].input_editing_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_editing_mode.source := source;
          IFEND;

        = ifc$input_output_mode =
          cdp^.input_output_mode.value := new_attributes [i].input_output_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_output_mode.source := source;
          IFEND;

        = ifc$input_timeout =
          cdp^.input_timeout.value := new_attributes [i].input_timeout;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_timeout.source := source;
          IFEND;

        = ifc$input_timeout_length =
          cdp^.input_timeout_length.value := new_attributes [i].input_timeout_length;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_timeout_length.source := source;
          IFEND;

        = ifc$input_timeout_purge =
          cdp^.input_timeout_purge.value := new_attributes [i].input_timeout_purge;
          IF source <> ifc$undefined_attribute THEN
            cdp^.input_timeout_purge.source := source;
          IFEND;

        = ifc$partial_char_forwarding =
          cdp^.partial_char_forwarding.value := new_attributes [i].partial_character_forwarding;
          IF source <> ifc$undefined_attribute THEN
            cdp^.partial_char_forwarding.source := source;
          IFEND;

        = ifc$prompt_file =
          cdp^.prompt_file.value := new_attributes [i].prompt_file;
          IF source <> ifc$undefined_attribute THEN
            cdp^.prompt_file.source := source;
          IFEND;

        = ifc$prompt_file_identifier =
          cdp^.prompt_file_identifier.value := new_attributes [i].prompt_file_identifier;
          IF source <> ifc$undefined_attribute THEN
            cdp^.prompt_file_identifier.source := source;
          IFEND;

        = ifc$prompt_string =
          cdp^.prompt_string.value := new_attributes [i].prompt_string;
          IF source <> ifc$undefined_attribute THEN
            cdp^.prompt_string.source := source;
          IFEND;

        = ifc$store_backspace_character =
          cdp^.store_backspace_character.value := new_attributes [i].store_backspace_character;
          IF source <> ifc$undefined_attribute THEN
            cdp^.store_backspace_character.source := source;
          IFEND;

        = ifc$store_nuls_dels =
          cdp^.store_nuls_dels.value := new_attributes [i].store_nuls_dels;
          IF source <> ifc$undefined_attribute THEN
            cdp^.store_nuls_dels.source := source;
          IFEND;

        = ifc$trans_character_mode =
          cdp^.trans_character_mode.value := new_attributes [i].trans_character_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_character_mode.source := source;
          IFEND;

        = ifc$trans_forward_character =
          cdp^.trans_forward_character.value := new_attributes [i].trans_forward_character;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_forward_character.source := source;
          IFEND;

        = ifc$trans_length_mode =
          cdp^.trans_length_mode.value := new_attributes [i].trans_length_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_length_mode.source := source;
          IFEND;

        = ifc$trans_timeout_mode =
          cdp^.trans_timeout_mode.value := new_attributes [i].trans_timeout_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_timeout_mode.source := source;
          IFEND;

        = ifc$trans_message_length =
          cdp^.trans_message_length.value := new_attributes [i].trans_message_length;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_message_length.source := source;
          IFEND;

        = ifc$trans_terminate_character =
          cdp^.trans_terminate_character.value := new_attributes [i].trans_terminate_character;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_terminate_character.source := source;
          IFEND;

        = ifc$trans_protocol_mode =
          cdp^.trans_protocol_mode.value := new_attributes [i].trans_protocol_mode;
          IF source <> ifc$undefined_attribute THEN
            cdp^.trans_protocol_mode.source := source;
          IFEND;

        ELSE
          {}
        CASEND;
        ELSE
          {}
        IFEND;
      FOREND;

  PROCEND iip$st_update_actual_attributes;

MODEND iim$st_update_actual_attributes;
