CVS: sylpheedclaws/sylpheed-claws/src/common utils.c,1.36.2.90,1.36.2.91

[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-serv128/src/common

Modified Files:
      Tag: gtk2
	utils.c 
Log Message:
2006-12-04 [colin]	2.6.0cvs81

	* src/common/utils.c
		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.90
retrieving revision 1.36.2.91
diff -u -d -r1.36.2.90 -r1.36.2.91
--- utils.c	2006/11/29 12:33:27	1.36.2.90
+++ utils.c	2006/12/04 07:42:20	1.36.2.91
@@ -4549,9 +4549,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)) {
@@ -4564,13 +4564,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")) {
@@ -4595,13 +4595,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.