about summary refs log tree commit diff stats
path: root/adapter
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate some superfluous copiesbptato2025-05-111-2/+2
|
* Enable ProveInit warningbptato2025-05-102-2/+5
| | | | It has caught some minor bugs.
* man, genidna: do not use std/unicodebptato2025-05-041-2/+1
|
* Improve static buildsbptato2025-05-014-8/+27
| | | | | Now we generate a single "ssl" binary for CGI scripts that need OpenSSL to reduce the output size.
* myaddr: backport & switch to newSeqUninitbptato2025-04-302-2/+2
|
* http: cast away GCC complaints properlybptato2025-04-241-4/+7
|
* http: re-add brotli supportbptato2025-04-231-1/+97
| | | | | Unfortunately this is unavoidable, as some servers still seem to return brotli despite our Accept-Encoding header not including it.
* lcgi_ssl, sftp: add cflags from pkg-configbptato2025-04-142-1/+5
|
* http: replace with newhttpbptato2025-04-142-637/+1306
| | | | | I think it works well enough at this point. If it doesn't, somebody will complain :)
* http: merge in curl.nimbptato2025-04-142-456/+456
|
* nc: various fixesbptato2025-04-131-14/+9
|
* sftp: verify known_hostsbptato2025-04-131-4/+140
| | | | Long overdue... the API is extremely painful to work with.
* sftp: fix IdentityFile scan orderbptato2025-04-091-2/+4
|
* lcgi_ssl: disable DHEbptato2025-03-221-1/+1
|
* newhttp: drop libcurl dependencybptato2025-03-212-2/+43
| | | | Now it only does HTTP/1.1, with Connection: close.
* bonus: add new http handler with tinflbptato2025-03-201-0/+19
| | | | not much else is done yet, but it's a start
* curl: fix build on OS Xbptato2025-03-101-4/+2
| | | | | | (also removed unused windows check) ref. https://todo.sr.ht/~bptato/chawan/50
* Refactor bufreader, bufwriterbptato2025-03-011-2/+2
| | | | | This adds a runtime check to packet readers to ensure that all fds have been read, and switches to seqs for packet writers.
* nc: remove redundant quitbptato2025-03-011-1/+0
|
* dynstream: remove exceptionsbptato2025-02-2612-86/+115
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* uri2html: uri-decode entriesbptato2025-02-191-1/+2
|
* file: fix directory listingbptato2025-02-051-4/+3
|
* img: remove intermediate C filesbptato2025-01-3010-49/+50
| | | | | | Nim doesn't consider included files when recompiling C files, which would sometimes lead to fixes not being compiled in without a clean build.
* about: move to loaderbptato2025-01-301-20/+0
| | | | | This means we can now use about:downloads for downloads. Plus it shaves off some ks from the distribution.
* nanosvg: fix infinite loopbptato2025-01-291-1/+4
| | | | My bad; not present upstream.
* file, sftp: send Content-Lengthbptato2025-01-242-14/+28
|
* term: rework input bufferbptato2025-01-171-2/+2
| | | | heh
* More strict defsbptato2025-01-143-5/+5
|
* Fix some strict defsbptato2025-01-121-1/+1
|
* tools, format: disable ARCbptato2025-01-082-4/+0
| | | | it's still not quite there yet T_T
* dirlist2html: fix setlocale callbptato2025-01-041-1/+1
|
* nanosvg: parse invalid transform args more efficientlybptato2025-01-031-2/+2
| | | | If there is no ( or ), then just skip until the NUL terminator.
* format, tools: use ARCbptato2024-12-302-0/+4
| | | | | Greatly reduces binary sizes. I won't risk it for protocols yet. Neither for img, because it doesn't work with sixel at all. (y?)
* Add built-in image viewerbptato2024-12-301-0/+22
| | | | | | It works by emitting a base64 URI inside an img tag. Very inefficient, but useful if no external viewer is set up (e.g. over SSH).
* lcgi: add missing noreturnbptato2024-12-291-1/+1
|
* uri2html: escape ampersandbptato2024-12-281-1/+1
|
* CHA_CONFIG_DIR -> CHA_DIRbptato2024-12-272-2/+2
| | | | | | | It isn't really limited to config. It just happens to be in XDG_CONFIG_HOME because XDG basedirs suck. (W3M_DIR works similarly.)
* Strict def fixesbptato2024-12-224-3/+5
|
* uri2html: skip hr if title is emptybptato2024-12-221-1/+1
|
* Misc character display fixesbptato2024-12-221-1/+19
| | | | | | | | | | | | | | | | | | * fix luwrap comparison function * strip high unicode controls in term/pager * use wcwidth in dirlist2html * remove combining category from strwidth * remove unused "disallowed" field from lineedit My initial goal with switching to wcwidth in dirlist2html was just to get rid of the outdated combining map in charwidth_gen. Then I realized that layout will normalize those out anyway, so we don't actually have to deal with them anywhere. Also, I found a few bugs in the process; high unicode control chars not being stripped out was a particularly bad one, as it allows for pages to mess up the terminal output. (Easiest way to replicate: just open a random binary file without this patch.)
* Add historybptato2024-12-171-0/+3
| | | | | It's still missing a "color visited links" feature, but it's better than nothing.
* twtstr: improve content type parameter handlingbptato2024-12-224-5/+4
| | | | | * accept quoted-string * quote values in setContentTypeAttr
* nanosvg, myaddr: fix obuf type and myaddr shimbptato2024-12-201-1/+1
| | | | | | | this is exactly why I shimmed in unsafeAddr, but the compiler isn't cooperating... :( well, it seems to work with auto.
* nanosvg: fix preserveAspectRatio parsingbptato2024-12-191-3/+3
|
* img: add nanosvgbptato2024-12-194-0/+4641
| | | | | | | | | | | | | | | | | | Only for SVG in image tags for now. Plus it comes with NanoSVG's limitations, i.e. no text. Still, better than nothing. I've gone through open tickets and PRs at upstream to check for known security issues. As a recurring theme I found that parseTransform fails to check the result of parseTransformArgs, so I fixed and refactored that part. (Probably not a security issue, but still UB.) Also, I've added a fix for an OOB read in parseColorRGB. Future directions: * replace nanosvgrast with our own rasterizer in canvas (will have to be extended somewhat...) * add text rendering (with unifont, which canvas already includes)
* default(T) -> T.default, add some strict defsbptato2024-12-173-10/+10
|
* gemini: fix known hosts not being read on *BSDbptato2024-12-161-0/+1
| | | | Only glibc starts from the file's beginning with "a+".
* chabookmark: fix new item placement, better error handlingbptato2024-12-151-18/+25
| | | | it should put it after the old items, not before them.
* md2html: add heading class to heading anchorsbptato2024-12-152-6/+9
| | | | makes it easier to hide them
* Add chabookmark scriptbptato2024-12-141-0/+235
| | | | | | | | | | Finally it's done. It's basically w3mbookmark, but using Markdown instead of HTML and in POSIX shell instead of C. As a bonus, it can also (sort of) import w3mbookmark's output. Well, at least it worked on my bookmark file, but there is a known issue with bracket escaping... if it goes wrong, it's simple enough to edit it manually :P