]> Savannah Git Hosting - gnulib.git/commitdiff
Rename module hash-triple to hashcode-file-inode.
authorBruno Haible <bruno@clisp.org>
Tue, 29 Apr 2025 22:37:08 +0000 (00:37 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 29 Apr 2025 22:51:32 +0000 (00:51 +0200)
* lib/hashcode-file-inode.c: Renamed from lib/hash-triple.c.
* modules/hashcode-file-inode: Renamed from modules/hash-triple.
* modules/hash-triple: New file.
* lib/hash-triple.h: Update.
* MODULES.html.sh: Update.

ChangeLog
MODULES.html.sh
lib/hash-triple.c [deleted file]
lib/hash-triple.h
lib/hashcode-file-inode.c [new file with mode: 0644]
modules/hash-triple
modules/hashcode-file-inode [new file with mode: 0644]

index a8112663f06f07e1e2e4653f6339841e26776312..44e143f459cbf2cffc665e34a2406ce35e5d29fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2025-04-29  Bruno Haible  <bruno@clisp.org>
 
+       Rename module hash-triple to hashcode-file-inode.
+       * lib/hashcode-file-inode.c: Renamed from lib/hash-triple.c.
+       * modules/hashcode-file-inode: Renamed from modules/hash-triple.
+       * modules/hash-triple: New file.
+       * lib/hash-triple.h: Update.
+       * MODULES.html.sh: Update.
+
        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.
index c80ea9d7a228c0ad011ca2031868f28c30121368..baee4f95fd7eb938d3013ddad73d6352cb443f47 100755 (executable)
@@ -2870,7 +2870,7 @@ func_all_modules ()
   func_module cycle-check
   func_module dev-ino
   func_module file-set
-  func_module hash-triple
+  func_module hashcode-file-inode
   func_module i-ring
   func_module same-inode
   func_end_table
diff --git a/lib/hash-triple.c b/lib/hash-triple.c
deleted file mode 100644 (file)
index 5d47e58..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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 "same.h"
-#include "same-inode.h"
-
-/* Hash an F_triple, without considering the file name.  */
-size_t
-triple_hash_no_name (void const *x, size_t table_size)
-{
-  struct F_triple const *p = x;
-
-  /* Ignoring the device number here should be fine.  */
-  return p->st_ino % table_size;
-}
-
-/* Compare two F_triple structs.  */
-bool
-triple_compare (void const *x, void const *y)
-{
-  struct F_triple const *a = x;
-  struct F_triple const *b = y;
-  return PSAME_INODE (a, b) && same_name (a->name, b->name);
-}
index 1e59be64baf00f440048cb0ac3145231c835e7a5..26ef7a1f050fc9c5028fb3cf96d91001062b3fd6 100644 (file)
@@ -47,7 +47,7 @@ extern bool triple_compare_ino_str (void const *x, void const *y)
   _GL_ATTRIBUTE_PURE;
 extern void triple_free (void *x);
 
-/* Defined in module 'hash-triple'.  */
+/* Defined in module 'hashcode-file-inode'.  */
 extern size_t triple_hash_no_name (void const *x, size_t table_size)
   _GL_ATTRIBUTE_PURE;
 extern bool triple_compare (void const *x, void const *y);
diff --git a/lib/hashcode-file-inode.c b/lib/hashcode-file-inode.c
new file mode 100644 (file)
index 0000000..5d47e58
--- /dev/null
@@ -0,0 +1,44 @@
+/* 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 "same.h"
+#include "same-inode.h"
+
+/* Hash an F_triple, without considering the file name.  */
+size_t
+triple_hash_no_name (void const *x, size_t table_size)
+{
+  struct F_triple const *p = x;
+
+  /* Ignoring the device number here should be fine.  */
+  return p->st_ino % table_size;
+}
+
+/* Compare two F_triple structs.  */
+bool
+triple_compare (void const *x, void const *y)
+{
+  struct F_triple const *a = x;
+  struct F_triple const *b = y;
+  return PSAME_INODE (a, b) && same_name (a->name, b->name);
+}
index f908f109495ab021d4f08d51df594b8746e71d28..5c446cbe34a615d49d3febac440cd3321888909f 100644 (file)
@@ -1,18 +1,20 @@
 Description:
 Hash functions for file-related triples: name, device, inode.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'hashcode-file-inode' instead.
+
 Files:
-lib/hash-triple.c
 
 Depends-on:
-hashcode-named-file
-same
-same-inode
+hashcode-file-inode
 
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += hash-triple.c
 
 Include:
 "hash-triple.h"
@@ -21,4 +23,3 @@ License:
 GPL
 
 Maintainer:
-Jim Meyering
diff --git a/modules/hashcode-file-inode b/modules/hashcode-file-inode
new file mode 100644 (file)
index 0000000..87d2d41
--- /dev/null
@@ -0,0 +1,24 @@
+Description:
+Hash functions for file-related triples: name, device, inode.
+
+Files:
+lib/hashcode-file-inode.c
+
+Depends-on:
+hashcode-named-file
+same
+same-inode
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += hashcode-file-inode.c
+
+Include:
+"hash-triple.h"
+
+License:
+GPL
+
+Maintainer:
+Jim Meyering