summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 17:31:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 17:31:05 +0000
commit1dd2318c265843dd414f123b9cf31602a698d661 (patch)
tree7e6006d99bee50a31f7704ca018ddec4e5a53399 /testsuites
parent2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-1dd2318c265843dd414f123b9cf31602a698d661.tar.bz2
2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* support/include/tmacros.h: Fix put_name to handle unprintable names.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/ChangeLog4
-rw-r--r--testsuites/support/include/tmacros.h9
2 files changed, 9 insertions, 4 deletions
diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog
index 6eb82aa976..b157892c91 100644
--- a/testsuites/ChangeLog
+++ b/testsuites/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * support/include/tmacros.h: Fix put_name to handle unprintable names.
+
2008-01-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* support/include/tmacros.h: Add new rtems_test_assert() which exits
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
index 49bc9a768f..a3e3ddd845 100644
--- a/testsuites/support/include/tmacros.h
+++ b/testsuites/support/include/tmacros.h
@@ -22,6 +22,7 @@ extern "C" {
#include <bsp.h> /* includes <rtems.h> */
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -214,10 +215,10 @@ extern "C" {
c1 = (name >> 16) & 0xff; \
c2 = (name >> 8) & 0xff; \
c3 = name & 0xff; \
- putchar( (char)c0 ); \
- if ( c1 ) putchar( (char)c1 ); \
- if ( c2 ) putchar( (char)c2 ); \
- if ( c3 ) putchar( (char)c3 ); \
+ putchar( (isprint(c0)) ? c0 : '*' ); \
+ if ( c1 ) putchar( (isprint(c1)) ? c1 : '*' ); \
+ if ( c2 ) putchar( (isprint(c2)) ? c2 : '*' ); \
+ if ( c3 ) putchar( (isprint(c3)) ? c3 : '*' ); \
if ( crlf ) \
putchar( '\n' ); \
}