mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 20:23:38 +00:00
msvcrt: Get rid of the now unused strndup/wstrndup functions.
This commit is contained in:
parent
00c81e9d9f
commit
1f5a4a8046
|
@ -115,8 +115,6 @@ extern thread_data_t *msvcrt_get_thread_data(void);
|
|||
extern int MSVCRT___lc_codepage;
|
||||
|
||||
void msvcrt_set_errno(int);
|
||||
char* msvcrt_strndup(const char*,unsigned int);
|
||||
MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int);
|
||||
|
||||
void _purecall(void);
|
||||
void _amsg_exit(int errnum);
|
||||
|
|
|
@ -30,23 +30,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
/* INTERNAL: MSVCRT_malloc() based strndup */
|
||||
char* msvcrt_strndup(const char* buf, unsigned int size)
|
||||
{
|
||||
char* ret;
|
||||
unsigned int len = strlen(buf), max_len;
|
||||
|
||||
max_len = size <= len? size : len + 1;
|
||||
|
||||
ret = MSVCRT_malloc(max_len);
|
||||
if (ret)
|
||||
{
|
||||
memcpy(ret,buf,max_len);
|
||||
ret[max_len] = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbsdup (MSVCRT.@)
|
||||
* _strdup (MSVCRT.@)
|
||||
|
|
|
@ -30,23 +30,6 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
|
||||
/* INTERNAL: MSVCRT_malloc() based wstrndup */
|
||||
MSVCRT_wchar_t* msvcrt_wstrndup(const MSVCRT_wchar_t *buf, unsigned int size)
|
||||
{
|
||||
MSVCRT_wchar_t* ret;
|
||||
unsigned int len = strlenW(buf), max_len;
|
||||
|
||||
max_len = size <= len? size : len + 1;
|
||||
|
||||
ret = MSVCRT_malloc(max_len * sizeof (MSVCRT_wchar_t));
|
||||
if (ret)
|
||||
{
|
||||
memcpy(ret,buf,max_len * sizeof (MSVCRT_wchar_t));
|
||||
ret[max_len] = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _wcsdup (MSVCRT.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue