summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1997-08-18 18:11:04 +0000
committerPaul Smith <psmith@gnu.org>1997-08-18 18:11:04 +0000
commit63dff1e0bcb9e1bdd189e4a3e0d6126389251885 (patch)
treef8b39c21a6c709622d4fcc18f40539477a5ceb1a /file.c
parente746a9c9510b2cc83548e8d9108eb24540e7a821 (diff)
downloadgunmake-63dff1e0bcb9e1bdd189e4a3e0d6126389251885.tar.gz
Bug fixes and automake changes.
Diffstat (limited to 'file.c')
-rw-r--r--file.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/file.c b/file.c
index b264d9d..dbb8fc3 100644
--- a/file.c
+++ b/file.c
@@ -187,6 +187,23 @@ rehash_file (file, name)
file_hash_enter (file, name, oldhash, file->name);
}
+/* Rename FILE to NAME. This is not as simple as resetting
+ the `name' member, since it must be put in a new hash bucket,
+ and possibly merged with an existing file called NAME. */
+
+void
+rename_file (file, name)
+ register struct file *file;
+ char *name;
+{
+ rehash_file(file, name);
+ while (file)
+ {
+ file->name = file->hname;
+ file = file->prev;
+ }
+}
+
void
file_hash_enter (file, name, oldhash, oldname)
register struct file *file;