diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-10-13 00:54:55 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-10-13 00:55:20 +0200 |
commit | 5eac2a9ffd7629fcba1c4800c63f90f8ea32ad17 (patch) | |
tree | aa03a8cc5951ab35e4486bf7ab8809e9997867c2 /libtreefs/hooks.c | |
parent | 96a673a4b0b7da004b7ffe6460894e94f57cd14a (diff) | |
download | hurd-5eac2a9ffd7629fcba1c4800c63f90f8ea32ad17.tar.gz hurd-5eac2a9ffd7629fcba1c4800c63f90f8ea32ad17.tar.bz2 hurd-5eac2a9ffd7629fcba1c4800c63f90f8ea32ad17.zip |
libtreefs: remove unfinished and unused code
* libtreefs: Remove directory.
Diffstat (limited to 'libtreefs/hooks.c')
-rw-r--r-- | libtreefs/hooks.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/libtreefs/hooks.c b/libtreefs/hooks.c deleted file mode 100644 index b8ec103f..00000000 --- a/libtreefs/hooks.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Functions for manipulating hook vectors. - - Copyright (C) 1995 Free Software Foundation, Inc. - - Written by Miles Bader <miles@gnu.ai.mit.edu> - - This file is part of the GNU Hurd. - - The GNU Hurd 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 2, or (at - your option) any later version. - - The GNU Hurd 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, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "treefs.h" - -#define HV_SIZE (sizeof (void (*)()) * TREEFS_NUM_HOOKS) - -/* Returns a copy of the treefs hook vector HOOKS, or a zero'd vector if HOOKS - is NULL. If HOOKS is NULL, treefs_default_hooks is used. If a memory - allocation error occurs, NULL is returned. */ -treefs_hook_vector_t -treefs_hooks_clone (treefs_hook_vector_t hooks) -{ - treefs_hook_vector_t clone = malloc (HV_SIZE); - if (clone != NULL) - { - if (hooks == NULL) - hooks = treefs_default_hooks; - bcopy (hooks, clone, HV_SIZE); - } - return clone; -} - -/* Copies each non-NULL entry in OVERRIDES into HOOKS. */ -void -treefs_hooks_override (treefs_hook_vector_t hooks, - treefs_hook_vector_t overrides) -{ - int num; - for (num = 0; num < TREEFS_NUM_HOOKS; num++) - if (overrides[num] != NULL) - hooks[num] = overrides[num]; -} - -/* Sets the hook NUM in HOOKS to HOOK. */ -void -treefs_hooks_set (treefs_hook_vector_t hooks, unsigned num, void (*hook)()) -{ - hooks[num] = hook; -} |