Commit Graph

5296 Commits

Author SHA1 Message Date
nick black
fff05e54ab remove hysterical FIXME 2021-12-08 01:09:15 -05:00
nick black
f6abcc92b2 [ncman] use autogrow 2021-12-08 01:09:15 -05:00
nick black
de3cd3c644 [notcurses-info] add chess pieces 2021-12-08 01:09:15 -05:00
nick black
e57999d226 basic autogrow tests #2440 2021-12-08 01:09:15 -05:00
nick black
c8e601e457 no autogrow for standard plane, add autogrow tests #2440 2021-12-08 01:09:15 -05:00
nick black
27bf6e0eee implement NCPLANE_OPTION_VSCROLL #2440 2021-12-08 01:09:15 -05:00
nick black
977a4ed966 introduce NCPLANE_OPTIONS_{VSCROLL, AUTOGROW} #2440 2021-12-08 01:09:15 -05:00
nick black
0c71899656 include any data in the same read as initdata with response #2434 2021-12-08 04:32:01 -05:00
nick black
eb55caf880 [windows] data path dir need always be heap allocated 2021-12-08 04:32:01 -05:00
nick black
ae948a1068 [ncplane_put] don't scroll on invalid x 2021-12-07 20:42:42 -05:00
nick black
5eb23cefb0 [ncplane_put] subtle cursor verification fix
We were checking for an off-plane cursor destination on
the X axis when it was provided explicitly, but not when
-1 was used to indicate the current position (contradicting
the comment immediately above the test). We also want to do
so when we're using the current position, though in this
case scrolling must be taken into account. Also, we were
placing the cursor on such a validation failure, despite not
intending to write anything.

Not testing for a current x (the -1 case) usually worked
because it was thrown out by ncplane_move_cursor_yx() below.
That fails, however, when we're working with an EGC that's
more than one column.

