home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / incla / string.h__ / STRING.H
Encoding:
C/C++ Source or Header  |  1992-09-30  |  7.4 KB  |  186 lines

  1. #ifndef __string_h
  2.    #define __string_h
  3.  
  4.    #pragma info( none )
  5.    #ifndef __CHKHDR__
  6.       #pragma info( none )
  7.    #endif
  8.    #pragma info( restore )
  9.  
  10.    #ifdef __cplusplus
  11.       extern "C" {
  12.    #endif
  13.  
  14.    /********************************************************************/
  15.    /*  <string.h> header file                                          */
  16.    /*                                                                  */
  17.    /*  Licensed Materials - Property of IBM                            */
  18.    /*                                                                  */
  19.    /*  IBM C Set/2 Beta Version                                        */
  20.    /*  Copyright (C) International Business Machines Corp., 1991,1992  */
  21.    /*  All rights reserved                                             */
  22.    /*                                                                  */
  23.    /*  US Government Users Restricted Rights -                         */
  24.    /*  Use, duplication, or disclosure restricted                      */
  25.    /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  26.    /*                                                                  */
  27.    /********************************************************************/
  28.  
  29.    #ifndef __size_t
  30.       #define __size_t
  31.       typedef unsigned int size_t;
  32.    #endif
  33.  
  34.    #ifndef NULL
  35.       #if (defined(__EXTENDED__)  || defined( __cplusplus ))
  36.          #define NULL 0
  37.       #else
  38.          #define NULL ((void *)0)
  39.       #endif
  40.    #endif
  41.  
  42.    char * _Builtin __strcat( char *, const char * );
  43.    char * _Builtin __strchr( const char *, int );
  44.    int    _Builtin __strcmp( const char *, const char * );
  45.    char * _Builtin __strcpy( char*, const char * );
  46.    size_t _Builtin __strlen( const char * );
  47.    char * _Builtin __strncat( char *, const char *, size_t );
  48.    int    _Builtin __strncmp( const char *, const char *, size_t );
  49.    char * _Builtin __strncpy( char *, const char *, size_t );
  50.    char * _Builtin __strrchr( const char *, int );
  51.    char * _Optlink strcat( char *, const char * );
  52.    char * _Optlink strchr( const char *, int );
  53.    int    _Optlink strcmp( const char *, const char * );
  54.    char * _Optlink strcpy( char*, const char * );
  55.    size_t _Optlink strlen( const char * );
  56.    char * _Optlink strncat( char *, const char *, size_t );
  57.    int    _Optlink strncmp( const char *, const char *, size_t );
  58.    char * _Optlink strncpy( char *, const char *, size_t );
  59.    char * _Optlink strrchr( const char *, int );
  60.    int    _Optlink strcoll( const char *, const char * );
  61.    size_t _Optlink strcspn( const char *, const char * );
  62.    char * _Optlink strerror( int );
  63.    char * _Optlink strpbrk( const char *, const char * );
  64.    size_t _Optlink strspn( const char *, const char * );
  65.    char * _Optlink strstr( const char *, const char * );
  66.    char * _Optlink strtok( char*, const char * );
  67.    size_t _Optlink strxfrm( char *, const char *, size_t );
  68.  
  69.    #ifndef __cplusplus
  70.       #pragma info( none )
  71.       #define strcat( x, y )     __strcat( (x), (y) )
  72.       #define strchr( x, y )     __strchr( (x), (y) )
  73.       #define strcmp( x, y )     __strcmp( (x), (y) )
  74.       #define strcpy( x, y )     __strcpy( (x), (y) )
  75.       #define strlen( x )        __strlen( (x) )
  76.       #define strncat( x, y, z ) __strncat( (x), (y), (z) )
  77.       #define strncmp( x, y, z ) __strncmp( (x), (y), (z) )
  78.       #define strncpy( x, y, z ) __strncpy( (x), (y), (z) )
  79.       #define strrchr( x, y )    __strrchr( (x), (y) )
  80.       #pragma info( restore )
  81.    #endif
  82.  
  83.    #ifndef __memory_h
  84.       #define __memory_h
  85.  
  86.       /*
  87.        *   __memcpy is predeclared in the C++ compiler do not redeclare it
  88.        */
  89.  
  90.       #ifndef __cplusplus
  91.          void * _Builtin __memcpy( void *, const void *, size_t );
  92.       #endif
  93.  
  94.       void * _Builtin __memchr( const void *, int, size_t );
  95.       int    _Builtin __memcmp( const void *, const void *, size_t );
  96.       void * _Builtin __memset( void *, int, size_t );
  97.       void * _Builtin __memmove( void *, const void *, size_t );
  98.  
  99.       void * _Optlink memcpy( void *, const void *, size_t );
  100.       void * _Optlink memchr( const void *, int, size_t );
  101.       int    _Optlink memcmp( const void *, const void *, size_t );
  102.       void * _Optlink memset( void *, int, size_t );
  103.       void * _Optlink memmove( void *, const void *, size_t );
  104.  
  105.       #ifndef __cplusplus
  106.          #pragma info( none )
  107.          #define memcpy( x, y, z )  __memcpy( (x), (y), (z) )
  108.          #define memchr( x, y, z )  __memchr( (x), (y), (z) )
  109.          #define memcmp( x, y, z )  __memcmp( (x), (y), (z) )
  110.          #define memset( x, y, z )  __memset( (x), (y), (z) )
  111.          #define memmove( x, y, z ) __memmove( (x), (y), (z) )
  112.          #pragma info( restore )
  113.       #endif
  114.  
  115.       #if  defined( __EXTENDED__ )
  116.  
  117.          void * _Optlink memccpy( void *, void *, int, unsigned int );
  118.          int    _Optlink memicmp( void *, void *, unsigned int );
  119.  
  120.          #pragma info( none )
  121.          #define _fmemcpy( x, y, z )     memcpy( (x), (y), (z) )
  122.          #define _fmemchr( x, y, z )     memchr( (x), (y), (z) )
  123.          #define _fmemcmp( x, y, z )     memcmp( (x), (y), (z) )
  124.          #define _fmemset( x, y, z )     memset( (x), (y), (z) )
  125.          #define _fmemccpy( w, x, y, z ) memccpy( (w), (x), (y), (z) )
  126.          #define _fmemicmp( x, y, z )    memicmp( (x), (y), (z) )
  127.          #pragma info( restore )
  128.  
  129.       #endif
  130.  
  131.    #endif
  132.  
  133.    #if defined(__EXTENDED__)
  134.  
  135.       char * _Optlink strdup( const char * );
  136.       int    _Optlink stricmp( const char *, const char * );
  137.       char * _Optlink strlwr( char * );
  138.       int    _Optlink strnicmp( const char *, const char *, size_t );
  139.       char * _Optlink strupr( char * );
  140.  
  141.  
  142.       int    _Optlink strcmpi( const char *, const char * );
  143.       char * _Optlink strrev( char * );
  144.       char * _Optlink strset( char *, int );
  145.       char * _Optlink strnset( char *, int, size_t );
  146.       char * _Optlink _strerror( char * );
  147.  
  148.       #define _fmemmove( x, y, z )  memmove( (x), (y), (z) )
  149.       #define _fstrcmp( x, y )      strcmp( (x), (y) )
  150.       #define _fstrlen( x )         strlen( (x) )
  151.       #define _fstrcpy( x, y )      strcpy( (x), (y) )
  152.       #define _fstrcat( x, y )      strcat( (x), (y) )
  153.       #define _fstrchr( x, y )      strchr( (x), (y) )
  154.       #define _fstrrchr( x, y )     strrchr( (x), (y) )
  155.       #define _fstrstr( x, y )      strstr( (x), (y) )
  156.       #define _fstrspn( x, y )      strspn( (x), (y) )
  157.       #define _fstrtok( x, y )      strtok( (x), (y) )
  158.       #define _fstrset( x, y )      strset( (x), (y) )
  159.       #define _fstrlwr( x )         strlwr( (x) )
  160.       #define _fstrupr( x )         strupr( (x) )
  161.       #define _fstrdup( x )         strdup( (x) )
  162.       #define _fstrrev( x )         strrev( (x) )
  163.       #define _fstrncat( x, y, z )  strncat( (x), (y), (z) )
  164.       #define _fstrpbrk( x, y )     strpbrk( (x), (y) )
  165.       #define _fstrnset( x, y, z )  strnset( (x), (y), (z) )
  166.       #define _fstrncmp( x, y, z )  strncmp( (x), (y), (z) )
  167.       #define _fstrncpy( x, y, z )  strncpy( (x), (y), (z) )
  168.       #define _fstricmp( x, y )     stricmp( (x), (y) )
  169.       #define _fstrcspn( x, y )     strcspn( (x), (y) )
  170.       #define _fstrnicmp( x, y, z ) strnicmp( (x), (y), (z) )
  171.       #define _nstrdup( x )         strdup( (x) )
  172.  
  173.    #endif
  174.  
  175.    #ifdef __cplusplus
  176.       }
  177.    #endif
  178.  
  179.    #pragma info( none )
  180.    #ifndef __CHKHDR__
  181.       #pragma info( restore )
  182.    #endif
  183.    #pragma info( restore )
  184.  
  185. #endif
  186.