Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.0 KiB

  1. /***
  2. *search.h - declarations for searcing/sorting routines
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file contains the declarations for the sorting and
  8. * searching routines.
  9. * [System V]
  10. *
  11. * [Public]
  12. *
  13. ****/
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #ifndef _INC_SEARCH
  18. #define _INC_SEARCH
  19. #if !defined(_WIN32)
  20. #error ERROR: Only Win32 target supported!
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if !defined(_W64)
  26. #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
  27. #define _W64 __w64
  28. #else
  29. #define _W64
  30. #endif
  31. #endif
  32. /* Define _CRTIMP */
  33. #ifndef _CRTIMP
  34. #ifdef _DLL
  35. #define _CRTIMP __declspec(dllimport)
  36. #else /* ndef _DLL */
  37. #define _CRTIMP
  38. #endif /* _DLL */
  39. #endif /* _CRTIMP */
  40. /* Define __cdecl for non-Microsoft compilers */
  41. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  42. #define __cdecl
  43. #endif
  44. #ifndef _SIZE_T_DEFINED
  45. #ifdef _WIN64
  46. typedef unsigned __int64 size_t;
  47. #else
  48. typedef _W64 unsigned int size_t;
  49. #endif
  50. #define _SIZE_T_DEFINED
  51. #endif
  52. /* Function prototypes */
  53. _CRTIMP void * __cdecl bsearch(const void *, const void *, size_t, size_t,
  54. int (__cdecl *)(const void *, const void *));
  55. _CRTIMP void * __cdecl _lfind(const void *, const void *, unsigned int *, unsigned int,
  56. int (__cdecl *)(const void *, const void *));
  57. _CRTIMP void * __cdecl _lsearch(const void *, void *, unsigned int *, unsigned int,
  58. int (__cdecl *)(const void *, const void *));
  59. _CRTIMP void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)(const void *,
  60. const void *));
  61. #if !__STDC__
  62. /* Non-ANSI names for compatibility */
  63. _CRTIMP void * __cdecl lfind(const void *, const void *, unsigned int *, unsigned int,
  64. int (__cdecl *)(const void *, const void *));
  65. _CRTIMP void * __cdecl lsearch(const void *, void *, unsigned int *, unsigned int,
  66. int (__cdecl *)(const void *, const void *));
  67. #endif /* __STDC__ */
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif /* _INC_SEARCH */