[Pcsclite-cvs-commit] PCSC/src dyn_hpux.c,1.6,1.7 dyn_macosx.c,1.5,1.6 dyn_unix.c,1.8,1.9 eventhandler.c,1.14,1.15 pcscdaemon.c,1.49,1.50 powermgt_macosx.c,1.12,1.13 prothandler.c,1.6,1.7 readerfactory.c,1.43,1.44 sys_unix.c,1.8,1.9 tokenfactory.c,1.19,1.20 winscard.c,1.23,1.24 winscard_clnt.c,1.32,1.33 winscard_msg.c,1.19,1.20 winscard_svc.c,1.21,1.22

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv11794

Modified Files:
	dyn_hpux.c dyn_macosx.c dyn_unix.c eventhandler.c pcscdaemon.c 
	powermgt_macosx.c prothandler.c readerfactory.c sys_unix.c 
	tokenfactory.c winscard.c winscard_clnt.c winscard_msg.c 
	winscard_svc.c 
Log Message:
remove the function names from the debug messages


Index: dyn_hpux.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/dyn_hpux.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dyn_hpux.c	18 Oct 2003 17:19:36 -0000	1.6
+++ dyn_hpux.c	21 Apr 2004 21:42:33 -0000	1.7
@@ -5,6 +5,8 @@
  *
  * Copyright (C) 2001
  *  David Corcoran <corcoran@linuxnet.com>
+ * Copyright (C) 2004
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -32,8 +34,7 @@
 
 	if (myHandle == 0)
 	{
-		DebugLogB("DYN_GetAddress: strerror() reports %s",
-			strerror(errno));
+		DebugLogB("%s: %s", pcLibrary, strerror(errno));
 		return SCARD_F_UNKNOWN_ERROR;
 	}
 
@@ -55,8 +56,7 @@
 
 	if (rv == -1)
 	{
-		DebugLogB("DYN_GetAddress: strerror() reports %s",
-			strerror(errno));
+		DebugLogB("%s", strerror(errno));
 		return SCARD_F_UNKNOWN_ERROR;
 	}
 
@@ -83,15 +83,14 @@
 
 	if (rv == -1)
 	{
-		DebugLogB("DYN_GetAddress: strerror() reports %s",
-			strerror(errno));
+		DebugLogB("%s: %s", pcFunction, strerror(errno));
 		rv = SCARD_F_UNKNOWN_ERROR;
-	} else
-	{
-		rv = SCARD_S_SUCCESS;
 	}
+	else
+		rv = SCARD_S_SUCCESS;
 
 	return rv;
 }
 
 #endif	/* HAVE_DL_H */
+

Index: dyn_macosx.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/dyn_macosx.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dyn_macosx.c	18 Oct 2003 17:19:36 -0000	1.5
+++ dyn_macosx.c	21 Apr 2004 21:42:33 -0000	1.6
@@ -39,38 +39,23 @@
 	bundlePath = CFStringCreateWithCString(NULL, pcLibrary,
 		kCFStringEncodingMacRoman);
 	if (bundlePath == NULL)
-	{
 		return SCARD_E_NO_MEMORY;
 
-	} else
-	{
-	}
-
 	bundleURL = CFURLCreateWithFileSystemPath(NULL, bundlePath,
 		kCFURLPOSIXPathStyle, TRUE);
 	CFRelease(bundlePath);
 	if (bundleURL == NULL)
-	{
 		return SCARD_E_NO_MEMORY;
-	} else
-	{
-	}
 
 	bundle = CFBundleCreate(NULL, bundleURL);
 	CFRelease(bundleURL);
 	if (bundle == NULL)
-	{
 		return SCARD_F_UNKNOWN_ERROR;
-	} else
-	{
-	}
 
 	if (!CFBundleLoadExecutable(bundle))
 	{
 		CFRelease(bundle);
 		return SCARD_F_UNKNOWN_ERROR;
-	} else
-	{
 	}
 
 	*pvLHandle = (void *) bundle;
@@ -87,10 +72,9 @@
 	{
 		CFBundleUnloadExecutable(bundle);
 		CFRelease(bundle);
-	} else
-	{
-		DebugLogA("DYN_CloseLibrary: Cannot unload library.");
 	}
+	else
+		DebugLogA("Cannot unload library.");
 
 	*pvLHandle = 0;
 	return SCARD_S_SUCCESS;

Index: dyn_unix.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/dyn_unix.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dyn_unix.c	18 Oct 2003 17:19:36 -0000	1.8
+++ dyn_unix.c	21 Apr 2004 21:42:33 -0000	1.9
@@ -5,6 +5,8 @@
  *
  * Copyright (C) 1999
  *  David Corcoran <corcoran@linuxnet.com>
+ * Copyright (C) 2004
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -28,7 +30,7 @@
 
 	if (*pvLHandle == NULL)
 	{
-		DebugLogB("DYN_LoadLibrary: dlerror() reports %s", dlerror());
+		DebugLogC("%s: %s", pcLibrary, dlerror());
 		return SCARD_F_UNKNOWN_ERROR;
 	}
 
@@ -44,7 +46,7 @@
 
 	if (ret)
 	{
-		DebugLogB("DYN_CloseLibrary: dlerror() reports %s", dlerror());
+		DebugLogB("%s", dlerror());
 		return SCARD_F_UNKNOWN_ERROR;
 	}
 
@@ -73,7 +75,7 @@
 
 	if (*pvFHandle == NULL)
 	{
-		DebugLogB("DYN_GetAddress: dlerror() reports %s", dlerror());
+		DebugLogC("%s: %s", pcFunction, dlerror());
 		rv = SCARD_F_UNKNOWN_ERROR;
 	} else
 		rv = SCARD_S_SUCCESS;

Index: eventhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/eventhandler.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- eventhandler.c	20 Oct 2003 16:08:34 -0000	1.14
+++ eventhandler.c	21 Apr 2004 21:42:33 -0000	1.15
@@ -6,6 +6,8 @@
  *
  * Copyright (C) 2000
  *  David Corcoran <corcoran@linuxnet.com>
