changeset 1002:3096a47232ec

Use gpointer instead of void *.
author zas_
date Tue, 26 Aug 2008 22:37:18 +0000
parents d22e21bfd2a3
children 4bfee4a63f86
files src/collect-dlg.c src/exif-int.h src/exif.c src/filedata.c src/filedata.h src/format_raw.c src/pan-view.c src/secure_save.c src/secure_save.h src/similar.c src/ui_pathsel.c src/ui_utildlg.c src/view_file_icon.c
diffstat 13 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/collect-dlg.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/collect-dlg.c	Tue Aug 26 22:37:18 2008 +0000
@@ -161,7 +161,7 @@
 	CollectWindow *cw;
 	const gchar *title;
 	const gchar *btntext;
-	void *btnfunc;
+	gpointer btnfunc;
 	gchar *base;
 	const gchar *stock_id;
 
--- a/src/exif-int.h	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/exif-int.h	Tue Aug 26 22:37:18 2008 +0000
@@ -150,7 +150,7 @@
 
 ExifItem *exif_item_new(ExifFormatType format, guint tag,
 			guint elements, const ExifMarker *marker);
-void exif_item_copy_data(ExifItem *item, void *src, guint len,
+void exif_item_copy_data(ExifItem *item, gpointer src, guint len,
 			 ExifFormatType src_format, ExifByteOrder bo);
 
 gint exif_parse_IFD_table(ExifData *exif,
--- a/src/exif.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/exif.c	Tue Aug 26 22:37:18 2008 +0000
@@ -713,7 +713,7 @@
 	return (list[i].tag == 0 ? NULL : &list[i]);
 }
 
-static void rational_from_data(ExifRational *r, void *src, ExifByteOrder bo)
+static void rational_from_data(ExifRational *r, gpointer src, ExifByteOrder bo)
 {
 	r->num = exif_byte_get_int32(src, bo);
 	r->den = exif_byte_get_int32(src + sizeof(guint32), bo);
@@ -722,7 +722,7 @@
 /* src_format and item->format must be compatible
  * and not overrun src or item->data.
  */
-void exif_item_copy_data(ExifItem *item, void *src, guint len,
+void exif_item_copy_data(ExifItem *item, gpointer src, guint len,
 			 ExifFormatType src_format, ExifByteOrder bo)
 {
 	gint bs;
@@ -1132,7 +1132,7 @@
 	return 0;
 }
 
-static gint unmap_file(void *mapping, gint size)
+static gint unmap_file(gpointer mapping, gint size)
 {
 	if (munmap(mapping, size) == -1)
 		{
@@ -1164,7 +1164,7 @@
 ExifData *exif_read(gchar *path, gchar *sidecar_path)
 {
 	ExifData *exif;
-	void *f;
+	gpointer f;
 	gint size, res;
 	gchar *pathl;
 
--- a/src/filedata.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/filedata.c	Tue Aug 26 22:37:18 2008 +0000
@@ -752,7 +752,7 @@
 	return filelist_sort_compare_filedata(fa, fb);
 }
 
-static gint filelist_sort_file_cb(void *a, void *b)
+static gint filelist_sort_file_cb(gpointer a, gpointer b)
 {
 	return filelist_sort_compare_filedata(a, b);
 }
@@ -764,7 +764,7 @@
 	return g_list_sort(list, cb);
 }
 
-GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb)
+GList *filelist_insert_sort_full(GList *list, gpointer data, SortType method, gint ascend, GCompareFunc cb)
 {
 	filelist_sort_method = method;
 	filelist_sort_ascend = ascend;
--- a/src/filedata.h	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/filedata.h	Tue Aug 26 22:37:18 2008 +0000
@@ -49,7 +49,7 @@
 GList *filelist_sort(GList *list, SortType method, gint ascend);
 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend);
 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb);
-GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb);
+GList *filelist_insert_sort_full(GList *list, gpointer data, SortType method, gint ascend, GCompareFunc cb);
 
 gint filelist_read(FileData *dir_fd, GList **files, GList **dirs);
 gint filelist_read_lstat(FileData *dir_fd, GList **files, GList **dirs);
--- a/src/format_raw.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/format_raw.c	Tue Aug 26 22:37:18 2008 +0000
@@ -42,7 +42,7 @@
 	const gchar *extension;
 	FormatRawMatchType magic_type;
 	const guint magic_offset;
-	const void *magic_pattern;
+	const gpointer magic_pattern;
 	const guint magic_length;
 	const FormatRawExifType exif_type;
 	FormatRawExifParseFunc exif_func;
@@ -67,7 +67,7 @@
 typedef struct _FormatExifEntry FormatExifEntry;
 struct _FormatExifEntry {
 	FormatExifMatchType header_type;
-	const void *header_pattern;
+	const gpointer header_pattern;
 	const guint header_length;
 	const gchar *description;
 	FormatExifParseFunc func_parse;
@@ -299,7 +299,7 @@
 				    guint *image_offset, guint *exif_offset)
 {
 	FormatRawEntry *entry;
-	void *map_data = NULL;
+	gpointer map_data = NULL;
 	size_t map_len = 0;
 	struct stat st;
 	gint success;
--- a/src/pan-view.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/pan-view.c	Tue Aug 26 22:37:18 2008 +0000
@@ -523,7 +523,7 @@
  *-----------------------------------------------------------------------------
  */
 
-static gint pan_cache_sort_file_cb(void *a, void *b)
+static gint pan_cache_sort_file_cb(gpointer a, gpointer b)
 {
 	PanCacheData *pca = a;
 	PanCacheData *pcb = b;
--- a/src/secure_save.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/secure_save.c	Tue Aug 26 22:37:18 2008 +0000
@@ -373,7 +373,7 @@
  * the number of elements to write. If ssi->err is set when called, it immediatly returns 0.
  */
 size_t
-secure_fwrite(const void *ptr, size_t size, size_t nmemb, SecureSaveInfo *ssi)
+secure_fwrite(const gpointer ptr, size_t size, size_t nmemb, SecureSaveInfo *ssi)
 {
 	size_t ret;
 
--- a/src/secure_save.h	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/secure_save.h	Tue Aug 26 22:37:18 2008 +0000
@@ -22,7 +22,7 @@
 gint secure_fputc(SecureSaveInfo *, gint);
 
 gint secure_fprintf(SecureSaveInfo *, const gchar *, ...);
-size_t secure_fwrite(const void *ptr, size_t size, size_t nmemb, SecureSaveInfo *ssi);
+size_t secure_fwrite(const gpointer ptr, size_t size, size_t nmemb, SecureSaveInfo *ssi);
 
 gchar *secsave_strerror(SecureSaveErrno);
 
--- a/src/similar.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/similar.c	Tue Aug 26 22:37:18 2008 +0000
@@ -68,10 +68,10 @@
 	g_free(sd);
 }
 
-static gint image_sim_channel_eq_sort_cb(const void *a, const void *b)
+static gint image_sim_channel_eq_sort_cb(const gpointer a, const gpointer b)
 {
-	gint *pa = (void *)a;
-	gint *pb = (void *)b;
+	gint *pa = (gpointer)a;
+	gint *pb = (gpointer)b;
 	if (pa[1] < pb[1]) return -1;
 	if (pa[1] > pb[1]) return 1;
 	return 0;
--- a/src/ui_pathsel.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/ui_pathsel.c	Tue Aug 26 22:37:18 2008 +0000
@@ -145,7 +145,7 @@
 #define CASE_SORT strcmp
 #endif
 
-static gint dest_sort_cb(void *a, void *b)
+static gint dest_sort_cb(gpointer a, gpointer b)
 {
 	return CASE_SORT((gchar *)a, (gchar *)b);
 }
--- a/src/ui_utildlg.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/ui_utildlg.c	Tue Aug 26 22:37:18 2008 +0000
@@ -344,7 +344,7 @@
 
 	generic_dialog_setup(GENERIC_DIALOG(fdlg), title,
 			     wmclass, wmsubclass, parent, FALSE,
-			     (void *)cancel_cb, data);
+			     (gpointer)cancel_cb, data);
 
 	return fdlg;
 }
@@ -353,7 +353,7 @@
 				  void (*func_cb)(FileDialog *, gpointer), gint is_default)
 {
 	return generic_dialog_add_button(GENERIC_DIALOG(fdlg), stock_id, text,
-					 (void *)func_cb, is_default);
+					 (gpointer)func_cb, is_default);
 }
 
 static void file_dialog_entry_cb(GtkWidget *widget, gpointer data)
--- a/src/view_file_icon.c	Tue Aug 26 22:30:40 2008 +0000
+++ b/src/view_file_icon.c	Tue Aug 26 22:37:18 2008 +0000
@@ -131,7 +131,7 @@
 
 }
 
-gint iconlist_sort_file_cb(void *a, void *b)
+gint iconlist_sort_file_cb(gpointer a, gpointer b)
 {
 	IconData *ida = a;
 	IconData *idb = b;