Changeset 1dd2318 in rtems for testsuites/support


Ignore:
Timestamp:
Jan 31, 2008, 5:31:05 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
b853d288
Parents:
916b0f30
Message:

2008-01-31 Joel Sherrill <joel.sherrill@…>

  • support/include/tmacros.h: Fix put_name to handle unprintable names.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/support/include/tmacros.h

    r916b0f30 r1dd2318  
    2323#include <bsp.h>    /* includes <rtems.h> */
    2424
     25#include <ctype.h>
    2526#include <stdio.h>
    2627#include <stdlib.h>
     
    215216  c2 = (name >> 8) & 0xff; \
    216217  c3 = name & 0xff; \
    217   putchar( (char)c0 ); \
    218   if ( c1 ) putchar( (char)c1 ); \
    219   if ( c2 ) putchar( (char)c2 ); \
    220   if ( c3 ) putchar( (char)c3 ); \
     218  putchar( (isprint(c0)) ? c0 : '*' ); \
     219  if ( c1 ) putchar( (isprint(c1)) ? c1 : '*' ); \
     220  if ( c2 ) putchar( (isprint(c2)) ? c2 : '*' ); \
     221  if ( c3 ) putchar( (isprint(c3)) ? c3 : '*' ); \
    221222  if ( crlf ) \
    222223    putchar( '\n' ); \
Note: See TracChangeset for help on using the changeset viewer.