Mercurial > geeqie.yaz
comparison src/exif.c @ 1002:3096a47232ec
Use gpointer instead of void *.
author | zas_ |
---|---|
date | Tue, 26 Aug 2008 22:37:18 +0000 |
parents | 4fe8f9656107 |
children | 82fe98d2cfdb |
comparison
equal
deleted
inserted
replaced
1001:d22e21bfd2a3 | 1002:3096a47232ec |
---|---|
711 } | 711 } |
712 | 712 |
713 return (list[i].tag == 0 ? NULL : &list[i]); | 713 return (list[i].tag == 0 ? NULL : &list[i]); |
714 } | 714 } |
715 | 715 |
716 static void rational_from_data(ExifRational *r, void *src, ExifByteOrder bo) | 716 static void rational_from_data(ExifRational *r, gpointer src, ExifByteOrder bo) |
717 { | 717 { |
718 r->num = exif_byte_get_int32(src, bo); | 718 r->num = exif_byte_get_int32(src, bo); |
719 r->den = exif_byte_get_int32(src + sizeof(guint32), bo); | 719 r->den = exif_byte_get_int32(src + sizeof(guint32), bo); |
720 } | 720 } |
721 | 721 |
722 /* src_format and item->format must be compatible | 722 /* src_format and item->format must be compatible |
723 * and not overrun src or item->data. | 723 * and not overrun src or item->data. |
724 */ | 724 */ |
725 void exif_item_copy_data(ExifItem *item, void *src, guint len, | 725 void exif_item_copy_data(ExifItem *item, gpointer src, guint len, |
726 ExifFormatType src_format, ExifByteOrder bo) | 726 ExifFormatType src_format, ExifByteOrder bo) |
727 { | 727 { |
728 gint bs; | 728 gint bs; |
729 gint ne; | 729 gint ne; |
730 gpointer dest; | 730 gpointer dest; |
1130 | 1130 |
1131 close(fd); | 1131 close(fd); |
1132 return 0; | 1132 return 0; |
1133 } | 1133 } |
1134 | 1134 |
1135 static gint unmap_file(void *mapping, gint size) | 1135 static gint unmap_file(gpointer mapping, gint size) |
1136 { | 1136 { |
1137 if (munmap(mapping, size) == -1) | 1137 if (munmap(mapping, size) == -1) |
1138 { | 1138 { |
1139 perror("munmap"); | 1139 perror("munmap"); |
1140 return -1; | 1140 return -1; |
1162 } | 1162 } |
1163 | 1163 |
1164 ExifData *exif_read(gchar *path, gchar *sidecar_path) | 1164 ExifData *exif_read(gchar *path, gchar *sidecar_path) |
1165 { | 1165 { |
1166 ExifData *exif; | 1166 ExifData *exif; |
1167 void *f; | 1167 gpointer f; |
1168 gint size, res; | 1168 gint size, res; |
1169 gchar *pathl; | 1169 gchar *pathl; |
1170 | 1170 |
1171 if (!path) return NULL; | 1171 if (!path) return NULL; |
1172 | 1172 |