mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Rename IS_PRINTABLE macro to unichar_isprint and move it to utf8.h.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4534 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
bd7bc8781b
commit
d3687d8a97
@ -32,4 +32,6 @@ void utf16_to_utf8_with_pos(const unichar *str, int spos, char *out, int *opos);
|
||||
/* Returns width for character (0-2). */
|
||||
int mk_wcwidth(unichar c);
|
||||
|
||||
#define unichar_isprint(c) (((c) & ~0x80) >= 32)
|
||||
|
||||
#endif
|
||||
|
@ -257,7 +257,7 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos)
|
||||
|
||||
if (entry->hidden)
|
||||
term_addch(root_window, ' ');
|
||||
else if (IS_PRINTABLE(*p))
|
||||
else if (unichar_isprint(*p))
|
||||
term_add_unichar(root_window, *p);
|
||||
else {
|
||||
term_set_color(root_window, ATTR_RESET|ATTR_REVERSE);
|
||||
|
@ -22,8 +22,6 @@ typedef struct _TERM_WINDOW TERM_WINDOW;
|
||||
|
||||
typedef guint32 unichar;
|
||||
|
||||
#define IS_PRINTABLE(c) (((c) & ~0x80) >= 32)
|
||||
|
||||
extern TERM_WINDOW *root_window;
|
||||
extern int term_width, term_height;
|
||||
extern int term_use_colors, term_type, term_detached;
|
||||
|
@ -451,7 +451,7 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
||||
|
||||
xpos += char_width;
|
||||
if (xpos <= term_width) {
|
||||
if (IS_PRINTABLE(chr)) {
|
||||
if (unichar_isprint(chr)) {
|
||||
for (; text < end; text++)
|
||||
term_addch(view->window, *text);
|
||||
term_addch(view->window, *text);
|
||||
|
Loading…
Reference in New Issue
Block a user