2005-03-29 Lutz Mueller <lutz@users.sourceforge.net>
authorLutz Mueller <lutz.s.mueller@gmail.com>
Wed, 30 Mar 2005 07:55:03 +0000 (09:55 +0200)
committerLutz Mueller <lutz.s.mueller@gmail.com>
Wed, 30 Mar 2005 07:55:03 +0000 (09:55 +0200)
* libjpeg: Removed.
* README
* Makefile.am
* configure.in
* libexif/exif-loader.c
* libexif/exif-data.c: Remove references to libjpeg.
* test/test-tree.c: Removed.
* test/Makefile.am: Remove test-tree

13 files changed:
ChangeLog
Makefile.am
README
configure.in
libexif/exif-data.c
libexif/exif-loader.c
libjpeg/Makefile.am [deleted file]
libjpeg/jpeg-data.c [deleted file]
libjpeg/jpeg-data.h [deleted file]
libjpeg/jpeg-marker.c [deleted file]
libjpeg/jpeg-marker.h [deleted file]
test/Makefile.am
test/test-tree.c [deleted file]

index 7c09c65..b1bbf9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-03-29  Lutz Mueller <lutz@users.sourceforge.net>
+
+       * libjpeg: Removed.
+       * README
+       * Makefile.am
+       * configure.in
+       * libexif/exif-loader.c
+       * libexif/exif-data.c: Remove references to libjpeg.
+       * test/test-tree.c: Removed.
+       * test/Makefile.am: Remove test-tree
+
 2005-03-16  Lutz Mueller <lutz@users.sourceforge.net>
 
        * libexif/exif-entry.c (exif_entry_get_value): Fix tag COPYRIGHT.
index bc7951e..8ed3442 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = m4 po libexif libjpeg test
+SUBDIRS = m4 po libexif test
 
 EXTRA_DIST = @PACKAGE_TARNAME@.spec
 
diff --git a/README b/README
index cc960e4..6b270a6 100644 (file)
--- a/README
+++ b/README
@@ -50,13 +50,6 @@ LIBRARIES
 I know of the following libraries that use or have been inspired by libexif:
  - pel: PHP-Code (http://pel.sourceforge.net)
 
-BUGS
-----
-
-libexif includes a 'libjpeg' that is 'educational code to illustrate the
-syntax of JPEG files'. Please ignore it. It is a bug that it is 
-distributed, but I think it may be useful for other people.
-
 TODO
 ----
 
index 97f0bf5..0e358a4 100644 (file)
@@ -75,7 +75,6 @@ dnl Compiler/Linker Options and Warnings
 dnl ---------------------------------------------------------------------------
 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)"
 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libexif"
-AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libjpeg"
 AM_LDFLAGS="$LDFLAGS"
 if test "x$GCC" = "xyes"; then
     AM_CFLAGS="$AM_CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
