summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/search.h
blob: cd02738a5af8f799eefeb521940e96ef49d8c858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <sys/cdefs.h>

__BEGIN_DECLS

typedef enum {
    preorder,
    postorder,
    endorder,
    leaf,
} VISIT;

void* tsearch(const void*, void**, int (*)(const void*, const void*));
void* tfind(const void*, void* const*, int (*)(const void*, const void*));
void* tdelete(const void*, void**, int (*)(const void*, const void*));
void twalk(const void*, void (*)(const void*, VISIT, int));

__END_DECLS