2004-05-12 Jan Patera <patera@users.sourceforge.net>
authorJan Patera <patera@pictview.com>
Wed, 12 May 2004 12:03:47 +0000 (14:03 +0200)
committerJan Patera <patera@pictview.com>
Wed, 12 May 2004 12:03:47 +0000 (14:03 +0200)
* libexif/exif-utils.h: definition of MIN
* libexif/pentax/mnote-pentax-entry.c: min -> MIN
  (found by Serge Droz <serge.droz@psi.ch>)

ChangeLog
libexif/exif-utils.h
libexif/pentax/mnote-pentax-entry.c

index 4db7a9e..91284e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-12  Jan Patera <patera@users.sourceforge.net>
+
+       * libexif/exif-utils.h: definition of MIN
+       * libexif/pentax/mnote-pentax-entry.c: min -> MIN
+         (found by Serge Droz <serge.droz@psi.ch>)
+
 2004-05-11  Jan Patera <patera@users.sourceforge.net>
 
        * libjpeg/jpeg-data.c: memory leak in jpeg_data_set_exif_data,
index a07ad3b..33a469f 100644 (file)
@@ -59,6 +59,9 @@ void exif_set_rational  (unsigned char *b, ExifByteOrder order,
 void exif_set_srational (unsigned char *b, ExifByteOrder order,
                         ExifSRational value);
 
+#undef  MIN
+#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
+
 /* For compatibility with older versions */
 #define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME
 
index 02b18f2..ca4f23c 100644 (file)
@@ -187,7 +187,7 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
        default:
                switch (entry->format) {
                case EXIF_FORMAT_ASCII:
-                 strncpy (val, entry->data, min(maxlen, entry->components));
+                 strncpy (val, entry->data, MIN(maxlen, entry->components));
                  break;
                case EXIF_FORMAT_SHORT:
                  vs = exif_get_short (entry->data, entry->order);