
  PROCEDURE [INLINE] rap$add_name_to_path_ref
    (    path_ref_p: ^fst$file_reference;
         name: ost$name;
     VAR sequence_p: ^SEQ ( * );
     VAR new_path_ref_p: ^fst$file_reference);

?? PUSH (LISTEXT := ON) ??


    VAR
      name_size: integer,
      path_size: integer;


    name_size := clp$trimmed_string_size (name);

    IF path_ref_p = NIL THEN
      NEXT new_path_ref_p: [name_size] IN sequence_p;
      new_path_ref_p^ (1, name_size) := name;
    ELSE
      path_size := clp$trimmed_string_size (path_ref_p^);
      NEXT new_path_ref_p: [path_size + name_size + 1] IN sequence_p;
      new_path_ref_p^ (1, path_size) := path_ref_p^;
      new_path_ref_p^ (path_size + 1, 1) := '.';
      new_path_ref_p^ (path_size + 2, name_size) := name;
    IFEND;

  PROCEND rap$add_name_to_path_ref;

{ PURPOSE:
{   This procedure adds a name to a file reference to create a new
{   file reference.
{
{ DESIGN:
{   If the file reference passed to the procedure contains a NIL pointer, then
{   the name is passed back as a file reference.
{   Else the file reference is concatenated with a period and the name and
{   then passed back to the calling procedure.
{
{ NOTES:
{
{

*copyc fst$file_reference
*copyc ost$name
*copyc clp$trimmed_string_size
?? POP ??
