Mostly minor updates to the source tree for portcls.
[reactos.git] / reactos / lib / mingw / include / search.h
1 /*
2 * search.h
3 *
4 * Functions for searching and sorting.
5 *
6 * This file is part of the Mingw32 package.
7 *
8 * Contributors:
9 * Created by Danny Smith <dannysmith@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #ifndef _SEARCH_H_
24 #define _SEARCH_H_
25
26 /* All the headers include this file. */
27 #include <_mingw.h>
28
29 #ifndef RC_INVOKED
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #ifndef _SIZE_T_DEFINED
36 typedef unsigned int size_t;
37 #define _SIZE_T_DEFINED
38 #endif
39
40 /* bsearch and qsort are also declared in stdlib.h */
41 _CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
42 int (*)(const void*, const void*));
43 _CRTIMP void __cdecl qsort (void*, size_t, size_t,
44 int (*)(const void*, const void*));
45
46 _CRTIMP void* __cdecl _lfind (const void*, const void*, unsigned int*,
47 unsigned int, int (*)(const void*, const void*));
48 _CRTIMP void* __cdecl _lsearch (const void*, void*, unsigned int*, unsigned int,
49 int (*)(const void*, const void*));
50
51 #ifndef _NO_OLDNAMES
52 _CRTIMP void* __cdecl lfind (const void*, const void*, unsigned int*,
53 unsigned int, int (*)(const void*, const void*));
54 _CRTIMP void* __cdecl lsearch (const void*, void*, unsigned int*, unsigned int,
55 int (*)(const void*, const void*));
56 #endif
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* RC_INVOKED */
63
64 #endif /* _SEARCH_H_ */