merge in master changes

This commit is contained in:
nick black 2020-05-22 06:56:02 -04:00 committed by Nick Black
parent 9675ed251e
commit 4347cd956a
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,8 @@ rearrangements of Notcurses.
* Add `PREFIXFMT`, `BPREFIXFMT`, and `IPREFIXFMT` macros for `ncmetric()`.
In order to properly use `printf(3)`'s field width capability, these
macros must be used. This is necessary to support 'µ' (micro).
* C++'s NotCurses constructor now passes a `nullptr` directly through to
`notcurses_init()`, rather than replacing it with `stdout`.
* Added `USE_STATIC` CMake option, defaulting to `ON`. If turned `OFF`,
static libraries will not be built.

View File

@ -40,7 +40,7 @@ NotCurses::NotCurses (const notcurses_options &nc_opts, FILE *fp)
if (_instance != nullptr)
throw new init_error ("There can be only one instance of the NotCurses class. Use NotCurses::get_instance() to access the existing instance.");
nc = notcurses_init (&nc_opts, fp == nullptr ? stdout : fp);
nc = notcurses_init (&nc_opts, fp);
if (nc == nullptr)
throw new init_error ("notcurses failed to initialize");
_instance = this;