diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2024-08-03 09:42:37 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2024-08-03 09:42:37 +0000 |
| commit | b27841e1b590f91c9de21bb694909211421e5f96 (patch) | |
| tree | 6f0f5a1fec321ae8c96e1bc019cc625d50b35012 /main.c | |
| parent | osc: kitty notifications: ignore invalid IDs (diff) | |
| parent | xmalloc: remove delim param from xstrjoin() and add separate xstrjoin3() (diff) | |
Merge branch 'xstrjoin3'
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -258,7 +258,7 @@ main(int argc, char *const *argv) break; case 't': - tll_push_back(overrides, xstrjoin("term=", optarg, 0)); + tll_push_back(overrides, xstrjoin("term=", optarg)); break; case 'L': @@ -266,11 +266,11 @@ main(int argc, char *const *argv) break; case 'T': - tll_push_back(overrides, xstrjoin("title=", optarg, 0)); + tll_push_back(overrides, xstrjoin("title=", optarg)); break; case 'a': - tll_push_back(overrides, xstrjoin("app-id=", optarg, 0)); + tll_push_back(overrides, xstrjoin("app-id=", optarg)); break; case 'D': { @@ -284,7 +284,7 @@ main(int argc, char *const *argv) } case 'f': { - char *font_override = xstrjoin("font=", optarg, 0); + char *font_override = xstrjoin("font=", optarg); tll_push_back(overrides, font_override); break; } @@ -658,15 +658,19 @@ out: UNITTEST { - char *s = xstrjoin("foo", "bar", 0); + char *s = xstrjoin("foo", "bar"); xassert(streq(s, "foobar")); free(s); - s = xstrjoin("foo", "bar", ' '); + s = xstrjoin3("foo", " ", "bar"); xassert(streq(s, "foo bar")); free(s); - s = xstrjoin("foo", "bar", ','); + s = xstrjoin3("foo", ",", "bar"); xassert(streq(s, "foo,bar")); free(s); + + s = xstrjoin3("foo", "bar", "baz"); + xassert(streq(s, "foobarbaz")); + free(s); } |
