source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/search.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 2.5 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_SEARCH
7#define _INC_SEARCH
8
9#include <crtdefs.h>
10#include <stddef.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#ifndef _CRT_ALGO_DEFINED
17#define _CRT_ALGO_DEFINED
18 void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
19 void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
20#endif
21 _CRTIMP void *__cdecl _lfind(const void *_Key,const void *_Base,unsigned int *_NumOfElements,unsigned int _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
22 _CRTIMP void *__cdecl _lsearch(const void *_Key,void *_Base,unsigned int *_NumOfElements,unsigned int _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
23
24#ifndef NO_OLDNAMES
25 void *__cdecl lfind(const void *_Key,const void *_Base,unsigned int *_NumOfElements,unsigned int _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *)) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
26 void *__cdecl lsearch(const void *_Key,void *_Base,unsigned int *_NumOfElements,unsigned int _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *)) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
27#endif
28
29/*
30Documentation for these POSIX definitions and prototypes can be found in
31The Open Group Base Specifications Issue 6
32IEEE Std 1003.1, 2004 Edition.
33eg: http://www.opengroup.org/onlinepubs/009695399/functions/twalk.html
34*/
35
36typedef struct entry {
37 char *key;
38 void *data;
39} ENTRY;
40
41typedef enum {
42 FIND,
43 ENTER
44} ACTION;
45
46typedef enum {
47 preorder,
48 postorder,
49 endorder,
50 leaf
51} VISIT;
52
53#ifdef _SEARCH_PRIVATE
54typedef struct node {
55 char *key;
56 struct node *llink, *rlink;
57} node_t;
58#endif
59
60void * __cdecl tdelete (const void * __restrict__, void ** __restrict__, int (*)(const void *, const void *)) __MINGW_ATTRIB_NONNULL (2) __MINGW_ATTRIB_NONNULL (3);
61void * __cdecl tfind (const void *, void * const *, int (*)(const void *, const void *)) __MINGW_ATTRIB_NONNULL (2) __MINGW_ATTRIB_NONNULL (3);
62void * __cdecl tsearch (const void *, void **, int (*)(const void *, const void *)) __MINGW_ATTRIB_NONNULL (2) __MINGW_ATTRIB_NONNULL (3);
63void __cdecl twalk (const void *, void (*)(const void *, VISIT, int));
64
65#ifdef __cplusplus
66}
67#endif
68
69#include <sec_api/search_s.h>
70
71#endif
Note: See TracBrowser for help on using the repository browser.