home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / stdlib.h < prev    next >
Text File  |  1999-03-15  |  24KB  |  545 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 __stdlib_h
  10.    #define __stdlib_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.    #if !(__IBMC__ || __IBMCPP__)
  33.       #ifndef _System
  34.         #define _System
  35.       #endif
  36.       #ifndef __cdecl
  37.         #define __cdecl
  38.       #endif
  39.    #endif
  40.  
  41.    /********************************************************************/
  42.    /*  <stdlib.h> header file                                          */
  43.    /*                                                                  */
  44.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  45.    /*  - Licensed Material - Program-Property of IBM                   */
  46.    /*  - All rights reserved                                           */
  47.    /*                                                                  */
  48.    /********************************************************************/
  49.  
  50.    #ifndef __size_t
  51.      #define __size_t
  52.      typedef unsigned int size_t;
  53.    #endif
  54.  
  55.    #ifndef __wchar_t
  56.      #define __wchar_t
  57.      typedef unsigned short wchar_t;
  58.    #endif
  59.  
  60.    typedef struct _div_t
  61.        {
  62.        int quot;        /* quotient of integer division       */
  63.        int rem;         /* remainder of integer division      */
  64.        } div_t;
  65.  
  66.    typedef struct _ldiv_t
  67.        {
  68.        long int quot;   /* quotient of long integer division  */
  69.        long int rem;    /* remainder of long integer division */
  70.        } ldiv_t;
  71.  
  72. #if _LONG_LONG
  73.    typedef struct _lldiv_t
  74.        {
  75.        long long int quot;   /* quotient of long long integer division  */
  76.        long long int rem;    /* remainder of long long integer division */
  77.        } lldiv_t;
  78. #endif
  79.  
  80.    #ifndef NULL
  81.       #if (defined(__EXTENDED__)  || defined( __cplusplus ))
  82.          #define NULL 0
  83.       #else
  84.          #define NULL ((void *)0)
  85.       #endif
  86.    #endif
  87.  
  88.    #define EXIT_SUCCESS      0
  89.    #define EXIT_FAILURE      8
  90.    #define RAND_MAX      32767
  91.  
  92.    #ifdef __BSEXCPT__
  93.       typedef unsigned long _System
  94.         _EH_RTN(PEXCEPTIONREPORTRECORD, struct _EXCEPTIONREGISTRATIONRECORD *,
  95.                 PCONTEXTRECORD, PVOID);
  96.    #elif defined(_INC_EXCPT)
  97.       typedef unsigned long __cdecl
  98.         _EH_RTN(struct _EXCEPTION_RECORD*, PVOID, struct _CONTEXT*, PVOID);
  99.    #else
  100.       #ifdef __OS2__
  101.          typedef unsigned long _System _EH_RTN(void *,void *,void *,void *);
  102.       #else
  103.          typedef unsigned long __cdecl _EH_RTN(void *,void *,void *,void *);
  104.       #endif
  105.    #endif
  106.  
  107.    extern int _IMPORT _LNK_CONV _eh_del(_EH_RTN *);
  108.    extern int _IMPORT _LNK_CONV _eh_add(_EH_RTN *);
  109.  
  110.    #ifdef MB_CUR_MAX
  111.       #undef MB_CUR_MAX
  112.    #endif
  113.    extern int _IMPORT _mb_cur_max;
  114.    #define MB_CUR_MAX _mb_cur_max
  115.  
  116.    /* function prototypes */
  117.  
  118.    extern int      _IMPORT _LNK_CONV atoi( const char * );
  119.    extern long int _IMPORT _LNK_CONV atol( const char * );
  120.    extern long int _IMPORT _LNK_CONV strtol( const char *, char **, int );
  121.    extern unsigned long int _IMPORT _LNK_CONV strtoul( const char *, char **, int );
  122.    extern int      _IMPORT _LNK_CONV rand( void );
  123.    extern void     _IMPORT _LNK_CONV srand( unsigned int );
  124.    extern void *   (_IMPORT _LNK_CONV calloc)( size_t, size_t );
  125.    extern void     (_IMPORT _LNK_CONV free)( void * );
  126.    extern void *   (_IMPORT _LNK_CONV malloc)( size_t );
  127.    extern void *   (_IMPORT _LNK_CONV realloc)( void *, size_t );
  128.    extern void     _IMPORT _LNK_CONV abort( void );
  129.    extern int      _IMPORT _LNK_CONV atexit( void ( * )( void ) );
  130.    extern void     _IMPORT _LNK_CONV exit( int );
  131.    extern char *   _IMPORT _LNK_CONV getenv( const char * );
  132.    extern int      _IMPORT _LNK_CONV system( const char * );
  133.    extern void *   _IMPORT _LNK_CONV bsearch( const void *, const void *, size_t, size_t,
  134.                               int ( * _LNK_CONV __compare )( const void *, const void * ) );
  135.    extern void     _IMPORT _LNK_CONV qsort( void *, size_t, size_t,
  136.                             int ( * _LNK_CONV __compare )( const void *, const void * ) );
  137.    extern div_t    _IMPORT _LNK_CONV div( int, int );
  138.    extern ldiv_t   _IMPORT _LNK_CONV ldiv( long int, long int );
  139.    extern int      _IMPORT _LNK_CONV mblen( const char *, size_t );
  140.    extern int      _IMPORT _LNK_CONV mbtowc( wchar_t *, const char *, size_t );
  141.    extern int      _IMPORT _LNK_CONV wctomb( char *, wchar_t );
  142.    extern size_t   _IMPORT _LNK_CONV mbstowcs( wchar_t *, const char *, size_t );
  143.    extern size_t   _IMPORT _LNK_CONV wcstombs( char *, const wchar_t *, size_t );
  144. #if _LONG_LONG
  145.    extern long long int _IMPORT _LNK_CONV atoll( const char * );
  146.    extern lldiv_t  _IMPORT _LNK_CONV lldiv( long long int, long long int );
  147.    extern long long int _IMPORT _LNK_CONV strtoll( const char *, char **, int );
  148.    extern unsigned long long int _IMPORT _LNK_CONV strtoull( const char *, char **, int );
  149.    extern long long int _IMPORT _LNK_CONV llabs( long long int );
  150. #endif
  151.  
  152.    #if (__THW_INTEL__ || defined(__MATH__)) && (__IBMC__ || __IBMCPP__)
  153.       #ifdef __cplusplus
  154.          extern "builtin" int      __abs( int );
  155.          extern "builtin" long int __labs( long int );
  156.          inline int      _LNK_CONV abs ( int x )      { return __abs ( x ); }
  157.          inline long int _LNK_CONV labs( long int l ) { return __labs( l ); }
  158. #if _LONG_LONG
  159.          extern "builtin" long long int __llabs( long long int );
  160.          inline long long int _LNK_CONV llabs( long long int l ) { return __llabs( l ); }
  161. #endif
  162.       #else
  163.          extern int      _IMPORT _LNK_CONV abs ( int );
  164.          extern long int _IMPORT _LNK_CONV labs( long int );
  165.          int           _Builtin __abs( int );
  166.          long int      _Builtin __labs( long int );
  167.          #define  abs( x )   __abs ( (x) )
  168.          #define  labs( x )  __labs( (x) )
  169. #if _LONG_LONG
  170.          long long int _Builtin __llabs( long long int );
  171.          #define  llabs( x )  __llabs( (x) )
  172. #endif
  173.       #endif
  174.    #else
  175.       extern int      _IMPORT _LNK_CONV abs ( int );
  176.       extern long int _IMPORT _LNK_CONV labs( long int );
  177.    #endif
  178.  
  179.    #ifndef __ANSI__
  180.  
  181.       #ifndef __SAA_L2__
  182.  
  183.          #define max(a,b) (((a) > (b)) ? (a) : (b))
  184.          #define min(a,b) (((a) < (b)) ? (a) : (b))
  185.  
  186.          #if __IBMC__ || __IBMCPP__
  187.             #ifndef _alloca
  188.                void * _Builtin __alloca( size_t );
  189.                #define _alloca( x ) __alloca( (x) )
  190.                #define alloca( x ) __alloca( (x) )
  191.             #endif
  192.  
  193.             #if __THW_INTEL__
  194.                unsigned char _Builtin __parmdwords( void );
  195.             #endif
  196.          #endif
  197.  
  198.          extern long double _IMPORT _LNK_CONV _atold( const char * );
  199.          extern char * _IMPORT _LNK_CONV  ecvt( double, int, int *, int * );
  200.          extern char * _IMPORT _LNK_CONV _ecvt( double, int, int *, int * );
  201.          extern char * _IMPORT _LNK_CONV  fcvt( double, int, int *, int * );
  202.          extern char * _IMPORT _LNK_CONV _fcvt( double, int, int *, int * );
  203.          extern int    _IMPORT _LNK_CONV _freemod( unsigned long );
  204.          extern char * _IMPORT _LNK_CONV _fullpath(char *, char *, size_t);
  205.          extern char * _IMPORT _LNK_CONV  gcvt( double, int, char * );
  206.          extern char * _IMPORT _LNK_CONV _gcvt( double, int, char * );
  207.          extern int    (_IMPORT _LNK_CONV _heapmin)( void );
  208.          extern char * _IMPORT _LNK_CONV  itoa( int, char *, int );
  209.          extern char * _IMPORT _LNK_CONV _itoa( int, char *, int );
  210.          extern int    _IMPORT _LNK_CONV _loadmod( char *, unsigned long * );
  211.          extern char * _IMPORT _LNK_CONV  ltoa( long, char *, int );
  212.          extern char * _IMPORT _LNK_CONV _ltoa( long, char *, int );
  213.          extern size_t _IMPORT _LNK_CONV _msize(void *);
  214.          extern int    _IMPORT _LNK_CONV  putenv( const char * );
  215.          extern int    _IMPORT _LNK_CONV _putenv( const char * );
  216.          extern long double _IMPORT _LNK_CONV  strtold( const char *, char ** );
  217.          extern long double _IMPORT _LNK_CONV _strtold( const char *, char ** );
  218.          extern char * _IMPORT _LNK_CONV  ultoa( unsigned long, char *, int );
  219.          extern char * _IMPORT _LNK_CONV _ultoa( unsigned long, char *, int );
  220. #if _LONG_LONG
  221.          extern char * _IMPORT _LNK_CONV  ulltoa( unsigned long long, char *, int );
  222.          extern char * _IMPORT _LNK_CONV _ulltoa( unsigned long long, char *, int );
  223. #endif
  224.  
  225.          #if __IBMC__ || __IBMCPP__
  226.             #if __WINDOWS__ && __THW_INTEL__
  227.                #pragma map( ecvt    , "?_ecvt"    )
  228.                #pragma map( fcvt    , "?_fcvt"    )
  229.                #pragma map( gcvt    , "?_gcvt"    )
  230.                #pragma map( itoa    , "?_itoa"    )
  231.                #pragma map( ltoa    , "?_ltoa"    )
  232.                #pragma map( ultoa   , "?_ultoa"   )
  233.                #pragma map( ulltoa  , "?_ulltoa"  )
  234.                #pragma map( putenv  , "?_putenv"  )
  235.                #pragma map( _strtold, "?strtold"  )
  236.             #else
  237.                #pragma map( ecvt    , "_ecvt"    )
  238.                #pragma map( fcvt    , "_fcvt"    )
  239.                #pragma map( gcvt    , "_gcvt"    )
  240.                #pragma map( itoa    , "_itoa"    )
  241.                #pragma map( ltoa    , "_ltoa"    )
  242.                #pragma map( ultoa   , "_ultoa"   )
  243.                #pragma map( ulltoa  , "_ulltoa"  )
  244.                #pragma map( putenv  , "_putenv"  )
  245.                #pragma map( _strtold, "strtold"  )
  246.             #endif
  247.          #else
  248.             #define ecvt _ecvt
  249.             #define fcvt _fcvt
  250.             #define gcvt _gcvt
  251.             #define itoa _itoa
  252.             #define ltoa _ltoa
  253.             #define ultoa _ultoa
  254.             #define putenv _putenv
  255.             #define _strtold strtold
  256.          #endif
  257.  
  258.          #ifndef __malloc_h
  259.  
  260.             #if defined(__TILED__) && __OS2__ && __THW_INTEL__
  261.                extern void * _IMPORT _LNK_CONV _tcalloc( size_t, size_t );
  262.                extern void   _IMPORT _LNK_CONV _tfree( void * );
  263.                extern void * _IMPORT _LNK_CONV _tmalloc( size_t );
  264.                extern void * _IMPORT _LNK_CONV _trealloc( void *, size_t );
  265.                extern void * _IMPORT _LNK_CONV _theapmin(void);
  266.                #ifndef __DEBUG_ALLOC__
  267.                   #if __IBMC__ || __IBMCPP__
  268.                      #pragma map( calloc , "_tcalloc"  )
  269.                      #pragma map( free   , "_tfree"    )
  270.                      #pragma map( malloc , "_tmalloc"  )
  271.                      #pragma map( realloc, "_trealloc" )
  272.                      #pragma map( heapmin, "_theapmin" )
  273.                   #else
  274.                      #define calloc _tcalloc
  275.                      #define free _tfree
  276.                      #define malloc _tmalloc
  277.                      #define realloc _trealloc
  278.                      #define heapmin _theapmin
  279.                   #endif
  280.                #endif
  281.             #endif
  282.  
  283.             #ifdef __DEBUG_ALLOC__
  284.                #if defined(__TILED__) && __OS2__ && __THW_INTEL__
  285.                   extern void * _IMPORT _LNK_CONV _debug_tcalloc( size_t, size_t, const char *, size_t );
  286.                   extern void   _IMPORT _LNK_CONV _debug_tfree( void *, const char *, size_t );
  287.                   extern void * _IMPORT _LNK_CONV _debug_tmalloc( size_t, const char *, size_t );
  288.                   extern void * _IMPORT _LNK_CONV _debug_trealloc( void *, size_t, const char *, size_t );
  289.                   extern int    _IMPORT _LNK_CONV _debug_theapmin( const char *, size_t );
  290.                   extern void   _IMPORT _LNK_CONV _theap_check( void );
  291.                   extern void   _IMPORT _LNK_CONV _tdump_allocated( int );
  292.                   extern void   _IMPORT _LNK_CONV _tdump_allocated_delta( int );
  293.  
  294.                   extern void   _IMPORT _LNK_CONV __theap_check( const char *,size_t );
  295.                   extern void   _IMPORT _LNK_CONV __tdump_allocated( int ,const char *, size_t);
  296.                   extern void   _IMPORT _LNK_CONV __tdump_allocated_delta( int, const char *, size_t);
  297.  
  298.                   #define _tcalloc(x,y)  _debug_tcalloc( (x), (y), __FILE__, __LINE__ )
  299.                   #define _tfree( x )    _debug_tfree( (x), __FILE__, __LINE__ )
  300.                   #define _tmalloc( x )  _debug_tmalloc( (x), __FILE__, __LINE__ )
  301.                   #define _trealloc(x,y) _debug_trealloc( (x), (y), __FILE__, __LINE__ )
  302.                   #define _theapmin( )   _debug_theapmin( __FILE__, __LINE__ )
  303.  
  304.                   #define calloc(x,y)    _debug_tcalloc( (x), (y), __FILE__, __LINE__ )
  305.                   #define free( x )      _debug_tfree( (x), __FILE__, __LINE__ )
  306.                   #define malloc( x )    _debug_tmalloc( (x), __FILE__, __LINE__ )
  307.                   #define realloc(x,y)   _debug_trealloc( (x), (y), __FILE__, __LINE__ )
  308.                   #define _heapmin( )    _debug_theapmin( __FILE__, __LINE__ )
  309.  
  310.                   #define _heap_check()            __theap_check(__FILE__,__LINE__)
  311.                   #define _dump_allocated(x)       __tdump_allocated((x),__FILE__,__LINE__)
  312.                   #define _dump_allocated_delta(x) __tdump_allocated_delta((x),__FILE__,__LINE__)
  313.  
  314.                #else
  315.                   extern void * _IMPORT _LNK_CONV _debug_calloc( size_t, size_t, const char *, size_t );
  316.                   extern void   _IMPORT _LNK_CONV _debug_free( void *, const char *, size_t );
  317.                   extern void * _IMPORT _LNK_CONV _debug_malloc( size_t, const char *, size_t );
  318.                   extern void * _IMPORT _LNK_CONV _debug_realloc( void *, size_t, const char *, size_t );
  319.                   extern int    _IMPORT _LNK_CONV _debug_heapmin( const char *, size_t );
  320.                   extern void   _IMPORT _LNK_CONV _heap_check( void );
  321.                   extern void   _IMPORT _LNK_CONV _dump_allocated( int );
  322.                   extern void   _IMPORT _LNK_CONV _dump_allocated_delta( int );
  323.                   extern void   _IMPORT _LNK_CONV __heap_check( const char *,size_t );
  324.                   extern void   _IMPORT _LNK_CONV __dump_allocated( int ,const char *, size_t);
  325.                   extern void   _IMPORT _LNK_CONV __dump_allocated_delta( int, const char *, size_t );
  326.  
  327.                   #define calloc( x, y )  _debug_calloc( (x), (y), __FILE__, __LINE__ )
  328.                   #define free( x )       _debug_free( (x), __FILE__, __LINE__ )
  329.                   #define malloc( x )     _debug_malloc( (x), __FILE__, __LINE__ )
  330.                   #define realloc( x, y ) _debug_realloc( (x), (y), __FILE__, __LINE__ )
  331.                   #define _heapmin( )     _debug_heapmin( __FILE__, __LINE__ )
  332.  
  333.                   #define _heap_check()            __heap_check(__FILE__,__LINE__)
  334.                   #define _dump_allocated(x)       __dump_allocated((x),__FILE__,__LINE__)
  335.                   #define _dump_allocated_delta(x) __dump_allocated_delta((x),__FILE__,__LINE__)
  336.  
  337.                #endif
  338.             #else
  339.                #define _heap_check( )
  340.                #define _dump_allocated( x )
  341.                #define _theap_check( )
  342.                #define _tdump_allocated( x )
  343.                #define _dump_allocated_delta( x )
  344.                #define _tdump_allocated_delta( x )
  345.             #endif
  346.  
  347.          #endif
  348.  
  349.          #ifdef __MULTI__
  350.             extern int  _IMPORT _LNK_CONV _beginthread( void ( * _LNK_CONV )( void * ), void *, unsigned, void * );
  351.             extern void _IMPORT _LNK_CONV _endthread( void );
  352.             extern void ** _IMPORT _LNK_CONV _threadstore( void );
  353.          #endif
  354.  
  355.          #if __IBMC__ || __IBMCPP__
  356.             #if __WINDOWS__ && __THW_INTEL__
  357.                #pragma map( atof  , "?_atofieee"   )
  358.                #pragma map( strtod, "?_strtodieee" )
  359.             #else
  360.                #pragma map( atof  , "_atofieee"   )
  361.                #pragma map( strtod, "_strtodieee" )
  362.             #endif
  363.          #else
  364.             #define atof _atofieee
  365.             #define strtod _strtodieee
  366.          #endif
  367.  
  368.          #if defined(__EXTENDED__)
  369.  
  370.             #if __THW_INTEL__ && (__IBMC__ || __IBMCPP__)
  371.                void  _Builtin __enable( void );
  372.                void  _Builtin __disable( void );
  373.  
  374.                #define _enable( )  __enable( )
  375.                #define _disable( ) __disable( )
  376.             #endif
  377.  
  378.             #ifndef errno
  379.                #ifdef __MULTI__
  380.                   extern int * _IMPORT _LNK_CONV _errno( void );
  381.                   #define errno (*_errno( ))
  382.                #else
  383.                   extern int _IMPORT errno;
  384.                      #define errno errno
  385.                #endif
  386.             #endif
  387.  
  388.             #ifndef _doserrno
  389.                #ifdef __MULTI__
  390.                   extern int * _IMPORT _LNK_CONV __doserrno(void);
  391.                   #define _doserrno (*__doserrno( ))
  392.                #else
  393.                   extern int _IMPORT _doserrno;
  394.                   #define _doserrno _doserrno
  395.                #endif
  396.             #endif
  397.  
  398.             extern const    char **_IMPORT _environ;
  399.             extern unsigned char   _IMPORT _osmajor;
  400.             extern unsigned char   _IMPORT _osminor;
  401.             extern unsigned char   _IMPORT _osmode;
  402.  
  403.             #define environ _environ
  404.  
  405.             #define DOS_MODE        0       /* Real Address Mode */
  406.             #define OS2_MODE        1       /* Protected Address Mode */
  407.  
  408.             typedef int ( __onexit_t )( void );
  409.             typedef __onexit_t * onexit_t;
  410.  
  411.             /* Sizes for buffers used by the _makepath() and _splitpath() functions.*/
  412.             /* Note that the sizes include space for null terminating character.    */
  413.  
  414.             #define _MAX_PATH       260   /* max. length of full pathname           */
  415.             #define _MAX_DRIVE      3     /* max. length of drive component         */
  416.             #define _MAX_DIR        256   /* max. length of path component          */
  417.             #define _MAX_FNAME      256   /* max. length of file name component     */
  418.             #define _MAX_EXT        256   /* max. length of extension component     */
  419.  
  420.             extern void           _IMPORT _LNK_CONV _exit( int );
  421.             extern onexit_t       _IMPORT _LNK_CONV  onexit( onexit_t );
  422.             extern onexit_t       _IMPORT _LNK_CONV _onexit( onexit_t );
  423.  
  424.             #if __THW_INTEL__ && (__IBMC__ || __IBMCPP__)
  425. #if _LONG_LONG
  426.                unsigned long long _Builtin  __llrotl(unsigned long long, int);
  427.                unsigned long long _Builtin  __llrotr(unsigned long long, int);
  428. #endif
  429.                unsigned long  _Builtin  __lrotl(unsigned long, int);
  430.                unsigned long  _Builtin  __lrotr(unsigned long, int);
  431.                unsigned short _Builtin  __srotl(unsigned short, int);
  432.                unsigned short _Builtin  __srotr(unsigned short, int);
  433.                unsigned char  _Builtin  __crotl(unsigned char, int);
  434.                unsigned char  _Builtin  __crotr(unsigned char, int);
  435.  
  436.                #define  _rotl( x, y )   __lrotl( (x), (y) )
  437.                #define  _rotr( x, y )   __lrotr( (x), (y) )
  438.                #define  _llrotl( x, y ) __llrotl( (x), (y) )
  439.                #define  _llrotr( x, y ) __llrotr( (x), (y) )
  440.                #define  _lrotl( x, y )  __lrotl( (x), (y) )
  441.                #define  _lrotr( x, y )  __lrotr( (x), (y) )
  442.                #define  _srotl( x, y )  __srotl( (x), (y) )
  443.                #define  _srotr( x, y )  __srotr( (x), (y) )
  444.                #define  _crotl( x, y )  __crotl( (x), (y) )
  445.                #define  _crotr( x, y )  __crotr( (x), (y) )
  446.             #elif __THW_PPC__
  447. #if _LONG_LONG
  448.                unsigned long long _llrotl(unsigned long long, int);
  449.                unsigned long long _llrotr(unsigned long long, int);
  450. #endif
  451.                unsigned long  _lrotl(unsigned long, int);
  452.                unsigned long  _lrotr(unsigned long, int);
  453.                unsigned short _srotl(unsigned short, int);
  454.                unsigned short _srotr(unsigned short, int);
  455.                unsigned char  _crotl(unsigned char, int);
  456.                unsigned char  _crotr(unsigned char, int);
  457.  
  458.                #define  _rotl( x, y )   _lrotl( (x), (y) )
  459.                #define  _rotr( x, y )   _lrotr( (x), (y) )
  460.                #define  _llrotl( x, y ) _llrotl( (x), (y) )
  461.                #define  _llrotr( x, y ) _llrotr( (x), (y) )
  462.                #define  _lrotl( x, y )  _lrotl( (x), (y) )
  463.                #define  _lrotr( x, y )  _lrotr( (x), (y) )
  464.                #define  _srotl( x, y )  _srotl( (x), (y) )
  465.                #define  _srotr( x, y )  _srotr( (x), (y) )
  466.                #define  _crotl( x, y )  _crotl( (x), (y) )
  467.                #define  _crotr( x, y )  _crotr( (x), (y) )
  468.             #endif
  469.  
  470.             extern void _IMPORT _LNK_CONV _makepath( char *, const char *, const char *, const char *, const char * );
  471.             extern void _IMPORT _LNK_CONV _splitpath( const char *, char *, char *, char *, char * );
  472.             extern void _IMPORT _LNK_CONV _searchenv( char *, char *, char *);
  473.             extern void _IMPORT _LNK_CONV  swab( char *, char *, int );
  474.             extern void _IMPORT _LNK_CONV _swab( char *, char *, int );
  475.  
  476.             #if __IBMC__ || __IBMCPP__
  477.                #if __WINDOWS__ && __THW_INTEL__
  478.                   #pragma map( onexit , "?_onexit"  )
  479.                   #pragma map( swab   , "?_swab"    )
  480.                #else
  481.                   #pragma map( onexit , "_onexit"  )
  482.                   #pragma map( swab   , "_swab"    )
  483.                #endif
  484.             #else
  485.                #define onexit _onexit
  486.                #define swab _swab
  487.             #endif
  488.  
  489.             #if __IBMC__ || __IBMCPP__
  490.                #if __WINDOWS__ && __THW_INTEL__
  491.                   #pragma map( rpmatch, "?_rpmatch" )
  492.                   #pragma map( csid   , "?_csid"    )
  493.                   #pragma map( wcsid  , "?_wcsid"   )
  494.                #else
  495.                   #pragma map( rpmatch, "_rpmatch" )
  496.                   #pragma map( csid   , "_csid"    )
  497.                   #pragma map( wcsid  , "_wcsid"   )
  498.                #endif
  499.             #else
  500.                #define rpmatch _rpmatch
  501.                #define csid _csid
  502.                #define wcsid _wcsid
  503.             #endif
  504.  
  505.             extern int _IMPORT _LNK_CONV rpmatch(const char *);
  506.             extern int _IMPORT _LNK_CONV csid(const char *);
  507.             extern int _IMPORT _LNK_CONV wcsid(const wchar_t);
  508.  
  509.             /* Define different memory model versions of memory management       */
  510.             /* routines to the standard names.                                   */
  511.  
  512.             #define _ncalloc( x, y )  calloc( (x), (y) )
  513.             #define _fcalloc( x, y )  calloc( (x), (y) )
  514.             #define _nfree( x )       free( (x) )
  515.             #define _ffree( x )       free( (x) )
  516.             #define _nmalloc( x )     malloc( (x) )
  517.             #define _fmalloc( x )     malloc( (x) )
  518.             #define _nrealloc( x, y ) realloc( (x), (y) )
  519.             #define _frealloc( x, y ) realloc( (x), (y) )
  520.             #define _fheapmin( )      _heapmin( )
  521.             #define _nheapmin( )      _heapmin( )
  522.  
  523.          #endif
  524.  
  525.       #endif
  526.    #endif
  527.  
  528.    extern double   _IMPORT _LNK_CONV atof( const char * );
  529.    extern double   _IMPORT _LNK_CONV strtod( const char *, char ** );
  530.  
  531.    #ifdef __cplusplus
  532.       }
  533.    #endif
  534.  
  535. #endif
  536.  
  537. #if __IBMC__ || __IBMCPP__
  538. #pragma info( none )
  539. #ifndef __CHKHDR__
  540.    #pragma info( restore )
  541. #endif
  542. #pragma info( restore )
  543. #endif
  544.  
  545.