kernel32: Remove string.c.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-05-26 14:57:31 +02:00
parent f41e205dfc
commit c7760ce7a2
3 changed files with 79 additions and 114 deletions

View File

@ -24,7 +24,6 @@ C_SRCS = \
process.c \
profile.c \
resource.c \
string.c \
sync.c \
tape.c \
term.c \

View File

@ -1,113 +0,0 @@
/*
* Kernel string functions
*
* Copyright 1993 Yngvi Sigurjonsson
* Copyright 1996 Alexandre Julliard
* Copyright 2001 Dmitry Timoshkov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#define WINE_NO_INLINE_STRING
#include "windef.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "wine/exception.h"
/***********************************************************************
* lstrcatA (KERNEL32.@)
* lstrcat (KERNEL32.@)
*/
LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src )
{
__TRY
{
strcat( dst, src );
}
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcatW (KERNEL32.@)
*/
LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcatW( dst, src );
}
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcpyA (KERNEL32.@)
* lstrcpy (KERNEL32.@)
*/
LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
{
__TRY
{
/* this is how Windows does it */
memmove( dst, src, strlen(src)+1 );
}
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcpyW (KERNEL32.@)
*/
LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcpyW( dst, src );
}
__EXCEPT_PAGE_FAULT
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}

View File

@ -30,6 +30,7 @@
# include <unistd.h>
#endif
#define WINE_NO_INLINE_STRING
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
@ -40,6 +41,7 @@
#include "winerror.h"
#include "psapi.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "kernel_private.h"
@ -256,3 +258,80 @@ BOOL WINAPI IsBadStringPtrW( LPCWSTR str, UINT_PTR max )
__ENDTRY
return FALSE;
}
/***********************************************************************
* lstrcatA (KERNEL32.@)
* lstrcat (KERNEL32.@)
*/
LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src )
{
__TRY
{
strcat( dst, src );
}
__EXCEPT( badptr_handler )
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcatW (KERNEL32.@)
*/
LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcatW( dst, src );
}
__EXCEPT( badptr_handler )
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcpyA (KERNEL32.@)
* lstrcpy (KERNEL32.@)
*/
LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
{
__TRY
{
/* this is how Windows does it */
memmove( dst, src, strlen(src)+1 );
}
__EXCEPT( badptr_handler )
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}
/***********************************************************************
* lstrcpyW (KERNEL32.@)
*/
LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcpyW( dst, src );
}
__EXCEPT( badptr_handler )
{
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}
__ENDTRY
return dst;
}