commit 20a51bafd3906aa0337fe221d0981293d94370a5
parent 21d46d603a3697f04072e4c0edb0076b4a215a2e
Author: Michael Forney <mforney@mforney.org>
Date: Tue, 19 Mar 2024 14:52:09 -0700
Avoid zero-length iowrite
iowrite with bs==0 results in either a zero-length write() or
tls_write().
The former is unspecified by POSIX[0]:
> If nbyte is zero and the file is not a regular file, the results
> are unspecified.
The latter is not explicitly disallowed by tls_write(3), but libressl
implements tls_write with a call to SSL_write, which is documented
to have undefined behavior[1]:
> When calling SSL_write() with num=0 bytes to be sent, the behaviour
> is undefined.
Show correct (gopher) URLs for menuentries pointing to HTML files.
Only the 'h'tml links providing an external URI (prefixed with "URL:")
should be printed directly.
Otherwise print the link like any other gopher link.
Example for a menu pointing to HTML files in the real world:
gopher://gopher.metafilter.com/1/MetaFilter
d70616c357a135b8e251fe1974cf88f529dbc67f 2023-07-31T20:01:45Z 2023-07-31T20:01:45Z Release version 1.07
This makes these keys work on a default configured urxvt and putty.
b4f6ed2bf2344c5717523313bc666eb297a6fe36 2022-03-27T11:28:02Z 2022-03-27T12:37:33Z ui_ti: refactor DEC function key handling a bit for an upcoming commit
This is a sequence like ESC O A (arrow key in application key mode).
This is a default mode in some terminals, like the terminal in HaikuOS.
It makes the arrow keys work nicely.
b15d084107da05069a3cf70cd81475f26d8e563e 2022-03-27T09:47:44Z 2022-03-27T10:57:05Z Ignore SIGCHLD to prevent zombie processes for non-modal plumbing
Ignore SIGCHLD to prevent zombie processes for non-modal plumbing
In config.h, when modalplumber = 0 is set (the default),
sacc does not wait(2) on the process
when a child process exits
and it then becomes a zombie on Linux.
edbf8409a1e281d17422e7b12b5edd3832b4429d 2021-11-28T14:29:13Z 2021-11-28T14:29:13Z Release version 1.05
Thanks to adc (Anders Damsgaard <anders@adamsgaard.dk>) and
Evil_Bob (Hiltjo Posthuma <hiltjo@codemadness.org>) for
their suggestions, patches, and peer pressure.
e80d8bfc3241d197f387a7cbe40ec924853bdc83 2021-11-13T10:43:16Z 2021-11-13T10:43:16Z Make plumb function a generic execuri function
Previously the current line would change to fit in the new screen size.
Instead, change the current screen offset to keep the current line on
screen.
0573022ce4ceab92394c35c5701abe061f2ec35a 2021-05-26T14:18:22Z 2021-05-28T17:16:43Z reset SIGWINCH when spawning a child program for displaying text items
reset SIGWINCH when spawning a child program for displaying text items
When opening a text item in the pager such as less and then resizing the
terminal it would garble/overwrite the terminal output because sacc was
redrawn.
eae2a995544b2b48c3a7debcb186a00aa0c400b3 2021-03-22T17:44:01Z 2021-03-22T17:44:59Z Always restore terminal mode in TUI cleanup
This approach instead of always warning that something might have been
wrong in case the message isn't terminated single-dot line is more
forgiving as not all gopher server follow that aspect of the standard.
34fd4f17068b408353bb6ae1df3eb4a58c259e25 2021-01-30T18:44:16Z 2021-01-30T18:44:16Z Check that non-binary types end with ".\r\n"
mbsprint: improve printing output when it has invalid UTF data
Reset the decode state when mbtowc returns -1. The OpenBSD mbtowc(3)
man page says: "If a call to mbtowc() resulted in an undefined internal
state, mbtowc() must be called with s set to NULL to reset the internal
state before it can safely be used again."
Print the UTF replacement character (codepoint 0xfffd) for the invalid
codepoint or incomplete sequence and continue printing the line
(instead of stopping).
Remove the 0 return code as it can't happen because we're already
checking the string length in the loop.
c416c8c73d0a33eb8c428b1a9b9eaaffc098ee5b 2020-12-03T17:30:27Z 2020-12-03T17:30:27Z sacc.1: Document use of PAGER environment variable
Use a random temporary directory instead of a fixed one
Thanks to the persons who asked for this.
49292644fd4a8c983928738fe36ac9daaebc755d 2020-01-01T17:01:17Z 2020-01-01T17:22:44Z for displayuri for 'h' types show only the url and not the username field
mask signals while using connect(2) in connectto()
This makes sure connect(2) don't return a possible < 0 and errno = EINTR.
POSIX says for connect(2): "
[EINTR] The connection attempt was interrupted by a signal.
The attempt will continue asynchronously as if the
socket was non-blocking."
This was reproducable by launching with st -e sacc bitreich.org . When sacc was
signaled with SIGWINCH while it was connecting the connect(2) would be handled
as a failure and the next interface was tried. This gave a vague message "no
route to host", because the next interfaces could fail.
c7ab5157ebc7e7d502e0970770a7e7be48e61ea2 2018-12-25T18:33:21Z 2018-12-26T10:46:21Z ui_txt: check for curentry is NULL like ui_ti
freeaddrinfo can leak if a connection fails in connectto()
18a92be39ac2fea50ce2d63c7a03ad64528eb843 2018-11-16T21:24:06Z 2018-11-16T21:35:58Z Handle SIGHUP and SIGTERM
Stefan Hagen sh+git@codevoid.de
commit 18a92be39ac2fea50ce2d63c7a03ad64528eb843
parent ed63d85224f39fc733d55b0d326085d7f4bd0b70
Author: Stefan Hagen <sh+git@codevoid.de>
Date: Fri, 16 Nov 2018 22:24:06 +0100
Handle SIGHUP and SIGTERM
Killing a terminal where sacc is running will send SIGHUP to sacc.
With this patch, sacc is handling SIGHUP and SIGTERM and cleans up
temporary files properly.
ed63d85224f39fc733d55b0d326085d7f4bd0b70 2018-09-08T10:44:35Z 2018-09-08T13:35:34Z fix undefined behaviours with isdigit() and tolower() functions