summaryrefslogtreecommitdiff
path: root/sfeed_curses.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-07-05 15:57:35 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-07-05 15:57:35 +0200
commit6890a40099bf940bb7bf21c0f5b073766ff67f5f (patch)
tree6b6ed32c80aa862662f4888491f417318a3c09ab /sfeed_curses.c
parent70007b61aaa485c7084badc5d8336ee480b2d138 (diff)
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/
Diffstat (limited to 'sfeed_curses.c')
-rw-r--r--sfeed_curses.c4
1 files changed, 3 insertions, 1 deletions
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);
}