Use gpointer instead of void *.
authorLaurent Monin <geeqie@norz.org>
Tue, 26 Aug 2008 22:37:18 +0000 (22:37 +0000)
committerLaurent Monin <geeqie@norz.org>
Tue, 26 Aug 2008 22:37:18 +0000 (22:37 +0000)
13 files changed:
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

index 363bdf3..8f45717 100644 (file)
@@ -161,7 +161,7 @@ static void collection_save_or_load_dialog(const gchar *path,
        CollectWindow *cw;
        const gchar *title;
        const gchar *btntext;
-       void *btnfunc;
+       gpointer btnfunc;
        gchar *base;
        const gchar *stock_id;
 
index dcccaea..1bd04e3 100644 (file)
@@ -150,7 +150,7 @@ void exif_byte_put_int32(guchar *f, guint32 n, ExifByteOrder bo);
 
 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,
index 7299461..ecc8a72 100644 (file)
@@ -713,7 +713,7 @@ static const ExifMarker *exif_marker_from_tag(guint16 tag, const ExifMarker *lis
        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 @@ static void rational_from_data(ExifRational *r, void *src, ExifByteOrder bo)
 /* 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 @@ static gint map_file(const gchar *path, void **mapping, gint *size)
        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 @@ void exif_free(ExifData *exif)
 ExifData *exif_read(gchar *path, gchar *sidecar_path)
 {
        ExifData *exif;
-       void *f;
+       gpointer f;
        gint size, res;
        gchar *pathl;
 
index d71eca9..f9c75f3 100644 (file)
@@ -752,7 +752,7 @@ gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType me
        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 @@ GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFun
        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;
index 8192058..91bbbcb 100644 (file)
@@ -49,7 +49,7 @@ gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType me
 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);
index aaa75c6..1f20ce8 100644 (file)
@@ -42,7 +42,7 @@ struct _FormatRawEntry {
        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 @@ static FormatRawEntry format_raw_list[] = {
 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 @@ gint format_raw_img_exif_offsets_fd(gint fd, const gchar *path,
                                    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;
index e988e40..f9022b0 100644 (file)
@@ -523,7 +523,7 @@ static void pan_window_zoom_limit(PanWindow *pw)
  *-----------------------------------------------------------------------------
  */
 
-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;
index 253b44b..712529f 100644 (file)
@@ -373,7 +373,7 @@ secure_fprintf(SecureSaveInfo *ssi, const gchar *format, ...)
  * 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;
 
index 2ac953e..dc6f051 100644 (file)
@@ -22,7 +22,7 @@ gint secure_fputs(SecureSaveInfo *, const gchar *);
 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);
 
index 0ee308d..7f5c755 100644 (file)
@@ -68,10 +68,10 @@ void image_sim_free(ImageSimilarityData *sd)
        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;
index f9e8b20..587a4a5 100644 (file)
@@ -145,7 +145,7 @@ static gint dest_check_filter(const gchar *filter, const gchar *file)
 #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);
 }
index f63507e..8361512 100644 (file)
@@ -344,7 +344,7 @@ FileDialog *file_dialog_new(const gchar *title,
 
        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 @@ GtkWidget *file_dialog_add_button(FileDialog *fdlg, const gchar *stock_id, const
                                  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)
index 284f161..5b4c91c 100644 (file)
@@ -131,7 +131,7 @@ static void iconlist_free(GList *list)
 
 }
 
-gint iconlist_sort_file_cb(void *a, void *b)
+gint iconlist_sort_file_cb(gpointer a, gpointer b)
 {
        IconData *ida = a;
        IconData *idb = b;