home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / wcstr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  6.7 KB  |  159 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 __wcstr_h
  10.    #define __wcstr_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.    /*  <wcstr.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.    #ifndef __ANSI__
  45.  
  46.       #ifndef __size_t
  47.          #define __size_t
  48.          typedef unsigned int size_t;
  49.       #endif
  50.  
  51.       #ifndef NULL
  52.          #if (defined(__EXTENDED__)  || defined( __cplusplus ))
  53.             #define NULL 0
  54.          #else
  55.             #define NULL ((void *)0)
  56.          #endif
  57.       #endif
  58.  
  59.  
  60.       #ifndef __wchar_t
  61.          #define __wchar_t
  62.          typedef unsigned short wchar_t;
  63.       #endif
  64.  
  65.       #ifndef __wint_t
  66.          #define __wint_t
  67.          typedef int        wint_t;
  68.       #endif
  69.  
  70.       #ifdef _M_I386
  71.          wchar_t * _Builtin __wcscat(wchar_t *, const wchar_t *);
  72.          wchar_t * _Builtin __wcschr(const wchar_t *,  wchar_t);
  73.          int       _Builtin __wcscmp(const wchar_t *, const wchar_t *);
  74.          wchar_t * _Builtin __wcscpy(wchar_t *, const wchar_t *);
  75.          size_t    _Builtin __wcslen(const wchar_t *);
  76.          wchar_t * _Builtin __wcsncat(wchar_t *, const wchar_t *, size_t);
  77.          int       _Builtin __wcsncmp(const wchar_t *, const wchar_t *, size_t);
  78.          wchar_t * _Builtin __wcsncpy(wchar_t *, const wchar_t *, size_t);
  79.          wchar_t * _Builtin __wcsrchr(const wchar_t *, wchar_t);
  80.  
  81.       #ifdef __cplusplus
  82.          inline wchar_t * _LNK_CONV wcscat(wchar_t * s1, const wchar_t * s2)
  83.                                           {return __wcscat(s1, s2); }
  84.          inline wchar_t * _LNK_CONV wcschr(const wchar_t * s1, wchar_t wc)
  85.                                           {return __wcschr(s1, wc); }
  86.          inline int       _LNK_CONV wcscmp(const wchar_t * s1, const wchar_t * s2)
  87.                                           {return __wcscmp(s1, s2); }
  88.          inline wchar_t * _LNK_CONV wcscpy(wchar_t * s1, const wchar_t * s2)
  89.                                           {return __wcscpy(s1, s2); }
  90.          inline size_t    _LNK_CONV wcslen(const wchar_t * s)
  91.                                           {return __wcslen(s); }
  92.          inline wchar_t * _LNK_CONV wcsncat(wchar_t * s1, const wchar_t * s2, size_t t)
  93.                                           {return __wcsncat(s1, s2, t); }
  94.          inline int       _LNK_CONV wcsncmp(const wchar_t * s1, const wchar_t * s2, size_t t)
  95.                                           {return __wcsncmp(s1, s2, t); }
  96.          inline wchar_t * _LNK_CONV wcsncpy(wchar_t * s1, const wchar_t * s2, size_t t)
  97.                                           {return __wcsncpy(s1, s2, t); }
  98.          inline wchar_t * _LNK_CONV wcsrchr(const wchar_t * s1, wchar_t wc)
  99.                                           {return __wcsrchr(s1, wc); }
  100.       #else
  101.          extern wchar_t * _IMPORT _LNK_CONV wcscat(wchar_t *, const wchar_t *);
  102.          extern wchar_t * _IMPORT _LNK_CONV wcschr(const wchar_t *, wchar_t);
  103.          extern int       _IMPORT _LNK_CONV wcscmp(const wchar_t *, const wchar_t *);
  104.          extern wchar_t * _IMPORT _LNK_CONV wcscpy(wchar_t *, const wchar_t *);
  105.          extern size_t    _IMPORT _LNK_CONV wcslen(const wchar_t *);
  106.          extern wchar_t * _IMPORT _LNK_CONV wcsncat(wchar_t *, const wchar_t *, size_t);
  107.          extern int       _IMPORT _LNK_CONV wcsncmp(const wchar_t *, const wchar_t *, size_t);
  108.          extern wchar_t * _IMPORT _LNK_CONV wcsncpy(wchar_t *, const wchar_t *, size_t);
  109.          extern wchar_t * _IMPORT _LNK_CONV wcsrchr(const wchar_t *, wchar_t);
  110.  
  111.          #pragma info ( none )
  112.          #define wcscat( x,y )        __wcscat( (x), (y) )
  113.          #define wcschr( x,y )        __wcschr( (x), (y) )
  114.          #define wcscmp( x,y )        __wcscmp( (x), (y) )
  115.          #define wcscpy( x,y )        __wcscpy( (x), (y) )
  116.          #define wcslen( x )          __wcslen( (x) )
  117.          #define wcsncat( x,y,z )     __wcsncat( (x), (y), (z) )
  118.          #define wcsncmp( x,y,z )     __wcsncmp( (x), (y), (z) )
  119.          #define wcsncpy( x,y,z )     __wcsncpy( (x), (y), (z) )
  120.          #define wcsrchr( x,y )       __wcsrchr( (x), (y) )
  121.          #pragma info (restore)
  122.       #endif
  123.       #endif
  124.  
  125.    #ifdef  __THW_PPC__
  126.       extern wchar_t * _IMPORT _LNK_CONV wcscat( wchar_t *, const wchar_t * );
  127.       extern wchar_t * _IMPORT _LNK_CONV wcschr( const wchar_t *, wchar_t);
  128.       extern int     * _IMPORT _LNK_CONV wcscmp( const wchar_t *, const wchar_t * );
  129.       extern wchar_t * _IMPORT _LNK_CONV wcscpy( wchar_t *, const wchar_t * );
  130.       extern size_t  * _IMPORT _LNK_CONV wcslen( const wchar_t * );
  131.       extern wchar_t * _IMPORT _LNK_CONV wcsncat( wchar_t *, const wchar_t *, size_t);
  132.       extern int     * _IMPORT _LNK_CONV wcsncmp( const wchar_t *, const wchar_t *, size_t);
  133.       extern wchar_t * _IMPORT _LNK_CONV wcsncpy( wchar_t *, const wchar_t *, size_t);
  134.       extern wchar_t * _IMPORT _LNK_CONV wcsrchr( const wchar_t *, wchar_t);
  135.    #endif
  136.  
  137.       extern size_t    _IMPORT _LNK_CONV wcscspn( const wchar_t *, const wchar_t * );
  138.       extern wchar_t * _IMPORT _LNK_CONV wcspbrk( const wchar_t *, const wchar_t * );
  139.       extern size_t    _IMPORT _LNK_CONV wcsspn( const wchar_t *, const wchar_t * );
  140.       extern wchar_t * _IMPORT _LNK_CONV wcswcs( const wchar_t *, const wchar_t * );
  141.       extern wchar_t * _IMPORT _LNK_CONV wcsstr( const wchar_t *, const wchar_t * );
  142.  
  143.    #endif
  144.  
  145.    #ifdef __cplusplus
  146.       }
  147.    #endif
  148.  
  149. #endif
  150.  
  151. #if (defined(__IBMC__) || defined(__IBMCPP__))
  152. #pragma info( none )
  153. #ifndef __CHKHDR__
  154.    #pragma info( restore )
  155. #endif
  156. #pragma info( restore )
  157. #endif
  158.  
  159.