2001-04-11 01:21:43 +02:00
|
|
|
/*
|
|
|
|
* String definitions
|
|
|
|
*
|
|
|
|
* Derived from the mingw header written by Colin Peters.
|
|
|
|
* Modified for Wine use by Jon Griffiths and Francois Gouget.
|
|
|
|
* This file is in the public domain.
|
|
|
|
*/
|
|
|
|
#ifndef __WINE_STRING_H
|
|
|
|
#define __WINE_STRING_H
|
2003-07-19 00:57:15 +02:00
|
|
|
#ifndef __WINE_USE_MSVCRT
|
2001-10-22 20:59:23 +02:00
|
|
|
#define __WINE_USE_MSVCRT
|
2003-07-19 00:57:15 +02:00
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _WCHAR_T_DEFINED
|
|
|
|
#define _WCHAR_T_DEFINED
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef __cplusplus
|
2004-06-25 03:19:15 +02:00
|
|
|
typedef unsigned short wchar_t;
|
2002-12-18 21:17:20 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2006-10-16 21:29:23 +02:00
|
|
|
#if defined(__x86_64__) && !defined(_WIN64)
|
|
|
|
#define _WIN64
|
2006-06-30 21:37:39 +02:00
|
|
|
#endif
|
|
|
|
|
2007-06-06 13:12:57 +02:00
|
|
|
#if !defined(_MSC_VER) && !defined(__int64)
|
|
|
|
# ifdef _WIN64
|
|
|
|
# define __int64 long
|
|
|
|
# else
|
|
|
|
# define __int64 long long
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _SIZE_T_DEFINED
|
2006-06-30 21:37:39 +02:00
|
|
|
#ifdef _WIN64
|
|
|
|
typedef unsigned __int64 size_t;
|
|
|
|
#else
|
2004-06-25 03:19:15 +02:00
|
|
|
typedef unsigned int size_t;
|
2006-06-30 21:37:39 +02:00
|
|
|
#endif
|
2004-06-25 03:19:15 +02:00
|
|
|
#define _SIZE_T_DEFINED
|
2001-04-11 01:21:43 +02:00
|
|
|
#endif
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _NLSCMP_DEFINED
|
2002-12-18 21:17:20 +01:00
|
|
|
#define _NLSCMPERROR ((unsigned int)0x7fffffff)
|
2004-06-25 03:19:15 +02:00
|
|
|
#define _NLSCMP_DEFINED
|
2002-12-18 21:17:20 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define NULL 0
|
|
|
|
#else
|
|
|
|
#define NULL ((void *)0)
|
|
|
|
#endif
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-03-16 20:17:11 +01:00
|
|
|
void* _memccpy(void*,const void*,int,unsigned int);
|
|
|
|
int _memicmp(const void*,const void*,unsigned int);
|
2001-04-11 01:21:43 +02:00
|
|
|
int _strcmpi(const char*,const char*);
|
|
|
|
char* _strdup(const char*);
|
2001-07-18 23:04:23 +02:00
|
|
|
char* _strerror(const char*);
|
2001-04-11 01:21:43 +02:00
|
|
|
int _stricmp(const char*,const char*);
|
|
|
|
int _stricoll(const char*,const char*);
|
|
|
|
char* _strlwr(char*);
|
2004-06-25 03:19:15 +02:00
|
|
|
int _strnicmp(const char*,const char*,size_t);
|
|
|
|
char* _strnset(char*,int,size_t);
|
2001-04-11 01:21:43 +02:00
|
|
|
char* _strrev(char*);
|
|
|
|
char* _strset(char*,int);
|
|
|
|
char* _strupr(char*);
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
void* memchr(const void*,int,size_t);
|
|
|
|
int memcmp(const void*,const void*,size_t);
|
|
|
|
void* memcpy(void*,const void*,size_t);
|
|
|
|
void* memmove(void*,const void*,size_t);
|
|
|
|
void* memset(void*,int,size_t);
|
|
|
|
char* strcat(char*,const char*);
|
|
|
|
char* strchr(const char*,int);
|
|
|
|
int strcmp(const char*,const char*);
|
|
|
|
int strcoll(const char*,const char*);
|
|
|
|
char* strcpy(char*,const char*);
|
|
|
|
size_t strcspn(const char*,const char*);
|
|
|
|
char* strerror(int);
|
|
|
|
size_t strlen(const char*);
|
|
|
|
char* strncat(char*,const char*,size_t);
|
|
|
|
int strncmp(const char*,const char*,size_t);
|
|
|
|
char* strncpy(char*,const char*,size_t);
|
|
|
|
char* strpbrk(const char*,const char*);
|
|
|
|
char* strrchr(const char*,int);
|
|
|
|
size_t strspn(const char*,const char*);
|
|
|
|
char* strstr(const char*,const char*);
|
|
|
|
char* strtok(char*,const char*);
|
|
|
|
size_t strxfrm(char*,const char*,size_t);
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _WSTRING_DEFINED
|
|
|
|
#define _WSTRING_DEFINED
|
|
|
|
wchar_t*_wcsdup(const wchar_t*);
|
|
|
|
int _wcsicmp(const wchar_t*,const wchar_t*);
|
|
|
|
int _wcsicoll(const wchar_t*,const wchar_t*);
|
|
|
|
wchar_t*_wcslwr(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*_wcsupr(wchar_t*);
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
wchar_t*wcscat(wchar_t*,const wchar_t*);
|
|
|
|
wchar_t*wcschr(const wchar_t*,wchar_t);
|
|
|
|
int wcscmp(const wchar_t*,const wchar_t*);
|
|
|
|
int wcscoll(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 wcFor);
|
|
|
|
size_t wcsspn(const wchar_t*,const wchar_t*);
|
|
|
|
wchar_t*wcsstr(const wchar_t*,const wchar_t*);
|
|
|
|
wchar_t*wcstok(wchar_t*,const wchar_t*);
|
|
|
|
size_t wcsxfrm(wchar_t*,const wchar_t*,size_t);
|
|
|
|
#endif /* _WSTRING_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); }
|
|
|
|
static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); }
|
2003-03-22 22:15:41 +01:00
|
|
|
static inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
|
|
|
|
static inline int strcmpi(const char* s1, const char* s2) { return _strcmpi(s1, s2); }
|
|
|
|
static inline char* strdup(const char* buf) { return _strdup(buf); }
|
|
|
|
static inline int stricmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
|
|
|
|
static inline int stricoll(const char* s1, const char* s2) { return _stricoll(s1, s2); }
|
|
|
|
static inline char* strlwr(char* str) { return _strlwr(str); }
|
|
|
|
static inline int strncasecmp(const char *str1, const char *str2, size_t n) { return _strnicmp(str1, str2, n); }
|
2004-06-25 03:19:15 +02:00
|
|
|
static inline int strnicmp(const char* s1, const char* s2, size_t n) { return _strnicmp(s1, s2, n); }
|
2003-03-22 22:15:41 +01:00
|
|
|
static inline char* strnset(char* str, int value, unsigned int len) { return _strnset(str, value, len); }
|
|
|
|
static inline char* strrev(char* str) { return _strrev(str); }
|
|
|
|
static inline char* strset(char* str, int value) { return _strset(str, value); }
|
|
|
|
static inline char* strupr(char* str) { return _strupr(str); }
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
static inline wchar_t* wcsdup(const wchar_t* str) { return _wcsdup(str); }
|
|
|
|
static inline int wcsicoll(const wchar_t* str1, const wchar_t* str2) { return _wcsicoll(str1, str2); }
|
|
|
|
static inline wchar_t* wcslwr(wchar_t* str) { return _wcslwr(str); }
|
|
|
|
static inline int wcsnicmp(const wchar_t* str1, const wchar_t* str2, size_t n) { return _wcsnicmp(str1, str2, n); }
|
|
|
|
static inline wchar_t* wcsnset(wchar_t* str, wchar_t c, size_t n) { return _wcsnset(str, c, n); }
|
|
|
|
static inline wchar_t* wcsrev(wchar_t* str) { return _wcsrev(str); }
|
|
|
|
static inline wchar_t* wcsset(wchar_t* str, wchar_t c) { return _wcsset(str, c); }
|
|
|
|
static inline wchar_t* wcsupr(wchar_t* str) { return _wcsupr(str); }
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#endif /* __WINE_STRING_H */
|