diff src/filedata.c @ 1000:4fe8f9656107

For the sake of consistency, use glib basic types everywhere.
author zas_
date Tue, 26 Aug 2008 22:22:51 +0000
parents d2701a5864c5
children 3096a47232ec
line wrap: on
line diff
--- a/src/filedata.c	Tue Aug 26 21:19:33 2008 +0000
+++ b/src/filedata.c	Tue Aug 26 22:22:51 2008 +0000
@@ -90,16 +90,16 @@
 		}
 	if (size < (gint64)1048576)
 		{
-		return g_strdup_printf(_("%.1f K"), (double)size / 1024.0);
+		return g_strdup_printf(_("%.1f K"), (gdouble)size / 1024.0);
 		}
 	if (size < (gint64)1073741824)
 		{
-		return g_strdup_printf(_("%.1f MB"), (double)size / 1048576.0);
+		return g_strdup_printf(_("%.1f MB"), (gdouble)size / 1048576.0);
 		}
 
-	/* to avoid overflowing the double, do division in two steps */
+	/* to avoid overflowing the gdouble, do division in two steps */
 	size /= 1048576;
-	return g_strdup_printf(_("%.1f GB"), (double)size / 1024.0);
+	return g_strdup_printf(_("%.1f GB"), (gdouble)size / 1024.0);
 }
 
 /* note: returned string is valid until next call to text_from_time() */
@@ -368,7 +368,7 @@
 
 static void file_data_check_sidecars(FileData *fd)
 {
-	int base_len;
+	gint base_len;
 	GString *fname;
 	FileData *parent_fd = NULL;
 	GList *work;
@@ -677,8 +677,8 @@
 
 static gint sidecar_file_priority(const gchar *path)
 {
-	const char *extension = extension_from_path(path);
-	int i = 1;
+	const gchar *extension = extension_from_path(path);
+	gint i = 1;
 	GList *work;
 
 	if (extension == NULL)
@@ -809,7 +809,7 @@
 	gchar *pathl;
 	GList *dlist = NULL;
 	GList *flist = NULL;
-	int (*stat_func)(const char *path, struct stat *buf);
+	gint (*stat_func)(const gchar *path, struct stat *buf);
 
 	g_assert(files || dirs);
 
@@ -1478,7 +1478,7 @@
 
 static void file_data_update_ci_dest_preserve_ext(FileData *fd, const gchar *dest_path)
 {
-	const char *extension = extension_from_path(fd->change->source);
+	const gchar *extension = extension_from_path(fd->change->source);
 	gchar *base = remove_extension_from_path(dest_path);
 	gchar *old_path = fd->change->dest;