[Pcsclite-cvs-commit] r5898 - /trunk/PCSC/src/debug.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Aug 21 13:53:27 UTC 2011


Author: rousseau
Date: Sun Aug 21 13:53:27 2011
New Revision: 5898

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5898
Log:
Remove log_xxd() implementation

debug.c is use to log from the client side (libpcsclite).
log_xxd() is not used in the client library so is just dead code.

Modified:
    trunk/PCSC/src/debug.c

Modified: trunk/PCSC/src/debug.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/debug.c?rev=5898&op=diff
==============================================================================
--- trunk/PCSC/src/debug.c (original)
+++ trunk/PCSC/src/debug.c Sun Aug 21 13:53:27 2011
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1999-2002
  *  David Corcoran <corcoran at linuxnet.com>
- * Copyright (C) 2002-2009
+ * Copyright (C) 2002-2011
  *  Ludovic Rousseau <ludovic.rousseau at free.fr>
  *
  * $Id$
@@ -32,15 +32,6 @@
 {
 	(void)priority;
 	(void)fmt;
-}
-
-void log_xxd(const int priority, const char *msg, const unsigned char *buffer,
-	const int len)
-{
-	(void)priority;
-	(void)msg;
-	(void)buffer;
-	(void)len;
 }
 
 #else
@@ -137,31 +128,5 @@
 	}
 } /* log_msg */
 
-void log_xxd(const int priority, const char *msg, const unsigned char *buffer,
-	const int len)
-{
-	char DebugBuffer[DEBUG_BUF_SIZE];
-	int i;
-	char *c;
-	char *debug_buf_end;
-
-	if (priority < LogLevel) /* log priority lower than threshold? */
-		return;
-
-	debug_buf_end = DebugBuffer + DEBUG_BUF_SIZE - 5;
-
-	(void)strlcpy(DebugBuffer, msg, sizeof(DebugBuffer));
-	c = DebugBuffer + strlen(DebugBuffer);
-
-	for (i = 0; (i < len) && (c < debug_buf_end); ++i)
-	{
-		/* 2 hex characters, 1 space, 1 NUL : total 4 characters */
-		snprintf(c, 4, "%02X ", buffer[i]);
-		c += strlen(c);
-	}
-
-	fprintf(stderr, "%s\n", DebugBuffer);
-} /* log_xxd */
-
 #endif
 




More information about the Pcsclite-cvs-commit mailing list