unexport cell_egc_idx()

This commit is contained in:
nick black 2020-08-02 23:45:58 -04:00
parent ca2a6501e6
commit ead60d06cc
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
7 changed files with 11 additions and 23 deletions

View File

@ -1,7 +1,10 @@
This document attempts to list user-visible changes and any major internal
rearrangements of Notcurses.
* 1.6.10 (not yet released)
* 1.6.11 (not yet released)
* `cell_egc_idx()` is no longer exported; it was never intended to be.
* 1.6.10 (2020-08-01)
* The `egc` member of `ncreader_options` is now `const`.
* 1.6.9 (2020-07-26)

View File

@ -1693,13 +1693,6 @@ cell_load_simple(struct ncplane* n, cell* c, char ch){
return -1;
}
// get the offset into the egcpool for this cell's EGC. returns meaningless and
// unsafe results if called on a simple cell.
static inline uint32_t
cell_egc_idx(const cell* c){
return c->gcluster - 0x80;
}
// return a pointer to the NUL-terminated EGC referenced by 'c'. this pointer
// is invalidated by any further operation on the plane 'n', so...watch out!
const char* cell_extended_gcluster(const struct ncplane* n, const cell* c);

View File

@ -74,8 +74,6 @@ typedef struct cell {
**int cell_load_simple(struct ncplane* n, cell* c, char ch);**
**uint32_t cell_egc_idx(const cell* c);**
**unsigned cell_bchannel(const cell* cl);**
**unsigned cell_fchannel(const cell* cl);**

View File

@ -126,11 +126,6 @@ namespace ncpp
return cell_simple_p (&_cell);
}
uint32_t get_egc_idx () const noexcept
{
return cell_egc_idx (&_cell);
}
unsigned get_bchannel () const noexcept
{
return cell_bchannel (&_cell);

View File

@ -793,13 +793,6 @@ cell_load_simple(struct ncplane* n, cell* c, char ch){
return -1;
}
// get the offset into the egcpool for this cell's EGC. returns meaningless and
// unsafe results if called on a simple cell.
static inline uint32_t
cell_egc_idx(const cell* c){
return c->gcluster - 0x80;
}
// These log levels consciously map cleanly to those of libav; notcurses itself
// does not use this full granularity. The log level does not affect the opening
// and closing banners, which can be disabled via the notcurses_option struct's

View File

@ -230,7 +230,6 @@ bool cell_double_wide_p(const cell* c);
bool cell_simple_p(const cell* c);
const char* cell_extended_gcluster(const struct ncplane* n, const cell* c);
int cell_load_simple(struct ncplane* n, cell* c, char ch);
uint32_t cell_egc_idx(const cell* c);
unsigned cell_bchannel(const cell* cl);
unsigned cell_fchannel(const cell* cl);
uint64_t cell_set_bchannel(cell* cl, uint32_t channel);

View File

@ -245,6 +245,13 @@ egcpool_dump(egcpool* pool){
pool->poolused = 0;
}
// get the offset into the egcpool for this cell's EGC. returns meaningless and
// unsafe results if called on a simple cell.
static inline uint32_t
cell_egc_idx(const cell* c){
return c->gcluster - 0x80;
}
__attribute__ ((__returns_nonnull__)) static inline const char*
egcpool_extended_gcluster(const egcpool* pool, const cell* c) {
uint32_t idx = cell_egc_idx(c);