summaryrefslogtreecommitdiff
path: root/src/xine-utils/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-utils/utils.c')
-rw-r--r--src/xine-utils/utils.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index 1c267b800..8d7c405dc 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -27,10 +27,10 @@
#include "config.h"
#endif
-#include "xineutils.h"
-#include "xineintl.h"
+#include <xine/xineutils.h>
+#include <xine/xineintl.h>
#ifdef _MSC_VER
-#include "xine_internal.h"
+#include <xine/xine_internal.h>
#endif
#include <errno.h>
@@ -274,6 +274,19 @@ void *xine_xcalloc(size_t nmemb, size_t size) {
return ptr;
}
+}
+
+void *xine_memdup (const void *src, size_t length)
+{
+ void *dst = malloc (length);
+ return xine_fast_memcpy (dst, src, length);
+}
+
+void *xine_memdup0 (const void *src, size_t length)
+{
+ char *dst = xine_xmalloc (length + 1);
+ dst[length] = 0;
+ return xine_fast_memcpy (dst, src, length);
#ifdef WIN32
/*
* Parse command line with Windows XP syntax and copy the command (argv[0]).