From 202e3535d58c7a74a81ec22282c15695f53182e2 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 25 Nov 2020 19:43:53 -0500 Subject: [PATCH] document new NCSTYLE_STRUCK #1138 --- NEWS.md | 4 ++++ USAGE.md | 21 +++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/NEWS.md b/NEWS.md index 503097943..7d942c300 100644 --- a/NEWS.md +++ b/NEWS.md @@ -23,6 +23,10 @@ rearrangements of Notcurses. * Add new function `ncpile_render()`, which renders the pile containing the specified plane to the specified buffer. Add new function `ncpile_rasterize()` to rasterize the specified buffer to output. + * Added `NCSTYLE_STRUCK` for strikethrough. Note that this is not supported + by terminfo, and we instead just hardcode the control sequence. Use at your + own risk! If your terminal doesn't support this control sequence, behavior + is undefined. * 2.0.7 (2020-11-21) * The `horiz` union of `ncplane_options` has been discarded; the `int x` diff --git a/USAGE.md b/USAGE.md index ff3711bef..92d113514 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1696,16 +1696,17 @@ int cell_duplicate(struct ncplane* n, cell* targ, const cell* c); // Release resources held by the cell 'c'. void cell_release(struct ncplane* n, cell* c); -#define NCSTYLE_MASK 0xffff0000ul -#define NCSTYLE_STANDOUT 0x00800000ul -#define NCSTYLE_UNDERLINE 0x00400000ul -#define NCSTYLE_REVERSE 0x00200000ul -#define NCSTYLE_BLINK 0x00100000ul -#define NCSTYLE_DIM 0x00080000ul -#define NCSTYLE_BOLD 0x00040000ul -#define NCSTYLE_INVIS 0x00020000ul -#define NCSTYLE_PROTECT 0x00010000ul -#define NCSTYLE_ITALIC 0x01000000ul +#define NCSTYLE_MASK 0xfffful +#define NCSTYLE_STANDOUT 0x0080ul +#define NCSTYLE_UNDERLINE 0x0040ul +#define NCSTYLE_REVERSE 0x0020ul +#define NCSTYLE_BLINK 0x0010ul +#define NCSTYLE_DIM 0x0008ul +#define NCSTYLE_BOLD 0x0004ul +#define NCSTYLE_INVIS 0x0002ul +#define NCSTYLE_PROTECT 0x0001ul +#define NCSTYLE_ITALIC 0x0100ul +#define NCSTYLE_STRUCK 0x0200ul // copy the UTF8-encoded EGC out of the cell, whether simple or complex. the // result is not tied to the ncplane, and persists across erases / destruction.