home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 6.ddi / MWHC.006 / R < prev    next >
Encoding:
Text File  |  1992-12-09  |  1.5 KB  |  51 lines

  1. /*
  2.  *   search.h -- extra-ANSI 
  3.  *
  4.  *   Sorting and searching functions.
  5.  *
  6.  *           Copyright (c) 1990, MetaWare Incorporated
  7.  */
  8.  
  9. #ifndef _SEARCH_H
  10. #define _SEARCH_H
  11.  
  12. #ifdef __CPLUSPLUS__
  13. extern "C" {
  14. #endif
  15.  
  16. extern void * _lfind (void * __key, void * __start,
  17.                     unsigned * __kount, unsigned __wid,
  18.                     int (* __cmp)(const void * __data1, const void * __data2));
  19.  
  20. extern void * _lsearch (void * __key, void * __start,
  21.                     unsigned * __kount, unsigned __wid,
  22.                     int (* __cmp)(const void * __data1, const void * __data2));
  23.  
  24. #if __HIGHC__
  25.  
  26. #ifndef _SIZE_T_DEFINED
  27. #define _SIZE_T_DEFINED
  28. typedef unsigned int size_t;
  29. #endif
  30.  
  31. extern void * lfind (void * __key, void * __start,
  32.                     unsigned * __kount, unsigned __wid,
  33.                     int (* __cmp)(const void * __data1, const void * __data2));
  34.  
  35. extern void * lsearch (void * __key, void * __start,
  36.                     unsigned * __kount, unsigned __wid,
  37.                     int (* __cmp)(const void * __data1, const void * __data2));
  38.  
  39. extern  void * bsearch(const void *__key, const void *__base,
  40.                       size_t __nmemb, size_t __size,
  41.                       int (*__compar)(const void *, const void *));
  42.  
  43. extern  void qsort(void *__base, size_t __nmemb, size_t __size,
  44.                   int (*__compar)(const void *, const void *));
  45.  
  46. #endif
  47. #ifdef __CPLUSPLUS__
  48. }
  49. #endif
  50. #endif /* _SEARCH_H */
  51.