diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-05-31 13:19:05 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-05-31 13:19:05 +0000 |
commit | d3687d8a973e507db22e1565592c5ebdd7b017c4 (patch) | |
tree | 351503e1ea38518ed1ca31252afd4fee40ad50c1 | |
parent | bd7bc8781ba1d486d5346096ff352112f9b7d98d (diff) | |
download | irssi-d3687d8a973e507db22e1565592c5ebdd7b017c4.zip |
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
-rw-r--r-- | src/fe-common/core/utf8.h | 2 | ||||
-rw-r--r-- | src/fe-text/gui-entry.c | 2 | ||||
-rw-r--r-- | src/fe-text/term.h | 2 | ||||
-rw-r--r-- | src/fe-text/textbuffer-view.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-common/core/utf8.h b/src/fe-common/core/utf8.h index 9454f77d..067a9df7 100644 --- a/src/fe-common/core/utf8.h +++ b/src/fe-common/core/utf8.h @@ -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 diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 546c79ba..e44975c1 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -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); diff --git a/src/fe-text/term.h b/src/fe-text/term.h index 07d917c8..b5103c14 100644 --- a/src/fe-text/term.h +++ b/src/fe-text/term.h @@ -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; diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index 80f30438..9c5f793e 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -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); |