From e2e5e35d881df42eb2ea9a6a288b4d0935444ec7 Mon Sep 17 00:00:00 2001 From: Marco Zuehlke Date: Wed, 16 Jul 2003 14:14:17 +0000 Subject: more cleanup; remove unused variables; use lprintf CVS patchset: 5168 CVS date: 2003/07/16 14:14:17 --- src/xine-utils/utils.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'src/xine-utils/utils.c') diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index d79388cea..92161b5af 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2000-2002 the xine project * * This file is part of xine, a free video player. @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.c,v 1.13 2003/04/20 21:13:28 guenter Exp $ + * $Id: utils.c,v 1.14 2003/07/16 14:14:17 andruil Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ @@ -171,3 +171,38 @@ void xine_print_trace (void) { printf("stack backtrace not available.\n"); #endif } + +/* print a hexdump of length bytes from the data given in buf */ +void xine_hexdump (char *buf, int length) { + int i,j; + unsigned char c; + + /* printf ("Hexdump: %i Bytes\n", length);*/ + for(j=0; j<69; j++) + printf ("-"); + printf ("\n"); + + j=0; + while(j=20) && (c<128)) + printf ("%c", c); + else + printf ("."); + } + j=i; + printf("\n"); + } + + for(j=0; j<69; j++) + printf("-"); + printf("\n"); +} -- cgit v1.2.3