root/maint/gnulib/lib/hash-triple.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* Hash functions for file-related (name, device, inode) triples.
   2    Copyright (C) 2007-2021 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 #include <sys/types.h>
  23 #include <sys/stat.h>
  24 #include <stdbool.h>
  25 
  26 /* Describe a just-created or just-renamed destination file.  */
  27 struct F_triple
  28 {
  29   char *name;
  30   ino_t st_ino;
  31   dev_t st_dev;
  32 };
  33 
  34 /* Defined in module 'hash-triple-simple'.  */
  35 
  36 extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE;
  37 extern bool triple_compare_ino_str (void const *x, void const *y)
  38   _GL_ATTRIBUTE_PURE;
  39 extern void triple_free (void *x);
  40 
  41 /* Defined in module 'hash-triple'.  */
  42 extern size_t triple_hash_no_name (void const *x, size_t table_size)
  43   _GL_ATTRIBUTE_PURE;
  44 extern bool triple_compare (void const *x, void const *y);
  45 
  46 #endif

/* [previous][next][first][last][top][bottom][index][help] */