--- mstools/h/string.h 2018/08/09 18:20:01 1.1 +++ mstools/h/string.h 2018/08/09 18:20:28 1.1.1.2 @@ -1,7 +1,7 @@ /*** *string.h - declarations for string manipulation functions * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. * *Purpose: * This file contains the function declarations for the string @@ -17,9 +17,11 @@ extern "C" { #endif +#ifndef MIPS #if (_MSC_VER <= 600) #define __cdecl _cdecl #endif +#endif #ifndef _SIZE_T_DEFINED typedef unsigned int size_t; @@ -57,8 +59,13 @@ char * strcat(char *, const char *); char * strchr(const char *, int); int strcmp(const char *, const char *); int _strcmpi(const char *, const char *); -int strcoll(const char *, const char *); int _stricmp(const char *, const char *); +int strcoll(const char *, const char *); +#ifdef _MAC_ +char * _c2pstr(const char *); +char * _p2cstr(const char *); +#endif +int _stricoll(const char *, const char *); char * strcpy(char *, const char *); size_t strcspn(const char *, const char *); char * _strdup(const char *); @@ -81,6 +88,40 @@ char * strtok(char *, const char *); char * _strupr(char *); size_t strxfrm (char *, const char *, size_t); +#ifndef _WSTRING_DEFINED +wchar_t * wcscat(wchar_t *, const wchar_t *); +wchar_t * wcschr(const wchar_t *, wchar_t); +int wcscmp(const wchar_t *, const wchar_t *); +wchar_t * wcscpy(wchar_t *, const wchar_t *); +size_t wcscspn(const wchar_t *, const wchar_t *); +size_t wcslen(const wchar_t *); +wchar_t * wcsncat(wchar_t *, const wchar_t *, size_t); +int wcsncmp(const wchar_t *, const wchar_t *, size_t); +wchar_t * wcsncpy(wchar_t *, const wchar_t *, size_t); +wchar_t * wcspbrk(const wchar_t *, const wchar_t *); +wchar_t * wcsrchr(const wchar_t *, wchar_t); +size_t wcsspn(const wchar_t *, const wchar_t *); +wchar_t * wcsstr(const wchar_t *, const wchar_t *); + +wchar_t * _wcsdup(const wchar_t *); +int _wcsicmp(const wchar_t *, const wchar_t *); +int _wcsnicmp(const wchar_t *, const wchar_t *, size_t); +wchar_t * _wcsnset(wchar_t *, wchar_t, size_t); +wchar_t * _wcsrev(wchar_t *); +wchar_t * _wcsset(wchar_t *, wchar_t); + +wchar_t * _wcslwr(wchar_t *); +wchar_t * _wcsupr(wchar_t *); +size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); +int wcscoll(const wchar_t *, const wchar_t *); +int _wcsicoll(const wchar_t *, const wchar_t *); + +// old names +#define wcswcs wcsstr + +#define _WSTRING_DEFINED +#endif + #if !__STDC__ /* Non-ANSI names for compatibility */ #define memccpy _memccpy @@ -94,7 +135,23 @@ size_t strxfrm (char *, const char *, si #define strrev _strrev #define strset _strset #define strupr _strupr -#endif +#define stricoll _stricoll + +#ifdef _MAC_ +#define c2pstr _c2pstr +#define p2cstr _p2cstr +#endif + +#define wcsdup _wcsdup +#define wcsicmp _wcsicmp +#define wcsnicmp _wcsnicmp +#define wcsnset _wcsnset +#define wcsrev _wcsrev +#define wcsset _wcsset +#define wcslwr _wcslwr +#define wcsupr _wcsupr +#define wcsicoll _wcsicoll +#endif /* !__STDC__ */ #ifdef __cplusplus }