+ * Copyright (C) 2004
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -36,7 +38,6 @@
 
 LONG EHInitializeEventStructures()
 {
-
 	int fd, i, pageSize;
 
 	fd = 0;
@@ -48,7 +49,7 @@
 	fd = SYS_OpenFile(PCSCLITE_PUBSHM_FILE, O_RDWR | O_CREAT, 00644);
 	if (fd < 0)
 	{
-		DebugLogC("Error: Cannot create public shared file %s: %s",
+		DebugLogC("Cannot create public shared file %s: %s",
 			PCSCLITE_PUBSHM_FILE, strerror(errno));
 		exit(1);
 	}
@@ -73,7 +74,7 @@
 			SYS_MemoryMap(sizeof(READER_STATES), fd, (i * pageSize));
 		if (readerStates[i] == 0)
 		{
-			DebugLogC("Error: Cannot memory map public shared file %s: %s",
+			DebugLogC("Cannot memory map public shared file %s: %s",
 				PCSCLITE_PUBSHM_FILE, strerror(errno));
 			exit(1);
 		}
@@ -96,7 +97,6 @@
 
 LONG EHDestroyEventHandler(PREADER_CONTEXT rContext)
 {
-
 	LONG rv;
 	int i;
 
@@ -107,7 +107,7 @@
 	i = rContext->dwPublicID;
 	if ((readerStates[i])->readerName[0] == 0)
 	{
-		DebugLogA("EHDestroyEventHandler: Thread already stomped.");
+		DebugLogA("Thread already stomped.");
 		return SCARD_S_SUCCESS;
 	}
 
@@ -116,7 +116,7 @@
 	 */
 	rContext->dwLockId = 0xFFFF;
 
-	DebugLogA("EHDestroyEventHandler: Stomping thread.");
+	DebugLogA("Stomping thread.");
 
 	do
 	{
@@ -143,14 +143,13 @@
 	/* Zero the thread */
 	rContext->pthThread = 0;
 
-	DebugLogA("EHDestroyEventHandler: Thread stomped.");
+	DebugLogA("Thread stomped.");
 
 	return SCARD_S_SUCCESS;
 }
 
 LONG EHSpawnEventHandler(PREADER_CONTEXT rContext)
 {
-
 	LONG rv;
 	LPCSTR lpcReader;
 	DWORD dwStatus, dwProtocol;
@@ -172,8 +171,7 @@
 
 	if (rv != SCARD_S_SUCCESS)
 	{
-		DebugLogB("EHSpawnEventHandler: Initial Check Failed on %s",
-			lpcReader);
+		DebugLogB("Initial Check Failed on %s", lpcReader);
 		return SCARD_F_UNKNOWN_ERROR;
 	}
 
@@ -311,8 +309,7 @@
 
 		if (rv != SCARD_S_SUCCESS)
 		{
-			DebugLogB("EHSpawnEventHandler: Error communicating to: %s",
-				lpcReader);
+			DebugLogB("Error communicating to: %s", lpcReader);
 
 			/*
 			 * Set error status on this reader while errors occur 
@@ -370,8 +367,7 @@
 				/*
 				 * Change the status structure 
 				 */
-				DebugLogB("EHSpawnEventHandler: Card Removed From %s",
-					lpcReader);
+				DebugLogB("Card Removed From %s", lpcReader);
 				/*
 				 * Notify the card has been removed 
 				 */
@@ -459,21 +455,20 @@
 
 				SYS_MMapSynchronize((void *) readerStates[i], pageSize);
 
-				DebugLogB("EHSpawnEventHandler: Card inserted into %s",
-					lpcReader);
+				DebugLogB("Card inserted into %s", lpcReader);
 
 				if (rv == IFD_SUCCESS)
 				{
 					if (rContext->dwAtrLen > 0)
 					{
-						DebugXxd("EHSpawnEventHandler: Card ATR: ",
+						DebugXxd("Card ATR: ",
 							rContext->ucAtr, rContext->dwAtrLen);
 					}
 					else
-						DebugLogA("EHSpawnEventHandler: Card ATR: (NULL)");
+						DebugLogA("Card ATR: (NULL)");
 				}
 				else
-					DebugLogA("EHSpawnEventHandler: Error powering up card.");
+					DebugLogA("Error powering up card.");
 			}
 		}
 

Index: pcscdaemon.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/pcscdaemon.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- pcscdaemon.c	19 Apr 2004 16:49:39 -0000	1.49
+++ pcscdaemon.c	21 Apr 2004 21:42:33 -0000	1.50
@@ -3,7 +3,7 @@
  *
  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
  *
- * Copyright (C) 1999
+ * Copyright (C) 1999-2004
  *  David Corcoran <corcoran@linuxnet.com>
  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
@@ -87,7 +87,7 @@
 
 	if (rsp == -1)
 	{
-		DebugLogA("SVCServiceRunLoop: Error initializing pcscd.");
+		DebugLogA("Error initializing pcscd.");
 		exit(-1);
 	}
 
@@ -98,7 +98,7 @@
 
 	if (rv == -1)
 	{
-		DebugLogA("SVCServiceRunLoop: Error initializing pcscd.");
+		DebugLogA("Error initializing pcscd.");
 		exit(-1);
 	}
 
@@ -134,12 +134,12 @@
 		{
 
 		case 0:
-			DebugLogB("SVCServiceRunLoop: A new context thread creation is requested: %d", dwClientID);
+			DebugLogB("A new context thread creation is requested: %d", dwClientID);
 			rv = CreateContextThread(&dwClientID);
 
  			if (rv != SCARD_S_SUCCESS)
 			{
-				DebugLogA("SVCServiceRunLoop: Problem during the context thread creation");
+				DebugLogA("Problem during the context thread creation");
 				AraKiri = TRUE;
 			}
 
@@ -154,11 +154,11 @@
 			break;
 
 		case -1:
-			DebugLogA("SVCServiceRunLoop: Error in SHMProcessEventsServer");
+			DebugLogA("Error in SHMProcessEventsServer");
 			break;
 
 		default:
-			DebugLogB("SVCServiceRunLoop: SHMProcessEventsServer unknown retval: %d",
+			DebugLogB("SHMProcessEventsServer unknown retval: %d",
 				rsp);
 			break;
 		}
@@ -177,7 +177,6 @@
 
 int main(int argc, char **argv)
 {
-
 	int rv;
 	char setToForeground;
 	char *newReaderConfig;
@@ -229,7 +228,7 @@
 #endif
 		switch (opt) {
 			case 'c':
-				DebugLogB("main: using new config file: %s", optarg);
+				DebugLogB("using new config file: %s", optarg);
 				newReaderConfig = optarg;
 				break;
 
@@ -318,7 +317,7 @@
 
 			if (kill(pid, 0) == 0)
 			{
-				DebugLogA("main: file " PCSCLITE_PUBSHM_FILE " already exists.");
+				DebugLogA("file " PCSCLITE_PUBSHM_FILE " already exists.");
 				DebugLogB("Another pcscd (pid: %d) seems to be running.", pid);
 				return EXIT_FAILURE;
 			}
@@ -328,7 +327,7 @@
 		}
 		else
 		{
-			DebugLogA("main: file " PCSCLITE_PUBSHM_FILE " already exists.");
+			DebugLogA("file " PCSCLITE_PUBSHM_FILE " already exists.");
 			DebugLogA("Maybe another pcscd is running?");
 			DebugLogA("I can't read process pid from " USE_RUN_PID);
 			DebugLogA("Remove " PCSCLITE_PUBSHM_FILE " and " PCSCLITE_CSOCK_NAME);
@@ -336,7 +335,7 @@
 			return EXIT_FAILURE;
 		}
 #else
-		DebugLogA("main: file " PCSCLITE_PUBSHM_FILE " already exists.");
+		DebugLogA("file " PCSCLITE_PUBSHM_FILE " already exists.");
 		DebugLogA("Maybe another pcscd is running?");
 		DebugLogA("Remove " PCSCLITE_PUBSHM_FILE " and " PCSCLITE_CSOCK_NAME);
 		DebugLogA("if pcscd is not running to clear this message.");
@@ -350,7 +349,7 @@
 	if (!setToForeground)
 	{
 		if (SYS_Daemon(0, 0))
-			DebugLogB("main: SYS_Daemon() failed: %s", strerror(errno));
+			DebugLogB("SYS_Daemon() failed: %s", strerror(errno));
 	}
 
 	/*
@@ -386,7 +385,7 @@
 		rv = SYS_Mkdir(PCSCLITE_IPC_DIR, S_ISVTX | S_IRWXO | S_IRWXG | S_IRWXU);
 		if (rv != 0)
 		{
-			DebugLogB("main: cannot create " PCSCLITE_IPC_DIR ": %s",
+			DebugLogB("cannot create " PCSCLITE_IPC_DIR ": %s",
 				strerror(errno));
 			return EXIT_FAILURE;
 		}
@@ -394,7 +393,7 @@
 
 	/* cleanly remove /var/run/pcsc.* files when exiting */
 	if (atexit(at_exit))
-		DebugLogB("main: atexit() failed: %s", strerror(errno));
+		DebugLogB("atexit() failed: %s", strerror(errno));
 
 	/*
 	 * Allocate memory for reader structures 
@@ -409,7 +408,7 @@
 		rv = DBUpdateReaders(newReaderConfig);
 		if (rv != 0)
 		{
-			DebugLogC("main: invalid file %s: %s", newReaderConfig,
+			DebugLogC("invalid file %s: %s", newReaderConfig,
 				strerror(errno));
 			at_exit();
 		}
@@ -421,7 +420,7 @@
 #if 0
 		if (rv == 1)
 		{
-			DebugLogA("main: warning: no " PCSCLITE_READER_CONFIG " found");
+			DebugLogA("warning: no " PCSCLITE_READER_CONFIG " found");
 			/*
 			 * Token error in file 
 			 */
@@ -439,7 +438,7 @@
 	g_rgSCardT1Pci.dwProtocol = SCARD_PROTOCOL_T1;
 	g_rgSCardRawPci.dwProtocol = SCARD_PROTOCOL_RAW;
 
-	DebugLogA("main: pcsc-lite daemon ready.");
+	DebugLogA("pcsc-lite daemon ready.");
 
 	/*
 	 * post initialistion 
@@ -456,13 +455,13 @@
 
 	SVCServiceRunLoop();
 
-	DebugLogA("main: SVCServiceRunLoop returned");
+	DebugLogA("SVCServiceRunLoop returned");
 	return EXIT_FAILURE;
 }
 
 void at_exit(void)
 {
-	DebugLogA("at_exit: cleaning " PCSCLITE_IPC_DIR);
+	DebugLogA("cleaning " PCSCLITE_IPC_DIR);
 
 	clean_temp_files();
 
@@ -475,18 +474,18 @@
 
 	rv = SYS_Unlink(PCSCLITE_PUBSHM_FILE);
 	if (rv != 0)
-		DebugLogB("main: Cannot unlink " PCSCLITE_PUBSHM_FILE ": %s",
+		DebugLogB("Cannot unlink " PCSCLITE_PUBSHM_FILE ": %s",
 			strerror(errno));
 
 	rv = SYS_Unlink(PCSCLITE_CSOCK_NAME);
 	if (rv != 0)
-		DebugLogB("main: Cannot unlink " PCSCLITE_CSOCK_NAME ": %s",
+		DebugLogB("Cannot unlink " PCSCLITE_CSOCK_NAME ": %s",
 			strerror(errno));
 
 #ifdef USE_RUN_PID
 	rv = SYS_Unlink(USE_RUN_PID);
 	if (rv != 0)
-		DebugLogB("main: Cannot unlink " USE_RUN_PID ": %s",
+		DebugLogB("Cannot unlink " USE_RUN_PID ": %s",
 			strerror(errno));
 #endif
 }

Index: powermgt_macosx.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/powermgt_macosx.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- powermgt_macosx.c	16 Jan 2004 08:08:01 -0000	1.12
+++ powermgt_macosx.c	21 Apr 2004 21:42:33 -0000	1.13
@@ -57,14 +57,14 @@
           IOAllowPowerChange(root_port,(long)messageArgument);
           break;
     case kIOMessageSystemWillSleep:
-          DebugLogA("PMPowerEventCallback: system going into sleep");
+          DebugLogA("system going into sleep");
           SYS_MutexLock(&usbNotifierMutex);
           RFSuspendAllReaders();
           IOAllowPowerChange(root_port,(long)messageArgument);
-          DebugLogA("PMPowerEventCallback: system allowed to sleep");
+          DebugLogA("system allowed to sleep");
           break;
     case kIOMessageSystemHasPoweredOn: 
-        DebugLogA("PMPowerEventCallback: system coming out of sleep");
+        DebugLogA("system coming out of sleep");
         HPSearchHotPluggables();
         RFAwakeAllReaders();
         SYS_MutexUnLock(&usbNotifierMutex);

Index: prothandler.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/prothandler.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- prothandler.c	18 Oct 2003 17:19:36 -0000	1.6
+++ prothandler.c	21 Apr 2004 21:42:33 -0000	1.7
@@ -5,6 +5,8 @@
  *
  * Copyright (C) 1999
  *  David Corcoran <corcoran@linuxnet.com>
+ * Copyright (C) 2004
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -29,7 +31,6 @@
 
 UCHAR PHGetDefaultProtocol(PUCHAR pucAtr, DWORD dwLength)
 {
-
 	SMARTCARD_EXTENSION sSmartCard;
 
 	/*
@@ -38,13 +39,9 @@
 	memset(&sSmartCard, 0x00, sizeof(SMARTCARD_EXTENSION));
 
 	if (ATRDecodeAtr(&sSmartCard, pucAtr, dwLength))
-	{
 		return sSmartCard.CardCapabilities.CurrentProtocol;
-	} else
-	{
+	else
 		return 0x00;
-	}
-
 }
 
 /*
@@ -55,7 +52,6 @@
 
 UCHAR PHGetAvailableProtocols(PUCHAR pucAtr, DWORD dwLength)
 {
-
 	SMARTCARD_EXTENSION sSmartCard;
 
 	/*
@@ -64,13 +60,9 @@
 	memset(&sSmartCard, 0x00, sizeof(SMARTCARD_EXTENSION));
 
 	if (ATRDecodeAtr(&sSmartCard, pucAtr, dwLength))
-	{
 		return sSmartCard.CardCapabilities.AvailableProtocols;
-	} else
-	{
+	else
 		return 0x00;
-	}
-
 }
 
 /*
@@ -106,7 +98,7 @@
 
 		if (SCARD_PROTOCOL_T0 & ucAvailable)
 		{
-			DebugLogB("PHSetProtocol: Attempting PTS to T=%d", 0);
+			DebugLogB("Attempting PTS to T=%d", 0);
 
 			/*
 			 * Case 1: T1 is default but is not preferred 
@@ -118,11 +110,10 @@
 				0x00, 0x00, 0x00);
 
 			if (rv != SCARD_S_SUCCESS)
-			{
 				return SCARD_PROTOCOL_T1;
-			}
 
-		} else
+		}
+		else
 		{
 			/*
 			 * App wants an unsupported protocol 
@@ -134,8 +125,7 @@
 		((dwPreferred & SCARD_PROTOCOL_T0) == 0) &&
 		(dwPreferred & SCARD_PROTOCOL_T1))
 	{
-
-		DebugLogB("PHSetProtocol: Attempting PTS to T=%d", 1);
+		DebugLogB("Attempting PTS to T=%d", 1);
 
 		/*
 		 * Case 2: T=0 is default but T=1 is preferred 
@@ -150,22 +140,19 @@
 				0x00, 0x00, 0x00);
 
 			if (rv != SCARD_S_SUCCESS)
-			{
 				return SCARD_PROTOCOL_T0;
-			} else
-			{
+			else
 				return SCARD_PROTOCOL_T1;
-			}
-
-		} else
+		}
+		else
 		{
 			/*
 			 * App wants unsupported protocol 
 			 */
 			return -1;
 		}
-
-	} else
+	}
+	else
 	{
 		/*
 		 * Case 3: Default protocol is preferred 

Index: readerfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/readerfactory.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- readerfactory.c	31 Mar 2004 14:57:50 -0000	1.43
+++ readerfactory.c	21 Apr 2004 21:42:33 -0000	1.44
@@ -98,7 +98,7 @@
 				if ((strcmp(lpcReader, lpcStripReader) == 0) &&
 					(dwPort == (sReadersContexts[i])->dwPort))
 				{
-					DebugLogA("RFAddReader: Duplicate reader found.");
+					DebugLogA("Duplicate reader found.");
 					return SCARD_E_DUPLICATE_READER;
 				}
 			}
@@ -221,7 +221,7 @@
 		/*
 		 * Clean up so it is not using needed space 
 		 */
-		DebugLogB("RFAddReader: %s init failed.", lpcReader);
+		DebugLogB("%s init failed.", lpcReader);
 
 		(sReadersContexts[dwContext])->dwVersion = 0;
 		(sReadersContexts[dwContext])->dwPort = 0;
@@ -390,7 +390,7 @@
 			/*
 			 * Clean up so it is not using needed space 
 			 */
-			DebugLogB("RFAddReader: %s init failed.", lpcReader);
+			DebugLogB("%s init failed.", lpcReader);
 
 			(sReadersContexts[dwContextB])->dwVersion = 0;
 			(sReadersContexts[dwContextB])->dwPort = 0;
@@ -862,7 +862,7 @@
 
 	if (rContext->vHandle != 0)
 	{
-		DebugLogA("RFLoadReader: Warning library pointer not NULL");
+		DebugLogA("Warning library pointer not NULL");
 		/*
 		 * Another reader exists with this library loaded 
 		 */
@@ -913,7 +913,7 @@
 		 */
 		rContext->psFunctions.pvfCreateChannel = 0;
 
-		DebugLogA("RFBindFunctions: IFDHandler functions missing");
+		DebugLogA("IFDHandler functions missing");
 
 		exit(1);
 	} else if (rv1 == SCARD_S_SUCCESS)
@@ -948,8 +948,7 @@
 
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
-
-		DebugLogA("RFBindFunctions: Loading IFD Handler 1.0");
+		DebugLogA("Loading IFD Handler 1.0");
 
 		rv = DYN_GetAddress(rContext->vHandle,
 			&rContext->psFunctions.pvfCloseChannel, "IO_Close_Channel");
@@ -957,7 +956,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfCloseChannel = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -968,7 +967,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfGetCapabilities = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -979,7 +978,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfSetCapabilities = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -999,7 +998,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfPowerICC = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1036,7 +1035,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfTransmitICC = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1046,7 +1045,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfICCPresent = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1067,9 +1066,9 @@
 	} else if ((rContext->dwVersion == IFD_HVERSION_2_0) || (rContext->dwVersion == IFD_HVERSION_3_0))
 	{
 		if (rContext->dwVersion == IFD_HVERSION_2_0)
-			DebugLogA("RFBindFunctions: Loading IFD Handler 2.0");
+			DebugLogA("Loading IFD Handler 2.0");
 		else
-			DebugLogA("RFBindFunctions: Loading IFD Handler 3.0");
+			DebugLogA("Loading IFD Handler 3.0");
 
 		rv = DYN_GetAddress(rContext->vHandle,
 			&rContext->psFunctions.pvfCloseChannel, "IFDHCloseChannel");
@@ -1077,7 +1076,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfCloseChannel = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1088,7 +1087,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfGetCapabilities = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1099,7 +1098,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfSetCapabilities = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1121,7 +1120,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfPowerICC = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1131,7 +1130,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfTransmitICC = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1141,7 +1140,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfControl = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1151,7 +1150,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			rContext->psFunctions.pvfICCPresent = 0;
-			DebugLogA("RFBindFunctions: IFDHandler functions missing");
+			DebugLogA("IFDHandler functions missing");
 			exit(1);
 		}
 
@@ -1160,7 +1159,7 @@
 		/*
 		 * Who knows what could have happenned for it to get here. 
 		 */
-		DebugLogA("RFBindFunctions: IFD Handler not 1.0/2.0/3.0");
+		DebugLogA("IFD Handler not 1.0/2.0/3.0");
 		exit(1);
 	}
 
@@ -1198,7 +1197,7 @@
 
 	if (*rContext->dwFeeds == 1)
 	{
-		DebugLogA("RFUnloadReader: Unloading reader driver.");
+		DebugLogA("Unloading reader driver.");
 		DYN_CloseLibrary(&rContext->vHandle);
 	}
 
@@ -1310,8 +1309,7 @@
 	/*
 	 * Spawn the event handler thread 
 	 */
-	DebugLogB("RFInitializeReader: Attempting startup of %s.",
-		rContext->lpcReader);
+	DebugLogB("Attempting startup of %s.", rContext->lpcReader);
 
   /******************************************/
 	/*
@@ -1345,7 +1343,7 @@
 
 	if (rv != IFD_SUCCESS)
 	{
-		DebugLogC("RFInitializeReader: Open Port %X Failed (%s)",
+		DebugLogC("Open Port %X Failed (%s)",
 			rContext->dwPort, rContext->lpcDevice);
 		RFUnBindFunctions(rContext);
 		RFUnloadReader(rContext);
@@ -1357,7 +1355,7 @@
 
 LONG RFUnInitializeReader(PREADER_CONTEXT rContext)
 {
-	DebugLogB("RFUninitializeReader: Attempting shutdown of %s.",
+	DebugLogB("Attempting shutdown of %s.",
 		rContext->lpcReader);
 
 	/*
@@ -1578,7 +1576,7 @@
 	LONG rv;
 	char lpcStripReader[MAX_READERNAME];
 
-	DebugLogA("RFCleanupReaders: entering cleaning function");
+	DebugLogA("entering cleaning function");
 	for (i = 0; i < PCSCLITE_MAX_READERS_CONTEXTS; i++)
 	{
 		if (sReadersContexts[i]->vHandle != 0)
@@ -1654,7 +1652,7 @@
 
 			if (rv != IFD_SUCCESS)
 			{
-				DebugLogC("RFInitializeReader: Open Port %X Failed (%s)",
+				DebugLogC("Open Port %X Failed (%s)",
 					  (sReadersContexts[i])->dwPort, (sReadersContexts[i])->lpcDevice);
 			}
 

Index: sys_unix.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/sys_unix.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sys_unix.c	18 Oct 2003 17:19:36 -0000	1.8
+++ sys_unix.c	21 Apr 2004 21:42:33 -0000	1.9
@@ -259,17 +259,17 @@
 
 	if (!noclose) {
 		if (SYS_CloseFile(0))
-			DebugLogB("main: SYS_CloseFile(0) failed: %s", strerror(errno));
+			DebugLogB("SYS_CloseFile(0) failed: %s", strerror(errno));
 
 		if (SYS_CloseFile(1))
-			DebugLogB("main: SYS_CloseFile(1) failed: %s", strerror(errno));
+			DebugLogB("SYS_CloseFile(1) failed: %s", strerror(errno));
 
 		if (SYS_CloseFile(2))
-			DebugLogB("main: SYS_CloseFile(2) failed: %s", strerror(errno));
+			DebugLogB("SYS_CloseFile(2) failed: %s", strerror(errno));
 	}
 	if (!nochdir) {
 		if (SYS_Chdir("/"))
-			DebugLogB("main: SYS_Chdir() failed: %s", strerror(errno));
+			DebugLogB("SYS_Chdir() failed: %s", strerror(errno));
 	}
 	return 0;
 #endif

Index: tokenfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/tokenfactory.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- tokenfactory.c	24 Mar 2004 14:32:07 -0000	1.19
+++ tokenfactory.c	21 Apr 2004 21:42:33 -0000	1.20
@@ -5,6 +5,8 @@
  *
  * Copyright (C) 2000
  *  David Corcoran <corcoran@linuxnet.com>
+ * Copyright (C) 2004
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -39,7 +41,6 @@
 
 int atrToString(MSCPUChar8 Atr, MSCULong32 Length, char *outAtr)
 {
-
 	MSCULong32 i;
 	MSCULong32 j;
 
@@ -76,7 +77,6 @@
 
 int stringToBytes(char *inStr, MSCPUChar8 Buffer, MSCPULong32 Length)
 {
-
 	int i;
 	int j;
 	int inLen;
@@ -337,7 +337,6 @@
 
 MSCLong32 TPLoadToken(MSCLPTokenConnection pConnection)
 {
-
 	MSCLong32 rv;
 
 	pConnection->libPointers.pvfWriteFramework = 0;
@@ -407,7 +406,6 @@
 
 MSCLong32 TPUnloadToken(MSCLPTokenConnection pConnection)
 {
-
 	MSCLong32 rv;
 
 	if (pConnection->tokenLibHandle == 0)
@@ -428,7 +426,6 @@
 
 MSCLong32 TPBindFunctions(MSCLPTokenConnection pConnection)
 {
-
 	MSCLong32 rv;
 
 	if (pConnection->tokenLibHandle == 0)
@@ -443,7 +440,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfWriteFramework = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		/*
 		 * No big deal - this feature is just not supported 
 		 */
@@ -455,7 +452,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfIdentifyToken = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -466,7 +463,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfInitializePlugin = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -477,7 +474,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfFinalizePlugin = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -487,7 +484,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfGetStatus = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -498,7 +495,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfGetCapabilities = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -509,7 +506,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfExtendedFeature = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		/*
 		 * No big deal - there are no extended features 
 		 */
@@ -521,7 +518,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfGenerateKeys = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -531,7 +528,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfImportKey = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -541,7 +538,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfExportKey = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -551,7 +548,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfComputeCrypt = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -562,7 +559,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfExtAuthenticate = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -572,7 +569,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfListKeys = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -582,7 +579,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfCreatePIN = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -592,7 +589,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfVerifyPIN = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -602,7 +599,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfChangePIN = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -612,7 +609,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfUnblockPIN = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -622,7 +619,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfListPINs = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -632,7 +629,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfCreateObject = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -642,7 +639,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfDeleteObject = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -652,7 +649,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfWriteObject = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -662,7 +659,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfReadObject = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -672,7 +669,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfListObjects = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -682,7 +679,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfLogoutAll = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -692,7 +689,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		pConnection->libPointers.pvfGetChallenge = 0;
-		DebugLogA("TPBindFunctions: Missing functions");
+		DebugLogA("Missing functions");
 		return SCARD_F_INTERNAL_ERROR;
 	}
 
@@ -701,7 +698,6 @@
 
 MSCLong32 TPUnbindFunctions(MSCLPTokenConnection pConnection)
 {
-
 	pConnection->libPointers.pvfWriteFramework = 0;
 	pConnection->libPointers.pvfInitializePlugin = 0;
 	pConnection->libPointers.pvfFinalizePlugin = 0;

Index: winscard.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- winscard.c	19 Apr 2004 16:25:23 -0000	1.23
+++ winscard.c	21 Apr 2004 21:42:33 -0000	1.24
@@ -4,7 +4,7 @@
  *
  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
  *
- * Copyright (C) 1999-2003
+ * Copyright (C) 1999-2004
  *  David Corcoran <corcoran@linuxnet.com>
  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
@@ -72,8 +72,7 @@
 	*phContext = (PCSCLITE_SVC_IDENTITY + SYS_Random(SYS_GetSeed(),
 			1.0, 65535.0));
 
-	DebugLogB("SCardEstablishContext: Establishing Context: %d",
-		*phContext);
+	DebugLogB("Establishing Context: %d", *phContext);
 
 	return SCARD_S_SUCCESS;
 }
@@ -84,7 +83,7 @@
 	 * Nothing to do here RPC layer will handle this 
 	 */
 
-	DebugLogB("SCardReleaseContext: Releasing Context: %d", hContext);
+	DebugLogB("Releasing Context: %d", hContext);
 
 	return SCARD_S_SUCCESS;
 }
@@ -141,13 +140,13 @@
 			dwShareMode != SCARD_SHARE_DIRECT)
 		return SCARD_E_INVALID_VALUE;
 
