Update of /cvsroot/libexif/libexif/libexif/canon
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25739/libexif/canon
Modified Files:
mnote-canon-entry.c mnote-canon-tag.c
Log Message:
* Added support for a new macro NO_VERBOSE_TAG_DATA to allow
some size reduction but still retain the ability to properly
interpret each tag.
* Added an end-of-table marker in the Canon color_information
makernote table that could otherwise potentially cause a crash
on a bad image.
Index: mnote-canon-tag.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/canon/mnote-canon-tag.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -d -r1.14 -r1.15
--- mnote-canon-tag.c 30 Oct 2007 03:23:29 -0000 1.14
+++ mnote-canon-tag.c 14 Nov 2007 05:27:19 -0000 1.15
@@ -31,6 +31,7 @@ static const struct {
const char *title;
const char *description;
} table[] = {
+#ifndef NO_VERBOSE_TAG_STRINGS
{MNOTE_CANON_TAG_SETTINGS_1, "Settings1", N_("Settings (first part)"), ""},
{MNOTE_CANON_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal length"), ""},
{MNOTE_CANON_TAG_SETTINGS_2, "Settings2", N_("Settings (second part)"), ""},
@@ -42,6 +43,7 @@ static const struct {
{MNOTE_CANON_TAG_COLOR_INFORMATION, "ColorInformation", N_("Color information"), ""},
{MNOTE_CANON_TAG_SERIAL_NUMBER, "SerialNumber", N_("Serial number"), ""},
{MNOTE_CANON_TAG_CUSTOM_FUNCS, "CustomFunctions", N_("Custom functions"), ""},
+#endif
{0, NULL, NULL, NULL}
};
@@ -50,6 +52,7 @@ static const struct {
unsigned int subtag;
const char *name;
} table_sub[] = {
+#ifndef NO_VERBOSE_TAG_STRINGS
{MNOTE_CANON_TAG_SETTINGS_1, 0, N_("Macro mode")},
{MNOTE_CANON_TAG_SETTINGS_1, 1, N_("Self-timer")},
{MNOTE_CANON_TAG_SETTINGS_1, 2, N_("Quality")},
@@ -119,6 +122,7 @@ static const struct {
{MNOTE_CANON_TAG_COLOR_INFORMATION, 2, N_("Sharpness frequency")},
{MNOTE_CANON_TAG_COLOR_INFORMATION, 7, N_("White balance")},
{MNOTE_CANON_TAG_COLOR_INFORMATION, 9, N_("Picture style")},
+#endif
{0, 0, NULL}
};
Index: mnote-canon-entry.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/canon/mnote-canon-entry.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -d -r1.24 -r1.25
--- mnote-canon-entry.c 30 Oct 2007 03:23:29 -0000 1.24
+++ mnote-canon-entry.c 14 Nov 2007 05:27:19 -0000 1.25
@@ -72,6 +72,7 @@ static const struct canon_entry_table_t
ExifShort value;
const char *name;
} entries_settings_1 [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ 0, 1, N_("Macro")},
{ 0, 2, N_("Normal")},
{ 2, 1, N_("Economy")},
@@ -312,14 +313,18 @@ static const struct canon_entry_table_t
{40, 0x0500, N_("Full")},
{40, 0x0502, N_("2/3")},
{40, 0x0504, N_("1/3")},
+#endif
{ 0, 0, NULL}
},
entries_focal_length [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 1, N_("Fixed")},
{0, 2, N_("Zoom")},
+#endif
{0, 0, NULL}
},
entries_settings_2 [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ 6, 0, N_("Auto")},
{ 6, 1, N_("Sunny")},
{ 6, 2, N_("Cloudy")},
@@ -368,17 +373,21 @@ entries_settings_2 [] = {
{ 32, 0x0014, N_("1/3")},
{ 32, 0x008c, N_("2/3")},
{ 32, 0x07d0, N_("Full")},
+#endif
{0, 0, NULL}
},
entries_panorama [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 0, N_("Left to right")},
{0, 1, N_("Right to left")},
{0, 2, N_("Bottom to top")},
{0, 3, N_("Top to bottom")},
{0, 4, N_("2x2 matrix (clockwise)")},
+#endif
{0, 0, NULL}
},
color_information [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 0, N_("Standard")},
{0, 1, N_("Manual")},
{0, 2, N_("Custom")},
@@ -422,6 +431,8 @@ color_information [] = {
{9, 0x84, N_("Neutral")},
{9, 0x85, N_("Faithful")},
{9, 0x86, N_("Monochrome")},
+#endif
+ {0, 0, NULL}
};
static void
|