// cstring standard header #ifndef _CSTRING_ #define _CSTRING_ #include #ifdef _STD_USING #undef _STD_USING #define _CPP_STYLE_HEADER /* for __TI_COMPILER_VERSION__ */ #include #define _STD_USING #undef _CPP_STYLE_HEADER /* for __TI_COMPILER_VERSION__ */ #else /* _STD_USING */ #include #if defined(__BORLANDC__) /* compiler test */ _STD_BEGIN inline void * memchr(void *_Str, int _Ch, size_t _Size) { /* find first occurrence of c in s[n] */ const unsigned char _Uch = _Ch; const unsigned char *_Ustr = (const unsigned char *)_Str; for (; 0 < _Size; ++_Ustr, --_Size) if (*_Ustr == _Uch) return ((void *)_Ustr); return (0); } inline const void * memchr(const void *_Str, int _Ch, size_t _Size) { /* find first occurrence of c in s[n] */ return (memchr((void *)_Str, _Ch, _Size)); } _STD_END #endif /* defined(__BORLANDC__) */ #ifdef _GLOBAL_USING _STD_BEGIN #if defined(__BORLANDC__) /* compiler test */ using _CSTD size_t; using _CSTD memcmp; #else /* defined(__BORLANDC__) */ using _CSTD size_t; using _CSTD memchr; using _CSTD memcmp; #endif /* defined(__BORLANDC__) */ using _CSTD memcpy; using _CSTD memmove; using _CSTD memset; using _CSTD strcat; using _CSTD strchr; using _CSTD strcmp; using _CSTD strcoll; using _CSTD strcpy; using _CSTD strcspn; using _CSTD strerror; using _CSTD strlen; using _CSTD strncat; using _CSTD strncmp; using _CSTD strncpy; using _CSTD strpbrk; using _CSTD strrchr; using _CSTD strspn; using _CSTD strstr; using _CSTD strtok; using _CSTD strxfrm; _STD_END #endif /* _GLOBAL_USING */ #endif /* _STD_USING */ #endif /* _CSTRING_ */ /* * Copyright (c) 1992-2004 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. V4.02:1476 */