-	DebugLogB("SCardConnect: Attempting Connect to %s", szReader);
+	DebugLogB("Attempting Connect to %s", szReader);
 
 	rv = RFReaderInfo((LPSTR) szReader, &rContext);
 
 	if (rv != SCARD_S_SUCCESS)
 	{
-		DebugLogB("SCardConnect: Reader %s Not Found", szReader);
+		DebugLogB("Reader %s Not Found", szReader);
 		return rv;
 	}
 
@@ -169,7 +168,7 @@
 	 */
 	if (rContext->dwContexts == SCARD_EXCLUSIVE_CONTEXT)
 	{
-		DebugLogA("SCardConnect: Error Reader Exclusive");
+		DebugLogA("Error Reader Exclusive");
 		return SCARD_E_SHARING_VIOLATION;
 	}
 
@@ -187,7 +186,7 @@
 	{
 		if (!(dwStatus & SCARD_PRESENT))
 		{
-			DebugLogA("SCardConnect: Card Not Inserted");
+			DebugLogA("Card Not Inserted");
 			return SCARD_E_NO_SMARTCARD;
 		}
 	}
@@ -210,8 +209,7 @@
 			memcpy(pucAtr, rContext->ucAtr, rContext->dwAtrLen);
 			dwAtrLength = rContext->dwAtrLen;
 			if (rContext->dwAtrLen > 0)
