Commit 1f5a4a80 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Get rid of the now unused strndup/wstrndup functions.

parent 00c81e9d
...@@ -115,8 +115,6 @@ extern thread_data_t *msvcrt_get_thread_data(void); ...@@ -115,8 +115,6 @@ extern thread_data_t *msvcrt_get_thread_data(void);
extern int MSVCRT___lc_codepage; extern int MSVCRT___lc_codepage;
void msvcrt_set_errno(int); 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 _purecall(void);
void _amsg_exit(int errnum); void _amsg_exit(int errnum);
......
...@@ -30,23 +30,6 @@ ...@@ -30,23 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 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.@) * _mbsdup (MSVCRT.@)
* _strdup (MSVCRT.@) * _strdup (MSVCRT.@)
......
...@@ -30,23 +30,6 @@ ...@@ -30,23 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 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.@) * _wcsdup (MSVCRT.@)
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment