diff options
author | wm4 <wm4@nowhere> | 2014-04-29 13:14:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-29 13:14:48 +0200 |
commit | 81171e37b2c90bdb9b3b9c79d9cab1774760326e (patch) | |
tree | d5f96c14c02d07c2e2d61ab09e82935aa8216d3d /common/common.h | |
parent | 8562f53cf95d30c8de64bd0049a8635413c46e91 (diff) | |
download | mpv-81171e37b2c90bdb9b3b9c79d9cab1774760326e.tar.bz2 mpv-81171e37b2c90bdb9b3b9c79d9cab1774760326e.tar.xz |
common: add mp_snprintf_append() utility function
Diffstat (limited to 'common/common.h')
-rw-r--r-- | common/common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h index aad1460aa2..f7362152c2 100644 --- a/common/common.h +++ b/common/common.h @@ -19,6 +19,7 @@ #ifndef MPLAYER_MPCOMMON_H #define MPLAYER_MPCOMMON_H +#include <stddef.h> #include <stdlib.h> #include <stdbool.h> #include <stdint.h> @@ -76,6 +77,9 @@ struct mp_rect { void mp_rect_union(struct mp_rect *rc, const struct mp_rect *src); bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2); +int mp_snprintf_append(char *str, size_t size, const char *format, ...) + PRINTF_ATTRIBUTE(3, 4); + struct bstr; void mp_append_utf8_bstr(void *talloc_ctx, struct bstr *buf, uint32_t codepoint); |