-				DebugXxd("EHSpawnEventHandler: Card ATR: ",
-					rContext->ucAtr, rContext->dwAtrLen);
+				DebugXxd("Card ATR: ", rContext->ucAtr, rContext->dwAtrLen);
 
 			rContext->dwProtocol =
 				PHGetDefaultProtocol(pucAtr, dwAtrLength);
@@ -240,14 +238,14 @@
 
 	*pdwActiveProtocol = rContext->dwProtocol;
 
-	DebugLogB("SCardConnect: Active Protocol: %d", *pdwActiveProtocol);
+	DebugLogB("Active Protocol: %d", *pdwActiveProtocol);
 
 	/*
 	 * Prepare the SCARDHANDLE identity 
 	 */
 	*phCard = RFCreateReaderHandle(rContext);
 
-	DebugLogB("SCardConnect: hCard Identity: %x", *phCard);
+	DebugLogB("hCard Identity: %x", *phCard);
 
 	/*******************************************/
 	/*
@@ -318,7 +316,7 @@
 	UCHAR pucAtr[MAX_ATR_SIZE], ucAvailable;
 	DWORD dwAtrLength, dwAction = 0;
 
-	DebugLogA("SCardReconnect: Attempting reconnect to token.");
+	DebugLogA("Attempting reconnect to token.");
 
 	/*
 	 * Zero out everything 
@@ -415,17 +413,17 @@
 				break;
 
 			case SCARD_W_REMOVED_CARD:
-				DebugLogA("SCardReconnect: card removed");
+				DebugLogA("card removed");
 				return SCARD_W_REMOVED_CARD;
 
 			/* invalid EventStatus */
 			case SCARD_E_INVALID_VALUE:
