[Kst] extragear/graphics/kst/kst/extensions/js

Dirk Mueller mueller at kde.org
Tue Jan 3 23:41:09 CET 2006


SVN commit 494018 by mueller:

remove nonconst format strings


 M  +11 -11    kstcmd.cpp  


--- trunk/extragear/graphics/kst/kst/extensions/js/kstcmd.cpp #494017:494018
@@ -50,7 +50,7 @@
 void ping(int) {
 	DCOPClient *client = KApplication::dcopClient();
 	if (!client->registeredApplications().contains(kstName)) {
-		printf(_T("Kst application process has terminated.\n"));
+		printf("%s", _T("Kst application process has terminated.\n"));
 		rl_cleanup_after_signal();
 		exit(ERR_KST_TERMINATED);
 	}
@@ -75,7 +75,7 @@
 
 	for (;;) {
 		if (!client->registeredApplications().contains(kstName)) {
-			printf(_T("Kst application process has terminated.\n"));
+			printf("%s", _T("Kst application process has terminated.\n"));
 			return ERR_KST_TERMINATED;
 		}
 
@@ -112,10 +112,10 @@
 		}
 
 		if (clean == "help") {
-			printf(_T("Help:\n"));
-			printf(_T("session\t\tDisplay the name of the session in use\n"));
-			printf(_T("help\t\tDisplay help\n"));
-			printf(_T("exit\t\tExit the command-line interpreter\n"));
+			printf("%s", _T("Help:\n"));
+			printf("%s", _T("session\t\tDisplay the name of the session in use\n"));
+			printf("%s", _T("help\t\tDisplay help\n"));
+			printf("%s", _T("exit\t\tExit the command-line interpreter\n"));
 			continue;
 		}
 
@@ -201,10 +201,10 @@
 			}
 
 			time_t startTime = time(NULL);
-			printf(_T("Waiting for Kst to start."));
+			printf("%s", _T("Waiting for Kst to start."));
 			while (!client->isApplicationRegistered(session)) {
 				if (time(NULL) - startTime > 30) {
-					printf(_T("\nTimeout waiting for Kst to start\n"));
+					printf("%s", _T("\nTimeout waiting for Kst to start\n"));
 					return ERR_STARTING_SESSION;
 				}
 				printf(".");
@@ -216,7 +216,7 @@
 			if (ksts.contains(parentKst)) {
 				session = parentKst;
 			} else {
-				printf(_T("Please choose a session number to attach to:\n"));
+				printf("%s", _T("Please choose a session number to attach to:\n"));
 				int j = 0;
 				for (QCStringList::ConstIterator i = ksts.begin(); i != ksts.end(); ++i) {
 					printf(_T("%2d: %s\n"), ++j, (*i).data());
@@ -226,7 +226,7 @@
 				QString l = fgets(choice, 4, stdin);
 				l = l.stripWhiteSpace();
 				if (l.isEmpty()) {
-					printf(_T("No session found.\n"));
+					printf("%s", _T("No session found.\n"));
 					return ERR_NO_SESSION;
 				}
 				bool ok = false;
@@ -234,7 +234,7 @@
 				if (ok && nchoice > 0 && nchoice <= j) {
 					session = ksts[nchoice - 1];
 				} else {
-					printf(_T("No session found.\n"));
+					printf("%s", _T("No session found.\n"));
 					return ERR_NO_SESSION;
 				}
 			}


More information about the Kst mailing list