@@ -96,7 +95,6 @@ AC_CONFIG_FILES([
   libexif/canon/Makefile
   libexif/olympus/Makefile
   libexif/pentax/Makefile
-  libjpeg/Makefile
   test/Makefile
   test/nls/Makefile
   m4/Makefile
index 9c4dffc..0e08b52 100644 (file)
@@ -28,8 +28,6 @@
 #include <libexif/exif-loader.h>
 #include <libexif/exif-log.h>
 
-#include <libjpeg/jpeg-marker.h>
-
 #include <libexif/olympus/exif-mnote-data-olympus.h>
 #include <libexif/canon/exif-mnote-data-canon.h>
 #include <libexif/pentax/exif-mnote-data-pentax.h>
 #      define strncasecmp strnicmp
 #endif
 
+#undef JPEG_MARKER_SOI
+#define JPEG_MARKER_SOI  0xd8
+#undef JPEG_MARKER_APP0
+#define JPEG_MARKER_APP0 0xe0
+#undef JPEG_MARKER_APP1
+#define JPEG_MARKER_APP1 0xe1
+
 static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00};
 
 struct _ExifDataPrivate
index d5ec3c1..d6eba7d 100644 (file)
@@ -7,7 +7,16 @@
 #include <string.h>
 #include <stdio.h>
 
-#include <libjpeg/jpeg-marker.h>
+#undef JPEG_MARKER_SOI
+#define JPEG_MARKER_SOI  0xd8
+#undef JPEG_MARKER_APP0
+#define JPEG_MARKER_APP0 0xe0
+#undef JPEG_MARKER_APP1
+#define JPEG_MARKER_APP1 0xe1
+#undef JPEG_MARKER_APP13
+#define JPEG_MARKER_APP13 0xed
+#undef JPEG_MARKER_COM
+#define JPEG_MARKER_COM 0xfe
 
 typedef enum {
        EL_READ = 0,
diff --git a/libjpeg/Makefile.am b/libjpeg/Makefile.am
deleted file mode 100644 (file)
index cf17207..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_LTLIBRARIES = libjpeg.la
-libjpeg_la_SOURCES =                   \
-       jpeg-data.c jpeg-data.h         \
-       jpeg-marker.c jpeg-marker.h
-libjpeg_la_LIBADD = $(top_builddir)/libexif/libexif.la
diff --git a/libjpeg/jpeg-data.c b/libjpeg/jpeg-data.c
deleted file mode 100644 (file)
index f480dec..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-/* jpeg-data.c
- *
- * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include "jpeg-data.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-/* #define DEBUG */
-
-struct _JPEGDataPrivate
-{
-       unsigned int ref_count;
-};
-
-JPEGData *
-jpeg_data_new (void)
-{
-       JPEGData *data;
-
-       data = malloc (sizeof (JPEGData));
-       if (!data)
-               return (NULL);
-       memset (data, 0, sizeof (JPEGData));
-       data->priv = malloc (sizeof (JPEGDataPrivate));
-       if (!data->priv) {
-               free (data);
-               return (NULL);
-       }
-       memset (data->priv, 0, sizeof (JPEGDataPrivate));
-       data->priv->ref_count = 1;
-
-       return (data);
-}
-
-void
-jpeg_data_append_section (JPEGData *data)
-{
-       JPEGSection *s;
-
-       if (!data->count)
-               s = malloc (sizeof (JPEGSection));
-       else
-               s = realloc (data->sections,
-                            sizeof (JPEGSection) * (data->count + 1));
-       if (!s)
-               return;
-
-       data->sections = s;
-       data->count++;
-}
-
-/* jpeg_data_save_file returns 1 on succes, 0 on failure */
-int
-jpeg_data_save_file (JPEGData *data, const char *path)
-{
-       FILE *f;
-       unsigned char *d = NULL;
-       unsigned int size = 0, written;
-
-       jpeg_data_save_data (data, &d, &size);
-       if (!d)
-               return 0;
-
-       remove (path);
-       f = fopen (path, "wb");
-       if (!f) {
-               free (d);
-               return 0;
-       }
-       written = fwrite (d, 1, size, f);
-       fclose (f);
-       free (d);
-       if (written == size)  {
-               return 1;
-       }
-       remove(path);
-       return 0;
-}
-
-void
-jpeg_data_save_data (JPEGData *data, unsigned char **d, unsigned int *ds)
-{
-       unsigned int i, eds = 0;
-       JPEGSection s;
-       unsigned char *ed = NULL;
-
-       if (!data)
-               return;
-       if (!d)
-               return;
-       if (!ds)
-               return;
-
-       for (*ds = i = 0; i < data->count; i++) {
-               s = data->sections[i];
-#ifdef DEBUG
-               printf ("Writing marker 0x%x at position %i...\n",
-                       s.marker, *ds);
-#endif
-
-               /* Write the marker */
-               *d = realloc (*d, sizeof (char) * (*ds + 2));
-               (*d)[*ds + 0] = 0xff;
-               (*d)[*ds + 1] = s.marker;
-               *ds += 2;
-
-               switch (s.marker) {
-               case JPEG_MARKER_SOI:
-               case JPEG_MARKER_EOI:
-                       break;
-               case JPEG_MARKER_APP1:
-                       exif_data_save_data (s.content.app1, &ed, &eds);
-                       if (!ed) break;
-                       *d = realloc (*d, sizeof (char) * (*ds + 2));
-                       (*d)[*ds + 0] = (eds + 2) >> 8;
-                       (*d)[*ds + 1] = (eds + 2) >> 0;
-                       *ds += 2;
-                       *d = realloc (*d, sizeof (char) * (*ds + eds));
-                       memcpy (*d + *ds, ed, eds);
-                       *ds += eds;
-                       free (ed);
-                       break;
-               default:
-                       *d = realloc (*d, sizeof (char) *
-                                       (*ds + s.content.generic.size + 2));
-                       (*d)[*ds + 0] = (s.content.generic.size + 2) >> 8;
-                       (*d)[*ds + 1] = (s.content.generic.size + 2) >> 0;
-                       *ds += 2;
-                       memcpy (*d + *ds, s.content.generic.data,
-                               s.content.generic.size);
-                       *ds += s.content.generic.size;
-
-                       /* In case of SOS, we need to write the data. */
-                       if (s.marker == JPEG_MARKER_SOS) {
-                               *d = realloc (*d, *ds + data->size);
-                               memcpy (*d + *ds, data->data, data->size);
-                               *ds += data->size;
-                       }
-                       break;
-               }
-       }
-}
-
-JPEGData *
-jpeg_data_new_from_data (const unsigned char *d,
-                        unsigned int size)
-{
-       JPEGData *data;
-
-       data = jpeg_data_new ();
-       jpeg_data_load_data (data, d, size);
-       return (data);
-}
-
-void
-jpeg_data_load_data (JPEGData *data, const unsigned char *d,
-                    unsigned int size)
-{
-       unsigned int i, o, len;
-       JPEGSection *s;
-       JPEGMarker marker;
-
-       if (!data)
-               return;
-       if (!d)
-               return;
-
-#ifdef DEBUG
-       printf ("Parsing %i bytes...\n", size);
-#endif
-
-       for (o = 0; o < size;) {
-
-               /*
-                * JPEG sections start with 0xff. The first byte that is
-                * not 0xff is a marker (hopefully).
-                */
-               for (i = 0; i < 7; i++)
-                       if (d[o + i] != 0xff)
-                               break;
-               if (!JPEG_IS_MARKER (d[o + i]))
-                       return;
-               marker = d[o + i];
-
-#ifdef DEBUG
-               printf ("Found marker 0x%x ('%s') at %i.\n", marker,
-                       jpeg_marker_get_name (marker), o + i);
-#endif
-
-               /* Append this section */
-               jpeg_data_append_section (data);
-               if (!data->count) return;
-               s = &data->sections[data->count - 1];
-               s->marker = marker;
-               s->content.generic.data = NULL;
-               o += i + 1;
-
-               switch (s->marker) {
-               case JPEG_MARKER_SOI:
-               case JPEG_MARKER_EOI:
-                       break;
-               default:
-
-                       /* Read the length of the section */
-                       len = ((d[o] << 8) | d[o + 1]) - 2;
-                       if (len > size) { o = size; break; }
-                       o += 2;
-                       if (o + len > size) { o = size; break; }
-
-                       switch (s->marker) {
-                       case JPEG_MARKER_APP1:
-                               s->content.app1 = exif_data_new_from_data (
-                                                       d + o - 4, len + 4);
-                               break;
-                       default:
-                               s->content.generic.size = len;
-                               s->content.generic.data =
-                                               malloc (sizeof (char) * len);
-                               memcpy (s->content.generic.data, &d[o], len);
-
-                               /* In case of SOS, image data will follow. */
-                               if (s->marker == JPEG_MARKER_SOS) {
-                                       data->size = size - 2 - o - len;
-                                       data->data = malloc (
-                                               sizeof (char) * data->size);
-                                       memcpy (data->data, d + o + len,
-                                               data->size);
-                                       o += data->size;
-                               }
-                               break;
-                       }
-                       o += len;
-                       break;
-               }
-       }
-}
-
-JPEGData *
-jpeg_data_new_from_file (const char *path)
-{
-       JPEGData *data;
-
-       data = jpeg_data_new ();
-       jpeg_data_load_file (data, path);
-       return (data);
-}
-
-void
-jpeg_data_load_file (JPEGData *data, const char *path)
-{
-       FILE *f;
-       unsigned char *d;
-       unsigned int size;
-
-       if (!data)
-               return;
-       if (!path)
-               return;
-
-       f = fopen (path, "rb");
-       if (!f)
-               return;
-
-       /* For now, we read the data into memory. Patches welcome... */
-       fseek (f, 0, SEEK_END);
-       size = ftell (f);
-       fseek (f, 0, SEEK_SET);
-       d = malloc (sizeof (char) * size);
-       if (!d) {
-               fclose (f);
-               return;
-       }
-       if (fread (d, 1, size, f) != size) {
-               free (d);
-               fclose (f);
-               return;
-       }
-       fclose (f);
-
-       jpeg_data_load_data (data, d, size);
-       free (d);
-}
-
-void
-jpeg_data_ref (JPEGData *data)
-{
-       if (!data)
-               return;
-
-       data->priv->ref_count++;
-}
-
-void
-jpeg_data_unref (JPEGData *data)
-{
-       if (!data)
-               return;
-
-       data->priv->ref_count--;
-       if (!data->priv->ref_count)
-               jpeg_data_free (data);
-}
-
-void
-jpeg_data_free (JPEGData *data)
-{
-       unsigned int i;
-       JPEGSection s;
-
-       if (!data)
-               return;
-
-       if (data->count) {
-               for (i = 0; i < data->count; i++) {
-                       s = data->sections[i];
-                       switch (s.marker) {
-                       case JPEG_MARKER_SOI:
-                       case JPEG_MARKER_EOI:
-                               break;
-                       case JPEG_MARKER_APP1:
-                               exif_data_unref (s.content.app1);
-                               break;
-                       default:
-                               free (s.content.generic.data);
-                               break;
-                       }
-               }
-               free (data->sections);
-       }
-
-       if (data->data)
-               free (data->data);
-       free (data->priv);
-       free (data);
-}
-
-void
-jpeg_data_dump (JPEGData *data)
-{
-       unsigned int i;
-       JPEGContent content;
-       JPEGMarker marker;
-
-       if (!data)
-               return;
-
-       printf ("Dumping JPEG data (%i bytes of data)...\n", data->size);
-       for (i = 0; i < data->count; i++) {
-               marker = data->sections[i].marker;
-               content = data->sections[i].content;
-               printf ("Section %i (marker 0x%x - %s):\n", i, marker,
-                       jpeg_marker_get_name (marker));
-               printf ("  Description: %s\n",
-                       jpeg_marker_get_description (marker));
-               switch (marker) {
-                case JPEG_MARKER_SOI:
-                case JPEG_MARKER_EOI:
-                       break;
-                case JPEG_MARKER_APP1:
-                       exif_data_dump (content.app1);
-                       break;
-                default:
-                       printf ("  Size: %i\n", content.generic.size);
-                        printf ("  Unknown content.\n");
-                        break;
-                }
-        }
-}
-
-static JPEGSection *
-jpeg_data_get_section (JPEGData *data, JPEGMarker marker)
-{
-       unsigned int i;
-
-       if (!data)
-               return (NULL);
-
-       for (i = 0; i < data->count; i++)
-               if (data->sections[i].marker == marker)
-                       return (&data->sections[i]);
-       return (NULL);
-}
-
-ExifData *
-jpeg_data_get_exif_data (JPEGData *data)
-{
-       JPEGSection *section;
-
-       if (!data)
-               return NULL;
-
-       section = jpeg_data_get_section (data, JPEG_MARKER_APP1);
-       if (section) {
-               exif_data_ref (section->content.app1);
-               return (section->content.app1);
-       }
-
-       return (NULL);
-}
-
-void
-jpeg_data_set_exif_data (JPEGData *data, ExifData *exif_data)
-{
-       JPEGSection *section;
-
-       if (!data) return;
-
-       section = jpeg_data_get_section (data, JPEG_MARKER_APP1);
-       if (!section) {
-               jpeg_data_append_section (data);
-               if (data->count < 2) return;
-               memmove (&data->sections[2], &data->sections[1],
-                        sizeof (JPEGSection) * (data->count - 2));
-               section = &data->sections[1];
-       } else {
-               exif_data_unref (section->content.app1);
-       }
-       section->marker = JPEG_MARKER_APP1;
-       section->content.app1 = exif_data;
-       exif_data_ref (exif_data);
-}
diff --git a/libjpeg/jpeg-data.h b/libjpeg/jpeg-data.h
deleted file mode 100644 (file)
index 315a849..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* jpeg-data.h
- *
- * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details. 
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __JPEG_DATA_H__
-#define __JPEG_DATA_H__
-
-#include <libjpeg/jpeg-marker.h>
-#include <libexif/exif-data.h>
-
-typedef ExifData * JPEGContentAPP1;
-
-typedef struct _JPEGContentGeneric JPEGContentGeneric;
-struct _JPEGContentGeneric
-{
-       unsigned char *data;
-       unsigned int size;
-};
-
-typedef union _JPEGContent JPEGContent;
-union _JPEGContent
-{
-       JPEGContentGeneric generic;
-       JPEGContentAPP1    app1;
-};
-
-typedef struct _JPEGSection JPEGSection;
-struct _JPEGSection
-{
-       JPEGMarker marker;
-       JPEGContent content;
-};
-
-typedef struct _JPEGData        JPEGData;
-typedef struct _JPEGDataPrivate JPEGDataPrivate;
-
-struct _JPEGData
-{
-       JPEGSection *sections;
-       unsigned int count;
-
-       unsigned char *data;
-       unsigned int size;
-
-       JPEGDataPrivate *priv;
-};
-
-JPEGData *jpeg_data_new           (void);
-JPEGData *jpeg_data_new_from_file (const char *path);
-JPEGData *jpeg_data_new_from_data (const unsigned char *data,
-                                  unsigned int size);
-
-void      jpeg_data_ref   (JPEGData *data);
-void      jpeg_data_unref (JPEGData *data);
-void      jpeg_data_free  (JPEGData *data);
-
-void      jpeg_data_load_data     (JPEGData *data, const unsigned char *d,
-                                  unsigned int size);
-void      jpeg_data_save_data     (JPEGData *data, unsigned char **d,
-                                  unsigned int *size);
-
-void      jpeg_data_load_file     (JPEGData *data, const char *path);
-int       jpeg_data_save_file     (JPEGData *data, const char *path);
-
-void      jpeg_data_set_exif_data (JPEGData *data, ExifData *exif_data);
-ExifData *jpeg_data_get_exif_data (JPEGData *data);
-
-void      jpeg_data_dump (JPEGData *data);
-
-void      jpeg_data_append_section (JPEGData *data);
-
-#endif /* __JPEG_DATA_H__ */
diff --git a/libjpeg/jpeg-marker.c b/libjpeg/jpeg-marker.c
deleted file mode 100644 (file)
index afc02a8..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/* jpeg-marker.c
- *
- * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details. 
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#include "config.h"
-#include "jpeg-marker.h"
-
-#include <stdlib.h>
-
-static struct {
-        JPEGMarker marker;
-        const char *name;
-        const char *description;
-} JPEGMarkerTable[] = {
-        {JPEG_MARKER_SOF0, "SOF0", "Encoding (baseline)"},
-        {JPEG_MARKER_SOF1, "SOF1", "Encoding (extended sequential)"},
-        {JPEG_MARKER_SOF2, "SOF2", "Encoding (progressive)"},
-        {JPEG_MARKER_SOF3, "SOF3", "Encoding (lossless)"},
-        {JPEG_MARKER_SOF5, "SOF5", "Encoding (differential sequential)"},
-        {JPEG_MARKER_SOF6, "SOF6", "Encoding (differential progressive)"},
-        {JPEG_MARKER_SOF7, "SOF7", "Encoding (differential lossless)"},
-        {JPEG_MARKER_SOF9, "SOF9",
-               "Encoding (extended sequential, arithmetic)"},
-        {JPEG_MARKER_SOF10, "SOF10", "Encoding (progressive, arithmetic)"},
-        {JPEG_MARKER_SOF11, "SOF11", "Encoding (lossless, arithmetic)"},
-        {JPEG_MARKER_SOF13, "SOF13",
-               "Encoding (differential sequential, arithmetic)"},
-        {JPEG_MARKER_SOF14, "SOF14",
-               "Encoding (differential progressive, arithmetic)"},
-        {JPEG_MARKER_SOF15, "SOF15",
-               "Encoding (differential lossless, arithmetic)"},
-       {JPEG_MARKER_SOI, "SOI", "Start of image"},
-       {JPEG_MARKER_EOI, "EOI", "End of image"},
-       {JPEG_MARKER_SOS, "SOS", "Start of scan"},
-       {JPEG_MARKER_COM, "COM", "Comment"},
-       {JPEG_MARKER_DHT, "DHT", "Define Huffman table"},
-       {JPEG_MARKER_JPG, "JPG", "Extension"},
-       {JPEG_MARKER_DAC, "DAC", "Define arithmetic coding conditioning"},
-       {JPEG_MARKER_RST1, "RST1", "Restart 1"},
-       {JPEG_MARKER_RST2, "RST2", "Restart 2"},
-       {JPEG_MARKER_RST3, "RST3", "Restart 3"},
-       {JPEG_MARKER_RST4, "RST4", "Restart 4"},
-       {JPEG_MARKER_RST5, "RST5", "Restart 5"},
-       {JPEG_MARKER_RST6, "RST6", "Restart 6"},
-       {JPEG_MARKER_RST7, "RST7", "Restart 7"},
-       {JPEG_MARKER_DQT, "DQT", "Define quantization table"},
-       {JPEG_MARKER_DNL, "DNL", "Define number of lines"},
-       {JPEG_MARKER_DRI, "DRI", "Define restart interval"},
-       {JPEG_MARKER_DHP, "DHP", "Define hierarchical progression"},
-       {JPEG_MARKER_EXP, "EXP", "Expand reference component"},
-       {JPEG_MARKER_APP0, "APP0", "Application segment 0"},
-       {JPEG_MARKER_APP1, "APP1", "Application segment 1"},
-       {JPEG_MARKER_APP2, "APP2", "Application segment 2"},
-       {JPEG_MARKER_APP3, "APP3", "Application segment 3"},
-       {JPEG_MARKER_APP4, "APP4", "Application segment 4"},
-       {JPEG_MARKER_APP5, "APP5", "Application segment 5"},
-       {JPEG_MARKER_APP6, "APP6", "Application segment 6"},
-       {JPEG_MARKER_APP7, "APP7", "Application segment 7"},
-       {JPEG_MARKER_APP8, "APP8", "Application segment 8"},
-       {JPEG_MARKER_APP9, "APP9", "Application segment 9"},
-       {JPEG_MARKER_APP10, "APP10", "Application segment 10"},
-       {JPEG_MARKER_APP11, "APP11", "Application segment 11"},
-       {JPEG_MARKER_APP12, "APP12", "Application segment 12"},
-       {JPEG_MARKER_APP13, "APP13", "Application segment 13"},
-       {JPEG_MARKER_APP14, "APP14", "Application segment 14"},
-       {JPEG_MARKER_APP15, "APP15", "Application segment 15"},
-       {JPEG_MARKER_JPG0, "JPG0", "Extension 0"},
-       {JPEG_MARKER_JPG1, "JPG1", "Extension 1"},
-       {JPEG_MARKER_JPG2, "JPG2", "Extension 2"},
-       {JPEG_MARKER_JPG3, "JPG3", "Extension 3"},
-       {JPEG_MARKER_JPG4, "JPG4", "Extension 4"},
-       {JPEG_MARKER_JPG5, "JPG5", "Extension 5"},
-       {JPEG_MARKER_JPG6, "JPG6", "Extension 6"},
-       {JPEG_MARKER_JPG7, "JPG7", "Extension 7"},
-       {JPEG_MARKER_JPG8, "JPG8", "Extension 8"},
-       {JPEG_MARKER_JPG9, "JPG9", "Extension 9"},
-       {JPEG_MARKER_JPG10, "JPG10", "Extension 10"},
-       {JPEG_MARKER_JPG11, "JPG11", "Extension 11"},
-       {JPEG_MARKER_JPG12, "JPG12", "Extension 12"},
-       {JPEG_MARKER_JPG13, "JPG13", "Extension 13"},
-       {0, NULL, NULL}
-};
-
-const char *
-jpeg_marker_get_name (JPEGMarker marker)
-{
-       unsigned int i;
-
-       for (i = 0; JPEGMarkerTable[i].name; i++)
-               if (JPEGMarkerTable[i].marker == marker)
-                       break;
-
-       return (JPEGMarkerTable[i].name);
-}
-
-const char *
-jpeg_marker_get_description (JPEGMarker marker)
-{
-       unsigned int i;
-
-       for (i = 0; JPEGMarkerTable[i].description; i++)
-               if (JPEGMarkerTable[i].marker == marker)
-                       break;
-
-       return (JPEGMarkerTable[i].description);
-}
-
diff --git a/libjpeg/jpeg-marker.h b/libjpeg/jpeg-marker.h
deleted file mode 100644 (file)
index 34a32eb..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/* jpeg-marker.h
- *
- * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details. 
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __JPEG_MARKER_H__
-#define __JPEG_MARKER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-typedef enum {
-        JPEG_MARKER_SOF0        = 0xc0,
-        JPEG_MARKER_SOF1        = 0xc1,
-        JPEG_MARKER_SOF2        = 0xc2,
-        JPEG_MARKER_SOF3        = 0xc3,
-       JPEG_MARKER_DHT         = 0xc4,
-        JPEG_MARKER_SOF5        = 0xc5,
-        JPEG_MARKER_SOF6        = 0xc6,
-        JPEG_MARKER_SOF7        = 0xc7,
-       JPEG_MARKER_JPG         = 0xc8,
-        JPEG_MARKER_SOF9        = 0xc9,
-        JPEG_MARKER_SOF10       = 0xca,
-        JPEG_MARKER_SOF11       = 0xcb,
-       JPEG_MARKER_DAC         = 0xcc,
-        JPEG_MARKER_SOF13       = 0xcd,
-        JPEG_MARKER_SOF14       = 0xce,
-        JPEG_MARKER_SOF15       = 0xcf,
-        JPEG_MARKER_RST0       = 0xd0,
-        JPEG_MARKER_RST1       = 0xd1,
-        JPEG_MARKER_RST2       = 0xd2,
-        JPEG_MARKER_RST3       = 0xd3,
-        JPEG_MARKER_RST4       = 0xd4,
-       JPEG_MARKER_RST5        = 0xd5,
-        JPEG_MARKER_RST6       = 0xd6,
-        JPEG_MARKER_RST7       = 0xd7,
-        JPEG_MARKER_SOI         = 0xd8,
-        JPEG_MARKER_EOI         = 0xd9,
-        JPEG_MARKER_SOS         = 0xda,
-        JPEG_MARKER_DQT                = 0xdb,
-        JPEG_MARKER_DNL                = 0xdc,
-        JPEG_MARKER_DRI                = 0xdd,
-        JPEG_MARKER_DHP                = 0xde,
-        JPEG_MARKER_EXP                = 0xdf,
-       JPEG_MARKER_APP0        = 0xe0,
-        JPEG_MARKER_APP1        = 0xe1,
-       JPEG_MARKER_APP2        = 0xe2,
-       JPEG_MARKER_APP3        = 0xe3,
-       JPEG_MARKER_APP4        = 0xe4,
-       JPEG_MARKER_APP5        = 0xe5,
-       JPEG_MARKER_APP6        = 0xe6,
-       JPEG_MARKER_APP7        = 0xe7,
-       JPEG_MARKER_APP8        = 0xe8,
-       JPEG_MARKER_APP9        = 0xe9,
-       JPEG_MARKER_APP10       = 0xea,
-       JPEG_MARKER_APP11       = 0xeb,
-       JPEG_MARKER_APP12       = 0xec,
-       JPEG_MARKER_APP13       = 0xed,
-       JPEG_MARKER_APP14       = 0xee,
-       JPEG_MARKER_APP15       = 0xef,
-       JPEG_MARKER_JPG0        = 0xf0,
-       JPEG_MARKER_JPG1        = 0xf1,
-       JPEG_MARKER_JPG2        = 0xf2,
-       JPEG_MARKER_JPG3        = 0xf3,
-       JPEG_MARKER_JPG4        = 0xf4,
-       JPEG_MARKER_JPG5        = 0xf5,
-       JPEG_MARKER_JPG6        = 0xf6,
-       JPEG_MARKER_JPG7        = 0xf7,
-       JPEG_MARKER_JPG8        = 0xf8,
-       JPEG_MARKER_JPG9        = 0xf9,
-       JPEG_MARKER_JPG10       = 0xfa,
-       JPEG_MARKER_JPG11       = 0xfb,
-       JPEG_MARKER_JPG12       = 0xfc,
-       JPEG_MARKER_JPG13       = 0xfd,
-        JPEG_MARKER_COM         = 0xfe
-} JPEGMarker;
-
-#define JPEG_IS_MARKER(m) (((m) >= JPEG_MARKER_SOF0) &&                \
-                          ((m) <= JPEG_MARKER_COM))
-
-const char *jpeg_marker_get_name        (JPEGMarker marker);
-const char *jpeg_marker_get_description (JPEGMarker marker);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __JPEG_MARKER_H__ */
index 2fa8b22..468b69f 100644 (file)
@@ -1,8 +1,7 @@
 SUBDIRS = nls
 
-noinst_PROGRAMS = test-mem test-tree test-mnote test-value
+noinst_PROGRAMS = test-mem test-mnote test-value
 
-test_tree_LDADD = $(top_builddir)/libjpeg/libjpeg.la $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
 test_mem_LDADD   = $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
 test_mnote_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
 test_value_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
diff --git a/test/test-tree.c b/test/test-tree.c
deleted file mode 100644 (file)
index 33319a2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "config.h"
-#include "libjpeg/jpeg-data.h"
-
-#include <stdio.h>
-
-int
-main (int argc, char **argv)
-{
-       JPEGData *data;
-
-       if (argc <= 1) {
-               printf ("You need to specify a file!\n");
-               return (1);
-       }
-
-       data = jpeg_data_new_from_file (argv[1]);
-       if (!data) {
-               printf ("Could not load '%s'!\n", argv[1]);
-               return (1);
-       }
-       jpeg_data_dump (data);
-       jpeg_data_free (data);
-
-       return (0);
-}