-				DebugLogA("SCardReconnect: invalid EventStatus");
+				DebugLogA("invalid EventStatus");
 				return SCARD_F_INTERNAL_ERROR;
 
 			/* invalid hCard, but hCard was widely used some lines above :( */
 			case SCARD_E_INVALID_HANDLE:
-				DebugLogA("SCardReconnect: invalid handle");
+				DebugLogA("invalid handle");
 				return SCARD_F_INTERNAL_ERROR;
 
 			case SCARD_S_SUCCESS:
@@ -462,16 +460,15 @@
 
 				if (rContext->dwAtrLen > 0)
 				{
-					DebugLogA("SCardReconnect: Reset complete.");
-					DebugXxd("SCardReconnect: Card ATR: ",
-						rContext->ucAtr, rContext->dwAtrLen);
+					DebugLogA("Reset complete.");
+					DebugXxd("Card ATR: ", rContext->ucAtr, rContext->dwAtrLen);
 				}
 				else
-					DebugLogA("SCardReconnect: Error resetting card.");
+					DebugLogA("Error resetting card.");
 				break;
 
 			default:
-				DebugLogB("SCardReconnect: invalid retcode from RFCheckReaderEventState (%X)", rv);
+				DebugLogB("invalid retcode from RFCheckReaderEventState (%X)", rv);
 				return SCARD_F_INTERNAL_ERROR;
 				break;
 		}
