From 6203966fbf1f8886ff59cc9d6350b034ee5374c9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 21 Jul 2014 22:44:14 +0200 Subject: Add vasprintf() and asprintf() The new utils.c functions vasprintf() and asprintf() are analogs to sprintf() and vsprintf(). However, instead of requiring a buffer that is large enough to hold the output data, the functions allocate a string and return a pointer to it. Signed-off-by: Lukas Fleischer --- src/calcurse.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/calcurse.h') diff --git a/src/calcurse.h b/src/calcurse.h index e593ff0..887e224 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -1051,6 +1051,8 @@ void print_recur_apoint(const char *, long, unsigned, struct recur_apoint *); void print_recur_event(const char *, long, struct recur_event *); void print_todo(const char *, struct todo *); +int vasprintf(char **, const char *, va_list); +int asprintf(char **, const char *, ...); /* vars.c */ extern int col, row; -- cgit v1.2.3-54-g00ecf