diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-16 12:06:28 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-16 12:06:28 +0000 |
commit | aed742c9a09fc443418ba4ef8f31892ef00df984 (patch) | |
tree | e9d0138d2456e7ec94be79b66f1f06181d308743 /cpukit/libmisc/dumpbuf/dumpbuf.c | |
parent | Remove stray white spaces. (diff) | |
download | rtems-aed742c9a09fc443418ba4ef8f31892ef00df984.tar.bz2 |
Remove stray white spaces.
Diffstat (limited to 'cpukit/libmisc/dumpbuf/dumpbuf.c')
-rw-r--r-- | cpukit/libmisc/dumpbuf/dumpbuf.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c index fe76853949..b83a23f0bd 100644 --- a/cpukit/libmisc/dumpbuf/dumpbuf.c +++ b/cpukit/libmisc/dumpbuf/dumpbuf.c @@ -17,13 +17,13 @@ #include <string.h> #include <ctype.h> #include <rtems/dumpbuf.h> - + /* * Put the body below Dump_Buffer so it won't get inlined. */ static inline void Dump_Line( - unsigned char *buffer, + unsigned char *buffer, int length ); @@ -32,18 +32,18 @@ void Dump_Buffer( int length ) { - + int i, mod, max; - + if ( !length ) return; - + mod = length % 16; - + max = length - mod; - + for ( i=0 ; i<max ; i+=16 ) Dump_Line( &buffer[ i ], 16 ); - + if ( mod ) Dump_Line( &buffer[ max ], mod ); } @@ -53,27 +53,27 @@ static inline void Dump_Line( int length ) { - + int i; char line_buffer[120]; - + line_buffer[0] = '\0'; - + for( i=0 ; i<length ; i++ ) sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); - + for( ; i<16 ; i++ ) strcat( line_buffer, " " ); - + strcat( line_buffer, "|" ); for( i=0 ; i<length ; i++ ) sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); - + for( ; i<16 ; i++ ) strcat( line_buffer, " " ); - + strcat( line_buffer, "|\n" ); - + printf( line_buffer ); } |