about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* cascade: add missing nil checkbptato2024-09-021-1/+1
|
* loader: fix some fd leaksbptato2024-09-024-11/+37
| | | | + be a bit more paranoid about double closes
* doc: update manpagesbptato2024-09-0214-30/+387
|
* md2html: misc inline fixesbptato2024-09-011-114/+160
| | | | | * fix whitespace-surrounded asterisk turning into emphasis * slightly refactor parseInline (it's still quite ugly...)
* Update chagashibptato2024-09-012-1/+1
|
* pager: fix missing gotoLine return valuebptato2024-09-011-0/+1
|
* sixel: special case search for few color registersbptato2024-09-011-17/+58
| | | | | | See comment for details. (Also, set the palette size based on quality for toBlob.)
* canvas: make sure we don't link to QJSbptato2024-09-0111-192/+167
|
* url: reduce idna sizebptato2024-09-013-2155/+1181
| | | | | Instead of storing pointers to cstrings, put all of them in a single huge string and store indices of that.
* path: fix swap bug, refactor linesbptato2024-09-013-19/+21
|
* canvas: move to separate CGI scriptbptato2024-09-0123-364/+571
| | | | | | | | | | * stream: and passFd is now client-based, and accessible for buffers * Bitmap's width & height is now int, not uint64 * no more non-network Bitmap special case in the pager for canvas I just shoehorned it into the static image model, so it still doesn't render changes after page load. But at least now it doesn't crash the browser.
* git.cgi: add git blamebptato2024-09-011-11/+63
|
* layout: fix table height constraint typebptato2024-08-303-1/+35
| | | | | it's really min-height, not height; consistency is not CSS's strong suit...
* sixel: fix oobbptato2024-08-301-3/+2
| | | | whoops
* term, sixel: misc image fixes, sixel optimizationbptato2024-08-302-70/+121
| | | | | | | | * expand allowed color range somewhat * update maximum sixel size on window resize * fix kitty image cropping * use faster algorithm for sixel compression (also produces less wasteful output)
* md2html: support blockquotebptato2024-08-304-13/+30
| | | | + update todo, readme
* sixel: ditheringbptato2024-08-291-42/+73
| | | | | | | | | | | | | uses floyd-steinberg - I originally tried atkinson, but liked the results with fs a bit more. also, I got rid of the half hearted attempt to skip tree traversals for color lookups, as it performs horribly with dithering. it *did* work if I set Y as the key, but it still felt wrong - well, as it turns out, octree traversal is faster anyway, so just do that. it works out nicely because we can fill in holes (from dithering) with a linear search for the nearest match as we go.
* sixel: fix borked approximation schemebptato2024-08-291-41/+29
| | | | | | | | | | | ok, of course if you search for the nearest entry after setting blue as the lowest index bits the search will be biased towards blue... let's just skip the trouble of reconstructing closest color relations by storing hashes in the octree - this way, I can ensure that the final merged colors are present in the buckets that getColor then looks at (while we're at it, also fix the color run merging code in quantize.)
* Update readmebptato2024-08-281-0/+8
|
* sixel: minor optimizationsbptato2024-08-282-52/+89
| | | | | | * don't emit transparency request when we don't need it * add lookup table for missing hash entries * write(2)'ize
* sixel, term: fix off-by-1's in croppingbptato2024-08-282-52/+42
| | | | & clean up outputSixelImage in general
* Update showcase.pngbptato2024-08-271-0/+0
|
* term: fix crash on identical stacked imagesbptato2024-08-272-3/+5
| | | | | | | in fact, we consider these to be the same image, and arguably that's a bug in and of itself. but at least we don't crash anymore. (also, update todo)
* sixel: proper color quantizationbptato2024-08-273-40/+218
| | | | | | | | just use an octree. works fine afaict, though obviously somewhat slower than the static method (encoding is 2-pass now) & still has banding issues with many colors (will need dithering) also, fixed a bug that caused initial masks of bands to get misplaced
* pager: fix nav direction after view sourcebptato2024-08-271-0/+1
|
* stbi, jebp: use read/write instead of fread/fwritebptato2024-08-263-61/+131
| | | | | | | | glibc likes to do weird things (such as calling stat) when you use fread(3) and friends, so try to use functions that are more likely to just do a single syscall. Also, copy over some more paranoid read/write procedures to http.
* Add image docsbptato2024-08-251-0/+143
| | | | Somewhat rough, but better than nothing.
* dom: toBlob fixesbptato2024-08-251-20/+7
| | | | | | | | | | * fix return type * don't choke on empty bitmaps * don't check for Cha-Image-Dimensions in encoder output (it was unused anyways) Mainly so that I can spec the encoder without Cha-Image-Dimensions as an output header - it's pointless redundancy.
* makefile: misc fixesbptato2024-08-241-0/+4
|
* sixel: break out into a separate cgi scriptbptato2024-08-246-134/+355
| | | | | | | | This caches sixel output. Works best when the line height is a multiple of 6px, but should still be faster than the previous solution everywhere else too (simply by virtue of encoding separate images in parallel). Next step: actual color quantization
* layout: fix whitespace weirdnessbptato2024-08-233-1/+9
| | | | | avoid adding whitespace to the previous atom if it's not on the current line
* winattrs: un-snakeifybptato2024-08-237-18/+18
|
* cssvalues: fix broken vmin, vmaxbptato2024-08-231-2/+2
|
* Update monouchabptato2024-08-222-1/+1
|
* loader: fix crash on empty data URLsbptato2024-08-172-1/+9
|
* term: don't panic if termcap tgetent failsbptato2024-08-173-85/+110
| | | | | | | | If TERM is unrecognized by termcap, retry as dosansi. When that fails, just fall back to the non-termcap code path. (There is no reason to panic without termcap; it's just one of the several capability detection mechanisms we use.)
* buffer: fix some hover weirdnessbptato2024-08-151-7/+7
| | | | | | | | Setting the new hover value before unsetting the previous one would unset the new hover value for nodes in the same branch. In particular, this broke hover when moving the cursor from a pseudo element (e.g. ::before) to its parent.
* dom, xhr: slight progress on modules, fix an XHR bugbptato2024-08-155-59/+118
| | | | | | * actually download & compile modules (but don't run them yet) * fix a bug in XHR (on some older Nim versions, move() doesn't actually move)
* xhr: more progressbptato2024-08-1525-127/+328
| | | | | | | | | | * add responseText, response * add net tests -> currently sync XHR only; should find a way to do async tests... * update monoucha -> simplified & updated some related code that no longer worked properly
* xhr: progressbptato2024-08-138-85/+226
| | | | | | | | | | | | | * fix header case sensitivity issues -> probably still wrong as it discards the original casing. better than nothing, anyway * fix fulfill on generic promises * support standard open() async parameter weirdness * refactor loader response body reading (so bodyRead is no longer mandatory) * actually read response body still missing: response body getters
* mailcap: fix weird error handlingbptato2024-08-131-19/+13
| | | | | | * don't accept flags specified as named fields * don't error out on named field specified as flag * allow trailing whitespace on named fields & flags
* mailcap: various fixesbptato2024-08-112-43/+32
| | | | | | * parse last line even if it doesn't end with LF * parse flags & named fields case-insensitively * update naming
* dom: remove generic JS bindingsbptato2024-08-119-135/+156
| | | | Dispatch manually with fromJS instead.
* dom: fix crash on wrong image content typebptato2024-08-113-5/+10
| | | | + slightly optimize getContentType
* urldec: merge into urlencbptato2024-08-113-28/+30
| | | | also, move the ln command to make all
* md2html: label headings with their levelbptato2024-08-111-1/+2
| | | | like sr.ht does
* Update docsbptato2024-08-102-0/+24
|
* pager: fix incorrect error message in rewrite-urlbptato2024-08-101-3/+6
| | | | It did not actually break rewrite-url, but was still annoying.
* twtstr: don't cast in parseEnumbptato2024-08-091-2/+2
| | | | Nim 1.6 does not like it.
* sandbox: allow ugetrlimitbptato2024-08-091-0/+1
| | | | called on armhf