Add common IS_PRINTABLE macro.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4474 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2007-05-03 15:49:19 +00:00 committed by exg
commit 7c84b6fc2e
4 changed files with 5 additions and 5 deletions

View file

@ -661,9 +661,7 @@ static char *reverse_controls(const char *str)
out = g_string_new(NULL);
while (*str != '\0') {
if ((unsigned char) *str < 32 ||
(term_type == TERM_TYPE_8BIT &&
(unsigned char) (*str & 0x7f) < 32)) {
if (!IS_PRINTABLE((unsigned char) *str)) {
/* control char */
g_string_sprintfa(out, "%%8%c%%8",
'A'-1 + (*str & 0x7f));