/* FIXME: document */
static enum backup_type backup_type;
-/* A pointer to the function used to make links. This will point to either
- `link' or `symlink'. */
-static int (*linkfunc) ();
-
/* If true, make symbolic links; otherwise, make hard links. */
static bool symbolic_link;
}
}
- ok = (linkfunc (source, dest) == 0);
+ ok = ((symbolic_link ? symlink (source, dest) : link (source, dest))
+ == 0);
/* If the attempt to create a link failed and we are removing or
backing up destinations, unlink the destination and try again.
return false;
}
- ok = (linkfunc (source, dest) == 0);
+ ok = ((symbolic_link ? symlink (source, dest) : link (source, dest))
+ == 0);
}
if (ok)
quote (file[n_files - 1]));
}
- if (symbolic_link)
- linkfunc = symlink;
- else
- linkfunc = link;
-
if (backup_suffix_string)
simple_backup_suffix = xstrdup (backup_suffix_string);