sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit c1d2ebe8cac049808be400221c3ed4bda780cab7
parent 4a9456848a45edbc097770df20dec216f44ca0f5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 25 Feb 2022 00:27:22 +0100

sfeed_curses: cast character for SFEED_AUTOCMD to unsigned char

Otherwise a character like \xa0 (160) would be negative and goto the event,
since a negative return value in readch() is used for errors or reserved for
signal handling.

Noticed while testing mouse X10 encoding with extended buttons, like button 7:

	SFEED_AUTOCMD="l$(printf '\x1b[M\xa0!!')j" ./sfeed_curses ~/.sfeed/feeds/*

Diffstat:
Msfeed_curses.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -951,8 +951,10 @@ readch(void) fd_set readfds; struct timeval tv; - if (cmdenv && *cmdenv) - return *(cmdenv++); /* $SFEED_AUTOCMD */ + if (cmdenv && *cmdenv) { + b = *(cmdenv++); /* $SFEED_AUTOCMD */ + return (int)b; + } for (;;) { FD_ZERO(&readfds);