home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / search.h < prev    next >
Text File  |  1999-03-15  |  3KB  |  94 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __search_h
  10.    #define __search_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <search.h> header file                                          */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    #if defined(__EXTENDED__)
  42.  
  43.       #ifndef __size_t
  44.         #define __size_t
  45.         typedef unsigned int size_t;
  46.       #endif
  47.  
  48.       /* function prototypes */
  49.  
  50.       char * _IMPORT _LNK_CONV _lsearch( const char *, const char *, unsigned int *,
  51.                                 unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  52.       char * _IMPORT _LNK_CONV _lfind( const char *, const char *, unsigned int *,
  53.                               unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  54.  
  55.       char * _IMPORT _LNK_CONV lsearch( const char *, const char *, unsigned int *,
  56.                                unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  57.       char * _IMPORT _LNK_CONV lfind( const char *, const char *, unsigned int *,
  58.                              unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  59.  
  60.       #if __IBMC__ || __IBMCPP__
  61.          #if __WINDOWS__ && __THW_INTEL__
  62.             #pragma map( lsearch, "?_lsearch" )
  63.             #pragma map( lfind  , "?_lfind"   )
  64.          #else
  65.             #pragma map( lsearch, "_lsearch" )
  66.             #pragma map( lfind  , "_lfind"   )
  67.          #endif
  68.       #else
  69.          #define lsearch _lsearch
  70.          #define lfind _lfind
  71.        #endif
  72.  
  73.       void * _IMPORT _LNK_CONV bsearch( const void *, const void *, size_t, size_t,
  74.                                int ( * _LNK_CONV __compare )( const void *, const void * ) );
  75.       void   _IMPORT _LNK_CONV qsort( void *, size_t, size_t,
  76.                              int ( * _LNK_CONV __compare )( const void *, const void * ) );
  77.  
  78.    #endif
  79.  
  80.    #ifdef __cplusplus
  81.       }
  82.    #endif
  83.  
  84. #endif
  85.  
  86. #if __IBMC__ || __IBMCPP__
  87. #pragma info( none )
  88. #ifndef __CHKHDR__
  89.    #pragma info( restore )
  90. #endif
  91. #pragma info( restore )
  92. #endif
  93.  
  94.