Delicate!
2021-12-07 20:42:42 -05:00
nick black
b468c3fc83 [ncman] grow paras, handle single-byte lines #2323 2021-12-06 17:28:53 -05:00
nick black
a50cd595c0 [ncman] handle paras and free text #2323 2021-12-06 17:28:53 -05:00
nick black
55f48fb6e9 [ncman] extract / draw subsection headers 2021-12-06 17:28:53 -05:00
nick black
e6d0c07a23 [ncman] recurse for display 2021-12-06 17:28:53 -05:00
nick black
3c4b6f11fc [ncman] diagnostics for inflate, get zlib implementation working 2021-12-06 17:28:53 -05:00
nick black
dc833be329 [ncman] display section headers 2021-12-06 17:28:53 -05:00
nick black
5bf2f57561 [ncman] extract version 2021-12-06 10:42:20 -05:00
nick black
0acb9dfe4d use sysconf(_SC_PAGESIZE) 2021-12-06 10:42:20 -05:00
nick black
eab3ca981e [ncman] extract title/section 2021-12-06 10:42:20 -05:00
nick black
4c426f1fb6 [ncman] share trie across arguments 2021-12-06 10:42:20 -05:00
nick black
d28ddebfcf
hierarchal pagenodes 2021-12-06 06:16:31 -05:00
nick black
56c61d97b2
[ncman] start extracting structure from groff data 2021-12-06 04:26:04 -05:00
nick black
02d95dc5af
[demo] add ctrl+L to menu 2021-12-06 03:40:55 -05:00
nick black
b8a548873e
[ncman] bar at bottom with help 2021-12-06 02:39:06 -05:00
nick black
5860d41da5
[compat] only declare strndup on windows c #2428 2021-12-06 02:07:19 -05:00
nick black
0848edbbe7
[macOS] no MAP_POPULATE 2021-12-06 01:41:36 -05:00
nick black
7ed70a7234 link ncman against zlib 2021-12-06 01:30:25 -05:00
nick black
f8b797f9db [CMake] use zlib if not using libdeflate #2423 2021-12-06 01:30:25 -05:00
nick black
8f38689489 [ncman] zlib implementation, quick and dirty 2021-12-06 01:30:25 -05:00
nick black
21c22616d9 drop some obsolete casts 2021-12-06 01:30:25 -05:00
nick black
ee33dbd03a kill two obsolete FIXMEs 2021-12-06 01:30:25 -05:00
nick black
2ebf1f1942 [ncman] build trie, extract commands 2021-12-06 01:30:25 -05:00
nick black
51a76fe1e5 [ncman] augment troffnode with type 2021-12-06 01:30:25 -05:00
nick black
2c6be5a610 add structure for all troff elements 2021-12-06 01:30:25 -05:00
nick black
723139405f define troff structure 2021-12-06 01:30:25 -05:00
nick black
c32e9b3791 [ncman] lex out comments from troff data 2021-12-06 01:30:25 -05:00
nick black
e9cc8d0b2e [ncman] start lexing troff data 2021-12-06 01:30:25 -05:00
nick black
a2385047cc [ncman] add support for inflation using libdeflate 2021-12-06 01:30:25 -05:00
nick black
7f94e50e69 [ncman] map up argument 2021-12-06 01:30:25 -05:00
nick black
269bf361e7 [ncman] event loop for each argument 2021-12-06 01:30:25 -05:00
nick black
624389877f add ncman's main 2021-12-06 01:30:25 -05:00
nick black
403bf91634
[windows] setup_alt_sig_stack() implementation 2021-12-05 22:26:19 -05:00
nick black
fe7704919f
[ncman] reset alt signal stack after free() 2021-12-05 22:23:47 -05:00
nick black
9190d3bdfa
[signals] use an alternate signal stack #2424 2021-12-05 22:05:03 -05:00
nick black
91111cdb58
[ncchannels_reverse] don't generate illegal alpha+color states #2421 2021-12-04 06:27:38 -05:00
nick black
6c4c16465b
[xray] show only 1% of dropped frames 2021-12-04 03:54:44 -05:00
nick black
1c93a5ff45
[palette] rename unit tests, add some CHECKs 2021-12-04 03:54:30 -05:00
nick black
6f3ba8c3dd
utf8_to_egc: cast wchar_t to unsigned for logging 2021-12-04 02:55:53 -05:00
nick black
6080de837a [ncplane_putc_yx] copy egc to avoid invalidation
ncplane_putc_yx() calls ncplane_put() using an EGC extracted
from its nccell argument. The very act of writing that cell
to the plane, however, can grow the plane's underlying EGCpool,
possibly invalidating this reference. This was showing up as
a unit test failure on macOS, and was hopefully also the cause
of unit test failures on Alpine i686. Do a quick heap copy of
the EGC in ncplane_putc_yx(), and free it after writing to the
plane. Shouldn't cost anything (there was no measurable
impact in my testing). Closes #2420.
2021-12-04 01:03:13 -06:00
nick black
418aad1e45 reenable PlaneAtCursorInsane unit test on apple 2021-12-04 00:22:43 -06:00
nick black
c49d3b1e02 enable RightToLeft test on apple 2021-12-04 00:18:21 -06:00
nick black
4513d36978 enable MultiglyphWidth test on apple 2021-12-04 00:16:24 -06:00
nick black
a7db3b88fe
Use samoa.avi instead of fm6.mov in unit test
On DFSG builds, we don't have fm6.mov available to us,
so use samoa.avi (of my own construction) instead.
2021-12-03 23:27:54 -05:00
nick black
52c40cbca5
[notcurses.3] document all environment variables 2021-12-03 20:04:46 -05:00
nick black
d98eb2a454
grunt #2416 2021-12-02 09:31:58 -05:00
nick black
4a4bec5078
[demo] bring sham jungle definition up to date #2416 2021-12-02 08:21:24 -05:00
nick black
04489e179a
[ncneofetch] properly place palette plane 2021-12-02 08:09:23 -05:00
nick black
b57d6eb8d8 notcurses_data_path: allow overrides 2021-12-02 04:32:47 -05:00
nick black
16c9e9f101
[ncneofetch] fix display when no logo is found 2021-12-02 04:11:30 -05:00
nick black
a4bc4e1897 [windows] fall back to NOTCURSES_SHARE 2021-12-02 03:53:17 -05:00
nick black
46114adb57
oiio_decode_loop: fix sense of seek_subimage() test #2402 2021-12-02 03:31:11 -05:00
nick black
7925df32cc
[ncneofetch] use notcurses_data_path() #2402 2021-12-02 03:08:08 -05:00
nick black
238de45e96 [nctetris] find the background everywhere #2042 2021-12-02 03:06:39 -05:00
nick black
7351b2aff6
[oiio] plug memory leak in oiio_destroy, thanks ASAN! #2402 2021-12-02 02:44:38 -05:00
nick black
e9d299c139
[ncneofetch] clear area to left and right of palettebox 2021-12-02 02:21:21 -05:00
nick black
cf36985c69 block_on_input: pass HANDLE** #2402 2021-12-02 02:02:01 -05:00
nick black
caaeec5094
Place ncneofetch properly (#2415)
* ncplane_polyfill_inner: plug memory leak on error paths
* [progbar_create] memory leak on error path
* ncvisual_polyfill_core: memory leaks on error paths
* notcurses_early_init: memory leak on error path
* [demo] fix summary table for ASCII #2402
* [sliders] make it work in ASCII #2402
* add ncplane_ascii_box() #2402
* [notcurses-info] use capabilities accessors for blitters
2021-12-02 01:45:49 -05:00
nick black
771f2e1fb6 [ncplane_scrollup_child] need move to physical scroll location #2378 2021-12-01 21:11:01 -05:00
nick black
4ef8b53602 [ncneofetch] handle palette size not a multiple of showel 2021-12-01 21:11:01 -05:00
nick black
5cd85ca367 [ncneofetch] when in utf8, use half blocks for palette 2021-12-01 21:11:01 -05:00
nick black
3ffe7ac12c
kittykbdsupport bool distinct from kbdlevel, use in notcurses-info #2412 2021-12-01 15:02:51 -05:00
nick black
69b2b3d274
never send keyboard level changes with DRAININPUT #2412 2021-12-01 14:52:09 -05:00
nick black
dae138c7d0 [ncneofetch] only render once #2378 2021-11-30 12:14:16 -05:00
nick black
2a636e3d9d
windows compile fixup erp 2021-11-30 11:37:42 -05:00
nick black
879a79f001 milt! 2021-11-30 11:28:37 -05:00
nick black
fb33ea39c1 [windows] don't drain the input readiness pipe #2408 2021-11-30 11:14:39 -05:00
joseLuís
b1f636a2d9 [docs] rename plane/visual sections to regions 2021-11-30 15:39:58 +01:00
nick black
a4d7bd5670
[TERMINALS.md] document PuTTY settings #1298 2021-11-30 09:01:16 -05:00
nick black
48b124f82b
legacy_cb_f3 conflicts with cursor location report, dump it 2021-11-30 08:23:16 -05:00
nick black
bce181a0d9 [ncneofetch] handle NULL from notcurses_data_dir() 2021-11-30 06:55:09 -05:00
nick black
538dff91ba
[input] provide utf8 form in ncinput 2021-11-30 04:27:46 -05:00
nick black
62f694dfa3
extract_color_table: get cell-pixel geometry from bargs #2404 2021-11-30 02:56:23 -05:00
nick black
e57720ef51 [Stacking] fix unit test 2021-11-30 02:03:09 -05:00
nick black
6c5bc6b396 [rendercore] on fg elide, persist previous fg rgb 2021-11-30 02:03:09 -05:00
nick black
ffc5993eec [rendercore] drop diagnostic 2021-11-30 02:03:09 -05:00
nick black
1be43cb54a [rendercore] omit fg on rgbequal #1316 2021-11-30 02:03:09 -05:00
nick black
0761994abb mark some string literals as utf8 2021-11-30 02:03:09 -05:00
nick black
dc527439d4 [rendercore] cleanup, drop 'alttext', add 'noforeground' 2021-11-30 02:03:09 -05:00
nick black
7a91a2f905 normalize cell initializer names (prefix with NC) 2021-11-30 02:03:09 -05:00
nick black
b340f01a0a always use space when fgrgb == bgrgb #1316
When both foreground and background are using RGB, and
the two channels are the same RGB value, the glyph will
be invisible; emitting a space with the correct background
can save RGB escapes and glyph bytes. Eliminates several
longstanding FIXMEs in the Stacking unit tests. Add a new
function nccell_rgbequal_p(), and unit testing for it.
Add a new unit test to check that this optimization has
taken place, and that it has only taken place in the
rasterization phase--the original plane must be unchanged.
Closes #1316.
2021-11-30 02:03:09 -05:00
nick black
0b75f06abd add and unit test nccell_rgbequal_p() #1316 2021-11-30 02:03:09 -05:00
nick black
c298563e32 [FgMatchesBg] new unit test for optimized fg==bg #1316 2021-11-30 02:03:09 -05:00
nick black
3139bf019a
[initlang] fix sense of ASCII test 2021-11-30 01:53:01 -05:00
nick black
75bd0dd0bc
use notcurses_data_dir() in tester, fetch 2021-11-29 22:19:45 -05:00
nick black
d85a0b213a [windows] dump diagnostic 2021-11-29 22:02:24 -05:00
nick black
4b3b904040 [windows] use DataDir for registry key, not InstallDir 2021-11-29 22:01:40 -05:00
nick black
abb99d4a67
[notcurses-demo] don't hardcode NOTCURSES_SHARE, use notcurses_data_dir() 2021-11-29 21:34:32 -05:00
nick black
df689d9104
[notcurses_options] unsigned margins 2021-11-29 12:13:16 -05:00
nick black
233d32be04
kill obsolete FIXME in sprixel_rescale 2021-11-28 18:14:21 -05:00
nick black
2d3fb9f12e [xray] hold at 15s (true runtime of source media) 2021-11-28 18:13:48 -05:00
nick black
38daf44fb3 [sprite_rebuild] don't change state on a no-op 2021-11-28 18:13:48 -05:00
nick black
5665adc8cc fbcon_rebuild: use direct cellpx when appropriate 2021-11-28 18:13:48 -05:00
nick black
39310f5797 update_term_dimensions: set cpix for linuxfb 2021-11-28 18:13:48 -05:00
nick black
8645511b63 [sprixel_rescale] rebuild all cells using old TAM 2021-11-28 18:13:48 -05:00
nick black
ae2338c7a5 [render] refresh on resize #1687 2021-11-28 18:13:48 -05:00
nick black
affece853c [sprixel_rescale] hook up to the main paint() path #1687 2021-11-28 18:13:48 -05:00
nick black
47e842d6dc [input] properly identify EINTR 2021-11-28 18:13:48 -05:00
nick black
0d933a180d [splice_rescale] implement, hook up to splice_zaxis_recursive #1687 2021-11-28 18:13:48 -05:00
nick black
6da5392724 [ncplane_reparent] pass cell-pixel geometries into splice_zaxis_recursive() #1687 2021-11-28 18:13:48 -05:00
nick black
135208eafe [input] recognize 0x1b 0x5b 0x45 as begin #2396 2021-11-28 18:13:48 -05:00
nick black
ab233d85ee
[input] enable legacy f2 2021-11-28 11:56:40 -05:00
nick black
db9d15f795 [sprite_load] kill unnecessary check 2021-11-28 10:36:42 -05:00
nick black
0dbb469a27 [sprixels] use cell-pixel geometry from ncpile #1687 2021-11-28 10:36:42 -05:00
nick black
0925da36f7
[xray] brighten drop count 2021-11-28 10:07:39 -05:00
nick black
549fcac603
[ncplane_dup] don't use ncplane_cursor_move_yx(), set cursor directly 2021-11-28 08:14:11 -05:00
nick black
6f90d20543
[xray] make the drop count redder with more drops 2021-11-28 08:13:49 -05:00
nick black
fe20da9492
[input] legacy begin, end, home #2394 2021-11-28 07:03:44 -05:00
nick black
fc8b8813c2
[input] handle legacy disambiguated arrow keys #2394 2021-11-28 06:57:21 -05:00
nick black
230e8713d8
[xray] don't even render drop count/slider when behind 2021-11-28 06:36:22 -05:00
nick black
07bdfd8b0f
[xray] balance out singleton case 2021-11-28 06:28:24 -05:00
nick black
a5d79da1f0 [xray] add drop count with guy getting more and more pissed off 2021-11-28 06:09:10 -05:00
nick black
3a458c98c3 [xray] draw 5% of frames that would be dropped #2385 2021-11-28 06:09:10 -05:00
nick black
3cd09a0099 [xray] eliminate flicker on dropped frame #2385 2021-11-28 06:09:10 -05:00
nick black
efc57333a7 [demo] pass start time to demos for more precise deadlines 2021-11-28 06:09:10 -05:00
nick black
d5464deb9a [demo] use a single start time between HUD and recordkeeping 2021-11-28 06:09:10 -05:00
nick black
04ef46a067 [xray] take time at the beginning of demo 2021-11-28 06:09:10 -05:00
nick black
cee5c267a2 [xray] 20s deadline #2385 2021-11-28 06:09:10 -05:00
nick black
0c89881266 [xray] calculate 20s deadline #2385 2021-11-28 06:09:10 -05:00
nick black
2ac51d2404 [demo] workaround for summary tables =\ #2389 2021-11-28 06:09:10 -05:00
nick black
8f26eeea5c
[textlayout] plug memory leak in unit test 2021-11-28 03:21:28 -05:00
nick black
2fbfdbb19a
[stats] fix up non-linux unix compilation 2021-11-27 21:53:30 -05:00
nick black
5d547d3678
[stats] account for cell/pixel geometry changes #2384 2021-11-27 15:45:22 -05:00
nick black
8d84c79296
[stats] add new cell_geo_changes and pixel_geo_changes stats #2384 2021-11-27 15:17:12 -05:00
nick black
80dd726239
[cli PoC] fix compile on windows 2021-11-26 07:50:41 -05:00
nick black
55152a0e0c
[input] always drain event readiness pipe #2216 2021-11-26 07:48:49 -05:00
nick black
2d6428cb15
[cli PoC] add a poll on the eventready fd #2216 2021-11-26 07:34:43 -05:00
nick black
70bfd825d7 [windows] get InstallDir from registry, working 2021-11-26 07:01:48 -05:00
nick black
1e8e942594 [windows] implement tty_check() with _isatty() 2021-11-26 06:19:07 -05:00
nick black
455ec4eb66
combine path_seperator() functions 2021-11-26 05:54:26 -05:00
nick black
53a24e1e35
[oiio] erase plane in stream #2368 2021-11-26 05:54:26 -05:00
nick black
a7d54f90db zalgo: put prompt following output 2021-11-26 06:10:41 -03:00
nick black
c0daadeb9f
[visual] use absolute coordinate in diagnostic 2021-11-26 04:01:27 -05:00
nick black
821b2929b5
[input] only ever need 2 pfds 2021-11-26 02:58:51 -05:00
nick black
049f64ebf2
[input] check ipipe for readiness #2350 2021-11-26 02:58:11 -05:00
nick black
0c6b1b73a6
[ffmpeg] adapt to ncstrwidth() 2021-11-26 02:53:16 -05:00
nick black
0b4232d07d
[ncstrwidth] yield to ncstrwidth_valid 2021-11-26 01:36:52 -05:00
nick black
02f00b01e7
[nctetris] drop background to 3x2 from PIXEL #2380 2021-11-26 01:13:37 -05:00
nick black
46251c1d30
[visual] diagnostics on failures 2021-11-26 00:47:36 -05:00
nick black
4491ce0a94
[shame] 2021-11-25 19:25:35 -05:00