mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncmetric: tighten up PREFIXFWIDTH macros
This commit is contained in:
parent
bec9691999
commit
24dae2cf15
@ -2352,9 +2352,9 @@ API struct ncplane* nctablet_ncplane(struct nctablet* t);
|
||||
#define PREFIXFWIDTH(x) ((int)(strlen(x) - mbswidth(x) + PREFIXCOLUMNS))
|
||||
#define IPREFIXFWIDTH(x) ((int)(strlen(x) - mbswidth(x) + IPREFIXCOLUMNS))
|
||||
#define BPREFIXFWIDTH(x) ((int)(strlen(x) - mbswidth(x) + BPREFIXCOLUMNS))
|
||||
#define PREFIXFMT(x) PREFIXFWIDTH(x), x
|
||||
#define IPREFIXFMT(x) IPREFIXFWIDTH(x), x
|
||||
#define BPREFIXFMT(x) BPREFIXFWIDTH(x), x
|
||||
#define PREFIXFMT(x) PREFIXFWIDTH(x), (x)
|
||||
#define IPREFIXFMT(x) IPREFIXFWIDTH(x), (x)
|
||||
#define BPREFIXFMT(x) BPREFIXFWIDTH(x), (x)
|
||||
|
||||
// Takes an arbitrarily large number, and prints it into a fixed-size buffer by
|
||||
// adding the necessary SI suffix. Usually, pass a |[IB]PREFIXSTRLEN+1|-sized
|
||||
|
Loading…
Reference in New Issue
Block a user