aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile3
-rw-r--r--exiftran.c7
-rw-r--r--fbi.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index b8cfd36..0925476 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -32,6 +32,7 @@ LIB := $(LIB)
RESDIR := $(call ac_resdir)
HAVE_ENDIAN_H := $(call ac_header,endian.h)
HAVE_LINUX_FB_H := $(call ac_header,linux/fb.h)
+HAVE_NEW_EXIF := $(call ac_header,libexif/exif-log.h)
HAVE_GLIBC := $(call ac_func,fopencookie)
HAVE_STRCASESTR := $(call ac_func,strcasestr)
HAVE_LIBPCD := $(call ac_lib,pcd_open,pcd)
@@ -60,7 +61,7 @@ endif
########################################################################
# conditional stuff
-includes = ENDIAN_H STRCASESTR
+includes = ENDIAN_H STRCASESTR NEW_EXIF
libraries = PCD UNGIF PNG TIFF CURL SANE LIRC
ida_libs = PCD UNGIF PNG TIFF CURL SANE
fbi_libs = PCD UNGIF PNG TIFF CURL LIRC
diff --git a/exiftran.c b/exiftran.c
index 6db3fd2..382c998 100644
--- a/exiftran.c
+++ b/exiftran.c
@@ -21,6 +21,9 @@
static void dump_exif(FILE *out, ExifData *ed)
{
const char *title, *value;
+#ifdef HAVE_NEW_EXIF
+ char buffer[256];
+#endif
ExifEntry *ee;
int tag,i;
@@ -33,7 +36,11 @@ static void dump_exif(FILE *out, ExifData *ed)
ee = exif_content_get_entry (ed->ifd[i], tag);
if (NULL == ee)
continue;
+#ifdef HAVE_NEW_EXIF
+ value = exif_entry_get_value(ee, buffer, sizeof(buffer));
+#else
value = exif_entry_get_value(ee);
+#endif
fprintf(out," 0x%04x %-30s %s\n", tag, title, value);
}
}
diff --git a/fbi.c b/fbi.c
index f666994..fad7b77 100644
--- a/fbi.c
+++ b/fbi.c
@@ -432,7 +432,12 @@ static void show_exif(struct flist *f)
continue;
}
title[tag] = exif_tag_get_title(tags[tag]);
+#ifdef HAVE_NEW_EXIF
+ value[tag] = malloc(128);
+ exif_entry_get_value(ee, value[tag], 128);
+#else
value[tag] = strdup(exif_entry_get_value(ee));
+#endif
len = strlen(title[tag]);
if (l1 < len)
l1 = len;