search.h 523 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <sys/cdefs.h>
  8. __BEGIN_DECLS
  9. typedef enum {
  10. preorder,
  11. postorder,
  12. endorder,
  13. leaf,
  14. } VISIT;
  15. void* tsearch(void const*, void**, int (*)(void const*, void const*));
  16. void* tfind(void const*, void* const*, int (*)(void const*, void const*));
  17. void* tdelete(void const*, void**, int (*)(void const*, void const*));
  18. void twalk(void const*, void (*)(void const*, VISIT, int));
  19. __END_DECLS