jcs
/detritus
/amendments
Amendments on November 21, 2024
*: Use PAGE_CAN_READ_MORE macro in protocol handlers
page->request will not be null during a fetch but the connection is
done reading so use that as a hint that no more data is coming.
browser: Keep track of link rects, show URI and finger when hovering
Each time we scroll, find the links in the viewport and remember
their rects. In idle handler, check pointer coords and if it's in
any link rects, set cursor and show the link URI in the statusbar.
A nicer way to do this might have been to use the mouseRgn field of
WaitNextEvent that was the screen region with link rects cut out of
it, that way we only get a mouse move event when the cursor is in
those cutouts. But since our ticks value to WaitNextEvent is so
small, none of the mouse move events were coming through, so just
rely on nullEvent.where being the mouse cursor coordinates.
jcs made amendment
47
about 1 year ago
request: Do callback one more time after connection closes
With tcp_done_reading set, the caller can use it to know when there
is definitely no more data coming.
jcs made amendment
45
about 1 year ago
jcs made amendment
44
about 1 year ago
rez: Add finger pointer cursor
Not at all copied from Netscape 3
Amendments on November 18, 2024
jcs made amendment
42
about 1 year ago
Amendments on November 15, 2024
gopher: Add icon for menus pointing to other servers
Also tweak icon spacing to keep fixed-width text aligned
jcs made amendment
40
about 1 year ago
jcs made amendment
39
about 1 year ago
jcs made amendment
38
about 1 year ago
jcs made amendment
37
about 1 year ago
jcs made amendment
36
about 1 year ago
request: Rewrite parse_uri, add URI.query, loop request_data_shuffle
Looping through the idle handler for every back-and-forth is slow,
so loop tightly until we detect any mouse or keyboard input from the
user wanting to stop.
jcs made amendment
34
about 1 year ago
Amendments on November 14, 2024
jcs made amendment
33
about 1 year ago
Amendments on November 11, 2024
http: Add HTTP(s) module
For now this just downloads files that aren't text/plain or
text/markdown but the Markdown parsing isn't implemented yet.
Also stop having every handler re-parse the URI, just parse it once
and ask the handler if it wants it.
util: Fix snprintf not truncating when the format string is too long
We were correctly stopping when the resulting buffer was becoming
longer than size, but if the input format string was longer than the
size, it was incorrectly copying the whole thing. This wasn't much
of a problem since passing a user-supplied format is dangerous anyway
but this needed fixing.
Since we weren't using vfprintf, drop the FILE mechanism and
implement bounds checking directly in vsnprintf. This is easier to
understand and may be a tad more performant.
*: Shuffle things around yet again
Now TCP and TLS connections use the same callbacks so a module
doesn't have to do different things for plaintext or TLS.
Also reduce the amount of non-protocol-specific logic that has to be
in each protocol module and reduce duplication.