From 6890a40099bf940bb7bf21c0f5b073766ff67f5f Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 5 Jul 2022 15:57:35 +0200 Subject: sfeed_curses: write out plumbercmd argument in a verbose manner Write it in a more verbose, clear and C90-style manner. This workarounds a bug in scc too (reported upstream and will be fixed of course). All tools in sfeed can now be compiled with minicurses-mode with the scc compiler and musl libc without any modifications needed. scc: http://www.simple-cc.org/ --- sfeed_curses.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sfeed_curses.c b/sfeed_curses.c index e05d1c9..bc2e8ba 100644 --- a/sfeed_curses.c +++ b/sfeed_curses.c @@ -1432,13 +1432,15 @@ feed_plumb_selected_item(struct pane *p, int field) { struct row *row; struct item *item; - char *cmd[] = { plumbercmd, NULL, NULL }; + char *cmd[3]; /* will have: { plumbercmd, arg, NULL } */ if (!(row = pane_row_get(p, p->pos))) return; markread(p, p->pos, p->pos, 1); item = row->data; + cmd[0] = plumbercmd; cmd[1] = item->fields[field]; /* set first argument for plumber */ + cmd[2] = NULL; forkexec(cmd, plumberia); } -- cgit v1.2.3