
  PROCEDURE [INLINE] clp$check_name_for_path_handle
*IF NOT $true(osv$unix)
    (    name: fst$path_element_name;
*ELSE
    (    name: fst$file_reference;
*IFEND
     VAR path_handle: clt$path_handle);

?? PUSH (LISTEXT := ON) ??

    VAR
      i: 8 .. 31,
      j: integer,
      n: integer,
      offset_converter: fmt$path_handle_offset_nibbles;

  /check/
    BEGIN
      IF (name (1, 4) <> 'FS$$') OR (name (6) <> '_') OR (name (15) <>
            '_') THEN
        EXIT /check/;
      IFEND;

      path_handle.kind := clc$regular_path_handle;

      CASE name (5) OF
      = '_' =
        path_handle.regular_handle.open_position.specified := FALSE;
      = 'A' =
        path_handle.regular_handle.open_position.specified := TRUE;
        path_handle.regular_handle.open_position.value :=
              amc$open_no_positioning;
      = 'B' =
        path_handle.regular_handle.open_position.specified := TRUE;
        path_handle.regular_handle.open_position.value := amc$open_at_boi;
      = 'C' =
        path_handle.kind := clc$command_file_handle;
      = 'E' =
        path_handle.regular_handle.open_position.specified := TRUE;
        path_handle.regular_handle.open_position.value := amc$open_at_eoi;
      ELSE
        EXIT /check/;
      CASEND;

      CASE name (7) OF
      = '0' .. '7' =
        offset_converter.segment_offset := 0;
        offset_converter.nibble [1] := $INTEGER (name (7)) - $INTEGER ('0');
        FOR i := 8 TO 14 DO
          CASE name (i) OF
          = '0' .. '9' =
            offset_converter.nibble [i - 6] := $INTEGER (name (i)) -
                  $INTEGER ('0');
          = 'A' .. 'F' =
            offset_converter.nibble [i - 6] := $INTEGER (name (i)) -
                  $INTEGER ('A') + 10;
          ELSE
            EXIT /check/;
          CASEND;
        FOREND;
      ELSE
        EXIT /check/;
      CASEND;
      IF path_handle.kind = clc$command_file_handle THEN
        path_handle.block_handle.segment_offset :=
              offset_converter.segment_offset;
      ELSE
        path_handle.regular_handle.segment_offset :=
              offset_converter.segment_offset;
      IFEND;

      n := 0;

      IF (name (16) = '0') THEN
        EXIT /check/;
      IFEND;
    /compute_assignment_counter/
      FOR i := 16 TO 31 DO
        CASE name (i) OF
        = '0' .. '9' =
          j := $INTEGER (name (i)) - $INTEGER ('0');
        = 'A' .. 'F' =
          j := $INTEGER (name (i)) - $INTEGER ('A') + 10;
        = ' ' =
          EXIT /compute_assignment_counter/;
        ELSE
          EXIT /check/;
        CASEND;
        n := (n * 16) + j;
      FOREND /compute_assignment_counter/;
      IF n > UPPERVALUE (fmt$pde_assignment_counter) THEN
          EXIT /check/;
      IFEND;
      IF path_handle.kind = clc$command_file_handle THEN
        path_handle.block_handle.assignment_counter := n;
      ELSE
        path_handle.regular_handle.assignment_counter := n;
      IFEND;

      RETURN;
    END /check/;
    path_handle.kind := clc$not_a_path_handle;

  PROCEND clp$check_name_for_path_handle;

*copyc clt$path_handle
*copyc fmt$path_handle_offset_nibbles
*copyc fmt$pde_assignment_counter
*IF NOT $true(osv$unix)
*copyc fst$path_element_name
*ELSE
*copyc fst$file_reference
*IFEND
?? POP ??
