From: Dan F. <dfa...@us...> - 2008-11-25 20:37:57
|
Update of /cvsroot/libexif/exif/exif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv824/exif Modified Files: actions.c Log Message: Remove use of a deprecated function. Index: actions.c =================================================================== RCS file: /cvsroot/libexif/exif/exif/actions.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -p -d -r1.36 -r1.37 --- actions.c 19 Nov 2008 05:38:45 -0000 1.36 +++ actions.c 25 Nov 2008 20:37:48 -0000 1.37 @@ -365,20 +365,27 @@ action_tag_table (ExifData *ed, ExifPara unsigned int tag; const char *name; char txt[1024]; - unsigned int i; + ExifIfd i; memset (txt, 0, sizeof (txt)); snprintf (txt, sizeof (txt) - 1, _("EXIF tags in '%s':"), p.fin); fprintf (stdout, "%-38.38s", txt); - for (i = 0; i < EXIF_IFD_COUNT; i++) + for (i = (ExifIfd)0; i < EXIF_IFD_COUNT; i++) fprintf (stdout, "%-7.7s", exif_ifd_get_name (i)); fputc ('\n', stdout); + for (tag = 0; tag < 0xffff; tag++) { - name = exif_tag_get_title (tag); + /* + * Display the name of the first tag of this number found. + * Since there is some overlap (e.g. with GPS tags), this + * name could sometimes be incorrect for the specific tags + * found in this file. + */ + name = exif_tag_get_title(tag); if (!name) continue; fprintf (stdout, " 0x%04x %-29.29s", tag, C(name)); - for (i = 0; i < EXIF_IFD_COUNT; i++) + for (i = (ExifIfd)0; i < EXIF_IFD_COUNT; i++) if (exif_content_get_entry (ed->ifd[i], tag)) printf (ENTRY_FOUND); else @@ -557,7 +564,7 @@ show_entry_xml (ExifEntry *e, void *data fprintf (stdout, "</0x%04x>", e->tag); } else { int x; - strncpy (t, exif_tag_get_title (e->tag), sizeof (t)); + strncpy (t, exif_tag_get_title_in_ifd(e->tag, exif_entry_get_ifd(e)), sizeof (t)); /* Remove invalid characters from tag eg. (, ), space */ for (x = 0; x < strlen (t); x++) |