* lib/hashcode-named-file.c: Renamed from lib/hash-triple-simple.c.
* modules/hashcode-named-file: Renamed from modules/hash-triple-simple.
* lib/hash-triple.h: Update.
* modules/canonicalize (Depends-on): Update.
* modules/file-set (Depends-on): Update.
* modules/hash-triple (Depends-on): Update.
* NEWS: Mention the change.
+2025-04-29 Bruno Haible <bruno@clisp.org>
+
+ Rename module hash-triple-simple to hashcode-named-file.
+ * lib/hashcode-named-file.c: Renamed from lib/hash-triple-simple.c.
+ * modules/hashcode-named-file: Renamed from modules/hash-triple-simple.
+ * lib/hash-triple.h: Update.
+ * modules/canonicalize (Depends-on): Update.
+ * modules/file-set (Depends-on): Update.
+ * modules/hash-triple (Depends-on): Update.
+ * NEWS: Mention the change.
+
2025-04-29 Bruno Haible <bruno@clisp.org>
Rename module hash-pjw to hashcode-string.
Date Modules Changes
+2025-04-29 hash-triple-simple This module is renamed to hashcode-named-file.
+
2025-01-02 string-desc The function prefix is changed from string_desc_
xstring-desc to sd_, and from xstring_desc_ to xsd_.
string-desc-quotearg
+++ /dev/null
-/* Hash functions for file-related triples: name, device, inode.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-/* Specification. */
-#include "hash-triple.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "hashcode-string.h"
-#include "same-inode.h"
-
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
-/* Hash an F_triple, and *do* consider the file name. */
-size_t
-triple_hash (void const *x, size_t table_size)
-{
- struct F_triple const *p = x;
- size_t tmp = hash_pjw (p->name, table_size);
-
- /* Ignoring the device number here should be fine. */
- return (tmp ^ p->st_ino) % table_size;
-}
-
-/* Compare two F_triple structs. */
-bool
-triple_compare_ino_str (void const *x, void const *y)
-{
- struct F_triple const *a = x;
- struct F_triple const *b = y;
- return PSAME_INODE (a, b) && STREQ (a->name, b->name);
-}
-
-/* Free an F_triple. */
-void
-triple_free (void *x)
-{
- struct F_triple *a = x;
- free (a->name);
- free (a);
-}
dev_t st_dev;
};
-/* Defined in module 'hash-triple-simple'. */
+/* Defined in module 'hashcode-named-file'. */
extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE;
extern bool triple_compare_ino_str (void const *x, void const *y)
--- /dev/null
+/* Hash functions for file-related triples: name, device, inode.
+ Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include "hash-triple.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "hashcode-string.h"
+#include "same-inode.h"
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Hash an F_triple, and *do* consider the file name. */
+size_t
+triple_hash (void const *x, size_t table_size)
+{
+ struct F_triple const *p = x;
+ size_t tmp = hash_pjw (p->name, table_size);
+
+ /* Ignoring the device number here should be fine. */
+ return (tmp ^ p->st_ino) % table_size;
+}
+
+/* Compare two F_triple structs. */
+bool
+triple_compare_ino_str (void const *x, void const *y)
+{
+ struct F_triple const *a = x;
+ struct F_triple const *b = y;
+ return PSAME_INODE (a, b) && STREQ (a->name, b->name);
+}
+
+/* Free an F_triple. */
+void
+triple_free (void *x)
+{
+ struct F_triple *a = x;
+ free (a->name);
+ free (a);
+}
file-set
filename
getcwd
-hash-triple-simple
+hashcode-named-file
idx
intprops
memmove
Depends-on:
hash
-hash-triple-simple
+hashcode-named-file
bool
xalloc
xalloc-die
lib/hash-triple.c
Depends-on:
-hash-triple-simple
+hashcode-named-file
same
same-inode
+++ /dev/null
-Description:
-Hash functions for file-related triples: name, device, inode.
-
-Files:
-lib/hash-triple-simple.c
-lib/hash-triple.h
-
-Depends-on:
-hashcode-string
-same-inode
-bool
-
-configure.ac:
-
-Makefile.am:
-lib_SOURCES += hash-triple-simple.c
-
-Include:
-"hash-triple.h"
-
-License:
-GPL
-
-Maintainer:
-Jim Meyering
--- /dev/null
+Description:
+Hash functions for file-related triples: name, device, inode.
+
+Files:
+lib/hashcode-named-file.c
+lib/hash-triple.h
+
+Depends-on:
+hashcode-string
+same-inode
+bool
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += hashcode-named-file.c
+
+Include:
+"hash-triple.h"
+
+License:
+GPL
+
+Maintainer:
+Jim Meyering