@@ -647,8 +644,7 @@
 	 */
 	RFUnlockSharing(hCard);
 
-	DebugLogB("SCardDisconnect: Active Contexts: %d",
-		rContext->dwContexts);
+	DebugLogB("Active Contexts: %d", rContext->dwContexts);
 
 	/*
 	 * RFUnblockReader( rContext ); FIX - this doesn't work 
@@ -709,9 +705,9 @@
 		}
 
 		if (rContext->dwAtrLen > 0)
-			DebugLogA("SCardDisconnect: Reset complete.");
+			DebugLogA("Reset complete.");
 		else
-			DebugLogA("SCardDisconnect: Error resetting card.");
+			DebugLogA("Error resetting card.");
 
 	} else if (dwDisposition == SCARD_EJECT_CARD)
 	{
@@ -731,17 +727,17 @@
 		{
 			if (receiveLength == 2 && receiveBuffer[0] == 0x90)
 			{
-				DebugLogA("SCardDisconnect: Card ejected successfully.");
+				DebugLogA("Card ejected successfully.");
 				/*
 				 * Successful 
 				 */
 			} else
 			{
-				DebugLogA("SCardDisconnect: Error ejecting card.");
+				DebugLogA("Error ejecting card.");
 			}
 		} else
 		{
-			DebugLogA("SCardDisconnect: Error ejecting card.");
+			DebugLogA("Error ejecting card.");
 		}
 
 	} else if (dwDisposition == SCARD_LEAVE_CARD)
