(root)/
coreutils-9.4/
lib/
hash-triple.h
       1  /* Hash functions for file-related (name, device, inode) triples.
       2     Copyright (C) 2007-2023 Free Software Foundation, Inc.
       3  
       4     This program is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU General Public License as published by
       6     the Free Software Foundation, either version 3 of the License, or
       7     (at your option) any later version.
       8  
       9     This program is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU General Public License for more details.
      13  
      14     You should have received a copy of the GNU General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      16  
      17  /* Written by Jim Meyering, 2007.  */
      18  
      19  #ifndef HASH_TRIPLE_H
      20  #define HASH_TRIPLE_H
      21  
      22  /* This file uses _GL_ATTRIBUTE_PURE.  */
      23  #if !_GL_CONFIG_H_INCLUDED
      24   #error "Please include config.h first."
      25  #endif
      26  
      27  #include <sys/types.h>
      28  #include <sys/stat.h>
      29  
      30  /* Describe a just-created or just-renamed destination file.  */
      31  struct F_triple
      32  {
      33    char *name;
      34    ino_t st_ino;
      35    dev_t st_dev;
      36  };
      37  
      38  /* Defined in module 'hash-triple-simple'.  */
      39  
      40  extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE;
      41  extern bool triple_compare_ino_str (void const *x, void const *y)
      42    _GL_ATTRIBUTE_PURE;
      43  extern void triple_free (void *x);
      44  
      45  /* Defined in module 'hash-triple'.  */
      46  extern size_t triple_hash_no_name (void const *x, size_t table_size)
      47    _GL_ATTRIBUTE_PURE;
      48  extern bool triple_compare (void const *x, void const *y);
      49  
      50  #endif