SMOLNET PORTAL home about changes
sfeed_curses: write out plumbercmd argument in a verbose manner - sfeed - RSS and Atom parser
(URL) git clone git://git.codemadness.org/sfeed (git://git.codemadness.org)
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6890a40099bf940bb7bf21c0f5b073766ff67f5f
(DIR) parent 70007b61aaa485c7084badc5d8336ee480b2d138
(URL) Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) application/vnd.lotus-organizer
Date: Tue, 5 Jul 2022 15:57:35 +0200
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:
M sfeed_curses.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git 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);
}
Response: application/gopher-menu
Original URLgopher://codemadness.org/1/git/sfeed/commit/6890a40099bf9...
Content-Typeapplication/gopher-menu; charset=utf-8