diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
commit | b35a780479bbf5038a825d415f9ca49c92f6b425 (patch) | |
tree | 44e71007552714b03ae812e466495ec5c8a7e27b /util.c | |
parent | a61d90c32d4d6448148894872ebd91eb8f10fc2e (diff) |
ctrl+q to quit (with unsaved changes dialog)
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -57,6 +57,9 @@ static char *str_dup(char const *src) { // first, check that str is actually an array #define strbuf_printf(str, ...) assert(sizeof str != 4 && sizeof str != 8), \ str_printf(str, sizeof str, __VA_ARGS__) +#define str_catf(str, size, ...) str_printf((str) + strlen(str), (size) - strlen(str), __VA_ARGS__) +#define strbuf_catf(str, ...) assert(sizeof str != 4 && sizeof str != 8), \ + str_catf(str, sizeof str, __VA_ARGS__) // on 16-bit systems, this is 16383. on 32/64-bit systems, this is 1073741823 // it is unusual to have a string that long. |