about summary refs log tree commit diff stats
path: root/src/config
Commit message (Collapse)AuthorAgeFilesLines
...
* chapath: add missing returnbptato2023-12-141-1/+2
|
* Various fixesbptato2023-12-131-1/+1
| | | | | | | * 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
* Move gopher to adapter/bptato2023-12-121-10/+1
| | | | Also, move default urimethodmap config to res.
* Move out ftp: protocol; fix some local CGI bugsbptato2023-12-121-0/+3
|
* Move out file: protocol handling to adapter/bptato2023-12-121-1/+2
|
* local CGI improvements, move data: to cgi-binbptato2023-12-121-0/+1
| | | | error codes are WIP, not final yet...
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-121-0/+1
| | | | | | | | | | | | | | | * Add MAPPED_URI_* as environment variables when a request is coming from urimethodmap It costs us compatibility with w3m, but it seems to be a massive improvement over smuggling in the URL as a query string and then writing an ad-hoc parser for every single urimethodmap script. The variables are set for every urimethodmap request, to avoid accidental leaking of global environment variables. * Move about: to adapters (an obvious improvement over the previous solution)
* Add support for gemini by default, update readmebptato2023-12-101-6/+17
| | | | | No need to leave gemini support in the bonus folder. Still TODO: proxy support.
* mailcap: add $MAILCAP_URLbptato2023-12-101-1/+1
| | | | | | This is better than %u as it is backwards compatible (i.e. does not rely on other user agents doing whatever upon encountering an unknown substitution template.)
* Separate gopher conversion from main binarybptato2023-12-102-1/+18
| | | | | | | | | | | | | | | | | | | | | Now we use a (much simplified) gopher2html binary in libexec, instead of converting gopher directories to HTML in loader/gopher. This has two advantages: * Less ugly conversion logic in the loader module; we can just convert the file line by line. (The previous converter also had some correctness issues, that is fixed now as well.) * If the user desires, they can replace the gopher converter with another binary using the mailcap mechanism. The disadvantages are: * For now, source display is broken. This is a problem with all mailcap filters in general, and should be fixed in the future. (That said, the previous version also only displayed the converted HTML source, which was not really useful anyway.) * The proper directory structure is required for this to work; OTOH plenty of work has been done so that this is as frictionless as possible, so it should not really be a problem.
* Enable finger protocol by defaultbptato2023-12-101-1/+5
| | | | | | * Add a default urimethodmap that points finger: to cha-finger * Install cha-finger to /usr/local/libexec/cha/cgi-bin by default * cha-finger: use ALL_PROXY if given, die if curl is not installed
* config: better path handling; fix array parsing bugbptato2023-12-103-17/+320
| | | | | | | | | * Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory.
* pager: add marksbptato2023-12-091-0/+1
| | | | | Default is vi-style, but w3m-style marks work as well; see bonus/w3m.toml.
* pager, container: add text selection/copyingbptato2023-12-031-0/+2
| | | | | | | | | | * Add select & copy selection functionality to container * Fix bug in generateSwapOutput where output could be misplaced because of zero-width cells * Add fromJSPromise, call runJSJobs in every iteration of the headed event loop * "await" pager actions that output a promise * Change default view source keybinding to `\'
* config: add bare aliases for "8bit", "24bit"bptato2023-11-261-2/+2
| | | | | | | | | | | Without this, setting color-mode using -o required quoting the values, and then shell-quoting the quotes themselves (cha -o 'display-color-mode="24bit"'). Instead of more special casing in the TOML parser, we just add aliases for these enum values that can be parsed using TOML bare string rules. So now this works: cha -o display.color-mode=true-color
* twtstr: remove tolower, isWhitespacebptato2023-11-202-5/+6
| | | | | | | | * tolower: strutils toLowerAscii is good enough for the cases where we need it. Also, it's easy to confuse with unicode toLower and vice versa. * isWhitespace: in AsciiWhitespace is more idiomatic. Also has a naming collision with unicode toLower.
* Add -C optionbptato2023-10-271-6/+9
|
* toml: fix dquote escapingbptato2023-10-261-1/+1
|
* reduce new() usagebptato2023-10-251-2/+2
|
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-1/+10
|
* container: add cursorNthLink, cursorRevNthLinkbptato2023-10-141-1/+1
|
* config: fix `include` namingbptato2023-10-091-4/+4
| | | | use what is documented
* Add w3m-cgi-compat optionbptato2023-10-011-1/+3
|
* Use twtstr.join everywherebptato2023-10-011-2/+2
|
* Add urimethodmap supportbptato2023-09-301-19/+31
| | | | yay
* loader: add local-cgibptato2023-09-301-1/+4
| | | | | | | | | | | Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart
* toml: fix bug in multiline string parsingbptato2023-09-251-0/+5
|
* config: add missing \nbptato2023-09-201-1/+1
|
* Accept bare strings in -o, fix -o with missing newlinebptato2023-09-202-14/+80
| | | | | | | | * Bare strings are now allowed when specifying config options through -o. * Fix a bug where options specified with -o would be disregarded unless a newline was included. * (Also, add a TOML stringifier routine for debugging.)
* mailcap: fix regressionbptato2023-09-161-1/+1
| | | | not that this code path is ever executed
* mailcap: unquoteCommand improvements/fixesbptato2023-09-161-34/+57
| | | | | | | | * quote substituted URLs, mime types and named attributes too * change quote state: now we use a stack of quote states, new states are pushed/popped when a process substitution is encountered * fix named attribute state (it was incomplete) * remove superfluous tolower statements
* mailcap: allow whitespace after subtypebptato2023-09-161-1/+1
|
* move around more modulesbptato2023-09-143-5/+5
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* toml: fix underscore number separatorbptato2023-09-131-1/+1
| | | | | | Underscores should not be added to repr. Also, was_num should only start as true if the first character is a number, and must be true after the while loop.
* fix compile errorbptato2023-09-131-1/+1
| | | | aaaaaa
* toml: simplifybptato2023-09-131-4/+2
| | | | I meant to put this in the previous commit
* toml: fix bugs in parseNumberbptato2023-09-131-12/+15
| | | | | The input c was not considered, so positive/negative/non-decimal number parsing was incorrect.
* toml: do not stream inputbptato2023-09-131-4/+1
| | | | | | | | | It is more efficient to just read the whole file into memory than to... read the whole file into memory, but one piece at a time, while calling the rather slow readLine function for each chunk. (Also, configuration files are rather small, so even a proper streaming implementation would be pointless.)
* toml: add support for hex/octal numbersbptato2023-09-131-9/+45
|
* Add vi-style numeric prefixes, make gotoLine 1-basedbptato2023-09-081-0/+4
| | | | | | | | * it is now possible to jump to the nth line by typing {n}G * gotoLine is now 1-based, so to go to the first line you would use pager.gotoLine(1) * it is now allowed to return a function from a keybinding (which will be subsequently executed as a regular keybinding)
* toml: complain more on unexpected EOFbptato2023-09-071-2/+3
|
* toml: remove unused importbptato2023-09-071-1/+0
|
* toml: fix newline counting in multiline stringsbptato2023-09-071-2/+4
| | | | also, replace the todo comment
* loader: add data URLsbptato2023-09-011-1/+6
|
* Add jsdelprop, allow deletion of ActionMap propsbptato2023-08-291-0/+6
| | | | mostly for symmetry with real objects
* Add jssetprop, make ActionMap editable from JSbptato2023-08-291-18/+20
| | | | | | | | | jssetprop just adds the set_property exotic function. ActionMap is now editable from JS; the setter is implemented in the same way as bindPagerKey/bindLineKey. (In fact, now those two just call the setter.) But this is still rather inefficient and subject to change.
* javascript: refactorbptato2023-08-281-2/+3
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* javascript: de-ref some interfacesbptato2023-08-281-7/+16
| | | | | | | Also, make ActionMap use getters/hasprop instead of a table copy. peakmem remains up +200M at 950M after commit 9991bd3393483158ab0d1b9d995f695dee3c65dc. :(
* config: allow modification through JSbptato2023-08-271-44/+59
| | | | | | | This used to be possible until I moved everything under separate headers to their respective objects. Now it works again, mostly; modification of some attributes is still missing.
* mailcap: fix newline parsingbptato2023-08-261-1/+1
| | | | skipBlanks should not consume newlines.