Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
[geeqie.git] / src / format_raw.c
index 86c6dd9..37ae03c 100644 (file)
 #include "format_nikon.h"
 
 
+/* so that debugging is honored */
+extern gint debug;
+
+
 typedef struct _FormatRawEntry FormatRawEntry;
 struct _FormatRawEntry {
        const void *header_pattern;
@@ -44,6 +48,7 @@ struct _FormatRawEntry {
 static FormatRawEntry format_raw_list[] = {
        FORMAT_RAW_CANON,
        FORMAT_RAW_FUJI,
+       FORMAT_RAW_NIKON,
        { NULL, 0, NULL, NULL }
 };
 
@@ -53,6 +58,7 @@ struct _FormatExifEntry {
        FormatExifMatchType header_type;
        const void *header_pattern;
        const guint header_length;
+       const gchar *description;
        FormatExifParseFunc func_parse;
 };
 
@@ -92,6 +98,8 @@ static gint format_raw_parse(FormatRawEntry *entry,
 
        if (!entry || !entry->func_parse) return FALSE;
 
+       if (debug) printf("RAW using file parser for %s\n", entry->description);
+
        found = entry->func_parse(data, len, &io, &eo);
 
        if (!found ||
@@ -219,6 +227,8 @@ gint format_exif_makernote_parse(ExifData *exif, unsigned char *tiff, guint offs
 
        if (!entry || !entry->func_parse) return FALSE;
 
+       if (debug) printf("EXIF using makernote parser for %s\n", entry->description);
+
        return entry->func_parse(exif, tiff, offset, size, byte_order);
 }