Release 960611
Tue Jun 11 15:20:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/break.c] [loader/signal.c]
Fixed breakpoints in 32-bit code.
* [include/windows.h]
Added many more Win32 versions of standard structures.
* [include/winreg.h] [misc/registry.c]
Moved private types into registry.c.
* [memory/string.c] (New file)
Moved most string functions from misc/lstr.c; added Win32 version
of all functions.
* [misc/wsprintf.c]
Implemented Win32 wsprintf functions.
* [objects/bitmap.c]
Implemented Win32 bitmap functions.
* [windows/dialog.c]
Don't set dialog procedure before the controls are created. This
avoids a crash in Winhelp.
Tue Jun 11 14:10:06 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/menu.c] [if1632/user.spec] [windows/message.c]
Replace PeekMessage with PeekMessage16.
* [if1632/kernel32.spec][misc/main.c]
GetVersion32,GetVersionEx32A,GetVersionEx32W: new functions.
MAIN_ParseVersion: new function, new command line option -winver.
GetVersion: modified to take command line argument into account.
* [if1632/kernel32.spec] [win32/process.c]
FreeLibrary32: new function.
TlsAlloc: initialize Tls to zero.
InterlockedIncrement,InterlockedDecrement,InterlockedExchange: new
functions.
* [if1632/kernel32.spec]
SetErrorMode,GetActiveWindow: new relays to existing functions.
* [if1632/kernel32.spec][win32/user32.c]
PeekMessage32A,PeekMessage32W: new functions.
* [include/struct32.h][include/windows.h]
Moved MSG32 to windows.h.
Renamed MSG to MSG16.
Modified prototypes to use MSG16
* [include/winbase.h]
OSVERSIONINFO32A,OSVERSIONINFO32W: new structures.
Sun Jun 9 20:53:30 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/Makefile.in] [loader/builtin.c]
version.dll,lz32.dll added.
* [include/lzexpand.h] [if1632/lz32.spec] [if1632/lzexpand.spec]
[misc/lzexpand.c]
lz32.dll added.
Modified to new function naming standard.
* [include/ver.h] [if1632/ver.spec] [if1632/version.spec] [misc/ver.c]
version.dll added (win32 version of ver.dll).
Modified to new function naming standard.
Use registry to look up a LOCALE langids too.
(VerInstallFile,VerFindFile still stubs)
Fri Jun 7 20:40:20 1996 Albrecht Kleine <kleine@ak.sax.de>
* [files/file.c]
Added a warning if GetTempFileName() gets a bad drive parameter.
* [misc/commdlg.c]
Changed file listbox color to gray in SaveFile dialog
(just like Windows does this).
1996-06-11 18:02:08 +02:00
|
|
|
/*
|
|
|
|
* String functions
|
|
|
|
*
|
|
|
|
* Copyright 1993 Yngvi Sigurjonsson
|
|
|
|
* Copyright 1996 Alexandre Julliard
|
|
|
|
*/
|
|
|
|
|
1996-07-05 19:14:13 +02:00
|
|
|
#define NO_TRANSITION_TYPES /* This file is Win32-clean */
|
Release 960611
Tue Jun 11 15:20:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/break.c] [loader/signal.c]
Fixed breakpoints in 32-bit code.
* [include/windows.h]
Added many more Win32 versions of standard structures.
* [include/winreg.h] [misc/registry.c]
Moved private types into registry.c.
* [memory/string.c] (New file)
Moved most string functions from misc/lstr.c; added Win32 version
of all functions.
* [misc/wsprintf.c]
Implemented Win32 wsprintf functions.
* [objects/bitmap.c]
Implemented Win32 bitmap functions.
* [windows/dialog.c]
Don't set dialog procedure before the controls are created. This
avoids a crash in Winhelp.
Tue Jun 11 14:10:06 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/menu.c] [if1632/user.spec] [windows/message.c]
Replace PeekMessage with PeekMessage16.
* [if1632/kernel32.spec][misc/main.c]
GetVersion32,GetVersionEx32A,GetVersionEx32W: new functions.
MAIN_ParseVersion: new function, new command line option -winver.
GetVersion: modified to take command line argument into account.
* [if1632/kernel32.spec] [win32/process.c]
FreeLibrary32: new function.
TlsAlloc: initialize Tls to zero.
InterlockedIncrement,InterlockedDecrement,InterlockedExchange: new
functions.
* [if1632/kernel32.spec]
SetErrorMode,GetActiveWindow: new relays to existing functions.
* [if1632/kernel32.spec][win32/user32.c]
PeekMessage32A,PeekMessage32W: new functions.
* [include/struct32.h][include/windows.h]
Moved MSG32 to windows.h.
Renamed MSG to MSG16.
Modified prototypes to use MSG16
* [include/winbase.h]
OSVERSIONINFO32A,OSVERSIONINFO32W: new structures.
Sun Jun 9 20:53:30 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/Makefile.in] [loader/builtin.c]
version.dll,lz32.dll added.
* [include/lzexpand.h] [if1632/lz32.spec] [if1632/lzexpand.spec]
[misc/lzexpand.c]
lz32.dll added.
Modified to new function naming standard.
* [include/ver.h] [if1632/ver.spec] [if1632/version.spec] [misc/ver.c]
version.dll added (win32 version of ver.dll).
Modified to new function naming standard.
Use registry to look up a LOCALE langids too.
(VerInstallFile,VerFindFile still stubs)
Fri Jun 7 20:40:20 1996 Albrecht Kleine <kleine@ak.sax.de>
* [files/file.c]
Added a warning if GetTempFileName() gets a bad drive parameter.
* [misc/commdlg.c]
Changed file listbox color to gray in SaveFile dialog
(just like Windows does this).
1996-06-11 18:02:08 +02:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "windows.h"
|
|
|
|
#include "ldt.h"
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* hmemcpy (KERNEL.348)
|
|
|
|
*/
|
|
|
|
void hmemcpy( LPVOID dst, LPCVOID src, LONG count )
|
|
|
|
{
|
|
|
|
memcpy( dst, src, count );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcat16 (KERNEL.89)
|
|
|
|
*/
|
|
|
|
SEGPTR lstrcat16( SEGPTR dst, SEGPTR src )
|
|
|
|
{
|
|
|
|
lstrcat32A( (LPSTR)PTR_SEG_TO_LIN(dst), (LPCSTR)PTR_SEG_TO_LIN(src) );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcat32A (KERNEL32.599)
|
|
|
|
*/
|
|
|
|
LPSTR lstrcat32A( LPSTR dst, LPCSTR src )
|
|
|
|
{
|
|
|
|
strcat( dst, src );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcat32W (KERNEL32.600)
|
|
|
|
*/
|
|
|
|
LPWSTR lstrcat32W( LPWSTR dst, LPCWSTR src )
|
|
|
|
{
|
|
|
|
register LPWSTR p = dst;
|
|
|
|
while (*p) p++;
|
|
|
|
while ((*p++ = *src++));
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcatn16 (KERNEL.352)
|
|
|
|
*/
|
|
|
|
SEGPTR lstrcatn16( SEGPTR dst, SEGPTR src, INT16 n )
|
|
|
|
{
|
|
|
|
lstrcatn32A( (LPSTR)PTR_SEG_TO_LIN(dst), (LPCSTR)PTR_SEG_TO_LIN(src), n );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcatn32A (Not a Windows API)
|
|
|
|
*/
|
|
|
|
LPSTR lstrcatn32A( LPSTR dst, LPCSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
register LPSTR p = dst;
|
|
|
|
while (*p) p++;
|
|
|
|
if ((n -= (INT32)(p - dst)) <= 0) return dst;
|
|
|
|
lstrcpyn32A( p, src, n );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcatn32W (Not a Windows API)
|
|
|
|
*/
|
|
|
|
LPWSTR lstrcatn32W( LPWSTR dst, LPCWSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
register LPWSTR p = dst;
|
|
|
|
while (*p) p++;
|
|
|
|
if ((n -= (INT32)(p - dst)) <= 0) return dst;
|
|
|
|
lstrcpyn32W( p, src, n );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmp16 (USER.430)
|
|
|
|
*/
|
|
|
|
INT16 lstrcmp16( LPCSTR str1, LPCSTR str2 )
|
|
|
|
{
|
|
|
|
return (INT16)lstrcmp32A( str1, str2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmp32A (KERNEL.602)
|
|
|
|
*/
|
|
|
|
INT32 lstrcmp32A( LPCSTR str1, LPCSTR str2 )
|
|
|
|
{
|
|
|
|
return (INT32)strcmp( str1, str2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmp32W (KERNEL.603)
|
|
|
|
*/
|
|
|
|
INT32 lstrcmp32W( LPCWSTR str1, LPCWSTR str2 )
|
|
|
|
{
|
|
|
|
while (*str1 && (*str1 == *str2)) { str1++; str2++; }
|
|
|
|
return (INT32)(*str1 - *str2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmpi16 (USER.471)
|
|
|
|
*/
|
|
|
|
INT16 lstrcmpi16( LPCSTR str1, LPCSTR str2 )
|
|
|
|
{
|
|
|
|
return (INT16)lstrcmpi32A( str1, str2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmpi32A (KERNEL32.605)
|
|
|
|
*/
|
|
|
|
INT32 lstrcmpi32A( LPCSTR str1, LPCSTR str2 )
|
|
|
|
{
|
|
|
|
INT32 res;
|
|
|
|
|
|
|
|
while (*str1)
|
|
|
|
{
|
|
|
|
if ((res = toupper(*str1) - toupper(*str2)) != 0) return res;
|
|
|
|
str1++;
|
|
|
|
str2++;
|
|
|
|
}
|
|
|
|
return toupper(*str1) - toupper(*str2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcmpi32W (KERNEL32.606)
|
|
|
|
*/
|
|
|
|
INT32 lstrcmpi32W( LPCWSTR str1, LPCWSTR str2 )
|
|
|
|
{
|
|
|
|
INT32 res;
|
|
|
|
|
|
|
|
while (*str1)
|
|
|
|
{
|
|
|
|
/* FIXME: Unicode */
|
|
|
|
if ((res = toupper(*str1) - toupper(*str2)) != 0) return res;
|
|
|
|
str1++;
|
|
|
|
str2++;
|
|
|
|
}
|
|
|
|
return toupper(*str1) - toupper(*str2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpy16 (KERNEL.88)
|
|
|
|
*/
|
|
|
|
SEGPTR lstrcpy16( SEGPTR dst, SEGPTR src )
|
|
|
|
{
|
|
|
|
lstrcpy32A( (LPSTR)PTR_SEG_TO_LIN(dst), (LPCSTR)PTR_SEG_TO_LIN(src) );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpy32A (KERNEL32.608)
|
|
|
|
*/
|
|
|
|
LPSTR lstrcpy32A( LPSTR dst, LPCSTR src )
|
|
|
|
{
|
1996-07-12 21:02:39 +02:00
|
|
|
if (!src || !dst) return NULL;
|
Release 960611
Tue Jun 11 15:20:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/break.c] [loader/signal.c]
Fixed breakpoints in 32-bit code.
* [include/windows.h]
Added many more Win32 versions of standard structures.
* [include/winreg.h] [misc/registry.c]
Moved private types into registry.c.
* [memory/string.c] (New file)
Moved most string functions from misc/lstr.c; added Win32 version
of all functions.
* [misc/wsprintf.c]
Implemented Win32 wsprintf functions.
* [objects/bitmap.c]
Implemented Win32 bitmap functions.
* [windows/dialog.c]
Don't set dialog procedure before the controls are created. This
avoids a crash in Winhelp.
Tue Jun 11 14:10:06 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/menu.c] [if1632/user.spec] [windows/message.c]
Replace PeekMessage with PeekMessage16.
* [if1632/kernel32.spec][misc/main.c]
GetVersion32,GetVersionEx32A,GetVersionEx32W: new functions.
MAIN_ParseVersion: new function, new command line option -winver.
GetVersion: modified to take command line argument into account.
* [if1632/kernel32.spec] [win32/process.c]
FreeLibrary32: new function.
TlsAlloc: initialize Tls to zero.
InterlockedIncrement,InterlockedDecrement,InterlockedExchange: new
functions.
* [if1632/kernel32.spec]
SetErrorMode,GetActiveWindow: new relays to existing functions.
* [if1632/kernel32.spec][win32/user32.c]
PeekMessage32A,PeekMessage32W: new functions.
* [include/struct32.h][include/windows.h]
Moved MSG32 to windows.h.
Renamed MSG to MSG16.
Modified prototypes to use MSG16
* [include/winbase.h]
OSVERSIONINFO32A,OSVERSIONINFO32W: new structures.
Sun Jun 9 20:53:30 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/Makefile.in] [loader/builtin.c]
version.dll,lz32.dll added.
* [include/lzexpand.h] [if1632/lz32.spec] [if1632/lzexpand.spec]
[misc/lzexpand.c]
lz32.dll added.
Modified to new function naming standard.
* [include/ver.h] [if1632/ver.spec] [if1632/version.spec] [misc/ver.c]
version.dll added (win32 version of ver.dll).
Modified to new function naming standard.
Use registry to look up a LOCALE langids too.
(VerInstallFile,VerFindFile still stubs)
Fri Jun 7 20:40:20 1996 Albrecht Kleine <kleine@ak.sax.de>
* [files/file.c]
Added a warning if GetTempFileName() gets a bad drive parameter.
* [misc/commdlg.c]
Changed file listbox color to gray in SaveFile dialog
(just like Windows does this).
1996-06-11 18:02:08 +02:00
|
|
|
strcpy( dst, src );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpy32W (KERNEL32.609)
|
|
|
|
*/
|
|
|
|
LPWSTR lstrcpy32W( LPWSTR dst, LPCWSTR src )
|
|
|
|
{
|
|
|
|
register LPWSTR p = dst;
|
|
|
|
while ((*p++ = *src++));
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpyn16 (KERNEL.353)
|
|
|
|
*/
|
|
|
|
SEGPTR lstrcpyn16( SEGPTR dst, SEGPTR src, INT16 n )
|
|
|
|
{
|
|
|
|
lstrcpyn32A( (LPSTR)PTR_SEG_TO_LIN(dst), (LPCSTR)PTR_SEG_TO_LIN(src), n );
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpyn32A (KERNEL32.611)
|
|
|
|
*/
|
|
|
|
LPSTR lstrcpyn32A( LPSTR dst, LPCSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
LPSTR p = dst;
|
|
|
|
while ((n-- > 1) && *src) *p++ = *src++;
|
|
|
|
*p = 0;
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpyn32W (KERNEL32.612)
|
|
|
|
*/
|
|
|
|
LPWSTR lstrcpyn32W( LPWSTR dst, LPCWSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
LPWSTR p = dst;
|
|
|
|
while ((n-- > 1) && *src) *p++ = *src++;
|
|
|
|
*p = 0;
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrlen16 (KERNEL.90)
|
|
|
|
*/
|
|
|
|
INT16 lstrlen16( LPCSTR str )
|
|
|
|
{
|
|
|
|
return (INT16)lstrlen32A( str );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrlen32A (KERNEL32.614)
|
|
|
|
*/
|
|
|
|
INT32 lstrlen32A( LPCSTR str )
|
|
|
|
{
|
|
|
|
/* looks weird, but win3.1 KERNEL got a GeneralProtection handler
|
|
|
|
* in lstrlen() ... we check only for NULL pointer reference.
|
|
|
|
* - Marcus Meissner
|
|
|
|
*/
|
|
|
|
if (!str) return 0;
|
|
|
|
return (INT32)strlen(str);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrlen32W (KERNEL32.615)
|
|
|
|
*/
|
|
|
|
INT32 lstrlen32W( LPCWSTR str )
|
|
|
|
{
|
|
|
|
INT32 len = 0;
|
|
|
|
if (!str) return 0;
|
|
|
|
while (*str++) len++;
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrncmp32A (Not a Windows API)
|
|
|
|
*/
|
|
|
|
INT32 lstrncmp32A( LPCSTR str1, LPCSTR str2, INT32 n )
|
|
|
|
{
|
|
|
|
return (INT32)strncmp( str1, str2, n );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrncmp32W (Not a Windows API)
|
|
|
|
*/
|
|
|
|
INT32 lstrncmp32W( LPCWSTR str1, LPCWSTR str2, INT32 n )
|
|
|
|
{
|
|
|
|
if (!n) return 0;
|
|
|
|
while ((--n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
|
|
|
|
return (INT32)(*str1 - *str2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrncmpi32A (Not a Windows API)
|
|
|
|
*/
|
|
|
|
INT32 lstrncmpi32A( LPCSTR str1, LPCSTR str2, INT32 n )
|
|
|
|
{
|
|
|
|
INT32 res;
|
|
|
|
|
|
|
|
if (!n) return 0;
|
|
|
|
while ((--n > 0) && *str1)
|
|
|
|
{
|
|
|
|
if ((res = toupper(*str1) - toupper(*str2)) != 0) return res;
|
|
|
|
str1++;
|
|
|
|
str2++;
|
|
|
|
}
|
|
|
|
return toupper(*str1) - toupper(*str2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrncmpi32W (Not a Windows API)
|
|
|
|
*/
|
|
|
|
INT32 lstrncmpi32W( LPCWSTR str1, LPCWSTR str2, INT32 n )
|
|
|
|
{
|
|
|
|
INT32 res;
|
|
|
|
|
|
|
|
if (!n) return 0;
|
|
|
|
while ((--n > 0) && *str1)
|
|
|
|
{
|
|
|
|
/* FIXME: Unicode */
|
|
|
|
if ((res = toupper(*str1) - toupper(*str2)) != 0) return res;
|
|
|
|
str1++;
|
|
|
|
str2++;
|
|
|
|
}
|
|
|
|
return toupper(*str1) - toupper(*str2);
|
|
|
|
}
|
1996-07-05 19:14:13 +02:00
|
|
|
|
|
|
|
|
1996-07-12 21:02:39 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpynAtoW (Not a Windows API)
|
|
|
|
*/
|
|
|
|
LPWSTR lstrcpynAtoW( LPWSTR dst, LPCSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
LPWSTR p = dst;
|
|
|
|
while ((n-- > 1) && *src) *p++ = (WCHAR)(unsigned char)*src++;
|
|
|
|
*p = 0;
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* lstrcpynWtoA (Not a Windows API)
|
|
|
|
*/
|
|
|
|
LPSTR lstrcpynWtoA( LPSTR dst, LPCWSTR src, INT32 n )
|
|
|
|
{
|
|
|
|
LPSTR p = dst;
|
|
|
|
while ((n-- > 1) && *src) *p++ = (CHAR)*src++;
|
|
|
|
*p = 0;
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-07-05 19:14:13 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* RtlFillMemory (KERNEL32.441)
|
|
|
|
*/
|
|
|
|
VOID RtlFillMemory( LPVOID ptr, UINT32 len, UINT32 fill )
|
|
|
|
{
|
|
|
|
memset( ptr, fill, len );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* RtlMoveMemory (KERNEL32.442)
|
|
|
|
*/
|
|
|
|
VOID RtlMoveMemory( LPVOID dst, LPCVOID src, UINT32 len )
|
|
|
|
{
|
|
|
|
/* memcpy does not support overlapped copies, */
|
|
|
|
/* and memmove is not portable. */
|
|
|
|
if (((BYTE *)dst + len <= (BYTE *)src) ||
|
|
|
|
((BYTE *)src + len <= (BYTE *)dst))
|
|
|
|
{
|
|
|
|
memcpy( dst, src, len );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* do it the hard way (FIXME: could do better than this) */
|
1996-07-12 21:02:39 +02:00
|
|
|
if (dst < src)
|
|
|
|
{
|
|
|
|
while (len--) *((BYTE *)dst)++ = *((BYTE *)src)++;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dst = (BYTE *)dst + len - 1;
|
|
|
|
src = (BYTE *)src + len - 1;
|
|
|
|
while (len--) *((BYTE *)dst)-- = *((BYTE *)src)--;
|
|
|
|
}
|
1996-07-05 19:14:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* RtlZeroMemory (KERNEL32.444)
|
|
|
|
*/
|
|
|
|
VOID RtlZeroMemory( LPVOID ptr, UINT32 len )
|
|
|
|
{
|
|
|
|
memset( ptr, 0, len );
|
|
|
|
}
|