Commit Graph

285 Commits

Author SHA1 Message Date
nick black
71db3dbe61 CMake: unset HAVE_UNISTRING_H cache to force search 2020-07-23 21:37:44 -04:00
nick black
0bd73e2f1f
CMake: drop dirgb from test suite due to excess output 2020-07-22 16:38:23 -04:00
nick black
604747c8f2 notcurses_puttext: use libunistring for wordbreaking #772 2020-07-22 03:31:54 -04:00
nick black
255b404842
ncplane_puttext(): start long words early
If we're fed a word that in and of itself is wider than
the text layout area, and it is not the first word on the
row on which it starts, go ahead and start it there, as
opposed to breaking the line. #720

Also, remove sgr from test suite, as it's not a notcurses
application.
2020-07-22 02:11:09 -04:00
nick black
759e001ca6
CMake: sgr isn't a notcurses app; don't run it as a test 2020-07-22 01:39:03 -04:00
nick black
dd4d4817d1
CMake: run tests in serial #812 2020-07-21 22:47:03 -04:00
nick black
42b0be7f3a
Run PoC tests even without doctest #811
Add back the USE_DOCTEST CMake option, but make it conditional
upon BUILD_TESTING. If BUILD_TESTING is provided without
USE_DOCTEST, we build and run the PoC tests, just not
notcurses-tester. If neither is defined, no tests are available
(the PoC binaries are still built). If both are defined, build
the PoCs plus notcurses-tester, and run them all in make test.
2020-07-20 20:59:49 -04:00
nick black
17f1323c20
v1.6.6 2020-07-19 21:55:10 -04:00
nick black
2a4e728de6
CMake: don't install notcurses-pydemo 2020-07-19 21:40:46 -04:00
nick black
308b49da5a
v1.6.5 2020-07-19 21:16:53 -04:00
nick black
b2e924319b
v1.6.4 2020-07-19 20:09:14 -04:00
nick black
a4ee5bd9c7
v1.6.3 2020-07-16 12:53:42 -04:00
nick black
330b1612d4
CMake: fix up linux pkgconfig install path 2020-07-16 12:52:10 -04:00
nick black
3f544a4ed1
v1.6.2 2020-07-15 23:34:25 -04:00
nick black
62f6896715
CMake: remove python stuff; it'll be built externally 2020-07-13 08:30:32 -04:00
nick black
fa343c92a4
install pkg-config to libdata on FreeBSD #792 2020-07-13 08:14:18 -04:00
nick black
f5a84620d2
CMake: remove rust stuff; it's built externally 2020-07-12 06:36:55 -04:00
nick black
1cc0371373
v1.6.1 2020-07-12 03:20:50 -04:00
nick black
284dfc4fad
v1.6.0 2020-07-04 22:40:32 -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
6be683c83b rebase off master 2020-07-01 20:30:06 -04:00
nick black
6ab11e679f
v1.5.3 2020-06-28 16:18:57 -04:00
nick black
3a8b0150d3
move doctest --tce to drone.yaml 2020-06-28 08:28:30 -04:00
nick black
1b23e63f42
CTesst: exclude Ncpp,Exceptions for now 2020-06-28 08:23:04 -04:00
nick black
aec94e86ee
CMake: run some PoCs + ncneofetch as tests 2020-06-28 06:04:41 -04:00
nick black
141e8229a8
use pkg_search_module() to find tinfo or ncurses #734 2020-06-25 01:39:43 -04:00
Nick Black
16c086b41a CMake: don't define killer options on FreeBSD 2020-06-18 02:57:57 -04:00
nick black
ffab8b5294 lay groundwork for ncneofetch #550 2020-06-17 16:44:32 -04:00
Marek Habersack
5608b8735e [C++] Actually use compilation options
Fixes: https://github.com/dankamongmen/notcurses/issues/722

`-Wpedantic` is dropped because C code uses designated structure
initializers which are available in C++20 onward (and we use C++17
ATM). Once we switch to C++20 we should re-enable the flag.

`-fno-exceptions` is dropped because we do have exceptions, so...
2020-06-17 01:05:12 -04:00
nick black
929992c881 CMake: clean up defines a little 2020-06-16 18:39:08 -04:00
nick black
463f5acd6a CMake: unset cached result of qrcodegen header check #711 2020-06-16 13:40:16 -04:00
nick black
c6657f763a
prep for 1.5.2 2020-06-14 18:42:36 -04:00
nick black
0657267274
v1.5.1 2020-06-14 17:17:49 -04:00
nick black
7fc38d8fdd
v1.5.0 2020-06-08 06:05:17 -04:00
nick black
3bc9a4cfa2
v1.4.5 2020-06-05 06:09:17 -04:00
nick black
84ae45ef39
remove all libsixel crap #200 2020-06-05 04:19:56 -04:00
nick black
354ece5826
v1.4.4.1 2020-06-01 16:18:56 -04:00
nick black
230f3af8e1
v1.4.4 2020-06-01 15:32:23 -04:00
nick black
89ffb6658e
CMake: improvements to testing usability
Replace USE_TESTS with BUILD_TESTING variable already exported by CTest.
Use the CMake 3.17 CMAKE_CTEST_ARGUMENTS to pass "-V" to ctest. #651
2020-05-29 02:47:29 -04:00
Nick Black
ebcba82d4b
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:

Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:

decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.

There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().

This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.

The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.

Closes #638, #562, and #622.
2020-05-28 21:16:58 -04:00
Nick Black
478ebadd64 Revert "Change DSO versioning scheme"
This reverts commit 51205551f5.
2020-05-28 17:31:22 -04:00
Marek Habersack
51205551f5 Change DSO versioning scheme
This commit introduces the same shared library versioning scheme as used
by the SDL library.  The advantage is that different versions of
notcurses can be installed alongside each other (which is not an
unlikely scenario, as SDL itself certifies) and that, if the versioning
protocol is followed, any change to ABI will produce a DSO whose name
will not break any applications linked against any previous version.
2020-05-28 15:15:53 -04:00
nick black
8971bda0c2 ncpp: stop() resets _instance, add unit test #538 2020-05-24 03:34:46 -04:00
Marek Habersack
9ca8d9c9c6 Correctly cast ncpp::Plane to ncplane*
Fixes: https://github.com/dankamongmen/notcurses/issues/616

SIGSEGV was caused by an invalid cast.

Short explanation: PEBKAC

Long explanation: `Selector.hh`, `Plot.hh` and `MultiSelector.hh` did
not include `Plane.hh`, they merely declared `class Plane;` because
inclusion of `Plane.hh` would cause circular dependencies to appear and
the compiler would be unhappy.  On top of that, yours truly wrenched the
compiler's hands and caused it to believe that a pointer to `Plane` is
really a pointer to `ncplane*` which was quite a silly thing to do as
the compiler, not having included `Plane.hh` and thus not knowing full
definition of the type, wasn't able to look up the type cast operator in
`Plane`.

Don't abuse `reinterpret_cast`, kids!
2020-05-23 20:26:13 -04:00
nick black
c08c9b7f7f
v1.4.3 2020-05-22 09:18:39 -04:00
nick black
fc998510a0
CMake: only install static libs if built #625 2020-05-21 23:51:10 -04:00
nick black
00d63c0b69
add USE_STATIC option to CMake #625 2020-05-21 23:46:25 -04:00
nick black
7af027b895
ncpp unit tests: check get_instance exception #538 2020-05-20 18:36:25 -04:00
nick black
07e894c40c
v1.4.2.4 2020-05-20 15:38:23 -04:00
nick black
c3bc4bb7f2
CMake: first stab at llvm-cov #620 2020-05-19 23:12:27 -04:00
nick black
32d3ae91c8
v1.4.2.3 2020-05-17 09:01:53 -04:00
nick black
e132c6bb24
v1.4.2.2 2020-05-17 08:11:48 -04:00
nick black
49fb03655e
v1.4.2.1 2020-05-17 07:59:04 -04:00
nick black
38e67abd9d
v1.4.2 2020-05-17 07:29:10 -04:00
nick black
8b5b44cf36
v1.4.1 2020-05-10 22:21:48 -04:00
nick black
6a22040584
v1.4.0 2020-05-10 21:36:48 -04:00
nick black
76d29ac4cc
Export notcurses_LIBRARIES in CMake 2020-05-09 05:51:00 -04:00
nick black
261cfadf40
link math libraries into notcurses-demo #589 2020-05-09 03:47:56 -04:00
nick black
d09f7c7899
CMake: check for qrcodegen/qrcodegen.h #572 2020-05-07 17:14:45 -04:00
nick black
20d0048838
CMake improvements/cleanup #565
Rather than inspecting CMAKE_BUILD_TYPE manually and setting
DEBUG_OPTIONS based off the results, set CMAKE_{C/CXX}_FLAGS_DEBUG,
and allow that to be picked up by CMake #565. Remove repeated -W
flags that were all over the place, making them global compiler
flags. Remove repeated FORTIFY=2 definition that was all over the
place, making it a global compiler definition. Remove all uses of
${DEBUG_FLAGS}. Also, since CMake doesn't define a CMAKE_BUILD_TYPE
by default, instead just setting neither debugging nor optimization
flags, in what seems a pretty fucking boneheaded move, set it by
default to RelWithDebInfo. ugh. Explicitly disuse unused PoC variables.
2020-05-06 05:24:23 -04:00
Marek Habersack
e23d5baea4 [C++] Sync API changes
Added:

  * class FDPlane (`ncfdplane*`)
  * class Subproc (`ncsubproc*`)
  * NotCurses: get_inputready_fd (`notcurses_inputready_fd`)
  * Plane: qrcode (`ncplane_qrcode`)
  * class PlotBase: templated base class for Plot variations
  * class PlotU: `uint64_t` instantiation of PlotBase (aliased to previous
    `Plot` class for source compatibility), `ncuplot*`
  * class PlotD: `double` instantiation of PlotBase, `ncdplot*`
