comparison mcabber/src/commands.c @ 1462:2b43d89a10bb

Allow tab characters with /say_to -f (Reported by Myhailo Danylenko)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 12 Apr 2008 13:49:18 +0200
parents 0623d694a77f
children 477581e3b95e
comparison
equal deleted inserted replaced
1461:8fa24a6d1a93 1462:2b43d89a10bb
1381 1381
1382 // Check there is no binary data. It must be a *message* file! 1382 // Check there is no binary data. It must be a *message* file!
1383 for (p = msgbuf ; *p ; p++) { 1383 for (p = msgbuf ; *p ; p++) {
1384 if (utf8_mode) { 1384 if (utf8_mode) {
1385 if (p == next_utf8_char) { 1385 if (p == next_utf8_char) {
1386 if (!iswprint(get_char(p)) && *p != '\n') 1386 if (!iswprint(get_char(p)) && *p != '\n' && *p != '\t')
1387 break; 1387 break;
1388 next_utf8_char = next_char(p); 1388 next_utf8_char = next_char(p);
1389 } 1389 }
1390 } else { 1390 } else {
1391 unsigned char sc = *p; 1391 unsigned char sc = *p;
1392 if (!iswprint(sc) && sc != '\n') 1392 if (!iswprint(sc) && sc != '\n' && sc != '\t')
1393 break; 1393 break;
1394 } 1394 }
1395 } 1395 }
1396 1396
1397 if (*p || (size_t)(p-msgbuf) != len) { // We're not at the End Of Line... 1397 if (*p || (size_t)(p-msgbuf) != len) { // We're not at the End Of Line...