summaryrefslogtreecommitdiff
path: root/src/xine-utils/xineutils.h
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-10 00:52:08 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-10 00:52:08 +0300
commit83049ca9ad0d39a5795b586b76f954748a3de316 (patch)
tree3e4697c79d570f079e1d28573d7fa47b9edb2b66 /src/xine-utils/xineutils.h
parent68a893cefd56a81ff3af304cda6ee897a1506ed3 (diff)
downloadxine-lib-83049ca9ad0d39a5795b586b76f954748a3de316.tar.gz
xine-lib-83049ca9ad0d39a5795b586b76f954748a3de316.tar.bz2
Added asprintf wrapper
Diffstat (limited to 'src/xine-utils/xineutils.h')
-rw-r--r--src/xine-utils/xineutils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h
index d0946e471..5b16e6e3c 100644
--- a/src/xine-utils/xineutils.h
+++ b/src/xine-utils/xineutils.h
@@ -216,6 +216,14 @@ void xine_strdupa(char *dest, char *src) XINE_PROTECTED XINE_DEPRECATED;
char *xine_strcat_realloc (char **dest, char *append) XINE_PROTECTED;
/**
+ * asprintf wrapper
+ * allocate a string large enough to hold the output, and return a pointer to
+ * it. This pointer should be passed to free when it is no longer needed.
+ * return NULL on error.
+ */
+char *_x_asprintf(const char *format, ...) XINE_PROTECTED XINE_MALLOC XINE_FORMAT_PRINTF(1, 2);
+
+/**
* opens a file, ensuring that the descriptor will be closed
* automatically after a fork/execute.
*/