mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
Rename include file hash-triple.h to hashcode-file.h.
* lib/hashcode-file.h: Renamed from lib/hash-triple.h. * lib/hash-triple.h: New file. * lib/hashcode-named-file.c: Update. * lib/hashcode-file-inode.c: Update. * lib/canonicalize.c: Update. * lib/file-set.c: Update. * modules/hashcode-named-file (Files, Include): Update. * modules/hashcode-file-inode (Include): Update. * modules/hash-triple (Include): Update.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,5 +1,16 @@
|
|||||||
2025-04-29 Bruno Haible <bruno@clisp.org>
|
2025-04-29 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
Rename include file hash-triple.h to hashcode-file.h.
|
||||||
|
* lib/hashcode-file.h: Renamed from lib/hash-triple.h.
|
||||||
|
* lib/hash-triple.h: New file.
|
||||||
|
* lib/hashcode-named-file.c: Update.
|
||||||
|
* lib/hashcode-file-inode.c: Update.
|
||||||
|
* lib/canonicalize.c: Update.
|
||||||
|
* lib/file-set.c: Update.
|
||||||
|
* modules/hashcode-named-file (Files, Include): Update.
|
||||||
|
* modules/hashcode-file-inode (Include): Update.
|
||||||
|
* modules/hash-triple (Include): Update.
|
||||||
|
|
||||||
Rename module hash-triple to hashcode-file-inode.
|
Rename module hash-triple to hashcode-file-inode.
|
||||||
* lib/hashcode-file-inode.c: Renamed from lib/hash-triple.c.
|
* lib/hashcode-file-inode.c: Renamed from lib/hash-triple.c.
|
||||||
* modules/hashcode-file-inode: Renamed from modules/hash-triple.
|
* modules/hashcode-file-inode: Renamed from modules/hash-triple.
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "attribute.h"
|
#include "attribute.h"
|
||||||
#include "file-set.h"
|
#include "file-set.h"
|
||||||
#include "hash-triple.h"
|
#include "hashcode-file.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
/* Suppress bogus GCC -Wmaybe-uninitialized warnings. */
|
/* Suppress bogus GCC -Wmaybe-uninitialized warnings. */
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "file-set.h"
|
#include "file-set.h"
|
||||||
|
|
||||||
#include "hash-triple.h"
|
#include "hashcode-file.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
/* Record file, FILE, and dev/ino from *STATS, in the hash table, HT.
|
/* Record file, FILE, and dev/ino from *STATS, in the hash table, HT.
|
||||||
|
@@ -1,60 +1,21 @@
|
|||||||
/* Hash functions for file-related (name, device, inode) triples.
|
/* hash-triple.h -- declaration for a simple hash function
|
||||||
Copyright (C) 2007-2025 Free Software Foundation, Inc.
|
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This file is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
published by the Free Software Foundation; either version 2.1 of the
|
||||||
(at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This file is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Written by Jim Meyering, 2007. */
|
#include "hashcode-string.h"
|
||||||
|
|
||||||
#ifndef HASH_TRIPLE_H
|
|
||||||
#define HASH_TRIPLE_H
|
|
||||||
|
|
||||||
/* This file uses _GL_ATTRIBUTE_PURE. */
|
|
||||||
#if !_GL_CONFIG_H_INCLUDED
|
|
||||||
#error "Please include config.h first."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Describe a just-created or just-renamed destination file. */
|
|
||||||
struct F_triple
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
ino_t st_ino;
|
|
||||||
dev_t st_dev;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 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)
|
|
||||||
_GL_ATTRIBUTE_PURE;
|
|
||||||
extern void triple_free (void *x);
|
|
||||||
|
|
||||||
/* 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);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#if __GNUC__ || (__clang_major__ >= 4)
|
||||||
|
# warning "The include file hash-triple.h is deprecated. Use hashcode-file.h instead."
|
||||||
#endif
|
#endif
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
#include "hash-triple.h"
|
#include "hashcode-file.h"
|
||||||
|
|
||||||
#include "same.h"
|
#include "same.h"
|
||||||
#include "same-inode.h"
|
#include "same-inode.h"
|
||||||
|
60
lib/hashcode-file.h
Normal file
60
lib/hashcode-file.h
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/* Hash functions for file-related (name, device, inode) triples.
|
||||||
|
Copyright (C) 2007-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, 2007. */
|
||||||
|
|
||||||
|
#ifndef HASHCODE_FILE_H
|
||||||
|
#define HASHCODE_FILE_H
|
||||||
|
|
||||||
|
/* This file uses _GL_ATTRIBUTE_PURE. */
|
||||||
|
#if !_GL_CONFIG_H_INCLUDED
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Describe a just-created or just-renamed destination file. */
|
||||||
|
struct F_triple
|
||||||
|
{
|
||||||
|
char *name;
|
||||||
|
ino_t st_ino;
|
||||||
|
dev_t st_dev;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 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)
|
||||||
|
_GL_ATTRIBUTE_PURE;
|
||||||
|
extern void triple_free (void *x);
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -19,7 +19,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
#include "hash-triple.h"
|
#include "hashcode-file.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -17,7 +17,7 @@ configure.ac:
|
|||||||
Makefile.am:
|
Makefile.am:
|
||||||
|
|
||||||
Include:
|
Include:
|
||||||
"hash-triple.h"
|
"hashcode-file.h"
|
||||||
|
|
||||||
License:
|
License:
|
||||||
GPL
|
GPL
|
||||||
|
@@ -15,7 +15,7 @@ Makefile.am:
|
|||||||
lib_SOURCES += hashcode-file-inode.c
|
lib_SOURCES += hashcode-file-inode.c
|
||||||
|
|
||||||
Include:
|
Include:
|
||||||
"hash-triple.h"
|
"hashcode-file.h"
|
||||||
|
|
||||||
License:
|
License:
|
||||||
GPL
|
GPL
|
||||||
|
@@ -3,6 +3,7 @@ Hash functions for file-related triples: name, device, inode.
|
|||||||
|
|
||||||
Files:
|
Files:
|
||||||
lib/hashcode-named-file.c
|
lib/hashcode-named-file.c
|
||||||
|
lib/hashcode-file.h
|
||||||
lib/hash-triple.h
|
lib/hash-triple.h
|
||||||
|
|
||||||
Depends-on:
|
Depends-on:
|
||||||
@@ -16,7 +17,7 @@ Makefile.am:
|
|||||||
lib_SOURCES += hashcode-named-file.c
|
lib_SOURCES += hashcode-named-file.c
|
||||||
|
|
||||||
Include:
|
Include:
|
||||||
"hash-triple.h"
|
"hashcode-file.h"
|
||||||
|
|
||||||
License:
|
License:
|
||||||
GPL
|
GPL
|
||||||
|
Reference in New Issue
Block a user