diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index b7ae938877..85385c3929 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -95,11 +95,6 @@ typedef enum { NCSCALE_SCALE_HIRES, } ncscale_e; -// Returns the number of columns occupied by a multibyte (UTF-8) string, or -// -1 if a non-printable/illegal character is encountered. -// FIXME becomes a static inline in ABI3. -API int ncstrwidth(const char* mbs); - // Returns the number of columns occupied by a the valid prefix of a multibyte // (UTF-8) string. If an invalid character is encountered, -1 will be returned, // and the number of valid bytes and columns will be written into *|validbytes| @@ -107,6 +102,13 @@ API int ncstrwidth(const char* mbs); // *|validbytes| and *|validwidth| reflect the entire string. API int ncstrwidth_valid(const char* egcs, int* validbytes, int* validwidth); +// Returns the number of columns occupied by a multibyte (UTF-8) string, or +// -1 if a non-printable/illegal character is encountered. +static inline int +ncstrwidth(const char* mbs){ + return ncstrwidth_valid(mbs, NULL, NULL); +} + // Returns a heap-allocated copy of the user name under which we are running. API ALLOC char* notcurses_accountname(void); @@ -4133,19 +4135,9 @@ API __attribute__ ((deprecated)) int ncvisual_inflate(struct ncvisual* n, int sc API void notcurses_debug_caps(const struct notcurses* nc, FILE* debugfp) __attribute__ ((deprecated)) __attribute__ ((nonnull (1, 2))); -__attribute__ ((deprecated)) API int nccell_width(const struct ncplane* n, const nccell* c); - API ALLOC char* ncvisual_subtitle(const struct ncvisual* ncv) __attribute__ ((nonnull (1))) __attribute__ ((deprecated)); -API uint32_t notcurses_getc(struct notcurses* nc, const struct timespec* ts, - const void* unused, ncinput* ni) - __attribute__ ((nonnull (1))) __attribute__ ((deprecated)); - -API uint32_t ncdirect_getc(struct ncdirect* nc, const struct timespec *ts, - const void* unused, ncinput* ni) - __attribute__ ((nonnull (1))) __attribute__ ((deprecated)); - #undef API #undef ALLOC diff --git a/src/lib/in.c b/src/lib/in.c index 6248d70024..c316ac1f4d 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -2136,18 +2136,6 @@ uint32_t ncdirect_get(ncdirect* n, const struct timespec* ts, ncinput* ni){ return internal_get(n->tcache.ictx, ts, ni); } -uint32_t notcurses_getc(notcurses* nc, const struct timespec* ts, - const void* unused, ncinput* ni){ - (void)unused; // FIXME remove for abi3 - return notcurses_get(nc, ts, ni); -} - -uint32_t ncdirect_getc(ncdirect* nc, const struct timespec *ts, - const void* unused, ncinput* ni){ - (void)unused; // FIXME remove for abi3 - return ncdirect_get(nc, ts, ni); -} - int get_cursor_location(inputctx* ictx, const char* u7, int* y, int* x){ pthread_mutex_lock(&ictx->clock); while(ictx->cvalid == 0){ diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 3dddd6a9d3..787a44925b 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -1600,10 +1600,6 @@ int ncplane_scrollup_child(ncplane* n, const ncplane* child){ return ret; } -int nccell_width(const ncplane* n __attribute__ ((unused)), const nccell* c){ - return nccell_cols(c); -} - int nccell_load(ncplane* n, nccell* c, const char* gcluster){ int cols; int bytes = utf8_egc_len(gcluster, &cols); @@ -3149,10 +3145,6 @@ int notcurses_ucs32_to_utf8(const uint32_t* ucs32, unsigned ucs32count, return buflen; } -int ncstrwidth(const char* mbs){ - return ncstrwidth_valid(mbs, NULL, NULL); -} - int ncstrwidth_valid(const char* egcs, int* validbytes, int* validwidth){ int cols = 0; // number of columns consumed thus far if(validwidth == NULL){