Commit Graph

2046 Commits (478ebadd640864d0e55314f57e56665b7d6a6dac)
 

Author SHA1 Message Date
Nick Black 478ebadd64 Revert "Change DSO versioning scheme"
This reverts commit 51205551f5.
4 years ago
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.
4 years ago
nick black b80ac3d241
demo: move HUD/about to top of screen 4 years ago
Marek Habersack b5d8549bb3 [C++] Allow multiple instances of `NotCurses`
This is to make it possible, in the future, to create multiple instances
of `NotCurses` for multiple terminals.  The first instance of
`NotCurses` becomes the default one, so that any instances of other
classes that aren't explicitly created with a pointer to another
`NotCurses` instance still work as expected.

Note that currently trying to call `notcurses_init` twice results in the
following error for me:

    0x55555559bfc0 is already registered for signals
    Couldn't drop signals: 0x55555559bfc0 != 0x5555555b6720
    terminate called after throwing an instance of 'ncpp::init_error*'

    Program received signal SIGABRT, Aborted.

The error is signalled by `setup_signals` and the pointer shown in the
message points to the first `struct notcurses` instance created.
4 years ago
nick black dbc20bd5c0
add man page for ncmetric(3) #631 4 years ago
Marek Habersack e0462ed53a
[C++] Sync API changes (#633)
Added:

  * NotCurses: can_utf8 (`notcurses_canutf8`)
  * NotCurses: debug (`notcurses_debug`)
  * Plane: center_abs (`ncplane_center_abs`)
  * Plane: set_channels (`ncplane_set_channels`)
  * Plane: set_attr (`ncplane_set_attr`)
  * Reader: clear (`ncreader_clear`)

Changed:

  * USAGE.md: clarfied when C++ throws exceptions
4 years ago
nick black e097723a63
subproc: on older linux, fall back to fork() 4 years ago
nick black 8971bda0c2 ncpp: stop() resets _instance, add unit test #538 4 years ago
nick black 8e649ebe46 ncpp: test NotCurses construction/stop 4 years ago
nick black 4347cd956a merge in master changes 4 years ago
nick black 9675ed251e
eagle demo: work with ascii mode #634 4 years ago
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!
4 years ago
nick black 698f664bd8
drone: update to new builders 4 years ago
nick black c08c9b7f7f
v1.4.3 4 years ago
nick black ba8d80d444
procroller: don't recurse on argv[0], whoops 4 years ago
nick black 24dae2cf15
ncmetric: tighten up PREFIXFWIDTH macros 4 years ago
nick black bec9691999
NEWS: document *PREFIXFMT macros #630 4 years ago
nick black cce9384ab8
ncmetric: adapt PREFIXFMT to multibyte #630 4 years ago
nick black 4e9f46e063
Correct scaling in qrcode_rows() 4 years ago
nick black e682b4fae8
qrcode: only render sufficiently small codes #629 4 years ago
nick black f425944bba
FreeBSD: move back to getrandom(); read_random() is kernelspace 4 years ago
nick black 2b5546fc4c
plot: make 8x1 the default glyph geometry 4 years ago
nick black fc998510a0
CMake: only install static libs if built #625 4 years ago
nick black 00d63c0b69
add USE_STATIC option to CMake #625 4 years ago
nick black 7215bf92ad
throw somed attributes on a few functions 4 years ago
nick black 7e12436196
reader poc: fix Plane memory leak #624 4 years ago
nick black 57fb7fc96a
sgr poc: don't put critical logic in assert() #624 4 years ago
nick black f9f76046d5
sgr poc: don't put critical logic in assert() #624 4 years ago
nick black 4ab0e67155
tetris: rely on c++ exceptions #621 4 years ago
nick black 7af027b895
ncpp unit tests: check get_instance exception #538 4 years ago
nick black f120ab883f
tests: collapse RGB conversions into one TEST_CASE 4 years ago
nick black 07e894c40c
v1.4.2.4 4 years ago
nick black 37a4114f42
O(1) z-axis moves #623
Replace the singly-linked z-axis with a doubly-linked list,
and reimplement all z-axis moves as O(1) functions.
Eliminate ncplane_move_{above/below}_unsafe(), as there are no
longer unsafe moves.
4 years ago
nick black a288c2e654
document all build options 4 years ago
nick black 0d696be0cc
ncpp: normalize Notcurses capitalization 4 years ago
nick black 297263b39b
Add a new C++ section to USAGE.md 4 years ago
nick black c3bc4bb7f2
CMake: first stab at llvm-cov #620 4 years ago
nick black 2edb7fe690
handle clang11 -Wc99-designator 4 years ago
nick black 3119a87801 init_banner(): need use stdio directly for styling 4 years ago
nick black 99bd3fd597
recenter post-rotation in normal demo #617 4 years ago
nick black bcdf513e31
direct poc: exit out on bad ncdirect_cursor_up() 4 years ago
nick black e5b1c2cdea
view/demo/tetris: NCOPTION_INHIBIT_SETLOCALE 4 years ago
nick black 818ec25778
notcurses_stop: call del_curterm, plug memory leak 4 years ago
nick black 7f2888269f
all PoCs: use NCOPTION_INHIBIT_SETLOCALE 4 years ago
nick black 381263e9fe
Unify interrogate_terminfo() #614 4 years ago
nick black 30412d54ce
ncreel: fix up rendering, reel display #618 4 years ago
nick black 8ff3402166
move terminfo cache into its own shared struct #614 4 years ago
nick black bd4d4ef321 import init_banner() outfactoring 4 years ago
nick black 390dc208ba freebsd: use read_random() 4 years ago
nick black 8f78a8fdc0 fade tests: don't use CLOCK_MONOTONIC_RAW 4 years ago