Commit Graph

2385 Commits

Author SHA1 Message Date
nick black
2d87aff90e
subprocfd: fix memory leak on error path 2020-07-04 22:39:36 -04:00
nick black
7744c6aae5
highcon: keep text in original position #762 2020-07-04 07:13:08 -04:00
nick black
8f22a0a486
NegativePowersOfTen unit test: fix for ASCII 2020-07-04 05:46:01 -04:00
nick black
efcf0583c9
ncmetric: fix µ for ASCII mode #764 2020-07-04 02:39:29 -04:00
Nick Black
e201c9994d lookup_blitset: properly pass utf8 test #763 2020-07-04 01:23:07 -04:00
Nick Black
c88c51c4d3 cell_load: check for negative cols result, propagate #761 2020-07-04 00:45:41 -04:00
Nick Black
ecc7bb25cc selector: draw indicators in ASCII mode #761 2020-07-04 00:11:34 -04:00
nick black
853f286e70
tester: don't pass NCOPTION_NO_QUIT_SIGHANDLERS 2020-07-03 23:54:16 -04:00
nick black
3ebb5b0e4c
add 1.6.0 / Alpine to HISTORY 2020-07-03 23:41:26 -04:00
nick black
6b1b8d1695 ncplane_puttext: unit tests for scrolling #719 2020-07-03 22:50:34 -04:00
nick black
84746f1f31
OTHERS: add termbox, termion, pancurses 2020-07-03 22:42:34 -04:00
nick black
718abd648a ncdirect_render_image: add alignment #759 2020-07-03 21:24:00 -04:00
nick black
2fa8de9813 ncdirect: silence ffmpeg #759 2020-07-03 21:24:00 -04:00
nick black
46b8c8c913 ncdirect_render_image(): get it working for all geometries #759 2020-07-03 21:24:00 -04:00
nick black
eba7106067 ncdirect_clear: use ->clearscr, kill off bogon ->clear #759 2020-07-03 21:24:00 -04:00
nick black
4c3cb44100 ncdirect_render_image: fix NCSCALE_NONE #759 2020-07-03 21:24:00 -04:00
nick black
b829398538 ncdirect_render_image: accept ncalign_e parameter #759 2020-07-03 21:24:00 -04:00
nick black
46d75c072a ncdirect_render_image(): don't take current x into account #759 2020-07-03 21:24:00 -04:00
nick black
74b44506b6 vizdirect: use all three scaling types #759 2020-07-03 21:24:00 -04:00
nick black
b698efb953
ncdirect: prefer provided fp, iff it's a tty #752 2020-07-03 16:41:10 -04:00
nick black
e5c9168523
notcurses_init(): dup() ttyfd so we can always close() it 2020-07-03 16:40:53 -04:00
nick black
b4490dfc97
1.5.4->1.6.0. describe new TTY interactions 2020-07-03 16:09:54 -04:00
nick black
f7fc665c13
Acquire and use ttyfd properly in ncdirect #752
When we don't have an actual terminal in ncdirect, return
placeholder 80x24 for ncdirect_dim_y()/ncdirect_dim_x(), but
don't go querying e.g. a redirected file for its dimensions.
Similarly, only request info about cursor position from a true
TTY (we're otherwise likely to hang, or at best get meaningless
data). Rewrite 'direct' PoC to use ncdirect_dim_*().
Add tty_emit(). Closes #752.
2020-07-03 15:28:28 -04:00
Nick Black
415d4b813f
Tight work on unit testing, controlling tty vs output fd (#758)
* Some things go to the FILE* we're provided. Some can only go to a controlling terminal. Check to see if the FILE we're given is a TTY. If not, open up /dev/tty #752.
* term_emit(): fflush() can return EAGAIN. Loop on it to eliminate a rare error on shutdown that particularly affected unit tests (where we start and shut down Notcurses many times in a row).
* sgr poc: check return value of setlocale()
* drone: run all unit tests
* CMake: add some tests using PoCs
* ncneofetch: print even small palettes
2020-07-02 18:03:52 -04:00
nick black
2370329077
loop on fflush()->EAGAIN
sometimes when we call fflush(ttyfp), we get EAGAIN. we can
loop on this and force the flush. without it, we (fairly rarely)
get errors on shutdown, sometimes manifesting as unit test
failures (especially in the rust wrappers). #742
2020-07-02 17:34:30 -04:00
nick black
c0f12f4623
tester: pass INHIBIT_SETLOCALE|NO_ALTERNATE_SCREEN 2020-07-02 00:39:06 -04:00
nick black
6b5fd0d009
ncdirect_render_image(): handle newlines properly
in ncdirect_render_image(), we want to emit newlines if and
only if we did not hit the right border. we want to emit
cuds (cursor downs) if and only if we've hit the bottom
border. this resolves all mysteries of blank lines, eliminating
a FIXME. it also fixes ncneofetch's image display on very
wide terminals. closes #756. also removes the display semaphore
in ncneofetch, using a more natural pthread_join().
2020-07-02 00:10:59 -04:00
nick black
31c584e2e6 ncneofetch: work no matter y offset, done! #750 2020-07-01 20:30:06 -04:00
nick black
ef9e50be33 beef up 'what it is' a little; get our swag on 2020-07-01 20:30:06 -04:00
nick black
27c150b855 reorder introduction 2020-07-01 20:30:06 -04:00
nick black
8fedec050c ncneofetch: draw infoplane with notcurses + margin_t #750 2020-07-01 20:30:06 -04:00
nick black
93ff1d7789 ncdirect: open an fd for the controlling terminal
Use ctermid(3) to identify the controlling terminal device.
When one exists, open(2) it up, and retain this file descriptor
across the life of the ncdirect context. Allow a failure, since
not everything requires such an fd. This will be used for tty-
specific activity such as ioctl()s and escape sequences
involving terminal replies (such as get absolute cursor
position). #752
2020-07-01 20:30:06 -04:00
nick black
cda4253a0a ncneofetch: sem_post() on error path 2020-07-01 20:30:06 -04:00
nick black
a8db078689 ncneofetch: default background on palette 2020-07-01 20:30:06 -04:00
nick black
6be683c83b rebase off master 2020-07-01 20:30:06 -04:00
nick black
9ae1c6b3df ncdirect_render_image: fix arguments to rgba_blitter_low #751 2020-07-01 20:30:06 -04:00
nick black
4e04c3ae8f ncneofetch: fill out first line of infoplane 2020-07-01 20:30:06 -04:00
nick black
45fbbdb4ef ncneofetch: align output #750 2020-07-01 20:30:06 -04:00
nick black
33cb21d917 ncdirect_printf_aligned() added #750 2020-07-01 20:30:06 -04:00
nick black
4889e9b391 ncneofetch: scale 2020-07-01 20:30:06 -04:00
nick black
60619fc4b9 ncneofetch: move back to NCSCALE_SCALE #750 2020-07-01 20:30:06 -04:00
nick black
7eb70dad71 ncneofetch: display() in direct mode #750 2020-07-01 20:30:06 -04:00
nick black
7a022a4c76 ncneofetch: show palette via direct mode #750 2020-07-01 20:30:06 -04:00
nick black
452fdc671d
intro: move legend into main plane 2020-07-01 03:24:15 -04:00
nick black
4863c7e3df
ncdirect_image_render: restore NCBLIT_2x2 #751 2020-07-01 01:14:42 -04:00
nick black
0586adbe24
ffmpeg: disable debugging cruft erp 2020-06-30 00:43:18 -04:00
nick black
8a2f86ea16 vizdirect: use DFSG-safe media only #725 2020-06-30 00:18:02 -04:00
nick black
85893fb927 NEWS entry for ncdirect_render_image() 2020-06-30 00:18:02 -04:00
nick black
fd064b0f2a ncvisual_render_image(): working! #725 2020-06-30 00:18:02 -04:00
nick black
40d0efcece ncdirect_render_image(): just about working #725 2020-06-30 00:18:02 -04:00