Commits
- Commit:
3d89457cdeba5041aa6f0c1f8640b91bcbb6ec51
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
code: add wrappers for common failure cases
Certain calls to well-known functions sometimes result in similar
error handling across the code base. Sometimes there's a need to
centralise the failure case.
Achieve this for common wrappers to often-used functions.
The transformation is achieved via coccinelle, commited with this patch.
Note that coccinelle can be told to ignore code blocks with comment
delimiters.
This transformation applies just to telescope's code, and not any of the
bundled depdencies in telescope (libgrapheme).
- Commit:
fd1c80ce62030c6e75bb05db1aee43425d70fc97
- From:
- Omar Polo <op@omarpolo.com>
- Date:
constify the parser structs
- Commit:
c1d27b0e114e6a65f7979971940df212f00bb2ae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
untangle a bit buffers and parsers
Now buffers have a nicer interface, taking explicitly the buffer
where they push stuff, and the code that deals with buffers doesn't
need to peek into the parsers. The parsers now are 'pure' structs
without state attached to them, the state was moved to the buffer.
- Commit:
47eaa0e007e02fd3af48c398d5409c303562b15c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
pagebundler: always append a NUL byte, don't emit full length
Even if we have the full length for the about:* pages, we just treat
them as C strings. Except that they don't have a NUL terminator.
Add it so we can continue to prented they're strings.
- Commit:
ef1a5eb9f7f71d8d27af99f0766c5d5d9dba62f2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix crash in directory listing
don't try to double fclose(3) the same file.
- Commit:
f0e62b859a56026db832e80814a11b27f6a7332f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
draft of telescope-identity(1)
This is intended to generate and manage certificates outside of
telescope. Some operations are already available in the telescope
UI, such as use and forget a certificate for a specific page, but
generate and removal are hard at the moment to implement inside
telescope limited UI, so provide an helper program for that.
- Commit:
108aa3129d8eb612679e52d3c294ec5d758cfd59
- From:
- Omar Polo <op@omarpolo.com>
- Date:
return 0 on success (eventually -1 for failures)
- Commit:
f7db6d139bba0fb56f0560533b77af219958ecc0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
some headers cleanup
try to not include headers from headers, and remove some redundant
include.
This helps in modularizing the codebase and also helps during
incremental compilations.
- Commit:
609eaf39a9373e7f4e7e225a6a14c0819fa7271f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix certs_file_tmp path
- Commit:
64b6a4519290e0406fc9140c25418363cfc9bf4e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename the cert mapping file to certs.conf
- Commit:
d35e18b31b0e05c6178a6bfa891dd2e2dadf3db1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
first draft of client certificate support
At the moment telescope loads a mapping host:port/path -> certificate
from a file and always uses it, no ways to change it, use a temporary
one, generate a new one, etc are provided yet.
The format of ~/.telescope/certs/certs is
host port path certificate file name
where the certificate file name is the name of a file inside
~/.telescope/certs.
~/.telescope/certs/ is ~/.local/share/telescope/ when using XDG.
- Commit:
0ec5e323572bb5548370a1cbc339457205871ce6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix dst buffer size; no-op in practice
- Commit:
26e95b82a96d043e96f6364a9053c02d5d855ece
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move cwd to fs.c
- Commit:
64f4f8e21263a2ffeede63a19bbb28c897a90f2a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move load session stuff to session.c
- Commit:
3078e1bc2a28ec8a601f3880af32291ca7119434
- From:
- Omar Polo <op@omarpolo.com>
- Date:
merge update_cert and tofu_update into tofu_update_persist
- Commit:
4fa88f57fead5f472c4bbd60c65d70d884ccd6ee
- From:
- Omar Polo <op@omarpolo.com>
- Date:
merge tofu_add and save_cert into tofu_save
- Commit:
21268f10931a6c0ffd0b919e093a43dc31d86bb8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
constify
- Commit:
486bde7d965b776a646acd77807b514f3e16537c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move bookmark_page off fs.c
- Commit:
de6a6a402e45970c4b6d65778efc2e990c4a78a4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
generate session/history_file atomically
if an i/o error occurs while writing those files, they may end up
being corrupted or truncated. Use the approach already used for tofu,
write a temp file and rename(2) it to the correct position.
- Commit:
f63b8f7342aefba6b3dac50d6790981987c8faa8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
merge the fs into the ui process
The previous separation between the fs and ui process wasn't that good.
The idea was to have a `ui' process tightly sandboxed, but it was a lie
actually. `ui' was one imsg away from making internet connections and
accessing data on the disk, so it wasn't really limited in (almost) any
way.
Furthermore, having to serialize data to/from the fs proc started to
become not really maneagable.
As a first step to fix this situation, join the fs and ui process.
- Commit:
9e97090d644b51c0cb6e049e8c777139b18457fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
persist list of visited URLs to the disk
Persist a generalized history of visited URL in history_file and try to
keep it in sync during telescope usage and shutdown.
- Commit:
4cf6ba137fc2ca92f3066c390b89542d88735ef6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remote open: open an url into telescope from outside of it
if telescope is started with an url while there is already another
instance of it running and the -S flag is not provided, the link will be
automagically opened into the running instance of telescope.
Telescope now listens on a UNIX domain socket in ~/.telescope/ctl (or
~/.cache/telescope/ctl if XDG is used) for commands.
- Commit:
4aaf5de005720fd3086c249f6854b51a6c86ea92
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo in parse_session_line
without +4 strtonum sees top=X and cur=Y which are invalid numbers, so
the scroll position is lost.
- Commit:
e795e9355a607cbda3790e5c651c1a6f829e4326
- From:
- Omar Polo <op@omarpolo.com>
- Date:
save and restore scroll position
Save the offset to the first and current line of the buffers and restore
it when the page is loaded. This restores almost the exact viewport: we
save the offset of the *real* line in the document, but they get wrapped
before being displayed, so the actual restored position may be slightly
above from the original one (think of a long paragraph that gets wrapped
over multiple visual lines.) In practice, this isn't a drawback but
only an improvement over the current behaviour.
In the future we could save also the offset *inside* the line, to
restore the exact position, but that felt unnecessary for now.
Persisting the postion on the session file ensures that even when
re-opening telescope the scroll position is correct.
There are some very active pages, such as antenna or other aggregator,
where this feature doesn't really work well if you re-open the page
after a while, since new links are available, but otherwise is a god
sent!
See also github issue #1
- Commit:
8f1633da06463e8909dbf68a870aa64350f32a12
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify parse_session_line
drop sendtab which is not that useful and send the tab to the ui
process directly in parse_session_line. It's easier to skip malformed
session lines too!