source: EcnlProtoTool/trunk/musl-1.1.18/include/search.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 1.3 KB
Line 
1#ifndef _SEARCH_H
2#define _SEARCH_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <features.h>
9
10#define __NEED_size_t
11#include <bits/alltypes.h>
12
13typedef enum { FIND, ENTER } ACTION;
14typedef enum { preorder, postorder, endorder, leaf } VISIT;
15
16typedef struct entry {
17 char *key;
18 void *data;
19} ENTRY;
20
21int hcreate(size_t);
22void hdestroy(void);
23ENTRY *hsearch(ENTRY, ACTION);
24
25#ifdef _GNU_SOURCE
26struct hsearch_data {
27 struct __tab *__tab;
28 unsigned int __unused1;
29 unsigned int __unused2;
30};
31
32int hcreate_r(size_t, struct hsearch_data *);
33void hdestroy_r(struct hsearch_data *);
34int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
35#endif
36
37void insque(void *, void *);
38void remque(void *);
39
40void *lsearch(const void *, void *, size_t *, size_t,
41 int (*)(const void *, const void *));
42void *lfind(const void *, const void *, size_t *, size_t,
43 int (*)(const void *, const void *));
44
45void *tdelete(const void *__restrict, void **__restrict, int(*)(const void *, const void *));
46void *tfind(const void *, void *const *, int(*)(const void *, const void *));
47void *tsearch(const void *, void **, int (*)(const void *, const void *));
48void twalk(const void *, void (*)(const void *, VISIT, int));
49
50#ifdef _GNU_SOURCE
51struct qelem {
52 struct qelem *q_forw, *q_back;
53 char q_data[1];
54};
55
56void tdestroy(void *, void (*)(void *));
57#endif
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif
Note: See TracBrowser for help on using the repository browser.