[2055] | 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 __string_h
|
---|
| 10 | #define __string_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 | #ifndef __size_t
|
---|
| 33 | #define __size_t
|
---|
| 34 | typedef unsigned int size_t;
|
---|
| 35 | #endif
|
---|
| 36 |
|
---|
| 37 | #ifndef NULL
|
---|
| 38 | #if (defined(__EXTENDED__) || defined( __cplusplus ))
|
---|
| 39 | #define NULL 0
|
---|
| 40 | #else
|
---|
| 41 | #define NULL ((void *)0)
|
---|
| 42 | #endif
|
---|
| 43 | #endif
|
---|
| 44 |
|
---|
| 45 | #ifdef _M_I386
|
---|
| 46 | char * _Builtin __strcat( char *, const char * );
|
---|
| 47 | char * _Builtin __strchr( const char *, int );
|
---|
| 48 | int _Builtin __strcmp( const char *, const char * );
|
---|
| 49 | char * _Builtin __strcpy( char*, const char * );
|
---|
| 50 | size_t _Builtin __strlen( const char * );
|
---|
| 51 | char * _Builtin __strncat( char *, const char *, size_t );
|
---|
| 52 | int _Builtin __strncmp( const char *, const char *, size_t );
|
---|
| 53 | char * _LNK_CONV __strncpy( char *, const char *, size_t );
|
---|
| 54 | char * _Builtin __strrchr( const char *, int );
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 | int _IMPORT _LNK_CONV strcoll( const char *, const char * );
|
---|
| 58 | size_t _IMPORT _LNK_CONV strcspn( const char *, const char * );
|
---|
| 59 | char * _IMPORT _LNK_CONV strerror( int );
|
---|
| 60 | char * _IMPORT _LNK_CONV strpbrk( const char *, const char * );
|
---|
| 61 | size_t _IMPORT _LNK_CONV strspn( const char *, const char * );
|
---|
| 62 | char * _IMPORT _LNK_CONV strstr( const char *, const char * );
|
---|
| 63 | char * _IMPORT _LNK_CONV strtok( char*, const char * );
|
---|
| 64 | size_t _IMPORT _LNK_CONV strxfrm( char *, const char *, size_t );
|
---|
| 65 |
|
---|
| 66 | #ifdef _M_I386
|
---|
| 67 | #ifdef __cplusplus
|
---|
| 68 | inline char * _LNK_CONV strcat( char * s1, const char * s2 )
|
---|
| 69 | { return __strcat( s1, s2 ); }
|
---|
| 70 | inline char * _LNK_CONV strchr( const char * s, int ch )
|
---|
| 71 | { return __strchr( s, ch ); }
|
---|
| 72 | inline int _LNK_CONV strcmp( const char * s1, const char * s2 )
|
---|
| 73 | { return __strcmp( s1, s2 ); }
|
---|
| 74 | inline char * _LNK_CONV strcpy( char * s1, const char * s2 )
|
---|
| 75 | { return __strcpy( s1, s2 ); }
|
---|
| 76 | inline size_t _LNK_CONV strlen( const char * s )
|
---|
| 77 | { return __strlen( s ); }
|
---|
| 78 | inline char * _LNK_CONV strncat( char * s1, const char * s2, size_t len )
|
---|
| 79 | { return __strncat( s1, s2, len ); }
|
---|
| 80 | inline int _LNK_CONV strncmp( const char * s1, const char * s2, size_t len )
|
---|
| 81 | { return __strncmp( s1, s2, len ); }
|
---|
| 82 | inline char * _LNK_CONV strncpy( char * s1, const char * s2, size_t len )
|
---|
| 83 | { return __strncpy( s1, s2, len ); }
|
---|
| 84 | inline char * _LNK_CONV strrchr( const char * s1, int ch )
|
---|
| 85 | { return __strrchr( s1, ch ); }
|
---|
| 86 | #else
|
---|
| 87 | char * _IMPORT _LNK_CONV strcat( char *, const char * );
|
---|
| 88 | char * _IMPORT _LNK_CONV strchr( const char *, int );
|
---|
| 89 | int _IMPORT _LNK_CONV strcmp( const char *, const char * );
|
---|
| 90 | char * _IMPORT _LNK_CONV strcpy( char *, const char * );
|
---|
| 91 | size_t _IMPORT _LNK_CONV strlen( const char * );
|
---|
| 92 | char * _IMPORT _LNK_CONV strncat( char *, const char *, size_t );
|
---|
| 93 | int _IMPORT _LNK_CONV strncmp( const char *, const char *, size_t );
|
---|
| 94 | char * _IMPORT _LNK_CONV strncpy( char *, const char *, size_t );
|
---|
| 95 | char * _IMPORT _LNK_CONV strrchr( const char *, int );
|
---|
| 96 |
|
---|
| 97 | #pragma info( none )
|
---|
| 98 | #define strcat( x, y ) __strcat( (x), (y) )
|
---|
| 99 | #define strchr( x, y ) __strchr( (x), (y) )
|
---|
| 100 | #define strcmp( x, y ) __strcmp( (x), (y) )
|
---|
| 101 | #define strcpy( x, y ) __strcpy( (x), (y) )
|
---|
| 102 | #define strlen( x ) __strlen( (x) )
|
---|
| 103 | #define strncat( x, y, z ) __strncat( (x), (y), (z) )
|
---|
| 104 | #define strncmp( x, y, z ) __strncmp( (x), (y), (z) )
|
---|
| 105 | #define strncpy( x, y, z ) __strncpy( (x), (y), (z) )
|
---|
| 106 | #define strrchr( x, y ) __strrchr( (x), (y) )
|
---|
| 107 | #pragma info( restore )
|
---|
| 108 | #endif
|
---|
| 109 | #endif
|
---|
| 110 |
|
---|
| 111 | #ifdef __THW_PPC__
|
---|
| 112 | char * strcat( char *, const char * );
|
---|
| 113 | char * strchr( const char *, int );
|
---|
| 114 | int strcmp( const char *, const char * );
|
---|
| 115 | char * strcpy( char *, const char * );
|
---|
| 116 | size_t strlen( const char * );
|
---|
| 117 | char * strncat( char *, const char *, size_t );
|
---|
| 118 | int strncmp( const char *, const char *, size_t );
|
---|
| 119 | char * strncpy( char *, const char *, size_t );
|
---|
| 120 | char * strrchr( const char *, int );
|
---|
| 121 | #endif
|
---|
| 122 |
|
---|
| 123 | #ifndef __memory_h
|
---|
| 124 | #define __memory_h
|
---|
| 125 |
|
---|
| 126 | #ifdef _M_I386
|
---|
| 127 | void * _Builtin __memcpy( void *, const void *, size_t );
|
---|
| 128 | void * _Builtin __memchr( const void *, int, size_t );
|
---|
| 129 | int _Builtin __memcmp( const void *, const void *, size_t );
|
---|
| 130 | void * _Builtin __memset( void *, int, size_t );
|
---|
| 131 | void * _Builtin __memmove( void *, const void *, size_t );
|
---|
| 132 | #endif
|
---|
| 133 |
|
---|
| 134 | #ifdef _M_I386
|
---|
| 135 | #ifdef __cplusplus
|
---|
| 136 | inline void * _LNK_CONV memcpy( void * m1, const void * m2, size_t len )
|
---|
| 137 | { return __memcpy( m1, m2, len ); }
|
---|
| 138 | inline void * _LNK_CONV memchr( const void * m, int ch, size_t len )
|
---|
| 139 | { return __memchr( m, ch, len ); }
|
---|
| 140 | inline int _LNK_CONV memcmp( const void * m1, const void * m2, size_t len )
|
---|
| 141 | { return __memcmp( m1, m2, len ); }
|
---|
| 142 | inline void * _LNK_CONV memset( void * m, int ch, size_t len )
|
---|
| 143 | { return __memset( m, ch, len ); }
|
---|
| 144 | inline void * _LNK_CONV memmove( void * m1, const void * m2, size_t len )
|
---|
| 145 | { return __memmove( m1, m2, len ); }
|
---|
| 146 | #else
|
---|
| 147 | void * _IMPORT _LNK_CONV memcpy( void *, const void *, size_t );
|
---|
| 148 | void * _IMPORT _LNK_CONV memchr( const void *, int, size_t );
|
---|
| 149 | int _IMPORT _LNK_CONV memcmp( const void *, const void *, size_t );
|
---|
| 150 | void * _IMPORT _LNK_CONV memset( void *, int, size_t );
|
---|
| 151 | void * _IMPORT _LNK_CONV memmove( void *, const void *, size_t );
|
---|
| 152 |
|
---|
| 153 | #pragma info( none )
|
---|
| 154 | #define memcpy( x, y, z ) __memcpy( (x), (y), (z) )
|
---|
| 155 | #define memchr( x, y, z ) __memchr( (x), (y), (z) )
|
---|
| 156 | #define memcmp( x, y, z ) __memcmp( (x), (y), (z) )
|
---|
| 157 | #define memset( x, y, z ) __memset( (x), (y), (z) )
|
---|
| 158 | #define memmove( x, y, z ) __memmove( (x), (y), (z) )
|
---|
| 159 | #pragma info( restore )
|
---|
| 160 | #endif
|
---|
| 161 | #endif
|
---|
| 162 |
|
---|
| 163 | #ifdef __THW_PPC__
|
---|
| 164 | void * memcpy( void *, const void *, size_t );
|
---|
| 165 | void * memchr( const void *, int, size_t );
|
---|
| 166 | int memcmp( const void *, const void *, size_t );
|
---|
| 167 | void * memset( void *, int, size_t );
|
---|
| 168 | void * memmove( void *, const void *, size_t );
|
---|
| 169 | #endif
|
---|
| 170 |
|
---|
| 171 | #if defined( __EXTENDED__ )
|
---|
| 172 |
|
---|
| 173 | void * _IMPORT _LNK_CONV memccpy( void *, void *, int, unsigned int );
|
---|
| 174 | int _IMPORT _LNK_CONV memicmp( void *, void *, unsigned int );
|
---|
| 175 |
|
---|
| 176 | #define _fmemcpy( x, y, z ) memcpy( (x), (y), (z) )
|
---|
| 177 | #define _fmemchr( x, y, z ) memchr( (x), (y), (z) )
|
---|
| 178 | #define _fmemcmp( x, y, z ) memcmp( (x), (y), (z) )
|
---|
| 179 | #define _fmemset( x, y, z ) memset( (x), (y), (z) )
|
---|
| 180 | #define _fmemccpy( w, x, y, z ) memccpy( (w), (x), (y), (z) )
|
---|
| 181 | #define _fmemicmp( x, y, z ) memicmp( (x), (y), (z) )
|
---|
| 182 |
|
---|
| 183 | #endif
|
---|
| 184 |
|
---|
| 185 | #endif
|
---|
| 186 |
|
---|
| 187 | #if (defined(__EXTENDED__) || defined(__MW_EXT_ANSI__))
|
---|
| 188 |
|
---|
| 189 | char * _IMPORT _LNK_CONV strdup( const char * );
|
---|
| 190 | int _IMPORT _LNK_CONV stricmp( const char *, const char * );
|
---|
| 191 | char * _IMPORT _LNK_CONV strlwr( char * );
|
---|
| 192 | int _IMPORT _LNK_CONV strnicmp( const char *, const char *, size_t );
|
---|
| 193 | char * _IMPORT _LNK_CONV strupr( char * );
|
---|
| 194 |
|
---|
| 195 | int _IMPORT _LNK_CONV strcmpi( const char *, const char * );
|
---|
| 196 | char * _IMPORT _LNK_CONV strrev( char * );
|
---|
| 197 | char * _IMPORT _LNK_CONV strset( char *, int );
|
---|
| 198 | char * _IMPORT _LNK_CONV strnset( char *, int, size_t );
|
---|
| 199 | char * _IMPORT _LNK_CONV _strerror( char * );
|
---|
| 200 |
|
---|
| 201 | #define _fmemmove( x, y, z ) memmove( (x), (y), (z) )
|
---|
| 202 | #define _fstrcat( x, y ) strcat( (x), (y) )
|
---|
| 203 | #define _fstrchr( x, y ) strchr( (x), (y) )
|
---|
| 204 | #define _fstrcmp( x, y ) strcmp( (x), (y) )
|
---|
| 205 | #define _fstrcpy( x, y ) strcpy( (x), (y) )
|
---|
| 206 | #define _fstrlen( x ) strlen( (x) )
|
---|
| 207 | #define _fstrncat( x, y, z ) strncat( (x), (y), (z) )
|
---|
| 208 | #define _fstrncmp( x, y, z ) strncmp( (x), (y), (z) )
|
---|
| 209 | #define _fstrncpy( x, y, z ) strncpy( (x), (y), (z) )
|
---|
| 210 | #define _fstrrchr( x, y ) strrchr( (x), (y) )
|
---|
| 211 |
|
---|
| 212 | size_t _IMPORT _LNK_CONV _fstrcspn( const char *, const char * );
|
---|
| 213 | char * _IMPORT _LNK_CONV _fstrdup( const char * );
|
---|
| 214 | char * _IMPORT _LNK_CONV _nstrdup( const char * );
|
---|
| 215 | int _IMPORT _LNK_CONV _fstricmp( const char *, const char * );
|
---|
| 216 | char * _IMPORT _LNK_CONV _fstrlwr( char * );
|
---|
| 217 | int _IMPORT _LNK_CONV _fstrnicmp( const char *, const char *, size_t );
|
---|
| 218 | char * _IMPORT _LNK_CONV _fstrnset( char *, int, size_t );
|
---|
| 219 | char * _IMPORT _LNK_CONV _fstrpbrk( const char *, const char * );
|
---|
| 220 | char * _IMPORT _LNK_CONV _fstrrev( char * );
|
---|
| 221 | char * _IMPORT _LNK_CONV _fstrset( char *, int );
|
---|
| 222 | size_t _IMPORT _LNK_CONV _fstrspn( const char *, const char * );
|
---|
| 223 | char * _IMPORT _LNK_CONV _fstrstr( const char *, const char * );
|
---|
| 224 | char * _IMPORT _LNK_CONV _fstrtok( char*, const char * );
|
---|
| 225 | char * _IMPORT _LNK_CONV _fstrupr( char * );
|
---|
| 226 |
|
---|
| 227 | #if (defined(__IBMC__) || defined(__IBMCPP__))
|
---|
| 228 | #pragma map( _fstrcspn , "strcspn" )
|
---|
| 229 | #pragma map( _fstrdup , "strdup" )
|
---|
| 230 | #pragma map( _nstrdup , "strdup" )
|
---|
| 231 | #pragma map( _fstricmp , "stricmp" )
|
---|
| 232 | #pragma map( _fstrlwr , "strlwr" )
|
---|
| 233 | #pragma map( _fstrnicmp, "strnicmp" )
|
---|
| 234 | #pragma map( _fstrnset , "strnset" )
|
---|
| 235 | #pragma map( _fstrpbrk , "strpbrk" )
|
---|
| 236 | #pragma map( _fstrrev , "strrev" )
|
---|
| 237 | #pragma map( _fstrset , "strset" )
|
---|
| 238 | #pragma map( _fstrspn , "strspn" )
|
---|
| 239 | #pragma map( _fstrstr , "strstr" )
|
---|
| 240 | #pragma map( _fstrtok , "strtok" )
|
---|
| 241 | #pragma map( _fstrupr , "strupr" )
|
---|
| 242 | #else
|
---|
| 243 | #pragma Alias( _fstrcspn , "strcspn" )
|
---|
| 244 | #pragma Alias( _fstrdup , "strdup" )
|
---|
| 245 | #pragma Alias( _nstrdup , "strdup" )
|
---|
| 246 | #pragma Alias( _fstricmp , "stricmp" )
|
---|
| 247 | #pragma Alias( _fstrlwr , "strlwr" )
|
---|
| 248 | #pragma Alias( _fstrnicmp, "strnicmp" )
|
---|
| 249 | #pragma Alias( _fstrnset , "strnset" )
|
---|
| 250 | #pragma Alias( _fstrpbrk , "strpbrk" )
|
---|
| 251 | #pragma Alias( _fstrrev , "strrev" )
|
---|
| 252 | #pragma Alias( _fstrset , "strset" )
|
---|
| 253 | #pragma Alias( _fstrspn , "strspn" )
|
---|
| 254 | #pragma Alias( _fstrstr , "strstr" )
|
---|
| 255 | #pragma Alias( _fstrtok , "strtok" )
|
---|
| 256 | #pragma Alias( _fstrupr , "strupr" )
|
---|
| 257 | #endif
|
---|
| 258 |
|
---|
| 259 | #endif
|
---|
| 260 |
|
---|
| 261 | #ifdef __cplusplus
|
---|
| 262 | }
|
---|
| 263 | #endif
|
---|
| 264 |
|
---|
| 265 | #endif
|
---|
| 266 |
|
---|
| 267 | #if (defined(__IBMC__) || defined(__IBMCPP__))
|
---|
| 268 | #pragma info( none )
|
---|
| 269 | #ifndef __CHKHDR__
|
---|
| 270 | #pragma info( restore )
|
---|
| 271 | #endif
|
---|
| 272 | #pragma info( restore )
|
---|
| 273 | #endif
|
---|