@@ -824,7 +820,7 @@
 
 	rv = RFLockSharing(hCard);
 
-	DebugLogB("SCardBeginTransaction: Status: %d.", rv);
+	DebugLogB("Status: %d.", rv);
 
 	return rv;
 }
@@ -935,9 +931,9 @@
 		}
 
 		if (rContext->dwAtrLen > 0)
-			DebugLogA("SCardEndTransaction: Reset complete.");
+			DebugLogA("Reset complete.");
 		else
-			DebugLogA("SCardEndTransaction: Error resetting card.");
+			DebugLogA("Error resetting card.");
 
 	} else if (dwDisposition == SCARD_EJECT_CARD)
 	{
@@ -957,18 +953,17 @@
 		{
 			if (receiveLength == 2 && receiveBuffer[0] == 0x90)
 			{
-				DebugLogA
-					("SCardEndTransaction: Card ejected successfully.");
+				DebugLogA("Card ejected successfully.");
 				/*
 				 * Successful 
 				 */
 			} else
 			{
-				DebugLogA("SCardEndTransaction: Error ejecting card.");
+				DebugLogA("Error ejecting card.");
 			}
 		} else
 		{
-			DebugLogA("SCardEndTransaction: Error ejecting card.");
+			DebugLogA("Error ejecting card.");
 		}
 
 	} else if (dwDisposition == SCARD_LEAVE_CARD)
@@ -983,7 +978,7 @@
 	 */
 	RFUnlockSharing(hCard);
 
-	DebugLogB("SCardEndTransaction: Status: %d.", rv);
+	DebugLogB("Status: %d.", rv);
 
 	return rv;
 }
@@ -1025,7 +1020,7 @@
 
 	rv = RFUnlockSharing(hCard);
 
-	DebugLogB("SCardCancelTransaction: Status: %d.", rv);
+	DebugLogB("Status: %d.", rv);
 
 	return rv;
 }
@@ -1442,7 +1437,7 @@
 
 	sSendPci.Length = pioSendPci->cbPciLength;
 
-	DebugLogB("SCardTransmit: Send Protocol: %d", sSendPci.Protocol);
+	DebugLogB("Send Protocol: %d", sSendPci.Protocol);
 
 	tempRxLength = dwRxLength;
 

Index: winscard_clnt.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_clnt.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- winscard_clnt.c	19 Apr 2004 16:25:23 -0000	1.32
+++ winscard_clnt.c	21 Apr 2004 21:42:33 -0000	1.33
@@ -7,6 +7,7 @@
  * Copyright (C) 1999-2004
  *  David Corcoran <corcoran@linuxnet.com>
  *  Damien Sauveron <damien.sauveron@labri.fr>
+ *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -1198,7 +1199,7 @@
 	 */
 
 	/*
-	 * DebugLogA("SCardGetStatusChange: Event Loop Start"_);
+	 * DebugLogA("Event Loop Start"_);
 	 */
 
 	psContextMap[dwContextIndex].contextBlockStatus = BLOCK_STATUS_BLOCKING;
