Update of /cvsroot/libexif/exif/exif
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6967/exif
Modified Files:
main.c utils.c utils.h
Log Message:
Fixed an issue with default tag values from the last check-in
Index: main.c
===================================================================
RCS file: /cvsroot/libexif/exif/exif/main.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -p -d -r1.69 -r1.70
--- main.c 13 Jan 2009 08:44:31 -0000 1.69
+++ main.c 13 Jan 2009 08:51:41 -0000 1.70
@@ -172,7 +172,7 @@ static unsigned int remove_tag = 0, crea
static unsigned int list_mnote = 0;
static unsigned int show_version = 0;
static const char *ifd_string = NULL, *tag_string = NULL;
-static ExifParams p = {0xffff, EXIF_IFD_COUNT, 0, 0, NULL, NULL, NULL};
+static ExifParams p = {EXIF_INVALID_TAG, EXIF_IFD_COUNT, 0, 0, NULL, NULL,NULL};
LogArg log_arg = {0, 0, 0};
int
@@ -266,7 +266,7 @@ main (int argc, const char **argv)
}
if (tag_string) {
p.tag = exif_tag_from_string (tag_string);
- if (p.tag == 0xffff) {
+ if (p.tag == EXIF_INVALID_TAG) {
exif_log (log, -1, "exif", _("Invalid tag '%s'!"),
tag_string);
return 1;
@@ -274,7 +274,7 @@ main (int argc, const char **argv)
}
/* Check for all necessary parameters */
- if ((p.tag == 0xffff) && (p.set_value || show_description)) {
+ if ((p.tag == EXIF_INVALID_TAG) && (p.set_value || show_description)) {
exif_log (log, -1, "exif", _("You need to specify a tag!"));
return 1;
}
@@ -364,7 +364,8 @@ main (int argc, const char **argv)
if (list_tags)
action_tag_table (ed, p);
- else if (p.tag && !p.set_value && !remove_tag)
+ else if ((p.tag != EXIF_INVALID_TAG) &&
+ !p.set_value && !remove_tag)
action_show_tag (ed, log, p);
else if (extract_thumbnail)
action_save_thumb (ed, log, p, fout);
Index: utils.c
===================================================================
RCS file: /cvsroot/libexif/exif/exif/utils.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -d -r1.11 -r1.12
--- utils.c 26 Nov 2008 08:34:06 -0000 1.11
+++ utils.c 13 Jan 2009 08:51:41 -0000 1.12
@@ -33,7 +33,7 @@ exif_tag_from_string (const char *string
const char *name;
if (!string)
- return 0xffff;
+ return EXIF_INVALID_TAG;
/* Is the string a decimal number? */
if (strspn (string, "0123456789") == strlen (string))
@@ -53,7 +53,7 @@ exif_tag_from_string (const char *string
if (name && !strcmp (string, name))
return (tag);
}
- return (0xffff);
+ return EXIF_INVALID_TAG;
}
ExifIfd
Index: utils.h
===================================================================
RCS file: /cvsroot/libexif/exif/exif/utils.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -d -r1.7 -r1.8
--- utils.h 26 Nov 2008 08:34:06 -0000 1.7
+++ utils.h 13 Jan 2009 08:51:41 -0000 1.8
@@ -25,6 +25,8 @@
#include <libexif/exif-tag.h>
#include <libexif/exif-ifd.h>
+enum {EXIF_INVALID_TAG = 0xffff};
+
ExifTag exif_tag_from_string (const char *string);
ExifIfd exif_ifd_from_string (const char *string);
size_t exif_mbstrlen(const char *mbs, size_t *len);
|