2020-05-04 05:39:01 -04:00
nick black
2f904449a7
drop -fkeep-inline-functions #543 2020-04-27 03:24:37 -04:00
nick black
d4f71405d2
release-doc: remove unnecessary directive 2020-04-26 22:46:43 -04:00
nick black
05753bd91a
v1.3.3 2020-04-26 21:25:23 -04:00
nick black
7d1e3c77c8 oiio: image scaling #535, subimages for video #536 2020-04-26 18:33:52 -04:00
nick black
2c98639005
python: don't guard with DFSG_BUILD; we use USE_PYTHON 2020-04-25 18:06:02 -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
fe37d49c5d set soname on python module #530 2020-04-24 15:09:54 -04:00
nick black
ecbd6ad54e
Get Python in-tree build working again 2020-04-24 05:19:25 -04:00
nick black
6ffbef3d74 cmake: openimageio discovery #453 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
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
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
3a7e4139c4
Install Markdown files as documentation #512 2020-04-19 17:18:10 -04:00
nick black
1dad2c6b50
v1.3.2 2020-04-19 02:24:03 -04:00
nick black
e00ef4aca9
prep for 1.3.1 2020-04-18 00:35:15 -04:00
nick black
f644ed9e54
debian: notcursesI.osp #498 2020-04-17 21:32:07 -04:00
nick black
5880083022 CMake: don't install data/ .xcf files #498 2020-04-17 21:14:12 -04:00
nick black
b4cf4f3a0d
CMake: supply -fkeep-inline-functions for notcurses 2020-04-12 02:01:56 -04:00
nick black
86e225dc4c prep for 1.3.0 #460 2020-04-11 22:00:34 -04:00
nick black
24a9343b0b
prep for 1.2.9 2020-04-11 12:39:54 -04:00
nick black
16fa94eb59
CMake: install python with USE_PYTHON #462 2020-04-10 22:42:35 -04:00
nick black
69b716f7f8 prep for 1.2.8 2020-04-10 16:19:41 -04:00
Nick Black
516b561d2a cmake: unify header installation #465 2020-04-10 16:00:40 -04:00
nick black
50b82648fc
CMakeLists.txt: note nckeys.h as PUBLIC_HEADER 2020-04-10 14:12:35 -04:00
nick black
89809d5b59 prep for 1.2.7 2020-04-09 20:21:33 -04:00
nick black
6d366380ed prep for 1.2.6 2020-04-08 10:10:47 -04:00
nick black
cb7e844db1 unify notcurses-input+notcurses-keyplot #455 2020-04-08 09:39:10 -04:00
nick black
c717673458 drop keyplot man page/cmake #455 2020-04-08 09:39:10 -04:00
Nick Black
d66549d362
Prep for Fedora packaging (#452)
* jungle demo should be available outside of DFSG builds
* libav: blitters don't need FFMpeg
* CMake: threads independent of ffmpeg
* CMake: add USE_TESTS option to disable tests #450
* tetris: work without ffmpeg
* fedora: flesh out specfile #328
* menu poc: don't use ffmpeg at all
* compile PoCs with binary/include
* multiselect PoC: work without ffmpeg
2020-04-08 02:12:46 -04:00
nick black
fffc1ee850
Extract colloquy; it's gone to its new home #320 2020-04-08 00:12:35 -04:00
nick black
df3dc6b5bc
prep for 1.2.5 2020-04-04 18:49:16 -04:00
nick black
dfd54f540a keyplot: ticker thead so we needn't provide input 2020-04-04 12:32:19 -04:00
nick black
24ac23e405 rust: don't use --locked 2020-04-03 05:51:02 -04:00
nick black
5e27499194 add notcurses-keyplot #430 2020-04-03 05:51:02 -04:00
nick black
7c6b655483 v1.2.4 2020-03-24 16:25:47 -04:00
Nick Black
52bdbc6724
ncplane_translate() accept NULL dest as standard plane #408 (#411)
* tetris man page
* tetris basic skeleton
* tetris: Ticker()
* README: fix up some obsolete terminology
* tetris: draw the game board
* tetris: add NewPiece()
* tetris: draw tetriminos
* tetris: check for stuck piece, move it down
* Accept NULL dst in ncplane_translate() #408
2020-03-22 17:33:08 -04:00
nick black
78fadafb8f notcurses++ needs PUBLIC notcurses linkage 2020-03-15 01:19:47 -04:00
Marek Habersack
3e78dd7d1f [C++] API sync
New classes:

   * MultiSelector (`ncmultiselector_*`)

Added:

   * Direct: cursor_{enable,disable}
   * Plane: high_gradient (`ncplane_highgradient`)
   * Plane: high_gradient_sized (`ncplane_highgradient_sized`)
   * Plane: rotate_cw (`ncplane_rotate_cw`)
   * Plane: rotate_ccw (`ncplane_rotate_ccw`)

Updated:

   * NotCurses: added all the margin initializers to the default options
2020-03-14 21:49:32 -04:00