diff src/ui_fileops.c @ 516:b7e99bfeadc9

Convert the minority of while() to while ().
author zas_
date Thu, 24 Apr 2008 15:49:57 +0000
parents 48c8e49b571c
children b68fd1eb3243
line wrap: on
line diff
--- a/src/ui_fileops.c	Thu Apr 24 15:44:43 2008 +0000
+++ b/src/ui_fileops.c	Thu Apr 24 15:49:57 2008 +0000
@@ -426,7 +426,7 @@
 
 	if (!fi || !fo) return FALSE;
 
-	while((b = fread(buf, sizeof(char), sizeof(buf), fi)) && b != 0)
+	while ((b = fread(buf, sizeof(char), sizeof(buf), fi)) && b != 0)
 		{
 		if (fwrite(buf, sizeof(char), b, fo) != b)
 			{
@@ -634,7 +634,7 @@
 	g_free(path8);
 	if (!f) return -1;
 
-	while((c = fgetc(f)) != EOF)
+	while ((c = fgetc(f)) != EOF)
 		{
 		sum += c;
 		}
@@ -727,7 +727,7 @@
 
 	p = strlen(path) - 1;
 	if (p < 0) return NULL;
-	while(ptr[p] != '/' && p > 0) p--;
+	while (ptr[p] != '/' && p > 0) p--;
 	if (p == 0 && ptr[p] == '/') p++;
 	new_path = g_strndup(path, (guint)p);
 	return new_path;
@@ -772,7 +772,7 @@
 	if (strlen(path) < 2) return g_strdup(path);
 
 	p = strlen(path) - 1;
-	while(ptr[p] != '.' && p > 0) p--;
+	while (ptr[p] != '.' && p > 0) p--;
 	if (p == 0) p = strlen(path) - 1;
 	new_path = g_strndup(path, (guint)p);
 	return new_path;