remove_dot_segments
tmp1 = remove_dot_segments(PATH(&ref), ref.path);
tmp1 = remove_dot_segments(tmp2, strlen(tmp2));