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(const void*, void**, int (*)(const void*, const void*));
  16. void* tfind(const void*, void* const*, int (*)(const void*, const void*));
  17. void* tdelete(const void*, void**, int (*)(const void*, const void*));
  18. void twalk(const void*, void (*)(const void*, VISIT, int));
  19. __END_DECLS