From ba08a6142e9e44d166c9cd1e2ce7557ce25e1ed7 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 24 Nov 2019 18:31:26 -0500 Subject: [PATCH] demo: call boxdemo --- src/bin/demo.c | 3 +++ src/bin/demo.h | 1 + src/lib/notcurses.c | 2 -- tests/ncplane.cpp | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/demo.c b/src/bin/demo.c index eae776a03..e1f455486 100644 --- a/src/bin/demo.c +++ b/src/bin/demo.c @@ -95,6 +95,9 @@ int main(int argc, char** argv){ goto err; } sleep(1); + if(box_demo(nc)){ + goto err; + } if(widecolor_demo(nc, ncp)){ goto err; } diff --git a/src/bin/demo.h b/src/bin/demo.h index d69efb5ff..4bf375a1e 100644 --- a/src/bin/demo.h +++ b/src/bin/demo.h @@ -10,6 +10,7 @@ extern "C" { #define FADE_MILLISECONDS 500 int widecolor_demo(struct notcurses* nc, struct ncplane* n); +int box_demo(struct notcurses* nc); #ifdef __cplusplus } diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 499f07070..6416bb870 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -797,7 +797,6 @@ int ncplane_vline(ncplane* n, const cell* c, int len){ int ret, ypos, xpos; ncplane_cursor_yx(n, &ypos, &xpos); for(ret = 0 ; ret < len ; ++ret){ -fprintf(stderr, "MOCNG: %d %d\n", ypos + ret, xpos); if(ncplane_cursor_move_yx(n, ypos + ret, xpos)){ return -1; } @@ -805,7 +804,6 @@ fprintf(stderr, "MOCNG: %d %d\n", ypos + ret, xpos); break; } } -fprintf(stderr, "RETURN %d of %d\n", ret, len); return ret; } diff --git a/tests/ncplane.cpp b/tests/ncplane.cpp index 5839dd92c..9046a495a 100644 --- a/tests/ncplane.cpp +++ b/tests/ncplane.cpp @@ -169,8 +169,8 @@ TEST_F(NcplaneTest, ConcentricBoxen) { cell_load(n_, &ur, "╮"); cell_load(n_, &ll, "╰"); cell_load(n_, &lr, "╯"); - cell_load(n_, &hl, "│"); - cell_load(n_, &vl, "─"); + cell_load(n_, &vl, "│"); + cell_load(n_, &hl, "─"); EXPECT_EQ(0, ncplane_box(n_, &ul, &ur, &ll, &lr, &hl, &vl, y, x)); cell_release(n_, &vl); cell_release(n_, &hl);