CVS: sylpheedclaws/sylpheed-claws/src/common utils.c,1.36.2.86.2.2,1.36.2.86.2.3

[email protected]
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/common
In directory sunsite.dk:/tmp/cvs-serv8547/src/common

Modified Files:
      Tag: stable_2_6
	utils.c 
Log Message:
2006-12-04 [paul]	2.6.0cvs23-stable

	* src/common/utils.c
		backport from 2.6.0cvs81:
		Trim tabs from mailcap file too. 

Index: utils.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/common/utils.c,v
retrieving revision 1.36.2.86.2.2
retrieving revision 1.36.2.86.2.3
diff -u -d -r1.36.2.86.2.2 -r1.36.2.86.2.3
--- utils.c	2006/12/01 12:40:23	1.36.2.86.2.2
+++ utils.c	2006/12/04 08:15:48	1.36.2.86.2.3
@@ -4532,9 +4532,9 @@
 	while (fgets(buf, sizeof (buf), fp) != NULL) {
 		gchar **parts = g_strsplit(buf, ";", 3);
 		gchar *trimmed = parts[0];
-		while (trimmed[0] == ' ')
+		while (trimmed[0] == ' ' || trimmed[0] == '\t')
 			trimmed++;
-		while (trimmed[strlen(trimmed)-1] == ' ')
+		while (trimmed[strlen(trimmed)-1] == ' ' || trimmed[strlen(trimmed)-1] == '\t')
 			trimmed[strlen(trimmed)-1] = '\0';
 
 		if (!strcmp(trimmed, type)) {
@@ -4547,13 +4547,13 @@
 				gchar *testcmd = orig_testcmd;
 				if (strstr(testcmd,";"))
 					*(strstr(testcmd,";")) = '\0';
-				while (testcmd[0] == ' ')
+				while (testcmd[0] == ' ' || testcmd[0] == '\t')
 					testcmd++;
 				while (testcmd[strlen(testcmd)-1] == '\n')
 					testcmd[strlen(testcmd)-1] = '\0';
 				while (testcmd[strlen(testcmd)-1] == '\r')
 					testcmd[strlen(testcmd)-1] = '\0';
-				while (testcmd[strlen(testcmd)-1] == ' ')
+				while (testcmd[strlen(testcmd)-1] == ' ' || testcmd[strlen(testcmd)-1] == '\t')
 					testcmd[strlen(testcmd)-1] = '\0';
 					
 				if (strstr(testcmd, "%s")) {
@@ -4578,13 +4578,13 @@
 			}
 			
 			trimmed = parts[1];
-			while (trimmed[0] == ' ')
+			while (trimmed[0] == ' ' || trimmed[0] == '\t')
 				trimmed++;
 			while (trimmed[strlen(trimmed)-1] == '\n')
 				trimmed[strlen(trimmed)-1] = '\0';
 			while (trimmed[strlen(trimmed)-1] == '\r')
 				trimmed[strlen(trimmed)-1] = '\0';
-			while (trimmed[strlen(trimmed)-1] == ' ')
+			while (trimmed[strlen(trimmed)-1] == ' ' || trimmed[strlen(trimmed)-1] == '\t')
 				trimmed[strlen(trimmed)-1] = '\0';
 			result = g_strdup(trimmed);
 			g_strfreev(parts);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.