ncpile_create() not NCPLANE_OPTION_NEWPILE #1078

This commit is contained in:
nick black 2020-11-23 20:31:39 -05:00 committed by Nick Black
parent 3ad9a40426
commit b6e5b60374
25 changed files with 62 additions and 132 deletions

View File

@ -10,11 +10,10 @@ rearrangements of Notcurses.
or more `ncplane`s, with a bindtree and a z-axis. Different piles can be or more `ncplane`s, with a bindtree and a z-axis. Different piles can be
mutated or rendered concurrently. There is no new user-visible type: a mutated or rendered concurrently. There is no new user-visible type: a
`struct notcurses` can be treated as a single pile. `struct notcurses` can be treated as a single pile.
* To create a new pile, pass a `NULL` `n` argument to `ncplane_create()`. * To create a new pile from a new plane, use the new function
The returned plane will be the top, bottom, and root of a new plane. `ncpile_create()`. The returned plane will be the top, bottom, and root
Alternatively, use `ncplane_reparent()` or `ncplane_reparent_family()` of a new plane. Alternatively, use `ncplane_reparent()` or
with a `NULL` destination. `ncplane_reparent_family()` with the source equal to the destination.
* 2.0.7 (2020-11-21) * 2.0.7 (2020-11-21)
* The `horiz` union of `ncplane_options` has been discarded; the `int x` * The `horiz` union of `ncplane_options` has been discarded; the `int x`

View File

@ -631,6 +631,7 @@ In addition to its framebuffer--a rectilinear matrix of cells
* a configured user curry (a `void*`), * a configured user curry (a `void*`),
* its position relative to the visible plane, * its position relative to the visible plane,
* its z-index, and * its z-index, and
* an optional resize callback,
* a name (used only for debugging). * a name (used only for debugging).
If opaque, a `cell` on a higher `ncplane` completely obstructs a corresponding If opaque, a `cell` on a higher `ncplane` completely obstructs a corresponding

View File

@ -27,6 +27,8 @@ typedef struct ncplane_options {
**struct ncplane* ncplane_create(struct ncplane* ***n***, const ncplane_options* ***nopts***);** **struct ncplane* ncplane_create(struct ncplane* ***n***, const ncplane_options* ***nopts***);**
**struct ncplane* ncpile_create(struct notcurses* ***n***, const ncplane_options* ***nopts***);**
**struct ncplane* notcurses_top(struct notcurses* ***n***);** **struct ncplane* notcurses_top(struct notcurses* ***n***);**
**struct ncplane* notcurses_bottom(struct notcurses* ***n***);** **struct ncplane* notcurses_bottom(struct notcurses* ***n***);**
@ -255,8 +257,8 @@ bound to themselves). Multiple threads can concurrently operate on distinct
piles, even changing one while rendering another. piles, even changing one while rendering another.
Each plane is part of one and only one pile. By default, a plane is part of the Each plane is part of one and only one pile. By default, a plane is part of the
same pile containing that plane to which it is bound. If the **n** argument same pile containing that plane to which it is bound. If **ncpile_create** is
provided to **ncplane_create** is **NULL**, the returned plane becomes the root used in the place of **ncplane_create**, the returned plane becomes the root
plane, top, and bottom of a new pile. As a root plane, it is bound to itself. A plane, top, and bottom of a new pile. As a root plane, it is bound to itself. A
new pile can also be created by reparenting a plane to itself, though if the new pile can also be created by reparenting a plane to itself, though if the
plane is already a root plane, this is a no-op. plane is already a root plane, this is a no-op.

View File

@ -78,7 +78,6 @@ namespace ncpp
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
plane = ncplane_create ( plane = ncplane_create (
notcurses_stdplane(get_notcurses ()), notcurses_stdplane(get_notcurses ()),
@ -1204,7 +1203,6 @@ namespace ncpp
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
ncplane *ret = ncplane_create ( ncplane *ret = ncplane_create (
n.plane, n.plane,
@ -1230,7 +1228,6 @@ namespace ncpp
nullptr, nullptr,
nullptr, nullptr,
0, 0,
nullptr,
}; };
ncplane *ret = ncplane_create ( ncplane *ret = ncplane_create (
n.plane, n.plane,

View File

@ -1026,11 +1026,6 @@ API char* notcurses_at_yx(struct notcurses* nc, int yoff, int xoff,
// Horizontal alignment relative to the parent plane. Use 'align' instead of 'x'. // Horizontal alignment relative to the parent plane. Use 'align' instead of 'x'.
#define NCPLANE_OPTION_HORALIGNED 0x0001ull #define NCPLANE_OPTION_HORALIGNED 0x0001ull
// Create a new pile with the newly-created plane at its root. The 'n' argument
// ought be NULL, though this is not enforced. When this flag is provided, the
// 'nc' field of the ncplane_options struct must be a valid notcurses context.
#define NCPLANE_OPTION_NEWPILE 0x0002ull
typedef struct ncplane_options { typedef struct ncplane_options {
int y; // vertical placement relative to parent plane int y; // vertical placement relative to parent plane
int x; // horizontal placement relative to parent plane int x; // horizontal placement relative to parent plane
@ -1040,7 +1035,6 @@ typedef struct ncplane_options {
const char* name; // name (used only for debugging), may be NULL const char* name; // name (used only for debugging), may be NULL
int (*resizecb)(struct ncplane*); // callback when parent is resized int (*resizecb)(struct ncplane*); // callback when parent is resized
uint64_t flags; // closure over NCPLANE_OPTION_* uint64_t flags; // closure over NCPLANE_OPTION_*
struct notcurses* nc; // only needs to be set with NCPLANE_OPTION_NEWPILE
} ncplane_options; } ncplane_options;
// Create a new ncplane bound to plane 'n', at the offset 'y'x'x' (relative to // Create a new ncplane bound to plane 'n', at the offset 'y'x'x' (relative to
@ -1050,9 +1044,14 @@ typedef struct ncplane_options {
// retrieved (and reset) later. A 'name' can be set, used in debugging. // retrieved (and reset) later. A 'name' can be set, used in debugging.
API struct ncplane* ncplane_create(struct ncplane* n, const ncplane_options* nopts); API struct ncplane* ncplane_create(struct ncplane* n, const ncplane_options* nopts);
// Same as ncplane_create(), but creates a new pile. The returned plane will
// be the top, bottom, and root of this new pile.
API struct ncplane* ncpile_create(struct notcurses* nc, const ncplane_options* nopts);
// This function will be removed in 3.0 in favor of ncplane_create(). // This function will be removed in 3.0 in favor of ncplane_create().
// It persists in 2.0 only for backwards compatibility. // It persists in 2.0 only for backwards compatibility.
API struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name); API struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name)
__attribute__ ((deprecated));
// Suitable for use as a 'resizecb'. This will realign the plane 'n' against its // Suitable for use as a 'resizecb'. This will realign the plane 'n' against its
// parent, using the alignment specified at ncplane_create()-time. // parent, using the alignment specified at ncplane_create()-time.

View File

@ -451,7 +451,6 @@ int ncdirect_render_image(ncdirect* n, const char* file, ncalign_e align,
.name = "direct", .name = "direct",
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* faken = ncplane_new_internal(nullptr, nullptr, &nopts); struct ncplane* faken = ncplane_new_internal(nullptr, nullptr, &nopts);
if(faken == nullptr){ if(faken == nullptr){

View File

@ -303,7 +303,7 @@ void free_plane(ncplane* p){
// create a new ncpile. only call with pilelock held. // create a new ncpile. only call with pilelock held.
static ncpile* static ncpile*
ncpile_create(notcurses* nc){ make_ncpile(notcurses* nc){
ncpile* ret = malloc(sizeof(*ret)); ncpile* ret = malloc(sizeof(*ret));
if(ret){ if(ret){
ret->nc = nc; ret->nc = nc;
@ -362,7 +362,7 @@ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
p->blist = NULL; p->blist = NULL;
p->name = strdup(nopts->name ? nopts->name : ""); p->name = strdup(nopts->name ? nopts->name : "");
p->align = NCALIGN_UNALIGNED; p->align = NCALIGN_UNALIGNED;
if(nopts->flags & NCPLANE_OPTION_NEWPILE){ if(!n){ // new root/standard plane
assert(!(nopts->flags & NCPLANE_OPTION_HORALIGNED)); assert(!(nopts->flags & NCPLANE_OPTION_HORALIGNED));
p->absy = nopts->y; p->absy = nopts->y;
p->absx = nopts->x; p->absx = nopts->x;
@ -370,7 +370,7 @@ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
p->bprev = NULL; p->bprev = NULL;
p->boundto = p; p->boundto = p;
p->align = NCALIGN_UNALIGNED; p->align = NCALIGN_UNALIGNED;
}else{ // new root/standard plane }else{ // bound to preexisting pile
if(nopts->flags & NCPLANE_OPTION_HORALIGNED){ if(nopts->flags & NCPLANE_OPTION_HORALIGNED){
p->absx = ncplane_align(n, nopts->x, nopts->cols); p->absx = ncplane_align(n, nopts->x, nopts->cols);
p->align = nopts->x; p->align = nopts->x;
@ -409,7 +409,7 @@ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
nc->stats.fbbytes += fbsize; nc->stats.fbbytes += fbsize;
++nc->stats.planes; ++nc->stats.planes;
}else{ // new pile }else{ // new pile
p->pile = ncpile_create(nc); p->pile = make_ncpile(nc);
p->pile->top = p; p->pile->top = p;
p->pile->bottom = p; p->pile->bottom = p;
p->below = NULL; p->below = NULL;
@ -432,7 +432,6 @@ create_initial_ncplane(notcurses* nc, int dimy, int dimx){
.rows = dimy - (nc->margin_t + nc->margin_b), .rows = dimy - (nc->margin_t + nc->margin_b),
.cols = dimx - (nc->margin_l + nc->margin_r), .cols = dimx - (nc->margin_l + nc->margin_r),
.name = "std", .name = "std",
.flags = NCPLANE_OPTION_NEWPILE,
}; };
return nc->stdplane = ncplane_new_internal(nc, NULL, &nopts); return nc->stdplane = ncplane_new_internal(nc, NULL, &nopts);
} }
@ -445,19 +444,12 @@ const ncplane* notcurses_stdplane_const(const notcurses* nc){
return nc->stdplane; return nc->stdplane;
} }
// if n is NULL, nopts must supply nc together with NCPLANE_OPTIONS_NEWPILE
ncplane* ncplane_create(ncplane* n, const ncplane_options* nopts){ ncplane* ncplane_create(ncplane* n, const ncplane_options* nopts){
if(nopts->flags & NCPLANE_OPTION_NEWPILE){ return ncplane_new_internal(ncplane_notcurses(n), n, nopts);
if(nopts->flags & NCPLANE_OPTION_HORALIGNED){ }
logerror(ncplane_notcurses(n), "Can't align a root plane");
return NULL; ncplane* ncpile_create(notcurses* nc, const struct ncplane_options* nopts){
} return ncplane_new_internal(nc, NULL, nopts);
}else{
if(!n){
return NULL; // can't log, no n nor nc :/
}
}
return ncplane_new_internal(n ? ncplane_notcurses(n) : nopts->nc, n, nopts);
} }
struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name){ struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name){
@ -470,7 +462,6 @@ struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x,
.name = name, .name = name,
.resizecb = NULL, .resizecb = NULL,
.flags = 0, .flags = 0,
.nc = NULL,
}; };
return ncplane_create(n, &nopts); return ncplane_create(n, &nopts);
} }

View File

@ -427,7 +427,6 @@ auto ncvisual_render(notcurses* nc, ncvisual* ncv,
.name = "vis", .name = "vis",
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
if((n = ncplane_create(notcurses_stdplane(nc), &nopts)) == nullptr){ if((n = ncplane_create(notcurses_stdplane(nc), &nopts)) == nullptr){
return nullptr; return nullptr;

View File

@ -220,7 +220,6 @@ int main(int argc, char** argv){
.name = "reel", .name = "reel",
.resizecb = resize_reel, .resizecb = resize_reel,
.flags = NCPLANE_OPTION_HORALIGNED, .flags = NCPLANE_OPTION_HORALIGNED,
.nc = nullptr,
}; };
n = ncplane_create(nstd, &nopts); n = ncplane_create(nstd, &nopts);
if(!n){ if(!n){

View File

@ -89,7 +89,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = dimx, .cols = dimx,
nullptr, "subt", nullptr, 0, nullptr, nullptr, "subt", nullptr, 0,
}; };
marsh->subtitle_plane = ncplane_create(notcurses_stdplane(nc), &nopts); marsh->subtitle_plane = ncplane_create(notcurses_stdplane(nc), &nopts);
uint64_t channels = 0; uint64_t channels = 0;

View File

@ -26,7 +26,6 @@ TEST_CASE("Blitting") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto ncp = ncplane_create(n_, &nopts); auto ncp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != ncp); REQUIRE(nullptr != ncp);
@ -75,7 +74,6 @@ TEST_CASE("Blitting") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto ncp = ncplane_create(n_, &nopts); auto ncp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != ncp); REQUIRE(nullptr != ncp);

View File

@ -161,7 +161,6 @@ TEST_CASE("Cell") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto np = ncplane_create(n_, &nopts); auto np = ncplane_create(n_, &nopts);
REQUIRE(nullptr != np); REQUIRE(nullptr != np);
@ -201,7 +200,6 @@ TEST_CASE("Cell") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto np = ncplane_create(n_, &nopts); auto np = ncplane_create(n_, &nopts);
REQUIRE(nullptr != np); REQUIRE(nullptr != np);
@ -241,7 +239,6 @@ TEST_CASE("Cell") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto np = ncplane_create(n_, &nopts); auto np = ncplane_create(n_, &nopts);
REQUIRE(nullptr != np); REQUIRE(nullptr != np);
@ -281,7 +278,6 @@ TEST_CASE("Cell") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto np = ncplane_create(n_, &nopts); auto np = ncplane_create(n_, &nopts);
REQUIRE(nullptr != np); REQUIRE(nullptr != np);
@ -322,7 +318,6 @@ TEST_CASE("Cell") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto np = ncplane_create(n_, &nopts); auto np = ncplane_create(n_, &nopts);
REQUIRE(nullptr != np); REQUIRE(nullptr != np);

View File

@ -43,7 +43,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* pfn = ncplane_create(n_, &nopts); struct ncplane* pfn = ncplane_create(n_, &nopts);
REQUIRE(nullptr != pfn); REQUIRE(nullptr != pfn);
@ -76,7 +75,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* pfn = ncplane_create(n_, &nopts); struct ncplane* pfn = ncplane_create(n_, &nopts);
REQUIRE(nullptr != pfn); REQUIRE(nullptr != pfn);
@ -96,7 +94,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* pfn = ncplane_create(n_, &nopts); struct ncplane* pfn = ncplane_create(n_, &nopts);
REQUIRE(nullptr != pfn); REQUIRE(nullptr != pfn);
@ -368,7 +365,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* p1 = ncplane_create(n_, &nopts); struct ncplane* p1 = ncplane_create(n_, &nopts);
REQUIRE(p1); REQUIRE(p1);
@ -413,7 +409,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto p1 = ncplane_create(n_, &nopts); auto p1 = ncplane_create(n_, &nopts);
REQUIRE(p1); REQUIRE(p1);
@ -468,7 +463,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* p1 = ncplane_create(n_, &nopts); struct ncplane* p1 = ncplane_create(n_, &nopts);
REQUIRE(p1); REQUIRE(p1);
@ -487,7 +481,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto p2 = ncplane_create(n_, &n2opts); auto p2 = ncplane_create(n_, &n2opts);
REQUIRE(p2); REQUIRE(p2);
@ -529,7 +522,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* p1 = ncplane_create(n_, &nopts); struct ncplane* p1 = ncplane_create(n_, &nopts);
REQUIRE(p1); REQUIRE(p1);
@ -548,7 +540,6 @@ TEST_CASE("Fills") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto p2 = ncplane_create(n_, &n2opts); auto p2 = ncplane_create(n_, &n2opts);
REQUIRE(p2); REQUIRE(p2);

View File

@ -33,7 +33,6 @@ TEST_CASE("Geometry") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto n = ncplane_create(n_, &nopts); auto n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -80,7 +79,6 @@ TEST_CASE("Geometry") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto n = ncplane_create(n_, &nopts); auto n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);

View File

@ -21,7 +21,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -46,7 +45,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -71,7 +69,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -97,7 +94,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -124,7 +120,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -151,7 +146,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -178,7 +172,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -206,7 +199,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -235,7 +227,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -264,7 +255,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -291,7 +281,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -318,7 +307,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -345,7 +333,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -372,7 +359,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -399,7 +385,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -426,7 +411,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -454,7 +438,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -483,7 +466,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -510,7 +492,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -545,7 +526,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -580,7 +560,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);
@ -618,7 +597,6 @@ TEST_CASE("TextLayout") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto sp = ncplane_create(n_, &nopts); auto sp = ncplane_create(n_, &nopts);
REQUIRE(sp); REQUIRE(sp);

View File

@ -379,7 +379,7 @@ TEST_CASE("NCPlane") {
.rows = y, .rows = y,
.cols = x, .cols = x,
.userptr = sentinel, .userptr = sentinel,
nullptr, nullptr, 0, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ncp = ncplane_create(n_, &nopts); struct ncplane* ncp = ncplane_create(n_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
@ -402,7 +402,7 @@ TEST_CASE("NCPlane") {
.x = 0, .x = 0,
.rows = y, .rows = y,
.cols = x, .cols = x,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ncp = ncplane_create(n_, &nopts); struct ncplane* ncp = ncplane_create(n_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
@ -427,10 +427,9 @@ TEST_CASE("NCPlane") {
.x = 0, .x = 0,
.rows = y, .rows = y,
.cols = x, .cols = x,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0,
NCPLANE_OPTION_NEWPILE, nc_,
}; };
struct ncplane* ncp = ncplane_create(nullptr, &nopts); struct ncplane* ncp = ncpile_create(nc_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
int px, py; int px, py;
ncplane_dim_yx(ncp, &py, &px); ncplane_dim_yx(ncp, &py, &px);
@ -459,7 +458,7 @@ TEST_CASE("NCPlane") {
.x = x, .x = x,
.rows = maxy, .rows = maxy,
.cols = maxx, .cols = maxx,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* newp = ncplane_create(n_, &nopts); struct ncplane* newp = ncplane_create(n_, &nopts);
REQUIRE(newp); REQUIRE(newp);
@ -505,7 +504,7 @@ TEST_CASE("NCPlane") {
.x = x, .x = x,
.rows = maxy, .rows = maxy,
.cols = maxx, .cols = maxx,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* newp = ncplane_create(n_, &nopts); struct ncplane* newp = ncplane_create(n_, &nopts);
REQUIRE(newp); REQUIRE(newp);
@ -747,7 +746,7 @@ TEST_CASE("NCPlane") {
.x = ncols - 3, .x = ncols - 3,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ncp = ncplane_create(n_, &nopts); struct ncplane* ncp = ncplane_create(n_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
@ -769,7 +768,7 @@ TEST_CASE("NCPlane") {
.x = x, .x = x,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ncp = ncplane_create(n_, &nopts); struct ncplane* ncp = ncplane_create(n_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
@ -823,7 +822,7 @@ TEST_CASE("NCPlane") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -852,7 +851,7 @@ TEST_CASE("NCPlane") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ndom = ncplane_create(n_, &nopts); struct ncplane* ndom = ncplane_create(n_, &nopts);
REQUIRE(ndom); REQUIRE(ndom);
@ -875,7 +874,7 @@ TEST_CASE("NCPlane") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ndom = ncplane_create(n_, &nopts); struct ncplane* ndom = ncplane_create(n_, &nopts);
REQUIRE(ndom); REQUIRE(ndom);
@ -898,7 +897,7 @@ TEST_CASE("NCPlane") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ndom = ncplane_create(n_, &nopts); struct ncplane* ndom = ncplane_create(n_, &nopts);
REQUIRE(ndom); REQUIRE(ndom);
@ -925,7 +924,7 @@ TEST_CASE("NCPlane") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* ndom = ncplane_create(n_, &nopts); struct ncplane* ndom = ncplane_create(n_, &nopts);
REQUIRE(ndom); REQUIRE(ndom);

View File

@ -80,7 +80,6 @@ TEST_CASE("NotcursesBase") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
planes[idx] = ncplane_create(notcurses_stdplane(nc_), &nopts); planes[idx] = ncplane_create(notcurses_stdplane(nc_), &nopts);
REQUIRE(planes[idx]); REQUIRE(planes[idx]);

View File

@ -23,7 +23,6 @@ TEST_CASE("Readers") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto ncp = ncplane_create(notcurses_stdplane(nc_), &nopts); auto ncp = ncplane_create(notcurses_stdplane(nc_), &nopts);
uint64_t echannels = CHANNELS_RGB_INITIALIZER(0xff, 0x44, 0xff, 0, 0, 0); uint64_t echannels = CHANNELS_RGB_INITIALIZER(0xff, 0x44, 0xff, 0, 0, 0);

View File

@ -299,7 +299,6 @@ TEST_CASE("Reels") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto ncp = ncplane_create(n_, &nopts); auto ncp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != ncp); REQUIRE(nullptr != ncp);

View File

@ -28,7 +28,7 @@ TEST_CASE("Resize") {
.x = 0, .x = 0,
.rows = y, .rows = y,
.cols = x, .cols = x,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(nullptr != testn); REQUIRE(nullptr != testn);
@ -52,7 +52,7 @@ TEST_CASE("Resize") {
.x = 0, .x = 0,
.rows = y, .rows = y,
.cols = x, .cols = x,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(nullptr != testn); REQUIRE(nullptr != testn);

View File

@ -59,7 +59,6 @@ TEST_CASE("Rotate") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
uint64_t channels = 0; uint64_t channels = 0;
@ -94,7 +93,6 @@ TEST_CASE("Rotate") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 16)); REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 16));
@ -113,7 +111,6 @@ TEST_CASE("Rotate") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 32)); REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 32));
@ -132,7 +129,6 @@ TEST_CASE("Rotate") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 16)); REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 16));
@ -151,7 +147,6 @@ TEST_CASE("Rotate") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* testn = ncplane_create(n_, &nopts); struct ncplane* testn = ncplane_create(n_, &nopts);
REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 32)); REQUIRE(0 < ncplane_gradient_sized(testn, " ", 0, ul, ur, ll, lr, 8, 32));

View File

@ -24,7 +24,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -53,7 +53,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -74,7 +74,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -101,7 +101,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -140,7 +140,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 4, .rows = 4,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -164,7 +164,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -224,7 +224,7 @@ TEST_CASE("Scrolling") {
.x = 1, .x = 1,
.rows = 2, .rows = 2,
.cols = 20, .cols = 20,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);

View File

@ -18,7 +18,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -42,7 +42,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -65,7 +65,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -88,7 +88,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -117,7 +117,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -139,7 +139,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -170,7 +170,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -216,7 +216,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);
@ -267,7 +267,7 @@ TEST_CASE("Selectors") {
.x = 0, .x = 0,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
struct ncselector* ncs = ncselector_create(n, &opts); struct ncselector* ncs = ncselector_create(n, &opts);

View File

@ -231,7 +231,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* ncp = ncplane_create(n_, &nopts); struct ncplane* ncp = ncplane_create(n_, &nopts);
REQUIRE(ncp); REQUIRE(ncp);
@ -356,7 +355,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* n = ncplane_create(n_, &nopts); struct ncplane* n = ncplane_create(n_, &nopts);
REQUIRE(n); REQUIRE(n);
@ -404,7 +402,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* p = ncplane_create(n_, &nopts); struct ncplane* p = ncplane_create(n_, &nopts);
REQUIRE(nullptr != p); REQUIRE(nullptr != p);
@ -454,7 +451,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* topp = ncplane_create(n_, &nopts); struct ncplane* topp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != topp); REQUIRE(nullptr != topp);
@ -639,7 +635,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* topp = ncplane_create(n_, &nopts); struct ncplane* topp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != topp); REQUIRE(nullptr != topp);
@ -795,7 +790,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
struct ncplane* topp = ncplane_create(n_, &nopts); struct ncplane* topp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != topp); REQUIRE(nullptr != topp);
@ -990,7 +984,6 @@ TEST_CASE("Wide") {
.name = nullptr, .name = nullptr,
.resizecb = nullptr, .resizecb = nullptr,
.flags = 0, .flags = 0,
.nc = nullptr,
}; };
auto high = ncplane_create(n_, &nopts); auto high = ncplane_create(n_, &nopts);
REQUIRE(nullptr != high); REQUIRE(nullptr != high);

View File

@ -31,7 +31,7 @@ TEST_CASE("ZAxis") {
.x = 0, .x = 0,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* np = ncplane_create(n_, &nopts); struct ncplane* np = ncplane_create(n_, &nopts);
REQUIRE(np); REQUIRE(np);
@ -48,7 +48,7 @@ TEST_CASE("ZAxis") {
.x = 0, .x = 0,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* np = ncplane_create(n_, &nopts); struct ncplane* np = ncplane_create(n_, &nopts);
REQUIRE(np); REQUIRE(np);
@ -65,7 +65,7 @@ TEST_CASE("ZAxis") {
.x = 0, .x = 0,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* np = ncplane_create(n_, &nopts); struct ncplane* np = ncplane_create(n_, &nopts);
REQUIRE(np); REQUIRE(np);
@ -88,7 +88,7 @@ TEST_CASE("ZAxis") {
.x = 0, .x = 0,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* np = ncplane_create(n_, &nopts); struct ncplane* np = ncplane_create(n_, &nopts);
REQUIRE(np); REQUIRE(np);
@ -120,7 +120,7 @@ TEST_CASE("ZAxis") {
.x = 0, .x = 0,
.rows = 2, .rows = 2,
.cols = 2, .cols = 2,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
struct ncplane* n2 = ncplane_create(n_, &nopts); struct ncplane* n2 = ncplane_create(n_, &nopts);
REQUIRE(1 == cell_load(n2, &c, "y")); REQUIRE(1 == cell_load(n2, &c, "y"));
@ -151,7 +151,7 @@ TEST_CASE("ZAxis") {
.x = 1, .x = 1,
.rows = 1, .rows = 1,
.cols = 1, .cols = 1,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, 0,
}; };
auto p = ncplane_create(n_, &nopts); auto p = ncplane_create(n_, &nopts);
REQUIRE(nullptr != p); REQUIRE(nullptr != p);