Include a Other Software section in Help file
[geeqie.git] / src / format_nikon.c
index 2af0e57..c55f66e 100644 (file)
@@ -1,14 +1,22 @@
 /*
- *  GQView
- *  (C) 2005 John Ellis
+ * Copyright (C) 2005 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
- *  Authors:
- *    Raw NEF jpeg extraction based on nefextract.c by Joseph Heled,
- *        in addition nefextract.c is based on dcraw by Dave Coffin.
+ * Author: Joseph Heled
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -25,7 +33,7 @@
 
 #include "intl.h"
 
-#include "gqview.h"
+#include "main.h"
 #include "format_nikon.h"
 
 #include "exif.h"
  *-----------------------------------------------------------------------------
  */
 
-static guint nikon_tiff_table(unsigned char *data, const guint len, guint offset, ExifByteOrder bo,
+static guint nikon_tiff_table(guchar *data, const guint len, guint offset, ExifByteOrder bo,
                              gint level,
                              guint *image_offset, guint *jpeg_len);
 
 
-static void nikon_tiff_entry(unsigned char *data, const guint len, guint offset, ExifByteOrder bo,
+static void nikon_tiff_entry(guchar *data, const guint len, guint offset, ExifByteOrder bo,
                             gint level,
                             guint *image_offset, guint *image_length, guint *jpeg_start, guint *jpeg_len)
 {
@@ -73,7 +81,7 @@ static void nikon_tiff_entry(unsigned char *data, const guint len, guint offset,
        if (tag == 0x14a)
                {
                /* sub IFD table */
-               gint i;
+               guint i;
 
                for (i = 0; i < count; i++)
                        {
@@ -96,7 +104,7 @@ static void nikon_tiff_entry(unsigned char *data, const guint len, guint offset,
                }
 }
 
-static guint nikon_tiff_table(unsigned char *data, const guint len, guint offset, ExifByteOrder bo,
+static guint nikon_tiff_table(guchar *data, const guint len, guint offset, ExifByteOrder bo,
                              gint level,
                              guint *image_offset, guint *image_length)
 {
@@ -130,8 +138,8 @@ static guint nikon_tiff_table(unsigned char *data, const guint len, guint offset
        return exif_byte_get_int32(data + offset + count * EXIF_TIFD_SIZE, bo);
 }
 
-gint format_nikon_raw(unsigned char *data, const guint len,
-                     guint *image_offset, guint *exif_offset)
+gboolean format_nikon_raw(guchar *data, const guint len,
+                         guint *image_offset, guint *exif_offset)
 {
        guint i_off = 0;
        guint i_len = 0;
@@ -220,14 +228,6 @@ static ExifTextList NikonTagConverter[]= {
        EXIF_TEXT_LIST_END
 };
 
-#if 0
-static ExifTextList NikonTag[]= {
-       { ,     "" },
-       { ,     "" },
-       EXIF_TEXT_LIST_END
-};
-#endif
-
 static ExifMarker NikonExifMarkersList1[] = {
 { 0x0002, EXIF_FORMAT_STRING, 6,               "Nikon.unknown",        NULL,           NULL },
 { 0x0003, EXIF_FORMAT_SHORT_UNSIGNED, 1,       "Nikon.Quality",        "Quality",      NikonTagQuality },
@@ -281,17 +281,6 @@ static ExifTextList NikonTag2FlashUsed[]= {
        EXIF_TEXT_LIST_END
 };
 
-#if 0
-static ExifTextList NikonTagi2Saturation[]= {
-       { -3,   "black and white" },
-       { -2,   "-2" },
-       { -1,   "-1" },
-       { 0,    "normal" },
-       { 1,    "+1" },
-       { 2,    "+2" },
-       EXIF_TEXT_LIST_END
-};
-#endif
 
 static ExifMarker NikonExifMarkersList2[] = {
 { 0x0002, EXIF_FORMAT_SHORT_UNSIGNED, 2,       "Nikon.ISOSpeed",       "ISO speed",    NULL },
@@ -354,10 +343,10 @@ static ExifTextList NikonAFPoint[]= {
 };
 
 
-gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
-                           guint size, ExifByteOrder bo)
+gboolean format_nikon_makernote(ExifData *exif, guchar *tiff, guint offset,
+                               guint size, ExifByteOrder bo)
 {
-       unsigned char *data;
+       guchar *data;
        ExifItem *item;
 
        if (offset + 8 + 4 >= size) return FALSE;
@@ -444,5 +433,6 @@ gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
        return TRUE;
 }
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */