Age | Commit message (Collapse) | Author |
|
|
|
Some curses implementations have tparm(char *) (BSD and older ncurses), some
have tparm(const char *).
The older POSIX specification had: tparm(char *):
https://pubs.opengroup.org/onlinepubs/7908799/xcurses/term.h.html
Just cast it to char *. The terminfo variables are defined elsewhere so it
should be safe.
Also remove an unnecesary cast in minicurses.
Hopefully this satisfies all curses variants and versions now.
|
|
In theory feed names can contain newlines, TABS, control-characters or start
with echo options like -n. This is not recommended and not checked.
URLs cannot have these characters: they should be percent-encoded.
echo is typically a shell built-in and fast, so this trade-off is done.
|
|
|
|
Older POSIX standards also defined it as a char * parameter (not const char *)
for tparm().
https://pubs.opengroup.org/onlinepubs/7908799/xcurses/term.h.html
|
|
This makes atleast feeds with simple ASCII work.
|
|
This fixes a compile error tested with HaikuOS 32-bit (gcc2h, based on gcc
2.95).
It also suppresses a false-positive warning of an unused forkexec function in
cppcheck.
|
|
|
|
For feeds with lots of content data:
Small performance improvement (~2%) on systems that implement putchar as a
macro. On some systems using a function call for putchar it can be easier to
replace with putchar_unlocked.
(On an older MIPS32 VM changing putchar to putchar_unlocked makes writing 5x
faster).
|
|
There is only one enclosure supported.
|
|
|
|
|
|
Because the tty (/dev/tty). is reopened when reading feed data from stdin.
|
|
|
|
This replaces the current J and K keybind, which was rarely useful.
Thanks to IanJ for the suggestion and feedback!
|
|
|
|
|
|
|
|
This allows to parse the time as a number in the 64-bit range, even on 32-bit
platforms. Note that the sfeed formatting tools can still truncate/wrap the
value to time_t, which can be 32-bit.
|
|
SIGTERM is the best way to quit the program, because SIGINT can cancel only the
line editor prompt when using it.
|
|
|
|
|
|
Specified in RFC2822 Section 3.3. Date and Time Specification
"[...] the time-of-day MUST be in the range 00:00:00 through 23:59:60 (the
number of seconds allowing for a leap second; see [STD12]) [...]"
To test:
<entry><updated>2016-12-31T23:59:60Z</updated></entry>
|
|
Also tested on MIPS32BE which has 32-bit time_t and which wraps the time value.
|
|
|
|
When a new URL file is used with no URL entries then NULL is passed to qsort()
and bsearch(). This is reported by clang UBsan as undefined behaviour
(debatable), but no issue in practise with many implementations. Fix it anyway.
To reproduce with clang UBsan:
Compile with clang or gcc with CFLAGS and LDFLAGS -fsanitize=undefined
touch /tmp/urls # new file which should be empty.
SFEED_URL_FILE=/tmp/urls sfeed_curses 2>/tmp/log
^D
q
cat /tmp/log
|
|
|
|
|
|
|
|
|
|
|
|
Reported by Christos Margiolis and plasmoduck, thanks
|
|
|
|
This makes it a bit more easy to reuse the script and makes the run-time
dependency on lynx more optional.
For example with w3m:
SFEED_HTMLCONV="w3m -I UTF-8 -O UTF-8 -T text/html -dump" \
sfeed_curses ~/.sfeed/feeds/*
(of course this can be set in a wrapper script or shell profile too)
|
|
|
|
Performance improvements, use feed URL if the feed title is not (yet) set.
|
|
tested for fun
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sfeed_curses can be optionally compiled. Separate flags can be passed for
example for the curses library.
Also pass CFLAGS and LDFLAGS as a suffix.
See commit 0a9c4460c15e90113607ff1928858dfa940df725 of sfeed_curses
This is useful when passing -Wl,--as-needed or hardening flags.
|
|
|
|
|
|
Import sfeed_curses into sfeed.
The files are based of the commit 8e151ce48b503ad0ff0e24cb1be3bc93d6fbd895
|
|
commit ed8079dc3e8ce513c788a5ab11444aac221cbc5b added an option
$SFEED_MBOX_CONTENT with a content-type text/html to include the content.
However in this context the link and enclosure were not fully escaped.
|
|
|
|
"man sfeed" now hopefully more quickly gives a better overview how the tools
work together. Reference the README for extended examples and use-cases.
|