nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Port wide char display from termbox-go #51

Closed adsr closed 9 years ago

adsr commented 9 years ago

Similar logic to what's done in termbox-go, but also handles chars with wcwidth>2 if those exist.

Note _XOPEN_SOURCE has to be defined to make wcwidth available. Also note wcwidth relies on locale, so users will probably want to call setlocale(LC_ALL, "") before tb_init.