summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-14Makefile: remove duplicate CPPFLAGS for sfeed_cursesHiltjo Posthuma
2023-03-07sfeed_curses: fix (very hard to trigger) memleak when getline() returns EOF ↵Hiltjo Posthuma
for lazyloaded items Fix the code pattern of freeing the line when getline returns -1 but no error flag is set on the stream (such as EOF). Note that on errors (even ENOMEM: out-of-memory) an error flag is set on the stream and the process would exit and clean up all it's resources. This would be very hard to trigger. The following conditions would have to be true: * Lazyloading of items is enabled: SFEED_LAZYLOAD=1 is set. * Items of the feed are read and their offsets stored. * The line is read/lazy-loaded again by it's offset but returns EOF (not a read error) this time. This could maybe happen if the feed file was changed and made smaller while sfeed_curses is running and the remembered offset is now beyond the file. Note that the sfeed_curses(1) man page describes a workaround for a similar condition by sending SIGHUP if the sfeed(5) data was changed to reload the feed file. References: * https://man.openbsd.org/getline "It is the responsibility of the caller to free(3) *lineptr when it is no longer needed. Even when it fails, getdelim() may update *lineptr." * https://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html
2023-02-25bump version to 1.7Hiltjo Posthuma
2023-02-17sfeed_update, sfeed_opml_export, README: reference the example sfeedrc man pageHiltjo Posthuma
... and some small rewording.
2023-02-16sfeed_curses: add SUN keys supportHiltjo Posthuma
This fixes the keys on the sun-color console on OpenIndiana/Illumos/OpenSolaris (and other systems using these keys). See also the table: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html Section "Non-Function Keys".
2023-02-16sfeed_curses: add SCO keys for next, prior (CSI I and CSI G)Hiltjo Posthuma
This fixes the page up and page down keys in the cons25 console on DragonFlyBSD. See also the table: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html Section "Non-Function Keys".
2023-02-16README: small rewording in how to add new parsed tags and fieldsHiltjo Posthuma
2023-02-04README: describe how to add new parsed tags and fields to sfeed.cHiltjo Posthuma
2023-02-04fix comment for ASCII symbols for dumb terminalsHiltjo Posthuma
This was a copy-pasta.
2023-02-04sfeed_gopher: remove PATH_MAX and restricting the path lengthHiltjo Posthuma
This make it also cleanly compile without any other changes on GNU/Hurd. Reference: https://www.gnu.org/software/hurd/hurd/porting/guidelines.html Section: "PATH_MAX, MAX_PATH, MAXPATHLEN, _POSIX_PATH_MAX" The fopen() functions will return NULL when the path is too long and set errno = ENAMETOOLONG. "The length of a pathname exceeds {PATH_MAX}, or pathname resolution of a symbolic link produced an intermediate result with a length that exceeds {PATH_MAX}." Reference: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html
2023-01-18sfeedrc.5: improve documentation a bitHiltjo Posthuma
- Fix a typo "Url" -> "URL". - Be a bit more clear some overridable functions read from stdin. - Some small rewording.
2023-01-07sfeed.1: reference sfeed_opml_importHiltjo Posthuma
It is used in the examples. (Do not directly reference iconv to keep some kind of clear reference list)
2023-01-07sfeed.5: remove a caveat in the file format man pageHiltjo Posthuma
It is a caveat while parsing the data in the sfeed(1) program. Keep it described in the sfeed(1) man page.
2022-12-28README: small rewording "can be supported" -> "are supported"Hiltjo Posthuma
2022-12-20LICENSE: bump yearHiltjo Posthuma
2022-12-20sfeed_curses.1: small rewording and tweaks in the exampleHiltjo Posthuma
2022-12-15sfeed_update.1: "return status" -> "exit status"Hiltjo Posthuma
2022-08-26improve comment: uppercase cdata -> CDATAHiltjo Posthuma
2022-08-17bump version to 1.6Hiltjo Posthuma
2022-08-17sfeed_curses: fix a memleak caused by a mistake in refactoring the codeHiltjo Posthuma
Introduced by a code cleanup/refactor in commit 59ba2ed29bcbe67de6e9ee1e7fb18744f7490c22
2022-07-20slightly improve some commentsHiltjo Posthuma
2022-07-17sfeed_curses: cleanup code for handling read items from an URL fileHiltjo Posthuma
This makes it easier to reuse the code from reading plain-text list of items from a file and uses a struct urls to keep its state in a cleaner way. + some small code-style improvements and reshuffling. Inspired by a question from NRK by mail about implementing a "read later" feature. (A quick local experiment shows it can be done in ~70 lines of added code).
2022-07-05remove __dead codeNRK
this check is already done in util.h and is no longer needed after the `sfeed_curses -> sfeed` merge.
2022-07-05sfeed_curses: write out plumbercmd argument in a verbose mannerHiltjo Posthuma
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/
2022-06-21fix some typisNRK
found via codespell $ codespell --ignore-regex Nd
2022-06-20sfeed: reword a poorly-worded commentHiltjo Posthuma
2022-06-20sfeed: fix a wrong commentHiltjo Posthuma
2022-06-18README: add setsid exampleHiltjo Posthuma
2022-06-06themes: simplify empty macros, remove do { } while(0)Hiltjo Posthuma
Multiple function calls should still be nested in a do { } while(0), but this is hopefully obvious looking at the other lines. While testing, gcc with -O0 created the same binary. clang added a single jmp instruction.
2022-06-05sfeed_curses: processexit(): remove unneeded code for non-interactive processesHiltjo Posthuma
This was used in commit a58fa45f25da4f18d7b8c1a815884f67b965406f and previous, but the code for non-interactive process cleanup was later removed, so clearing the struct is not not needed anymore, because it is unused.
2022-05-31README: fix bug in an example for counting the new items of the last dayHiltjo Posthuma
This should not use the plain-text URL file ($SFEED_URL_FILE).
2022-05-31minicurses.h: remove unneeded includeHiltjo Posthuma
In the past there was an ioctl() call in setupterm(), so this include is not needed anymore.
2022-05-21bump version to 1.5Hiltjo Posthuma
2022-05-19README: make sure sfeed_update errors don't write to stderrHiltjo Posthuma
It would mess up the output since the progress bar writes to stderr aswell.
2022-05-14README: add progress indicator scriptHiltjo Posthuma
2022-05-14manual pages: reword a few things a bit more clearlyHiltjo Posthuma
2022-05-07sfeed_curses: improve commentHiltjo Posthuma
Do not restart the syscall waitpid, explicitly mention not setting SA_RESTART.
2022-05-07sfeed_curses: interrupt waitpid while interactive child program is runningHiltjo Posthuma
This now handles SIGTERM on sfeed_curses properly while an interactive child program is running. Test-case program: https://git.codemadness.org/sfeed_tests/commit/cd4268d4f71b5d7ab0df593d95e70188475d76bb.html
2022-05-05sfeed_curses: close stdin for spawning a plumb program in non-interactive modeHiltjo Posthuma
This is only for plumbing in non-interactive mode in forkexec(), but not piping content. Probably obvious what the descriptors are, but also add a few comments to dup2 of the file descriptors (stdin, stdout, stderr). To reproduce a behaviour: Plumb script: #!/bin/sh dmenu Then launch it: SFEED_PLUMB_INTERACTIVE=0 SFEED_PLUMB=thescript sfeed_curses ~/.sfeed/feeds/* The program now waits on input while in non-interactive mode and only seems to hang. After: The program starts but just has no input passed to it.
2022-05-04sfeed_curses.1: more details about signals and (non-)interactive programsHiltjo Posthuma
- SIGINT: reword, canceling the line editor is the exception. - Document the order of signal handling. - Document interactive and non-interactive behaviour in a separate section and in more detail. Remove repetition for each *_INTERACTIVE environment variable. - Document SIGINT and SIGTERM exit status. - Typo: "statusbar" -> "status bar". - Reword a few sentences. With additional changes and feedback from adc, thanks!
2022-05-02manual pages: properly escape some more backslashesHiltjo Posthuma
... and bump the date also.
2022-05-02manual pages: properly escape backslashesAnders Damsgaard
From the mdoc(7) extended introduction[0]: >To output a backslash, use the escape sequence ‘\e’. Never use the >escape sequence ‘\\’ in any context. 0: https://mandoc.bsd.lv/mdoc/intro/escaping.html
2022-04-10sfeed_curses.1: fix typo: automaticly -> automaticallyHiltjo Posthuma
Noticed by the Debian scanner for typos (typo-in-manual-page): https://mentors.debian.net/package/sfeed/
2022-04-02bump version to 1.4Hiltjo Posthuma
2022-04-02sfeed_curses: code-style: mouse mode: just use a constantHiltjo Posthuma
No functional change intended. Just slightly more clear.
2022-04-02sfeed_curses: line editor: handle SIGCHLD directlyHiltjo Posthuma
This makes sure when processes exit they are reaped immediately (instead of after closing the line editor).
2022-04-02sfeed_curses: line editor, temporarily disable the mouse when using the line ↵Hiltjo Posthuma
editor This allows pasting in the terminal and also doesnt spam mouse events, which are not useful here.
2022-04-01sfeed_curses: don't use bitmasks to keep the states for signalsHiltjo Posthuma
Reported by Leon Fisher, thanks! "Each signal should have its own sig_atomic_t variable if you want to keep state for all of them independently." A similar issue was referenced in a OpenBSD tech mailinglist thread: https://marc.info/?l=openbsd-tech&m=162940120614641&w=2
2022-04-01sfeed_curses: small code-style changeHiltjo Posthuma
2022-04-01README: reflect example with the descriptionHiltjo Posthuma