mirror of
https://github.com/cc65/cc65.git
synced 2024-12-30 05:30:41 +00:00
New function xdup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3723 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
889fd1ecbd
commit
44405a0bb5
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
/* (C) 2000-2006 Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@ -120,4 +120,11 @@ char* xstrdup (const char* S)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void* xdup (const void* Buf, size_t Size)
|
||||||
|
/* Create a copy of Buf on the heap and return a pointer to it. */
|
||||||
|
{
|
||||||
|
return memcpy (xmalloc (Size), Buf, Size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000 Ullrich von Bassewitz */
|
/* (C) 2000-2006 Ullrich von Bassewitz */
|
||||||
/* Wacholderweg 14 */
|
/* Römerstraße 52 */
|
||||||
/* D-70597 Stuttgart */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@musoftware.de */
|
/* EMail: uz@cc65.org */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
@ -60,6 +60,9 @@ void xfree (void* Block);
|
|||||||
char* xstrdup (const char* S);
|
char* xstrdup (const char* S);
|
||||||
/* Duplicate a string on the heap. The function checks for out of memory */
|
/* Duplicate a string on the heap. The function checks for out of memory */
|
||||||
|
|
||||||
|
void* xdup (const void* Buf, size_t Size);
|
||||||
|
/* Create a copy of Buf on the heap and return a pointer to it. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of xmalloc.h */
|
/* End of xmalloc.h */
|
||||||
|
Loading…
Reference in New Issue
Block a user