diff options
Diffstat (limited to 'include/stringop.h')
-rw-r--r-- | include/stringop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stringop.h b/include/stringop.h index 8d7089e9..19a50f23 100644 --- a/include/stringop.h +++ b/include/stringop.h | |||
@@ -2,8 +2,15 @@ | |||
2 | #define _SWAY_STRINGOP_H | 2 | #define _SWAY_STRINGOP_H |
3 | 3 | ||
4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
5 | #include <stddef.h> | ||
5 | #include "list.h" | 6 | #include "list.h" |
6 | 7 | ||
8 | #ifdef __GNUC__ | ||
9 | #define _SWAY_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) | ||
10 | #else | ||
11 | #define _SWAY_ATTRIB_PRINTF(start, end) | ||
12 | #endif | ||
13 | |||
7 | void strip_whitespace(char *str); | 14 | void strip_whitespace(char *str); |
8 | void strip_quotes(char *str); | 15 | void strip_quotes(char *str); |
9 | 16 | ||
@@ -30,4 +37,7 @@ char *argsep(char **stringp, const char *delim, char *matched_delim); | |||
30 | // Expand a path using shell replacements such as $HOME and ~ | 37 | // Expand a path using shell replacements such as $HOME and ~ |
31 | bool expand_path(char **path); | 38 | bool expand_path(char **path); |
32 | 39 | ||
40 | char *vformat_str(const char *fmt, va_list args) _SWAY_ATTRIB_PRINTF(1, 0); | ||
41 | char *format_str(const char *fmt, ...) _SWAY_ATTRIB_PRINTF(1, 2); | ||
42 | |||
33 | #endif | 43 | #endif |