about summary refs log tree commit diff stats
path: root/adapter
Commit message (Collapse)AuthorAgeFilesLines
...
* md2html: fix newline after list before EOFbptato2024-12-141-1/+1
|
* lcgi: fix error handlingbptato2024-12-111-1/+1
| | | | POSIX does not guarantee that an error is negative.
* Improve error messagesbptato2024-12-104-15/+15
|
* md2html: another list bugfix, add a testbptato2024-12-041-2/+1
|
* md2html: fix blank line handling & paragraphs in listsbptato2024-12-041-50/+112
| | | | | | | turns out whitespace-only lines also count as blanks also, fix the long-standing issue where a paragraph in a list would break out of the list
* gopher: fix an escaping bug, add some item typesbptato2024-11-302-6/+7
| | | | | | the types are from gopher+. (not that we support gopher+, but they work anyways if mime.types and mailcap is configured)
* gmi2html: optimize a bitbptato2024-11-261-7/+9
|
* file: remove some dead codebptato2024-11-241-6/+0
| | | | no longer needed as we just redirect on wrong dir URLs
* gopher: do not assume selector starts with /bptato2024-11-201-1/+1
| | | | | | It does not have to, according to the standard. (Slashes before the item selector are still collapsed.)
* md2html: fix parsing of nested parens in linksbptato2024-11-201-1/+1
|
* sixel: fix transparency in monochrome modebptato2024-11-201-0/+3
| | | | Assume it is required, so that we can still skip the first scan.
* gemini: set host name extension, refactorbptato2024-11-172-39/+33
| | | | gmifetch did this, but apparently it got lost in the rewrite.
* gopher: fix queries with spacesbptato2024-11-151-1/+2
|
* twtstr: beforeLast -> untilLastbptato2024-11-151-1/+1
| | | | for consistency
* gopher: url decode path & query before submissionbptato2024-11-121-1/+3
|
* Remove useless filebptato2024-11-121-1/+0
|
* url: reduce URL object size, simplifybptato2024-11-111-1/+4
| | | | | | | * query, fragment are now strings, not options * get rid of Host, Path types, now hostname/pathname are strings * fix ipv4 parsing error case * in file protocol, fix URL for dirlist without slash with a redirection
* Fix some C warnings, more makefile vars, etc.bptato2024-11-082-3/+3
| | | | | | | * add some more env vars to makefile * remove fpermissive from GCC builds * update Monoucha * fix borked seccomp filter length safety check (ugh)
* ftp: improve sendCommand error handlingbptato2024-11-071-17/+15
|
* gopher: rewrite in shellbptato2024-11-056-172/+121
| | | | | | also, make gopher2html more lenient, and add some functioning error handling in our nc clone. (other scripts still have to be updated to benefit from this)
* gopher: move ipv6 handling to lcgibptato2024-11-042-10/+18
|
* utils, types: merge some modulesbptato2024-11-031-3/+1
| | | | | * line, vector, matrix -> path * twtuni, charcategory -> twtstr
* protocol: sandbox more network processes + fix some gemini bugsbptato2024-11-026-9/+15
|
* urlenc: strip a trailing newline from input, etcbptato2024-11-012-39/+39
| | | | | | | | | * make it so 'echo "$var\n" | urlenc' works as expected * add special query encode set * set default encode set to form data * document encode sets in help message also, remove a redundant percentEncode implementation from gopher2html
* config: refactor, accept more possible config dirsbptato2024-10-282-11/+0
| | | | | | | | | | | | | | | | | | | | | I'm starting to favor dotfiles over XDG basedirs, but there's no reason why we couldn't have both. So now the search path is: 0. if config was set through -C, use that 1. $CHA_CONFIG_DIR is set -> $CHA_CONFIG_DIR/config.toml 2. $XDG_CONFIG_HOME is set -> $XDG_CONFIG_HOME/chawan/config.toml 3. ~/.config/chawan/config.toml exists -> use that 4. ~/.chawan/config.toml exists -> use that Notably, this makes it so the default directory is ~/.chawan *if* you don't have an existing config.toml file. So in that case known_hosts will be placed in ~/.chawan/known_hosts. However, configurations with a config in ~/.config/chawan/config.toml continue to work as expected, as for those the known_hosts file remains inside ~/.config/chawan/. Finally, I've added a default user CGI directory to reduce friction in setting CGI up. (Like known_hosts, it's also relative to whatever config dir you have.)
* md2html: fix index defect on EOFbptato2024-10-281-2/+6
|
* gemini: fix unnecessary NUL chars being sentbptato2024-10-271-1/+1
|
* md2html: support setext headingsbptato2024-10-261-15/+37
| | | | also, parse the last paragraph properly
* sftp: switch to libssh2bptato2024-10-268-212/+237
| | | | | | | | | | | | | | | | | | | Just to remove a level of indirection; the libcurl API is annoying to deal with when you don't even need asynchrony. It doesn't change anything in actual dependencies, because libcurl uses libssh2 too - however, now only http depends on libcurl, which makes reducing it to an optional module feasible. Still, I've listed libssh2 (along with OpenSSL - long overdue) in the readme just in case some OS doesn't pull in the headers by default as a libcurl dependency. Also, fix some bugs: * fix missing CWD command in FTP * resolve directories even if they don't end in / * allow links without -> in dirlist
* md2html: close p on headingbptato2024-10-251-29/+15
|
* sixel: simplify a bitbptato2024-10-241-14/+11
|
* color: use 64-bit SWARbptato2024-10-221-2/+2
| | | | | I originally left this at 32-bits because I was on a 32-bit arch, but that is no longer the case.
* md2html: misc improvementsbptato2024-10-211-10/+7
| | | | | | | | * fix line not being printed on pre end * add head to pre tags - this isn't in CommonMark, but it makes it easier to write hybrid markdown/HTML. * use character range constants
* sandbox: do not ask for signal permissionsbptato2024-10-173-0/+3
| | | | | On a second thought, no timeouts for name resolution is fine - and even if it weren't, it's better implemented in the loader.
* dirlist2html: remove redundant slashbptato2024-10-141-5/+2
|
* dirlist2html: fix heisenbug, refactorbptato2024-10-131-72/+74
| | | | | | | | so it turns out you *can't* just deref refcounted strings through a ptr... the entire algorithm was a mess anyway, so I've just re-done the sorting with refc.
* lcgi: support HTTP proxybptato2024-10-131-15/+52
| | | | | | | not quite sure this approach is right, because it still won't work with HTTPS without linking everything with OpenSSL... maybe a socks5 bridge through a UNIX socket would work better?
* lcgi_ssl: fix libressl compatbptato2024-10-132-6/+8
| | | | | * use correct headers for types (libressl doesn't have types.h) * use SSL_get_peer_certificate (libressl doesn't have a get0 variant)
* Add `nc' tool & adjust finger/spartan to use itbptato2024-10-124-57/+82
| | | | | | | | | Simple netcat clone, useful for portable scripts. Especially because some netcats will close the connection as soon as I close stdin... this one only quits when either stdout or the socket refuses new data. Also, it uses our standard TCP connection routine, meaning it respects ALL_PROXY. (i.e. now spartan works with socks5 too)
* dirlist: separate out into dirlist2htmlbptato2024-10-126-275/+224
| | | | | Now the dirlist parser lives inside dirlist2html, and the file protocol just emulates FTP LIST.
* gmifetch: rewrite in Nimbptato2024-10-124-658/+491
| | | | | | | | | | This finally makes it possible to use socks5 for Gemini. Also slightly refactored the config, to make it easier to pass on the config dir. By the way, the known_hosts file is now stored in the config dir too. The adapter will try to move it to there from the old location.
* layout, pager: preserve tabs on display, selection & outputbptato2024-10-101-0/+8
| | | | | | | | | | | | Substitute tabs with one of eight PUA characters based on their width, and convert them back in the pager: * TUI mode always prints spaces, but now handles tabs appropriately on cursor movement * dump mode tries to preserve hard tabs, but uses soft tabs when that is not possible (e.g. tabs after a margin, tab with background color, etc) * selection mode always outputs hard tabs.
* Fix compilation on Nim 2.2.0bptato2024-10-101-1/+1
|
* resize: use srgbbptato2024-10-091-5/+5
| | | | | | | | since that's our input color space (Actually, mainstream browsers seem to use linear scaling nevertheless. But apparently that produces surprising results in some cases, and stbir can do srgb, so might as well use it.)
* color: reduce CellColor size, misc color refactoringbptato2024-10-063-12/+9
| | | | | | * split out CSSColor from CellColor; now CellColor is just 4 bytes (which helps reduce FormatCell size) * unify color function naming (still not perfect)
* man: check exit code after reading first linebptato2024-10-061-8/+14
|
* sixel: simplify compressSixelbptato2024-10-051-12/+5
|
* md2html: support + lists, ~~~ blocksbptato2024-10-041-5/+7
|
* dynstream: fix memory leakbptato2024-10-043-4/+4
| | | | now I know why overloading dealloc felt wrong
* sixel, term: reduce half-dump special casingbptato2024-10-041-62/+46
| | | | | | | Makes it slightly easier to debug image output. Also, we stop sending dimension headers, and no longer check for the scheme env var to make CLI invocation a bit less annoying.