about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* js: merge some type modules into jstypesbptato2024-01-1116-51/+52
| | | | They only had type definitions, no need to put them in separate modules.
* pager: simplify updateReadLinebptato2024-01-111-14/+16
|
* Fix windowChange not refreshing valid media queriesbptato2024-01-103-1/+7
| | | | | | | | * css/cascade: copy stylesheet in applyMediaQuery (so that changes are reverted on re-style) * buffer: clear prevstyled in windowChange (to avoid using cached results from previous cascading passes); set window.attrs * pager: avoid windowChange if new attrs are identical to the old ones
* js: use Nim allocatorbptato2024-01-082-17/+49
|
* Add urlenc, urldec; fix a URL encoding bug; improve trans.cgibptato2024-01-083-13/+21
| | | | | | | | | | * Fix incorrect internal definition of the fragment percent-encode set * urlenc, urldec: these are simple utility programs mainly for use with shell local CGI scripts. (Sadly the printf + xargs solution is not portable.) * Pass libexec directory as an env var to local CGI scripts * Update trans.cgi to use urldec and add an example for combining it with selections
* Use std/* imports everywherebptato2024-01-0762-190/+189
|
* tojs: document + remove unused JSCFunction converterbptato2024-01-071-7/+41
|
* request: don't deny BodyInit that is not an objectbptato2024-01-061-3/+0
| | | | This breaks string conversions.
* Set cgiDir for client loader processbptato2024-01-063-4/+7
|
* Fix some casing issuesbptato2024-01-068-15/+17
|
* Merge data/idna with types/urlbptato2024-01-042-52/+49
| | | | No need to have a separate directory for just 3 functions.
* charwidth: use pre-generated map filebptato2024-01-043-178/+42
| | | | Also for reducing compilation time.
* idna: use pre-generated map file, misc changesbptato2024-01-041-174/+38
| | | | | | | | | Speeds up compilation somewhat. Included in the repository because it's not that huge. misc changes: * use seq, not set for UCS-16 sets (it takes up less space) * remove unnecessary noSideEffects casts
* css/sheet: skip media queries without blocksbptato2024-01-041-0/+3
| | | | Without this, media queries without a block would crash the buffer.
* buffer: do not trap SIGINT to cleanupbptato2024-01-032-2/+2
| | | | | | | We trap SIGINT with setControlCHook to avoid buffers being killed by the process group receiving a SIGINT; trapping it to cleanup has the opposite effect. SIGTERM should be enough, as that is what we use for cleaning up buffers.
* loader: send error message str for disallowed URLbptato2023-12-291-3/+3
| | | | buffer was crashing with an EOFError otherwise
* Compile with styleCheck:usagesbptato2023-12-2824-67/+67
| | | | much better
* dom: export import maps allowedbptato2023-12-251-1/+1
| | | | whoops
* dom: use JS_EvalFunction; add module fetching stubsbptato2023-12-256-51/+164
| | | | (still no module support in buffer...)
* Fix warnings on Nim 2.0.2bptato2023-12-242-3/+3
| | | | | | | | One is a false-positive (in dom). The other one in pager is something I hadn't noticed before, that's nice. For now I want to avoid making a change that may break things, so I just removed the dead code.
* bindings/quickjs: cint -> csize_tbptato2023-12-232-3/+5
| | | | | | cint was incorrect :/ Makes me wonder if maybe we should just use futhark after all...
* dom: use std/ in importsbptato2023-12-221-8/+8
|
* dom: simplify fetch classic scriptbptato2023-12-221-22/+21
|
* buffer: prevent crash in reshape before document is parsedbptato2023-12-221-0/+2
| | | | Can happen e.g. if the window is resized or the user manually reshapes.
* buffer: clean up ssock on being killedbptato2023-12-213-21/+40
| | | | | | * use signal handlers to avoid littering tmpdir with dead sockets * add connection reset error (for socketstream) * convert some imports to new style
* cgi: return ConnectionError when script is not executablebptato2023-12-212-1/+3
|
* loader: refactor onRead/onErrorbptato2023-12-211-19/+22
| | | | | | It was originally written this way to accomodate for the broken std file API. We no longer use that in buffer, so we can use a more correct version now.
* container: fix gotoMarkYbptato2023-12-211-1/+1
| | | | | | Now it actually does what it was supposed to do. Also, clarify what it does in config.md
* js: fix nil deref in jsgetpropbptato2023-12-201-4/+9
| | | | Turns out desc can in fact be nil.
* html/dom: do not submit implicitly if there is a submit buttonbptato2023-12-181-8/+10
| | | | | | | | | | | | | | | | See e.g. the sr.ht issue tracker, now forever tainted by the tickets I accidentally submitted :P Chawan will gladly autosubmit without the user having written anything in the textbox just by writing some text in the title. The problem is that graphical web browsers typically have a "submit" keybinding (enter), and a "next field" keybinding (tab). The implicit submission mechanism was created with graphical browsers in mind; like w3m, Chawan only has an "ok" keybinding, which may or may not also mean "submit". With this solution, only forms that could not otherwise be submitted will autosubmit.
* socketstream: get rid of emitsbptato2023-12-183-50/+75
| | | | Use .compile, as that is supported by nlvm too.
* strwidth & url fixesbptato2023-12-163-7/+7
| | | | | | * actually search Combining for isCombining * fix searchInMap * fix cmpRange of url
* container: fix multi-byte selections, do not append newlinebptato2023-12-161-7/+11
| | | | | | We need to select (first byte of first char)..(last byte of last char). Also, in line/block mode we no longer add the final newline to selections.
* config/toml: fix consumeComment overriding nodesbptato2023-12-151-1/+2
| | | | | We must first check if there is really no node to attach the comment to...
* config: allow overriding default prepended schemebptato2023-12-152-2/+4
|
* Implement local CGI error message handlingbptato2023-12-157-8/+44
| | | | | | This was documented, but not implemented until now. Also, improve the loader module's protocol documentation.
* ftp: fix unnecessary slashes being added to path; move bindings/curlbptato2023-12-151-425/+0
| | | | also in ftp: clean up resources before exit
* buffer: use BufferSize constantbptato2023-12-151-1/+1
|
* Set ishtml in the correct place, take ishtml on clonebptato2023-12-151-1/+2
|
* container: track ishtml statusbptato2023-12-152-1/+4
| | | | | This way we can at least view HTML source of x-htmloutput filtered buffers. TODO: make it render the actual source instead.
* charcategory: move out isDigitAsciibptato2023-12-143-6/+4
| | | | so we do not have to import unicode
* socketstream, serversocket: portable bindUnixbptato2023-12-144-10/+50
| | | | | reimplementing it portably in Nim seems incredibly annoying, so we just use C
* client: nil check connectSocketStream resultbptato2023-12-141-0/+5
| | | | | It may fail if the buffer process could not successfully create a server socket.
* client: avoid nil defect in flushConsolebptato2023-12-141-0/+5
|
* config: do not override user-defined urimethodmapbptato2023-12-142-1/+6
| | | | UMM resolution takes the first entry.
* chapath: add missing returnbptato2023-12-141-1/+2
|
* loaderhandle: fix ConversionDefect in getFdbptato2023-12-131-2/+7
| | | | | We must save fd in the constructor, because the stream type may be changed while loading.
* Various fixesbptato2023-12-137-40/+52
| | | | | | | * Makefile: fix parallel build, add new binaries to install target * twtstr: split out libunicode-related stuff to luwrap * config: quote default gopher2html URL env var for unquote * adapter/: get rid of types/url dependency, use CURL url in all cases
* http: use CURLU for URLsbptato2023-12-131-0/+78
|
* break up twtstr somewhatbptato2023-12-1318-380/+397
| | | | | Avoid computing e.g. charwidth data for http which does not need it at all.