Lines Matching refs:maxlen
444 exif_entry_format_value(ExifEntry *e, char *val, size_t maxlen) in exif_entry_format_value() argument
457 if (!e->size || !maxlen) in exif_entry_format_value()
459 ++maxlen; /* include the terminating NUL */ in exif_entry_format_value()
462 snprintf (val, maxlen, _("%i bytes undefined data"), e->size); in exif_entry_format_value()
467 snprintf (val, maxlen, "0x%02x", v_byte); in exif_entry_format_value()
471 snprintf (val+len, maxlen-len, ", 0x%02x", v_byte); in exif_entry_format_value()
473 if (len >= maxlen-1) break; in exif_entry_format_value()
478 snprintf (val, maxlen, "%u", v_short); in exif_entry_format_value()
483 snprintf (val+len, maxlen-len, ", %u", v_short); in exif_entry_format_value()
485 if (len >= maxlen-1) break; in exif_entry_format_value()
490 snprintf (val, maxlen, "%i", v_sshort); in exif_entry_format_value()
496 snprintf (val+len, maxlen-len, ", %i", v_sshort); in exif_entry_format_value()
498 if (len >= maxlen-1) break; in exif_entry_format_value()
503 snprintf (val, maxlen, "%lu", (unsigned long) v_long); in exif_entry_format_value()
509 snprintf (val+len, maxlen-len, ", %lu", (unsigned long) v_long); in exif_entry_format_value()
511 if (len >= maxlen-1) break; in exif_entry_format_value()
516 snprintf (val, maxlen, "%li", (long) v_slong); in exif_entry_format_value()
521 snprintf (val+len, maxlen-len, ", %li", (long) v_slong); in exif_entry_format_value()
523 if (len >= maxlen-1) break; in exif_entry_format_value()
527 strncpy (val, (char *) e->data, MIN (maxlen-1, e->size)); in exif_entry_format_value()
528 val[MIN (maxlen-1, e->size)] = 0; in exif_entry_format_value()
534 snprintf (val+len, maxlen-len, ", "); in exif_entry_format_value()
547 snprintf (val+len, maxlen-len, "%2.*f", in exif_entry_format_value()
552 snprintf (val+len, maxlen-len, "%lu/%lu", in exif_entry_format_value()
556 if (len >= maxlen-1) break; in exif_entry_format_value()
563 snprintf (val+len, maxlen-len, ", "); in exif_entry_format_value()
570 snprintf (val+len, maxlen-len, "%2.*f", in exif_entry_format_value()
575 snprintf (val+len, maxlen-len, "%li/%li", in exif_entry_format_value()
579 if (len >= maxlen-1) break; in exif_entry_format_value()
585 snprintf (val, maxlen, _("%i bytes unsupported data type"), in exif_entry_format_value()
638 #define CF(entry,target,v,maxlen) \ argument
651 #define CC(entry,target,v,maxlen) \ argument
830 exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) in exif_entry_get_value() argument
865 if (!e || !e->parent || !e->parent->parent || !maxlen) in exif_entry_get_value()
869 memset (val, 0, maxlen); in exif_entry_get_value()
870 maxlen--; in exif_entry_get_value()
878 snprintf (val, maxlen, _("Invalid size of entry (%i, " in exif_entry_get_value()
899 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
907 strncpy (val, (char *) e->data + 8, MIN (e->size - 8, maxlen)); in exif_entry_get_value()
911 strncpy (val, _("Unsupported UNICODE string"), maxlen); in exif_entry_get_value()
919 strncpy (val, _("Unsupported JIS string"), maxlen); in exif_entry_get_value()
937 for (j = 0; (i < e->size) && (j < maxlen); i++, j++) { in exif_entry_get_value()
945 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
946 CC (e, 4, val, maxlen); in exif_entry_get_value()
947 strncpy (val, _("Unknown Exif Version"), maxlen); in exif_entry_get_value()
950 snprintf (val, maxlen, in exif_entry_get_value()
959 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
960 CC (e, 4, val, maxlen); in exif_entry_get_value()
962 strncpy (val, _("FlashPix Version 1.0"), maxlen); in exif_entry_get_value()
964 strncpy (val, _("FlashPix Version 1.01"), maxlen); in exif_entry_get_value()
966 strncpy (val, _("Unknown FlashPix Version"), maxlen); in exif_entry_get_value()
969 CF (e, EXIF_FORMAT_ASCII, val, maxlen); in exif_entry_get_value()
977 strncpy (val, (char *) e->data, MIN (maxlen, e->size)); in exif_entry_get_value()
979 strncpy (val, _("[None]"), maxlen); in exif_entry_get_value()
980 strncat (val, " ", maxlen - strlen (val)); in exif_entry_get_value()
981 strncat (val, _("(Photographer)"), maxlen - strlen (val)); in exif_entry_get_value()
984 strncat (val, " - ", maxlen - strlen (val)); in exif_entry_get_value()
992 strncat (val, (const char*)tagdata, MIN (maxlen - strlen (val), (size_t)remaining)); in exif_entry_get_value()
998 strncat (val, _("[None]"), maxlen - strlen (val)); in exif_entry_get_value()
999 strncat (val, " ", maxlen - strlen (val)); in exif_entry_get_value()
1000 strncat (val, _("(Editor)"), maxlen - strlen (val)); in exif_entry_get_value()
1004 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1005 CC (e, 1, val, maxlen); in exif_entry_get_value()
1008 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1012 snprintf (val, maxlen, "f/%.01f", d); in exif_entry_get_value()
1016 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1017 CC (e, 1, val, maxlen); in exif_entry_get_value()
1020 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1024 snprintf (val, maxlen, _("%.02f EV"), d); in exif_entry_get_value()
1026 if (maxlen > strlen (val) + strlen (b)) in exif_entry_get_value()
1027 strncat (val, b, maxlen - strlen (val)); in exif_entry_get_value()
1030 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1031 CC (e, 1, val, maxlen); in exif_entry_get_value()
1034 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1064 snprintf (val, maxlen, "%.1f mm", d); in exif_entry_get_value()
1065 if (maxlen > strlen (val) + strlen (b)) in exif_entry_get_value()
1066 strncat (val, b, maxlen - strlen (val)); in exif_entry_get_value()
1069 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1070 CC (e, 1, val, maxlen); in exif_entry_get_value()
1073 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1077 snprintf (val, maxlen, "%.1f m", d); in exif_entry_get_value()
1080 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1081 CC (e, 1, val, maxlen); in exif_entry_get_value()
1084 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1089 snprintf (val, maxlen, _("1/%i"), (int) (0.5 + 1. / d)); in exif_entry_get_value()
1091 snprintf (val, maxlen, "%i", (int) d); in exif_entry_get_value()
1092 if (maxlen > strlen (val) + strlen (_(" sec."))) in exif_entry_get_value()
1093 strncat (val, _(" sec."), maxlen - strlen (val)); in exif_entry_get_value()
1096 CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); in exif_entry_get_value()
1097 CC (e, 1, val, maxlen); in exif_entry_get_value()
1100 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1104 snprintf (val, maxlen, _("%.02f EV"), d); in exif_entry_get_value()
1110 strncat (val, b, maxlen - strlen (val)); in exif_entry_get_value()
1113 CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); in exif_entry_get_value()
1114 CC (e, 1, val, maxlen); in exif_entry_get_value()
1117 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1121 snprintf (val, maxlen, _("%.02f EV"), d); in exif_entry_get_value()
1124 if (maxlen > strlen (val) + strlen (b)) in exif_entry_get_value()
1125 strncat (val, b, maxlen - strlen (val)); in exif_entry_get_value()
1128 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
1129 CC (e, 1, val, maxlen); in exif_entry_get_value()
1132 strncpy (val, _("DSC"), maxlen); in exif_entry_get_value()
1134 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1138 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
1139 CC (e, 4, val, maxlen); in exif_entry_get_value()
1151 strncat (val, c, maxlen - strlen (val)); in exif_entry_get_value()
1153 strncat (val, " ", maxlen - strlen (val)); in exif_entry_get_value()
1157 CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); in exif_entry_get_value()
1158 CC (e, 1, val, maxlen); in exif_entry_get_value()
1161 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1165 snprintf (val, maxlen, _("%.02f EV"), d); in exif_entry_get_value()
1168 CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); in exif_entry_get_value()
1169 CC (e, 1, val, maxlen); in exif_entry_get_value()
1172 strncpy (val, _("Directly photographed"), maxlen); in exif_entry_get_value()
1174 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1178 CF (e, EXIF_FORMAT_SHORT, val, maxlen); in exif_entry_get_value()
1179 CC (e, 2, val, maxlen); in exif_entry_get_value()
1185 strncpy (val, _("YCbCr4:2:2"), maxlen); in exif_entry_get_value()
1187 strncpy (val, _("YCbCr4:2:0"), maxlen); in exif_entry_get_value()
1189 snprintf (val, maxlen, "%u, %u", v_short, v_short2); in exif_entry_get_value()
1192 CF (e, EXIF_FORMAT_SHORT, val, maxlen); in exif_entry_get_value()
1197 snprintf (val, maxlen, "(x,y) = (%i,%i)", in exif_entry_get_value()
1204 snprintf (val, maxlen, _("Within distance %i of " in exif_entry_get_value()
1213 snprintf (val, maxlen, _("Within rectangle " in exif_entry_get_value()
1219 snprintf (val, maxlen, _("Unexpected number " in exif_entry_get_value()
1226 CF (e, EXIF_FORMAT_BYTE, val, maxlen); in exif_entry_get_value()
1227 CC (e, 4, val, maxlen); in exif_entry_get_value()
1229 snprintf (val, maxlen, "%u", v_byte); in exif_entry_get_value()
1230 maxlen -= strlen (val); in exif_entry_get_value()
1234 strncat (val, b, maxlen); in exif_entry_get_value()
1235 maxlen -= strlen (b); in exif_entry_get_value()
1236 if ((signed)maxlen <= 0) break; in exif_entry_get_value()
1243 strncpy (val, (char *) e->data, MIN (maxlen, e->size)); in exif_entry_get_value()
1249 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1253 CF (e, EXIF_FORMAT_BYTE, val, maxlen); in exif_entry_get_value()
1254 CC (e, 1, val, maxlen); in exif_entry_get_value()
1257 strncpy (val, _("Sea level"), maxlen); in exif_entry_get_value()
1259 strncpy (val, _("Sea level reference"), maxlen); in exif_entry_get_value()
1261 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1266 CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); in exif_entry_get_value()
1267 CC (e, 3, val, maxlen); in exif_entry_get_value()
1271 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1280 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1289 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()
1293 snprintf (val, maxlen, "%02u:%02u:%05.2f", i, j, d); in exif_entry_get_value()
1305 CF (e,EXIF_FORMAT_SHORT, val, maxlen); in exif_entry_get_value()
1306 CC (e, 1, val, maxlen); in exif_entry_get_value()
1312 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1321 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1327 memset (val, 0, maxlen); in exif_entry_get_value()
1330 if ((maxlen > l) && (strlen (val) < l)) in exif_entry_get_value()
1331 strncpy (val, _(list2[i].elem[j].values[k]), maxlen); in exif_entry_get_value()
1333 if (!val[0]) snprintf (val, maxlen, "%i", v_short); in exif_entry_get_value()
1350 CF (e, EXIF_FORMAT_SHORT, val, maxlen); in exif_entry_get_value()
1351 CC (e, 1, val, maxlen); in exif_entry_get_value()
1357 snprintf (val, maxlen, _("Internal error (unknown " in exif_entry_get_value()
1365 snprintf (val, maxlen, "%i", v_short); in exif_entry_get_value()
1367 snprintf (val, maxlen, _("Unknown value %i"), v_short); in exif_entry_get_value()
1369 strncpy (val, _(list[i].strings[j]), maxlen); in exif_entry_get_value()
1390 exif_convert_utf16_to_utf8(val, utf16, maxlen); in exif_entry_get_value()
1397 exif_entry_format_value(e, val, maxlen); in exif_entry_get_value()