
  PROCEDURE [INLINE] fmp$get_list_of_connected_files
    (    subject_path_handle_name: fst$path_handle_name;
     VAR target_files: ^fst$target_file_list;
     VAR object_information_p: ^SEQ ( * ));

?? PUSH (LISTEXT := ON) ??

    VAR
      active_target_index: ost$non_negative_integers,
      active_targets_p: ^fst$target_file_list,
      connected_file: ^clt$connected_file_subject,
      file_reference_size: fst$path_size,
      path_handle: clt$path_handle,
      status: ost$status,
      target_index: ost$positive_integers;

    target_files := NIL;

    clp$find_connected_file (subject_path_handle_name, connected_file);

    IF (connected_file <> NIL) AND (connected_file^.targets <> NIL) THEN
      active_target_index := 0;
      PUSH active_targets_p: [1 .. UPPERBOUND (connected_file^.targets^)];
      FOR target_index := 1 TO UPPERBOUND (connected_file^.targets^) DO
        IF connected_file^.targets^ [target_index].connection_active THEN
          active_target_index := active_target_index + 1;
          clp$check_name_for_path_handle (connected_file^.targets^ [target_index].path_handle_name,
                path_handle);
          fmp$get_path_string (path_handle.regular_handle, {lock_path_table} FALSE,
                active_targets_p^ [active_target_index], file_reference_size, status);
          IF status.normal THEN
            IF connected_file^.targets^ [target_index].open_position.specified THEN
              active_targets_p^ [active_target_index] (file_reference_size + 1, 1) := '.';
              active_targets_p^ [active_target_index] (file_reference_size + 2, *) :=
                    clv$open_positions [connected_file^.targets^ [target_index].open_position.value];
            IFEND;
          IFEND;
        IFEND;
      FOREND;

      IF active_target_index > 0 THEN
        NEXT target_files: [1 .. active_target_index] IN object_information_p;
        IF target_files <> NIL THEN
          i#move (active_targets_p, target_files, #SIZE (target_files^));
        IFEND;
      IFEND;
    IFEND;

  PROCEND fmp$get_list_of_connected_files;

*copyc fst$file_reference
*copyc fst$path_size
*copyc fst$target_file_list
*copyc osd$integer_limits

*copyc clp$check_name_for_path_handle
*copyc clp$find_connected_file
*copyc fmp$get_path_string
*copyc i#move

*copyc clv$open_positions
?? POP ??
