Commit Graph

11 Commits (792b28ec3eb755fda79f986da27e19bec7c552ac)

Author SHA1 Message Date
Nicholas Marriott cf7b384c43 Better UTF-8 support, including combined characters. Unicode data is now stored
as UTF-8 in a separate array, the code does a lookup into this every time it
gets to a UTF-8 cell. Zero width characters are just appended onto the UTF-8
data for the previous cell. This also means that almost no bytes extra are
wasted non-Unicode data (yay).

Still some oddities, such as copy mode skips over wide characters in a strange
way, and the code could do with some tidying.
2009-03-28 20:17:29 +00:00
Nicholas Marriott 34dd72f008 _fill functions are no longer needed. Nuke them. 2009-03-28 16:57:03 +00:00
Nicholas Marriott abf170d6d0 Whoops. Missed a few changes. 2009-03-28 16:55:46 +00:00
Nicholas Marriott 6c0728fe07 Step 2 of the Grand Plan To Make UTF-8 Better.
Split grid into two arrays, one containing grid attributes/flags/colours (keeps
the name grid_cell for now) and a separate with the character data (called
text). The text is stored as a u_short but is treated as a uint64_t elsewhere;
eventually the grid will have two arrays.

I'm not happy with the naming so that might change.

Still need to decide where to go from here. I'm not sure whether to combine
the peek/set functions together, and also whether to continue to treat the
text as a uint64_t (and convert to/from Unicode) or make it a char array
(of size one when UTF-8 disabled, eight when enabled) and keep everything
as UTF-8.

Also since UTF-8 will eventually become an attribute of the grid itself it
might be nice to move all the padding crap into grid.c.
2009-03-28 16:30:05 +00:00
Nicholas Marriott 989d67ccd7 struct grid_data -> struct grid. Stage 1 of the Grand Plan To Make UTF-8 Better. 2009-03-28 15:43:41 +00:00
Nicholas Marriott a1b43faa43 Trim spaces. 2009-01-10 01:51:22 +00:00
Nicholas Marriott ac3fe6512f Some tweaks found by LLVM courtesy of IcePic. 2009-01-05 11:04:06 +00:00
Nicholas Marriott 8fb10c11a0 Don't segfault on last character. 2008-12-11 17:06:28 +00:00
Nicholas Marriott 631a45ecb5 Calculate y properly. 2008-09-28 20:34:22 +00:00
Nicholas Marriott 62457bce0b Trim. 2008-09-26 06:45:28 +00:00
Nicholas Marriott efe557313a Internal screen data rewrite for better 256 colour/UTF-8 support. 2008-09-25 20:08:57 +00:00