|
1
1
该技术用于 Lynx , /*
* Determine the number of cells the given string would take up on the screen,
* limited (in the case of wide characters) by the maxCells parameter.
*
* If the returnCellNum parameter is TRUE, return the number of cells;
* otherwise, return the length (limited by the len parameter) of the prefix of
* the string that fits in maxCells cells.
*/
以及ncurses示例计划
/*
* Use the curses library for rendering, including tab-conversion. This
* will not make the resulting array's indices correspond to column for
* lines containing double-width cells because the "in_wch" functions will
* ignore the skipped cells. Use pads for that sort of thing.
*/
顺便说一句:
/*
* Solaris 10 wcwidth() returns "2" for all of the line-drawing (page
* 0x2500) and most of the geometric shapes (a few are excluded, just
* to make it more difficult to use). Do a sanity check to avoid using
* it.
*/
/*
* Regarding the soft-hyphen aberration, see
* http://archives.miloush.net/michkap/archive/2006/09/02/736881.html
*/
|
|
|
2
0
|