From: MINAMI H. <mi...@mi...> - 2006-03-06 16:50:38
|
On Mon, 2005-12-19 at 08:34 -0500, Rich Felker wrote: > With traditional character cell storage, a fixed size window holds a > finite fixed number of characters (W*H). However with combining > characters in unicode, it seems that a utf8 terminal has no upper > bound on the storage requirement. Is it appropriate to just choose an > arbitrary limit? In mlterm, we have assumed that a combined char can be represented by up to seven UCS4 codes. Since reserving (W*7) chars instead of (W*H) for a line is considered to be too wasteful, extra memory for combined chars are dynamically allocated only when necessary. We could use linked-list to support arbitrary long sequence. But I don't think we can bear to store a pointer to next node (=extra 4 or 8 bytes) for every character. -- MINAMI Hirokazu <mi...@mi...> |