From 5d3125132da523a5a9deaae6ec0f03bfa1797187 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 10 Oct 2021 20:53:57 -0400 Subject: [PATCH] kill ncplane_new() #1777 --- doc/man/man3/notcurses_plane.3.md | 3 --- include/notcurses/notcurses.h | 19 ------------------- src/lib/notcurses.c | 24 ------------------------ src/lib/reel.c | 4 ---- 4 files changed, 50 deletions(-) diff --git a/doc/man/man3/notcurses_plane.3.md b/doc/man/man3/notcurses_plane.3.md index 92ed725c4e..36fc2b44d7 100644 --- a/doc/man/man3/notcurses_plane.3.md +++ b/doc/man/man3/notcurses_plane.3.md @@ -505,9 +505,6 @@ All other functions cannot fail (and return **void**). # NOTES -**ncplane_new** is defined as a deprecated wrapper around **ncplane_create**. -It should not be used in new code. - # BUGS **ncplane_at_yx** doesn't yet account for bitmap-based graphics (see diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 3dff8fbdba..1d843d1f54 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -4120,11 +4120,6 @@ __attribute__ ((deprecated)) API int cell_duplicate(struct ncplane* n, nccell* t __attribute__ ((deprecated)) API void cell_release(struct ncplane* n, nccell* c); -// This function will be removed in ABI3 in favor of ncplane_create(). -// It persists in ABI2 only for backwards compatibility. -API ALLOC struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name) - __attribute__ ((deprecated)); - API void ncplane_styles_set(struct ncplane* n, unsigned stylebits) __attribute__ ((deprecated)); API void ncplane_styles_on(struct ncplane* n, unsigned stylebits) @@ -4132,20 +4127,6 @@ API void ncplane_styles_on(struct ncplane* n, unsigned stylebits) API void ncplane_styles_off(struct ncplane* n, unsigned stylebits) __attribute__ ((deprecated)); -__attribute__ ((deprecated)) API int -cells_rounded_box(struct ncplane* n, uint32_t styles, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, - nccell* lr, nccell* hl, nccell* vl); - -__attribute__ ((deprecated)) API int -cells_double_box(struct ncplane* n, uint32_t styles, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, - nccell* lr, nccell* hl, nccell* vl); - -// Deprecated form of nctablet_plane(). -API struct ncplane* nctablet_ncplane(struct nctablet* t) - __attribute__ ((deprecated)); - #undef API #undef ALLOC diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index b901e2fb38..a6f76e19f8 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -583,20 +583,6 @@ ncplane* ncpile_create(notcurses* nc, const struct ncplane_options* nopts){ return ncplane_new_internal(nc, NULL, nopts); } -struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name){ - ncplane_options nopts = { - .y = y, - .x = x, - .rows = rows, - .cols = cols, - .userptr = opaque, - .name = name, - .resizecb = NULL, - .flags = 0, - }; - return ncplane_create(n, &nopts); -} - void ncplane_home(ncplane* n){ n->x = 0; n->y = 0; @@ -2994,11 +2980,6 @@ int nccells_double_box(ncplane* n, uint32_t attr, uint64_t channels, return nccells_ascii_box(n, attr, channels, ul, ur, ll, lr, hl, vl); } -int cells_double_box(ncplane* n, uint32_t attr, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ - return nccells_double_box(n, attr, channels, ul, ur, ll, lr, hl, vl); -} - int nccells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ if(notcurses_canutf8(ncplane_notcurses(n))){ @@ -3007,11 +2988,6 @@ int nccells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, return nccells_ascii_box(n, attr, channels, ul, ur, ll, lr, hl, vl); } -int cells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ - return nccells_rounded_box(n, attr, channels, ul, ur, ll, lr, hl, vl); -} - // find the center coordinate of a plane, preferring the top/left in the // case of an even number of rows/columns (in such a case, there will be one // more cell to the bottom/right of the center than the top/left). the diff --git a/src/lib/reel.c b/src/lib/reel.c index f036067ea9..ee0ef2d9e5 100644 --- a/src/lib/reel.c +++ b/src/lib/reel.c @@ -749,10 +749,6 @@ ncplane* nctablet_plane(nctablet* t){ return t->cbp; } -ncplane* nctablet_ncplane(nctablet* t){ // deprecated - return nctablet_plane(t); -} - ncplane* ncreel_plane(ncreel* nr){ return nr->p; }