[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reasoning behind default of 5 for CCHARW_MAX
From: |
Nick Black |
Subject: |
reasoning behind default of 5 for CCHARW_MAX |
Date: |
Sat, 23 Nov 2019 05:24:14 -0500 |
User-agent: |
Mutt/1.12.2 (2019-09-21) |
Hello, friends in character cell UIs!
Does anyone know the reasoning behind the default value of 5 for
CCHARW_MAX? I'm aware that it can be changed (at the cost of
breaking ABI compatibility) via --with-ccharw-max since NCURSES
5.7, but I can't figure out why 5 was originally chosen.
I've checked X/Open Curses 4.2 (1996) and X/Open Curses 7
(2009), but both simply say that cchar_t ought be able to hold
an "implementation-defined" number of wchar_ts, without any
further guidance that I can find. include/curses.head in a
ncurses-6.1-20191019 checkout just restates material seen on
the man page. Is there something I'm missing?
I've stared a bit at the "Combining Diacritical Marks" table
from Unicode 12.1, and...thought I'd mail :). Is anyone aware of
cases where 5 chars are necessary, useful, and actually work on
at least one terminal?
Also, given the semantics of add_wch(3NCURSES), particulary:
"If wch refers to a non-spacing character, all previous characters
at that location are preserved. The non-spacing characters of wch
are added to the spacing complex character, and the rendition spec‐
ified by wch is ignored."
The series:
- 1 setcchar() + add_wch() for a spacing character
- N-1 setcchar() + add_wch()s for N-1 (N<=CCHAR_WMAX)
nonspacing characters (with attrs unchanged)
ought be equivalent to a single setcchar()+add_wch() for the
same N wchar_ts, correct? Just making sure. If so, it might be
helpful to remove the "current position...is then advanced" from
the overall add_wch summary, as it seems to suggest the cursor
always advances. Alternatively, we could explicitly note that it
does not advance in the quoted stanza.
Thanks for your time. Hack on! --nick
--
nick black -=- https://www.nick-black.com
to make an apple pie from scratch,
you need first invent a universe.
signature.asc
Description: PGP signature
- reasoning behind default of 5 for CCHARW_MAX,
Nick Black <=