(root)/
man-db-2.12.0/
lib/
cleanup.h
       1  /*
       2   * cleanup.h -- simple dynamic cleanup function management
       3   * Copyright (C) 1995 Markus Armbruster.
       4   * Copyright (C) 2007 Colin Watson.
       5   *
       6   * This library is free software; you can redistribute it and/or
       7   * modify it under the terms of the GNU Library General Public
       8   * License as published by the Free Software Foundation; either
       9   * version 2 of the License, or (at your option) any later version.
      10   *
      11   * This library is distributed in the hope that it will be useful,
      12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
      13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      14   * Library General Public License for more details.
      15   *
      16   * You should have received a copy of the GNU Library General Public
      17   * License along with this library; see the file docs/COPYING.LIB.  If not,
      18   * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
      19   * Floor, Boston, MA  02110-1301  USA.
      20   */
      21  
      22  #ifndef _CLEANUP_H
      23  #define _CLEANUP_H
      24  
      25  #include <stdbool.h>
      26  
      27  typedef void (*cleanup_fun) (void *);
      28  
      29  extern void do_cleanups_sigsafe (bool);
      30  extern void do_cleanups (void);
      31  extern int push_cleanup (cleanup_fun, void *, int);
      32  extern void pop_cleanup (cleanup_fun, void *);
      33  extern void pop_all_cleanups (void);
      34  
      35  #endif /* _CLEANUP_H */