Commit Graph

293 Commits

Author SHA1 Message Date
nick black
5a3e0625a4
enmetric unit tests: kill duplicated fesetround() 2020-05-08 22:00:27 -04:00
nick black
1c394dc103 modernize c++ according to clang-tidy-11 2020-05-08 21:42:04 -04:00
nick black
e2a94817e7 tests: lots of NULL->nullptr 2020-05-08 21:42:04 -04:00
nick black
989ca7ff9a selector->ncselector, multiselector -> ncmultiselector #580 2020-05-08 21:42:04 -04:00
nick black
4e94d942b0 reader unit test visualization #403 2020-05-08 21:42:04 -04:00
nick black
d174431187 ncreader_create: accept const options #403 2020-05-08 21:42:04 -04:00
nick black
7683973ee4 ncreader_options, bad options tests #403 2020-05-08 21:42:04 -04:00
nick black
4819c0e1c3 selector/multiselect: accept notcurses 2020-05-08 21:42:04 -04:00
nick black
c0c76342a8
rotate test: relax ncvisual_render() checks 2020-05-07 12:57:34 -04:00
nick black
cbf46402f8
tests: portable find_data() 2020-05-07 00:53:01 -04:00
nick black
ed548ab590
tests: apply clang modernizations 2020-05-07 00:52:40 -04:00
nick black
a571f4daaa
tests/wide.cpp: use modern range loop 2020-05-07 00:52:16 -04:00
nick black
173af7b3c6
unit test upper left of rotated visual #569 2020-05-06 23:50:24 -04:00
nick black
f84435f708
unit test ncplane_rgba() #569 #559 2020-05-06 23:16:00 -04:00
nick black
43a685be1e
ncsubproc: update unit tests for exit propagation #554 2020-05-06 19:53:59 -04:00
nick black
94fcada67c
ncvisual_rotate: unify _cw/_ccw, take radians 2020-05-06 05:49:22 -04:00
nick black
f63325db60 Lots of ncvisual work
Unify ffmpeg/oiio/null implementations, where possible. This effectively
required placing all three in the same file, which meant they're all now
C++. Update FFmpeg implemenation to be C++-usable. Implement
ncvisual_rotate_cw() and ncvisual_rotate_ccw() #515. Move most of tetris
over to Visual from Plane #558. Add bgra_to_rgba(), necessary for
creating ncvisual from BGRA memory. Implement ncvisual_from_rgba()
and ncvisual_from_bgra() #557. Add unit tests on ncvisual rotation.
2020-05-06 01:02:46 -04:00
nick black
39548acc3a rename ncvisual_open_plane->ncvisual_from_file() #560 2020-05-06 01:02:46 -04:00
nick black
cd2cbd0d88
export enforce_utf8() via internal.h #451 2020-05-02 15:52:11 -04:00
nick black
c8322e6cb1
ncfdplane: on non-following planes, break out on 0 read 2020-05-02 11:57:38 -04:00
nick black
a23efbb463
rigourize ncsubproc destruction
We need support three distinct paths for destruction of
ncsubprocs: (1) external call to ncsubproc_destroy() while
the subprocess is running, (2) external call to
ncsubproc_destroy() after the subprocess has terminated, and
(3) internal call to ncsubproc_destroy() without any external
call. To do this properly, we always waitid() on the subprocess
in our ncsubproc thread, and do not cancel said thread. This
guarantees that the subprocess has been reaped if the thread
has exited. We throw a pidfd_send_signal() into the thread
prior to the waitid(), because this is safe with pidfds. The
thread reclaims no resources otherwise. ncsubproc_destroy(),
instead, reclaims them, after joining the ncsubproc thread.
It sends SIGKILL before the join, which is once again safe
thanks to pidfds. Resolves #552.
2020-05-02 04:34:37 -04:00
nick black
c9088ff37b
subproc unit test rename 2020-05-02 03:49:16 -04:00
nick black
e156bd42be
plot: match delete, not free, with new 2020-04-29 05:32:08 -04:00
nick black
5210e410f4
visual unit test: use notcursesI.avi, which OIIO can decode #547 2020-04-28 21:23:36 -04:00
nick black
294e8fd90a
subproc tests: pass outofline_cancelled through as curry 2020-04-28 00:27:07 -04:00
nick black
36bfa45d6c
notcurses-tester: fix double-free 2020-04-27 07:16:49 -04:00
nick black
595dd20950
cells unit test: downgrade problematic unicode to WARN #517 2020-04-25 17:34:51 -04:00
Nick Black
9a075ae5d0
Support image decoding with OpenImageIO #453 (#534)
* fedora: dep on OpenImageIO, and use it
* fedora: dep on libqrcodegen-devel
* fedora: BuildRequires OpenEXR-devel
* tight check on USE_MULTIMEDIA
* CMake: enable notcurses-view for ffmpeg OR oiio
* notcurses-view: don't reach into libav
* oiio: ncvisual_render() #453
* oiio: need our own properly-offset ncvisual_plane()
* `visual` poc: accept optional command line argument
* oiio: work for 3-channel images #453
* oiio: destroy ncvisual's plane if we own it #453
* notcurses_visual.3: s/FFmpeg/multimedia/g
2020-04-25 15:52:23 -04:00
nick black
0b4ada19b1 Remove AVFrame from API #532 2020-04-24 04:17:56 -04:00
nick black
21822f98e7 fix up averr->ncerr #532 2020-04-24 04:17:56 -04:00
nick black
ad0685aa1b switch to nc_err_e #532 2020-04-24 04:17:56 -04:00
nick black
d81b3ef0cf start factoring out FFMpeg for OIIO plug #453 2020-04-24 04:17:56 -04:00
Nick Black
0e73b9d3d5
Floating-point ncplot, genericize ncplot (#531)
* compile ncplot as c++ generic #446
* add floating-point plots #446
2020-04-23 03:52:07 -04:00
nick black
5a017574f6
ncsubproc tests: don't rely on /etc/ files 2020-04-22 15:55:35 -04:00
nick black
34629688d9
interpret NULL second argument to *_init() as stdout 2020-04-22 12:53:56 -04:00
nick black
3e853f6635
ncsubproc: map new pipe onto stdio #310 2020-04-21 03:51:54 -04:00
nick black
04f90fa1ea
ncsubproc: launch processes, make pipes
link to LWN article in History section of README.md.
2020-04-21 03:33:04 -04:00
nick black
6304bc73e3
tester: better terminal restoration #240 2020-04-21 01:07:45 -04:00
Nick Black
fe8034b5e0
ncfdplane, fileroller PoC, ncfdplane unit tests, qrcodes #24 #514 (#524)
* first draft of ncsubproc spec
* qrcode first draft #24
* demo: add qrcode demo skeleton, entries #24
* qrcode demo #24
* fedora python build changes from @dcantrell
* ncplane_qrcode() works #24
* add some flash to the qrcode demo #24
* drone: use newest builders
* fix up rgb PoC
* drop jungle demo to 100Hz target
* add fd.c
* ncfd skeletons
* more ncfdplane #514
* ncfdp i/o loop
* ncfp: improve uinit test, write core
* firm up ncfdplane #514
* fileroller PoC #514
* ncplane: allow '\n' in stream when scrolling #523
2020-04-20 23:26:41 -04:00
nick black
483470f777
tester: restore terminal on early exit #240 2020-04-19 21:10:15 -04:00
nick black
4823098316
Hurd: uint64_t is ULL, fix up printf format/constants #519 2020-04-19 20:03:33 -04:00
nick black
9e28e14001
move enforce_utf8() into main 2020-04-18 03:00:25 -04:00
nick black
0a6f5d1a9f
enforce_utf8() for wide tests, duh 2020-04-18 01:59:21 -04:00
nick black
11600b6820
ensure UTF8 for metric tests 2020-04-18 01:39:34 -04:00
Nick Black
c6a9997554
Normalize ncplane_at_* / ncplane_set_base() (#479)
* ncplane_at_* and ncplane_at_cursor_*

We had notcurses_at_yx() expanding into three distinct parts of
the cell structure, and ncplane_at_yx() / ncplane_at_cursor()
writing directly to a cell. It was annoying to remember which
was which. The latter two now have a signature matching
notcurses_at_yx(), while the old functionality has been moved
to ncplane_at_yx_cell() and ncplane_at_cursor_yx(). #476
2020-04-18 00:09:14 -04:00
nick black
d274af34b9 ncplot: define 2x2 and 4x2 sets #461 2020-04-16 11:41:20 -04:00
nick black
355ea6d3d7
Allow EGCpools up to 1GB #425 2020-04-15 23:49:10 -04:00
nick black
a4e1d68786
Add ExhaustPool unit test #482 2020-04-15 16:36:17 -04:00
nick black
327c9cba78 Scrolling! all unit tests work #443 2020-04-15 11:37:57 -04:00
nick black
b385feef8f zero out newly-scrolled lines #443 2020-04-15 11:37:57 -04:00