home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / search.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  3.2 KB  |  97 lines

  1. #if (defined(__IBMC__) || defined(__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.       #ifdef _M_I386
  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.    /*  VisualAge for C++ for Windows, Version 3.5                      */
  36.    /*    Licensed Material - Property of IBM                           */
  37.    /*                                                                  */
  38.    /*  5801-ARR and Other Materials                                    */
  39.    /*                                                                  */
  40.    /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  41.    /*                                                                  */
  42.    /********************************************************************/
  43.  
  44.    #if defined(__EXTENDED__)
  45.  
  46.       #ifndef __size_t
  47.         #define __size_t
  48.         typedef unsigned int size_t;
  49.       #endif
  50.  
  51.       /* function prototypes */
  52.  
  53.       char * _IMPORT _LNK_CONV _lsearch( const char *, const char *, unsigned int *,
  54.                                 unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  55.       char * _IMPORT _LNK_CONV _lfind( const char *, const char *, unsigned int *,
  56.                               unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  57.  
  58.       char * _IMPORT _LNK_CONV lsearch( const char *, const char *, unsigned int *,
  59.                                unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  60.       char * _IMPORT _LNK_CONV lfind( const char *, const char *, unsigned int *,
  61.                              unsigned int, int ( * _LNK_CONV __compare )( const void *, const void * ) );
  62.  
  63.     #if (defined(__IBMC__) || defined(__IBMCPP__))
  64.       #ifdef __OS2__
  65.       #pragma map( lsearch, "_lsearch" )
  66.       #pragma map( lfind  , "_lfind"   )
  67.       #else
  68.       #pragma map( lsearch, "?_lsearch" )
  69.       #pragma map( lfind  , "?_lfind"   )
  70.       #endif
  71.     #else
  72.       #pragma Alias( lsearch, "_lsearch" )
  73.       #pragma Alias( lfind  , "_lfind"   )
  74.     #endif
  75.  
  76.       void * _IMPORT _LNK_CONV bsearch( const void *, const void *, size_t, size_t,
  77.                                int ( * _LNK_CONV __compare )( const void *, const void * ) );
  78.       void   _IMPORT _LNK_CONV qsort( void *, size_t, size_t,
  79.                              int ( * _LNK_CONV __compare )( const void *, const void * ) );
  80.  
  81.    #endif
  82.  
  83.    #ifdef __cplusplus
  84.       }
  85.    #endif
  86.  
  87. #endif
  88.  
  89. #if (defined(__IBMC__) || defined(__IBMCPP__))
  90. #pragma info( none )
  91. #ifndef __CHKHDR__
  92.    #pragma info( restore )
  93. #endif
  94. #pragma info( restore )
  95. #endif
  96.  
  97.