Revert "start working through notcurses.h with inlined utf8 #830"

This reverts commit 17b6706d3e. It
belonged on a branch, and was not intended for master. #830
This commit is contained in:
nick black 2020-07-30 00:38:42 -04:00
parent 620ae34c02
commit b8e6458de1
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -560,7 +560,7 @@ channels_set_bg_default(uint64_t* channels){
// //
// Each cell occupies 16 static bytes (128 bits). The surface is thus ~1.6MB // Each cell occupies 16 static bytes (128 bits). The surface is thus ~1.6MB
// for a (pretty large) 500x200 terminal. At 80x43, it's less than 64KB. // for a (pretty large) 500x200 terminal. At 80x43, it's less than 64KB.
// Dynamic requirements (the egcpool) can add up to 16MB to an ncplane, but // Dynamic requirements (the egcpool) can add up to 32MB to an ncplane, but
// such large pools are unlikely in common use. // such large pools are unlikely in common use.
// //
// We implement some small alpha compositing. Foreground and background both // We implement some small alpha compositing. Foreground and background both
@ -581,11 +581,9 @@ channels_set_bg_default(uint64_t* channels){
// RGB is used if neither default terminal colors nor palette indexing are in // RGB is used if neither default terminal colors nor palette indexing are in
// play, and fully supports all transparency options. // play, and fully supports all transparency options.
typedef struct cell { typedef struct cell {
// These 32 bits are either a single-character EGC, encoded as UTF-8, or a // These 32 bits are either a single-byte, single-character grapheme cluster
// 24-bit offset into a per-ncplane attached pool of varying-length UTF-8 // (values 0--0x7f), or an offset into a per-ncplane attached pool of
// grapheme clusters. This pool may thus be up to 16MB. Such an offset is // varying-length UTF-8 grapheme clusters. This pool may thus be up to 32MB.
// encoded with a first byte of 0x01 (non-printable SOH character); the
// offset is the lower 24 bits.
uint32_t gcluster; // 4B -> 4B uint32_t gcluster; // 4B -> 4B
// NCSTYLE_* attributes (16 bits) + 8 foreground palette index bits + 8 // NCSTYLE_* attributes (16 bits) + 8 foreground palette index bits + 8
// background palette index bits. palette index bits are used only if the // background palette index bits. palette index bits are used only if the
@ -613,7 +611,6 @@ typedef struct cell {
} cell; } cell;
#define CELL_TRIVIAL_INITIALIZER { .gcluster = '\0', .attrword = 0, .channels = 0, } #define CELL_TRIVIAL_INITIALIZER { .gcluster = '\0', .attrword = 0, .channels = 0, }
// c *must not* be 0x01, or the cell will be interpreted as an egcpool pointer!
#define CELL_SIMPLE_INITIALIZER(c) { .gcluster = (c), .attrword = 0, .channels = 0, } #define CELL_SIMPLE_INITIALIZER(c) { .gcluster = (c), .attrword = 0, .channels = 0, }
#define CELL_INITIALIZER(c, a, chan) { .gcluster = (c), .attrword = (a), .channels = (chan), } #define CELL_INITIALIZER(c, a, chan) { .gcluster = (c), .attrword = (a), .channels = (chan), }