about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Move http out of main binarybptato2023-12-1314-358/+195
| | | | | | | | | | | | Now it is (technically) no longer mandatory to link to libcurl. Also, Chawan is at last completely protocol and network backend agnostic :) * Implement multipart requests in local CGI * Implement simultaneous download of CGI data * Add REQUEST_HEADERS env var with all headers * cssparser: add a missing check in consumeEscape
* Move gopher to adapter/bptato2023-12-123-164/+1
| | | | Also, move default urimethodmap config to res.
* Move out ftp: protocol; fix some local CGI bugsbptato2023-12-124-217/+18
|
* Move out file: protocol handling to adapter/bptato2023-12-124-130/+4
|
* local CGI improvements, move data: to cgi-binbptato2023-12-125-58/+88
| | | | error codes are WIP, not final yet...
* twtstr: import functions from gopher2htmlbptato2023-12-121-15/+10
|
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-124-41/+22
| | | | | | | | | | | | | | | * 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)
* layout: rounding error correction fixesbptato2023-12-111-2/+6
| | | | | * start from 1 * divide by total - 1, since we are counting the rounding error between each line
* css: add case-insensitive matchingbptato2023-12-113-18/+96
| | | | Also case-sensitive, but for now that is the same as normal matching...
* css: add text-transformbptato2023-12-113-11/+163
| | | | | | | Probably not fully correct, but it's a good start. Includes proprietary extension -cha-half-width, which converts full-width characters to half-width ones.
* layout: do not resolve floats if grandparent position is resolvedbptato2023-12-101-2/+2
| | | | | | | | | | Instead, position them at the end of their block's layout pass. Without this, they could be positioned too early, as the grandparent's position being resolved does not guarantee that the parent's position has already been resolved as well. (Unlike the comment suggests, flushMargins is not appropriate there.)
* layout: fix rounding error correctionbptato2023-12-101-11/+8
| | | | | * Actually calculate rounding error * Skip a loop over lines by accumulating rounding error in finishLine
* 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-102-1/+3
| | | | | | 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-103-116/+28
| | | | | | | | | | | | | | | | | | | | | 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-102-1/+9
| | | | | | * 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-107-35/+370
| | | | | | | | | * 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-095-15/+201
| | | | | Default is vi-style, but w3m-style marks work as well; see bonus/w3m.toml.
* pager: add precnum to [, ]bptato2023-12-092-13/+27
|
* pager: add `{', `}'; document externIntobptato2023-12-092-1/+34
| | | | | | | | { & } acts like in vi (except the cursor is not moved to the line beginning). No reason to leave externInto undocumented, as it is even used in the default config.
* sheet: fix overflow in addAtRulebptato2023-12-091-1/+1
| | | | It is enough to just take the len of children there.
* cascade: simplifybptato2023-12-091-2/+1
|
-0800 committer Kartik K. Agaram <vc@akkartik.com> 2021-02-20 23:40:32 -0800 7763 - baremetal/shell: newline' href='/akkartik/mu/commit/baremetal/501draw-text.mu?h=hlt&id=b70748960e48fb6d762cb900d7088a9e99dde535'>b7074896 ^
bb0e67a3 ^
74f1512f ^
bb0e67a3 ^
b7074896 ^
bb0e67a3 ^

63be7b7d ^
bb0e67a3 ^

44131682 ^
9822a242 ^



dbf434f0 ^
9822a242 ^



dbf434f0 ^
9822a242 ^
63be7b7d ^
9822a242 ^

8f34dfd1 ^
851959cc ^


8f34dfd1 ^
851959cc ^
44131682 ^

8f34dfd1 ^
44131682 ^


422ebaf8 ^
dbf434f0 ^
422ebaf8 ^



dbf434f0 ^
422ebaf8 ^
8f34dfd1 ^
44131682 ^

8f34dfd1 ^
851959cc ^


8f34dfd1 ^
44131682 ^

8f34dfd1 ^
117a710a ^


928fd47d ^
117a710a ^
928fd47d ^
117a710a ^


8f34dfd1 ^
851959cc ^


8f34dfd1 ^
851959cc ^
117a710a ^

8f34dfd1 ^
117a710a ^



dbf434f0 ^
117a710a ^



dbf434f0 ^
117a710a ^
8f34dfd1 ^
117a710a ^

8f34dfd1 ^
851959cc ^


8f34dfd1 ^
117a710a ^

8f34dfd1 ^
117a710a ^

928fd47d ^




117a710a ^
928fd47d ^




117a710a ^


8f34dfd1 ^
851959cc ^


8f34dfd1 ^
851959cc ^
117a710a ^

8f34dfd1 ^
117a710a ^



dbf434f0 ^
117a710a ^



dbf434f0 ^
117a710a ^
8f34dfd1 ^
117a710a ^

8f34dfd1 ^
851959cc ^


8f34dfd1 ^
117a710a ^

44131682 ^



e78f801e ^
8f34dfd1 ^
44131682 ^


995dc380 ^







44131682 ^

44131682 ^
74f1512f ^
44131682 ^
8f34dfd1 ^
dbf434f0 ^
44131682 ^

63be7b7d ^
44131682 ^


8f34dfd1 ^
44131682 ^


8f34dfd1 ^
44131682 ^




e78f801e ^
995dc380 ^
44131682 ^


995dc380 ^










44131682 ^


44131682 ^
74f1512f ^
44131682 ^
8f34dfd1 ^
dbf434f0 ^
44131682 ^


dbf434f0 ^
44131682 ^



63be7b7d ^
44131682 ^


8f34dfd1 ^
851959cc ^


8f34dfd1 ^
851959cc ^
44131682 ^

8f34dfd1 ^
44131682 ^


422ebaf8 ^
dbf434f0 ^
422ebaf8 ^


dbf434f0 ^
422ebaf8 ^

8f34dfd1 ^
44131682 ^

8f34dfd1 ^
851959cc ^


8f34dfd1 ^
44131682 ^
bfcf5c72 ^










1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454