[Pcsclite-cvs-commit] r5547 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Jan 25 15:14:38 UTC 2011


Author: rousseau
Date: Tue Jan 25 15:14:30 2011
New Revision: 5547

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5547
Log:
Use color names macros

Modified:
    trunk/PCSC/src/winscard_clnt.c

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=5547&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Jan 25 15:14:30 2011
@@ -173,7 +173,7 @@
 		profile_fd = fopen(filename, "a+");
 		if (NULL == profile_fd)
 		{
-			fprintf(stderr, "\33[01;31mCan't open %s: %s\33[0m\n",
+			fprintf(stderr, COLOR_RED "Can't open %s: %s" COLOR_NORMAL "\n",
 				PROFILE_FILE, strerror(errno));
 			exit(-1);
 		}
@@ -187,8 +187,8 @@
 
 	/* PROFILE_END was not called before? */
 	if (profile_tty && fct_name[0])
-		printf("\33[01;34m WARNING: %s starts before %s finishes\33[0m\n",
-			f, fct_name);
+		printf(COLOR_BLUE " WARNING: %s starts before %s finishes"
+			COLOR_NORMAL "\n", f, fct_name);
 
 	strlcpy(fct_name, f, sizeof(fct_name));
 
@@ -208,22 +208,24 @@
 		if (fct_name[0])
 		{
 			if (strncmp(fct_name, f, sizeof(fct_name)))
-				printf("\33[01;34m WARNING: %s ends before %s\33[0m\n",
-					f, fct_name);
+				printf(COLOR_BLUE " WARNING: %s ends before %s"
+					COLOR_NORMAL "\n", f, fct_name);
 		}
 		else
-			printf("\33[01;34m WARNING: %s ends but we lost its start\33[0m\n",
-				f);
+			printf(COLOR_BLUE " WARNING: %s ends but we lost its start"
+				COLOR_NORMAL "\n", f);
 
 		/* allow to detect missing PROFILE_END calls */
 		fct_name[0] = '\0';
 
 		if (rv != SCARD_S_SUCCESS)
 			fprintf(stderr,
-				"\33[01;31mRESULT %s \33[35m%ld \33[34m0x%08lX %s\33[0m\n",
+				COLOR_RED "RESULT %s " COLOR_MAGENTA "%ld "
+				COLOR_BLUE "0x%08lX %s" COLOR_NORMAL "\n",
 				f, d, rv, pcsc_stringify_error(rv));
 		else
-			fprintf(stderr, "\33[01;31mRESULT %s \33[35m%ld\33[0m\n", f, d);
+			fprintf(stderr, COLOR_RED "RESULT %s " COLOR_MAGENTA "%ld"
+				COLOR_NORMAL "\n", f, d);
 	}
 	fprintf(profile_fd, "%s %ld\n", f, d);
 	fflush(profile_fd);




More information about the Pcsclite-cvs-commit mailing list