?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Physical Configuration Utility Functions processor.' ??
MODULE cmm$pcu_editor_functions;

{ PURPOSE:
{    This module contains the function processor interfaces for the
{    Physical Configuration Editor.

?? NEWTITLE := 'Global Declarations Referenced by This Module.', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clt$data_value
*copyc clt$parameter_list
*copyc clt$work_area
*copyc cmt$element_name
*copyc cmt$pcu_command_descriptor
?? POP ??
*copyc clp$evaluate_parameters
*copyc cmp$search_edited_file
*copyc cmv$command_descriptor_p
?? OLDTITLE ??
?? NEWTITLE := '   cmp$$element_definition', EJECT ??

{ PURPOSE:
{    This procedure is the function processor for the Physical
{    Configuration Editor function $ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$$element_definition
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);



{ FUNCTION (cmm$$edipc_ed) $element_definition, $ed (
{   element: any of
{       key
{         all
{       keyend
{       name
{     anyend = all
{   channel: name = $optional
{   mainframe: any of
{       key
{         all
{       keyend
{       name
{     anyend = $name($mainframe(identifier))
{   iou: name = $optional
{   )

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        default_value: string (29),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 18, 29, 148],
    clc$function, 4, 4, 0, 0, 0, 0, 0, 'CMM$$EDIPC_ED'], [
    ['CHANNEL                        ',clc$nominal_entry, 2],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['IOU                            ',clc$nominal_entry, 4],
    ['MAINFRAME                      ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 69,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 69,
  clc$optional_default_parameter, 0, 29],
{ PARAMETER 4
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ,
    '$name($mainframe(identifier))'],
{ PARAMETER 4
    [[1, 0, clc$name_type], [1, osc$max_name_size]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$channel = 2,
      p$mainframe = 3,
      p$iou = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;

    VAR
      channel: cmt$element_name,
      element_name: cmt$element_name,
      iou_name: cmt$element_name,
      mainframe_name: cmt$element_name;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Initialize function value to be a list.

    NEXT result IN work_area;
    result^.kind := clc$list;
    result^.element_value := NIL;
    result^.link := NIL;
    element_name := pvt [p$element].value^.name_value;
    IF pvt [p$channel].specified THEN
      channel := pvt [p$channel].value^.name_value;
    ELSE
      channel := osc$null_name;
    IFEND;
    mainframe_name := pvt [p$mainframe].value^.name_value;
    iou_name := 'IOU0';
    IF pvt [p$iou].specified THEN
      iou_name := pvt [p$iou].value^.name_value;

{ Check if ALL is specified on mainframe parameter and channel and IOU are also specified
{ If so, return empty list because this is an invalid request.

      IF (channel <> osc$null_name) AND (mainframe_name = 'ALL') THEN
        RETURN;
      IFEND;
    IFEND;
    setup_function_value (element_name, channel, mainframe_name, iou_name, work_area, result);

  PROCEND cmp$$element_definition;

?? OLDTITLE ??
?? NEWTITLE := '   build_result', EJECT ??

{ PURPOSE:
{   This procedures builds the value of the function $element_definition.

  PROCEDURE build_result
    (    command: cmt$pcu_command_descriptor;
     VAR work_area: ^clt$work_area;
     VAR value: ^clt$data_value);


    VAR
      i: integer,
      list_value: ^clt$data_value;


{ build element in the list of type record. Unitialized field will be of
{ type clc$unspecified.

    NEXT value^.element_value IN work_area;
    value^.element_value^.kind := clc$record;
    NEXT value^.element_value^.field_values: [1 .. 11] IN work_area;
    value^.element_value^.field_values^ [1].name := 'ELEMENT';
    NEXT value^.element_value^.field_values^ [1].value IN work_area;
    value^.element_value^.field_values^ [1].value^.kind := clc$name;
    value^.element_value^.field_values^ [1].value^.name_value := command.element_name;

    value^.element_value^.field_values^ [2].name := 'APPLICATION_INFORMATION';
    NEXT value^.element_value^.field_values^ [2].value IN work_area;
    value^.element_value^.field_values^ [2].value^.kind := clc$unspecified;
    IF command.application_info_p <> NIL THEN
      value^.element_value^.field_values^ [2].value^.kind := clc$string;
      NEXT value^.element_value^.field_values^ [2].value^.string_value:
          [STRLENGTH(command.application_info_p^)] IN work_area;
      value^.element_value^.field_values^ [2].value^.string_value^ := command.application_info_p^;
    IFEND;
    value^.element_value^.field_values^ [3].name := 'CENTRAL_MEMORY_CONNECTIONS';
    NEXT value^.element_value^.field_values^ [3].value IN work_area;
    value^.element_value^.field_values^ [3].value^.kind := clc$unspecified;

    value^.element_value^.field_values^ [4].name := 'ELEMENT_IDENTIFICATION';
    NEXT value^.element_value^.field_values^ [4].value IN work_area;
    IF command.pid <> osc$null_name THEN
      value^.element_value^.field_values^ [4].value^.kind := clc$name;
      value^.element_value^.field_values^ [4].value^.name_value := command.pid;
    ELSE
      value^.element_value^.field_values^ [4].value^.kind := clc$unspecified;
    IFEND;

    value^.element_value^.field_values^ [5].name := 'IOU_CONNECTIONS';
    NEXT value^.element_value^.field_values^ [5].value IN work_area;
    value^.element_value^.field_values^ [5].value^.kind := clc$unspecified;

    value^.element_value^.field_values^ [6].name := 'IOU_PROGRAM_NAME';
    NEXT value^.element_value^.field_values^ [6].value IN work_area;
    IF command.ioupn <> osc$null_name THEN
      value^.element_value^.field_values^ [6].value^.kind := clc$name;
      value^.element_value^.field_values^ [6].value^.name_value := command.ioupn;
    ELSE
      value^.element_value^.field_values^ [6].value^.kind := clc$unspecified;
    IFEND;

    value^.element_value^.field_values^ [7].name := 'PERIPHERAL_CONNECTIONS';
    NEXT value^.element_value^.field_values^ [7].value IN work_area;
    value^.element_value^.field_values^ [7].value^.kind := clc$unspecified;

    CASE command.connection OF
    = cmc$central_memory_connection =
      IF command.cmc_list <> NIL THEN
        list_value := value^.element_value^.field_values^ [3].value;

{ Construct a list of record.
{ Fields of record are:
{    PORT and MAINFRAME.

        FOR i := LOWERBOUND (command.cmc_list^) TO UPPERBOUND (command.cmc_list^) DO
          list_value^.kind := clc$list;
          NEXT list_value^.element_value IN work_area;
          list_value^.element_value^.kind := clc$record;
          NEXT list_value^.element_value^.field_values: [1 .. 2] IN work_area;
          list_value^.element_value^.field_values^ [1].name := 'PORT';
          NEXT list_value^.element_value^.field_values^ [1].value IN work_area;
          list_value^.element_value^.field_values^ [1].value^.kind := clc$integer;
          list_value^.element_value^.field_values^ [1].value^.integer_value.value :=
                command.cmc_list^ [i].port;
          list_value^.element_value^.field_values^ [1].value^.integer_value.radix := 10;
          list_value^.element_value^.field_values^ [1].value^.integer_value.radix_specified := FALSE;
          list_value^.element_value^.field_values^ [2].name := 'MAINFRAME';
          NEXT list_value^.element_value^.field_values^ [2].value IN work_area;
          list_value^.element_value^.field_values^ [2].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [2].value^.name_value := command.cmc_list^ [i].mainframe;
          list_value^.generated_via_list_rest := FALSE;
          IF i < UPPERBOUND (command.cmc_list^) THEN
            NEXT list_value^.link IN work_area;
            list_value := list_value^.link;
          ELSE
            list_value^.link := NIL;
          IFEND;
        FOREND;
      IFEND;
      IF command.channel_list <> NIL THEN
        list_value := value^.element_value^.field_values^ [5].value;

{ Construct a list of record.
{ Fields of record are:
{   CHANNEL, EQUIPMENT, MAINFRAME and IOU.
{ Note: External processor elements are defined with IOU_CONNECTIONS and
{ optional CENTRAL_MEMORY_CONNECTIONS.

        FOR i := LOWERBOUND (command.channel_list^) TO UPPERBOUND (command.channel_list^) DO
          list_value^.kind := clc$list;
          NEXT list_value^.element_value IN work_area;
          list_value^.element_value^.kind := clc$record;
          NEXT list_value^.element_value^.field_values: [1 .. 4] IN work_area;
          list_value^.element_value^.field_values^ [1].name := 'CHANNEL';
          NEXT list_value^.element_value^.field_values^ [1].value IN work_area;
          list_value^.element_value^.field_values^ [1].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [1].value^.name_value := command.channel_list^ [i].channel;
          list_value^.element_value^.field_values^ [2].name := 'EQUIPMENT';
          NEXT list_value^.element_value^.field_values^ [2].value IN work_area;
          list_value^.element_value^.field_values^ [2].value^.kind := clc$integer;
          list_value^.element_value^.field_values^ [2].value^.integer_value.value := command.
                channel_list^ [i].equipment;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix := 10;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix_specified := FALSE;
          list_value^.element_value^.field_values^ [3].name := 'MAINFRAME';
          NEXT list_value^.element_value^.field_values^ [3].value IN work_area;
          list_value^.element_value^.field_values^ [3].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [3].value^.name_value :=
                command.channel_list^ [i].mainframe;
          list_value^.element_value^.field_values^ [4].name := 'IOU';
          NEXT list_value^.element_value^.field_values^ [4].value IN work_area;
          list_value^.element_value^.field_values^ [4].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [4].value^.name_value := command.channel_list^ [i].iou;
          list_value^.generated_via_list_rest := FALSE;
          IF i < UPPERBOUND (command.channel_list^) THEN
            NEXT list_value^.link IN work_area;
            list_value := list_value^.link;
          ELSE
            list_value^.link := NIL;
          IFEND;
        FOREND;
      IFEND;

    = cmc$iou_connection =
      IF command.iou_list <> NIL THEN
        list_value := value^.element_value^.field_values^ [5].value;

{ Construct a list of record.
{ Fields of record are:
{   CHANNEL, EQUIPMENT, MAINFRAME and IOU.


        FOR i := LOWERBOUND (command.iou_list^) TO UPPERBOUND (command.iou_list^) DO
          list_value^.kind := clc$list;
          NEXT list_value^.element_value IN work_area;
          list_value^.element_value^.kind := clc$record;
          NEXT list_value^.element_value^.field_values: [1 .. 4] IN work_area;
          list_value^.element_value^.field_values^ [1].name := 'CHANNEL';
          NEXT list_value^.element_value^.field_values^ [1].value IN work_area;
          list_value^.element_value^.field_values^ [1].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [1].value^.name_value := command.iou_list^ [i].channel;
          list_value^.element_value^.field_values^ [2].name := 'EQUIPMENT';
          NEXT list_value^.element_value^.field_values^ [2].value IN work_area;
          list_value^.element_value^.field_values^ [2].value^.kind := clc$integer;
          list_value^.element_value^.field_values^ [2].value^.integer_value.value :=
                command.iou_list^ [i].equipment;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix := 10;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix_specified := FALSE;
          list_value^.element_value^.field_values^ [3].name := 'MAINFRAME';
          NEXT list_value^.element_value^.field_values^ [3].value IN work_area;
          list_value^.element_value^.field_values^ [3].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [3].value^.name_value := command.iou_list^ [i].mainframe;
          list_value^.element_value^.field_values^ [4].name := 'IOU';
          NEXT list_value^.element_value^.field_values^ [4].value IN work_area;
          list_value^.element_value^.field_values^ [4].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [4].value^.name_value := command.iou_list^ [i].iou;
          list_value^.generated_via_list_rest := FALSE;
          IF i < UPPERBOUND (command.iou_list^) THEN
            NEXT list_value^.link IN work_area;
            list_value := list_value^.link;
          ELSE
            list_value^.link := NIL;
          IFEND;
        FOREND;
      IFEND;

    = cmc$peripheral_connection =
      IF command.pc_list <> NIL THEN
        list_value := value^.element_value^.field_values^ [7].value;

{ Construct a list of record.
{ Fields of record are:
{    PERIPHERAL, and PHYSICAL_ADDRESS

        FOR i := LOWERBOUND (command.pc_list^) TO UPPERBOUND (command.pc_list^) DO
          list_value^.kind := clc$list;
          NEXT list_value^.element_value IN work_area;
          list_value^.element_value^.kind := clc$record;
          NEXT list_value^.element_value^.field_values: [1 .. 2] IN work_area;
          list_value^.element_value^.field_values^ [1].name := 'PERIPHERAL_ELEMENT';
          NEXT list_value^.element_value^.field_values^ [1].value IN work_area;
          list_value^.element_value^.field_values^ [1].value^.kind := clc$name;
          list_value^.element_value^.field_values^ [1].value^.name_value := command.pc_list^ [i].peripheral;
          list_value^.element_value^.field_values^ [2].name := 'PHYSICAL_ADDRESS';
          NEXT list_value^.element_value^.field_values^ [2].value IN work_area;
          list_value^.element_value^.field_values^ [2].value^.kind := clc$integer;
          list_value^.element_value^.field_values^ [2].value^.integer_value.value :=
                command.pc_list^ [i].address;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix := 10;
          list_value^.element_value^.field_values^ [2].value^.integer_value.radix_specified := FALSE;
          list_value^.generated_via_list_rest := FALSE;
          IF i < UPPERBOUND (command.pc_list^) THEN
            NEXT list_value^.link IN work_area;
            list_value := list_value^.link;
          ELSE
            list_value^.link := NIL;
          IFEND;
        FOREND;
      IFEND;
    ELSE
      ;
    CASEND;
    value^.element_value^.field_values^ [8].name := 'SERIAL_NUMBER';
    NEXT value^.element_value^.field_values^ [8].value IN work_area;
    IF command.sn <> 0 THEN
      value^.element_value^.field_values^ [8].value^.kind := clc$integer;
      value^.element_value^.field_values^ [8].value^.integer_value.value := command.sn;
      value^.element_value^.field_values^ [8].value^.integer_value.radix := 10;
      value^.element_value^.field_values^ [8].value^.integer_value.radix_specified := FALSE;
    ELSE
      value^.element_value^.field_values^ [8].value^.kind := clc$unspecified;
    IFEND;

    value^.element_value^.field_values^ [9].name := 'SITE_INFORMATION';
    NEXT value^.element_value^.field_values^ [9].value IN work_area;
    value^.element_value^.field_values^ [9].value^.kind := clc$unspecified;
    IF command.site_info_p <> NIL THEN
      value^.element_value^.field_values^ [9].value^.kind := clc$string;
      NEXT value^.element_value^.field_values^ [9].value^.string_value: [STRLENGTH(command.site_info_p^)]
                   IN work_area;
      value^.element_value^.field_values^ [9].value^.string_value^ := command.site_info_p^;
    IFEND;

    value^.element_value^.field_values^ [10].name := 'STATE';
    NEXT value^.element_value^.field_values^ [10].value IN work_area;
    IF command.state <> osc$null_name THEN
      value^.element_value^.field_values^ [10].value^.kind := clc$keyword;
      value^.element_value^.field_values^ [10].value^.keyword_value := command.state;
    ELSE
      value^.element_value^.field_values^ [10].value^.kind := clc$unspecified;
    IFEND;

    value^.element_value^.field_values^ [11].name := 'VERIFY_ELEMENT_IDENTIFICATION';
    NEXT value^.element_value^.field_values^ [11].value IN work_area;
    value^.element_value^.field_values^ [11].value^.kind := clc$boolean;
    value^.element_value^.field_values^ [11].value^.boolean_value.value := command.verify;
    value^.element_value^.field_values^ [11].value^.boolean_value.kind := clc$true_false_boolean;

    value^.generated_via_list_rest := FALSE;
  PROCEND build_result;

?? OLDTITLE ??
?? NEWTITLE := '   setup_function_value ', EJECT ??

{ PURPOSE:
{   This procedure searches for the definition in the edited file
{   and sets up the result of the function.

  PROCEDURE setup_function_value
    (    element_name: cmt$element_name;
         channel: cmt$element_name;
         mainframe_name: cmt$element_name;
         iou_name: cmt$element_name;
     VAR work_area: ^clt$work_area;
     VAR result: ^clt$data_value);

    VAR
      current_p: ^cmt$pcu_command_descriptor,
      find_all_element: boolean,
      found: boolean,
      found_element: cmt$pcu_command_descriptor,
      j: integer,
      list_index: integer,
      match: boolean,
      product_id: cmt$product_identification,
      status: ost$status,
      value: ^clt$data_value;


    IF cmv$command_descriptor_p = NIL THEN
      RETURN;
    IFEND;
    find_all_element := element_name = 'ALL';
    current_p := cmv$command_descriptor_p;
    value := NIL;
    WHILE current_p <> NIL DO
      IF mainframe_name <> 'ALL' THEN
        found := FALSE;
        CASE current_p^.connection OF
        = cmc$central_memory_connection =
          IF current_p^.channel_list <> NIL THEN
            list_index := 1;
            WHILE (NOT found) AND (list_index <= UPPERBOUND (current_p^.channel_list^)) DO
              IF find_all_element THEN
                IF channel <> osc$null_name THEN
                  found := ((current_p^.channel_list^ [list_index].mainframe = mainframe_name) AND
                        (current_p^.channel_list^ [list_index].iou = iou_name) AND
                        (current_p^.channel_list^ [list_index].channel = channel));
                ELSE
                  found := ((current_p^.channel_list^ [list_index].mainframe = mainframe_name) AND
                        (current_p^.channel_list^ [list_index].iou = iou_name));
                IFEND;
              ELSE
                found := current_p^.element_name = element_name;
              IFEND;
              list_index := list_index + 1;
            WHILEND;
          IFEND;

        = cmc$iou_connection =
          IF current_p^.iou_list <> NIL THEN
            list_index := 1;
            WHILE (NOT found) AND (list_index <= UPPERBOUND (current_p^.iou_list^)) DO
              IF find_all_element THEN
                IF (channel <> osc$null_name) THEN
                  found := ((current_p^.iou_list^ [list_index].mainframe = mainframe_name) AND
                        (current_p^.iou_list^ [list_index].iou = iou_name) AND
                        (current_p^.iou_list^ [list_index].channel = channel));
                ELSE
                  found := ((current_p^.iou_list^ [list_index].mainframe = mainframe_name) AND
                        (current_p^.iou_list^ [list_index].iou = iou_name));
                IFEND;
              ELSE
                found := current_p^.element_name = element_name;
              IFEND;
              list_index := list_index + 1;
            WHILEND;
          IFEND;

        = cmc$peripheral_connection =
          IF NOT find_all_element THEN
            found := current_p^.element_name = element_name;
          ELSE
            IF current_p^.pc_list <> NIL THEN
              list_index := 1;
              WHILE (NOT found) AND (list_index <= UPPERBOUND (current_p^.pc_list^)) DO
                cmp$search_edited_file (current_p^.pc_list^ [list_index].peripheral, 0, product_id,
                     found, found_element);
                IF found THEN
                  CASE found_element.connection OF
                  = cmc$iou_connection =
                    IF found_element.iou_list <> NIL THEN
                      j := 1;
                      match := FALSE;
                      WHILE (NOT match) AND (j <= UPPERBOUND (found_element.iou_list^)) DO
                        CASE found_element.connection OF
                        = cmc$iou_connection =
                          IF (channel <> osc$null_name) THEN
                            match := ((found_element.iou_list^ [j].mainframe = mainframe_name) AND
                                (found_element.iou_list^ [j].iou = iou_name) AND
                                (found_element.iou_list^ [j].channel = channel));
                          ELSE
                            match := ((found_element.iou_list^ [j].mainframe = mainframe_name) AND
                                (found_element.iou_list^ [j].iou = iou_name));
                          IFEND;
                        ELSE
                          ;
                        CASEND;
                        j := j + 1;
                      WHILEND;
                      found := match;
                    IFEND;
                  ELSE
                    ;
                  CASEND;
                IFEND;
                list_index := list_index + 1;
              WHILEND;
            IFEND;
          IFEND;
        CASEND;
      ELSE
        found := TRUE;
      IFEND;
      IF found THEN
        IF value <> NIL THEN
          NEXT value^.link IN work_area;
          value := value^.link;
          value^.kind := clc$list;
        ELSE
          value := result;
        IFEND;
        value^.link := NIL;
        build_result (current_p^, work_area, value);
        IF NOT find_all_element THEN
          RETURN
        IFEND;
      IFEND;
      current_p := current_p^.next_descriptor;
    WHILEND;

  PROCEND setup_function_value;

?? OLDTITLE ??

MODEND cmm$pcu_editor_functions;

