diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-31 17:31:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-31 17:31:05 +0000 |
commit | 1dd2318c265843dd414f123b9cf31602a698d661 (patch) | |
tree | 7e6006d99bee50a31f7704ca018ddec4e5a53399 /testsuites/support/include/tmacros.h | |
parent | 2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-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 '')
-rw-r--r-- | testsuites/support/include/tmacros.h | 9 |
1 files changed, 5 insertions, 4 deletions
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' ); \ } |