diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 02:49:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 02:49:21 +0000 |
commit | 3f06778ed8f93c6d9ff65a72be7b40b47fb7f37a (patch) | |
tree | 2f9cd9537f142d5e1d3571a4fb686d55bc110ed1 /c/src/lib/libmisc/dumpbuf/dumpbuf.c | |
parent | Patch rtems-rc-19991011-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-3f06778ed8f93c6d9ff65a72be7b40b47fb7f37a.tar.bz2 |
cat /tmp/j | while read f
do
rpm -qi $f 2>&1 | grep -v "is not ins"
done
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libmisc/dumpbuf/dumpbuf.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/c/src/lib/libmisc/dumpbuf/dumpbuf.c b/c/src/lib/libmisc/dumpbuf/dumpbuf.c deleted file mode 100644 index 1e41f52bbf..0000000000 --- a/c/src/lib/libmisc/dumpbuf/dumpbuf.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * COPYRIGHT (c) 1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <stdio.h> -#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, - int length -); - -void Dump_Buffer( - unsigned char *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 ); -} - -static inline void Dump_Line( - unsigned char *buffer, - 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 ); -} |