@@ -1512,7 +1513,7 @@
 	while (1);
 
 	/*
-	 * DebugLogA("SCardGetStatusChange: Event Loop End");
+	 * DebugLogA("Event Loop End");
 	 */
 
 	if (psContextMap[dwContextIndex].contextBlockStatus ==
@@ -2216,7 +2217,7 @@
 
 	if (rv != 0)
 	{
-		DebugLogA("SCardCheckDaemonAvailability: PCSC Not Running");
+		DebugLogA("PCSC Not Running");
 		return SCARD_E_NO_SERVICE;
 	}
 

Index: winscard_msg.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_msg.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- winscard_msg.c	19 Jan 2004 00:50:43 -0000	1.19
+++ winscard_msg.c	21 Apr 2004 21:42:33 -0000	1.20
@@ -6,6 +6,7 @@
  * Copyright (C) 2001-2004
  *  David Corcoran <corcoran@linuxnet.com>
  *  Damien Sauveron <damien.sauveron@labri.fr>
+ *  Ludoic Rousseau <ludovic.rousseau@free.fr>
  *
  * $Id$
  */
@@ -49,7 +50,7 @@
 
 	if ((*pdwClientID = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
 	{
-		DebugLogB("SHMClientSetupSession: Error: create on client socket: %s",
+		DebugLogB("Error: create on client socket: %s",
 			strerror(errno));
 		return -1;
 	}
@@ -61,7 +62,7 @@
 	if (connect(*pdwClientID, (struct sockaddr *) &svc_addr,
 			sizeof(svc_addr.sun_family) + strlen(svc_addr.sun_path) + 1) < 0)
 	{
-		DebugLogB("SHMClientSetupSession: Error: connect to client socket: %s",
+		DebugLogB("Error: connect to client socket: %s",
 			strerror(errno));
 		SYS_CloseFile(*pdwClientID);
 		return -1;
@@ -70,7 +71,7 @@
 	one = 1;
 	if (ioctl(*pdwClientID, FIONBIO, &one) < 0)
 	{
-		DebugLogB("SHMClientSetupSession: Error: cannot set socket nonblocking: %s",
+		DebugLogB("Error: cannot set socket nonblocking: %s",
 			strerror(errno));
 		SYS_CloseFile(*pdwClientID);
 		return -1;
@@ -95,8 +96,7 @@
 	 */
 	if ((commonSocket = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
 	{
-		DebugLogB("SHMInitializeCommonSegment: Unable to create common socket: %s",
-			strerror(errno));
+		DebugLogB("Unable to create common socket: %s", strerror(errno));
 		return -1;
 	}
 
@@ -108,16 +108,14 @@
 	if (bind(commonSocket, (struct sockaddr *) &serv_adr,
 			sizeof(serv_adr.sun_family) + strlen(serv_adr.sun_path) + 1) < 0)
 	{
-		DebugLogB("SHMInitializeCommonSegment: Unable to bind common socket: %s",
-			strerror(errno));
+		DebugLogB("Unable to bind common socket: %s", strerror(errno));
 		SHMCleanupSharedSegment(commonSocket, PCSCLITE_CSOCK_NAME);
 		return -1;
 	}
 
 	if (listen(commonSocket, 1) < 0)
 	{
-		DebugLogB("SHMInitializeCommonSegment: Unable to listen common socket: %s",
-			strerror(errno));
+		DebugLogB("Unable to listen common socket: %s", strerror(errno));
 		SHMCleanupSharedSegment(commonSocket, PCSCLITE_CSOCK_NAME);
 		return -1;
 	}
@@ -143,8 +141,7 @@
 	if ((new_sock = accept(commonSocket, (struct sockaddr *) &clnt_addr,
 				&clnt_len)) < 0)
 	{
-		DebugLogB("SHMProcessCommonChannelRequest: ER: Accept on common socket: %s",
-			strerror(errno));
+		DebugLogB("ER: Accept on common socket: %s", strerror(errno));
 		return -1;
 	}
 
@@ -153,8 +150,7 @@
 	one = 1;
 	if (ioctl(*pdwClientID, FIONBIO, &one) < 0)
 	{
-		DebugLogB("SHMProcessCommonChannelRequest: Error: cannot set socket "
-			"nonblocking: %s", strerror(errno));
+		DebugLogB("Error: cannot set socket nonblocking: %s", strerror(errno));
 		SYS_CloseFile(*pdwClientID);
 		*pdwClientID = -1;
 		return -1;
@@ -184,8 +180,7 @@
 
 	if (selret < 0)
 	{
-		DebugLogB("SHMProcessEventsServer: Select returns with failure: %s",
-			strerror(errno));
+		DebugLogB("Select returns with failure: %s", strerror(errno));
 		return -1;
 	}
 
@@ -197,14 +192,14 @@
 	 */
 	if (FD_ISSET(commonSocket, &read_fd))
 	{
-		DebugLogA("SHMProcessEventsServer: Common channel packet arrival");
+		DebugLogA("Common channel packet arrival");
 		if (SHMProcessCommonChannelRequest(pdwClientID) == -1)
 		{
-			DebugLogB("SHMProcessEventsServer: error in SHMProcessCommonChannelRequest: %d", *pdwClientID);
+			DebugLogB("error in SHMProcessCommonChannelRequest: %d", *pdwClientID);
 			return -1;
 		} else
 		{
-			DebugLogB("SHMProcessEventsServer: SHMProcessCommonChannelRequest detects: %d", *pdwClientID);
+			DebugLogB("SHMProcessCommonChannelRequest detects: %d", *pdwClientID);
 			return 0;
 		}
 	}
@@ -229,8 +224,7 @@
 
 	if (selret < 0)
 	{
-		DebugLogB("SHMProcessEventsContext: Select returns with failure: %s",
-			strerror(errno));
+		DebugLogB("Select returns with failure: %s", strerror(errno));
 		return -1;
 	}
 
@@ -248,7 +242,7 @@
 		
 		if (rv == -1)
 		{	/* The client has died */
-			DebugLogB("SHMProcessEventsContext: Client has disappeared: %d", *pdwClientID);
+			DebugLogB("Client has disappeared: %d", *pdwClientID);
 			msgStruct->mtype = CMD_CLIENT_DIED;
 			msgStruct->command = 0;
 			SYS_CloseFile(*pdwClientID);
@@ -259,7 +253,7 @@
 		/*
 		 * Set the identifier handle 
 		 */
-		DebugLogB("SHMProcessEventsContext: correctly processed client: %d", *pdwClientID);
+		DebugLogB("correctly processed client: %d", *pdwClientID);
 		return 1;
 	}
 	
@@ -369,8 +363,7 @@
 			 */
 			if (errno != EINTR)
 			{
-				DebugLogB("SHMMessageSend: Select returns with failure: %s",
-					strerror(errno));
+				DebugLogB("Select returns with failure: %s", strerror(errno));
 				retval = -1;
 				break;
 			}
@@ -482,8 +475,7 @@
 			 */
 			if (errno != EINTR)
 			{
-				DebugLogB("SHMMessageReceive: Select returns with failure: %s",
-					strerror(errno));
+				DebugLogB("Select returns with failure: %s", strerror(errno));
 				retval = -1;
 				break;
 			}

Index: winscard_svc.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_svc.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- winscard_svc.c	19 Apr 2004 16:25:23 -0000	1.21
+++ winscard_svc.c	21 Apr 2004 21:42:33 -0000	1.22
@@ -99,7 +99,7 @@
 	sharedSegmentMsg msgStruct;
 	DWORD dwContextIndex = *pdwIndex;
 
-	DebugLogB("ContextThread: Thread is started: %d", psContext[dwContextIndex].dwClientID);
+	DebugLogB("Thread is started: %d", psContext[dwContextIndex].dwClientID);
 	
 	while (1)
 	{
@@ -112,7 +112,7 @@
 				/*
 				 * Clean up the dead client
 				 */
-				DebugLogB("ContextThread: Client die: %d", psContext[dwContextIndex].dwClientID);
+				DebugLogB("Client die: %d", psContext[dwContextIndex].dwClientID);
 				MSGCleanupClient(dwContextIndex);
 				SYS_ThreadExit((LPVOID) NULL);
 			} 
@@ -166,11 +166,11 @@
 			break;
 			
 		case -1:
-			DebugLogA("ContextThread: Error in SHMProcessEventsContext");
+			DebugLogA("Error in SHMProcessEventsContext");
 			break;
 			
 		default:
-			DebugLogB("ContextThread: SHMProcessEventsContext unknown retval: %d",
+			DebugLogB("SHMProcessEventsContext unknown retval: %d",
 				  rv);
 			break;
 		}
@@ -442,7 +442,7 @@
 	}
 	
 	/* Must be a rogue client, debug log and sleep a couple of seconds */
-	DebugLogA("MSGCheckHandleAssociation: Client failed to authenticate");
+	DebugLogA("Client failed to authenticate");
 	SYS_Sleep(2);
 
 	return -1;