_Z12content_funcP10_ExifEntryPv:
   20|  71.8k|void content_func(ExifEntry *entry, void *user_data) {
   21|  71.8k|  char buf[10000];
   22|  71.8k|  exif_entry_get_value(entry, buf, sizeof(buf));
   23|  71.8k|}
_Z9data_funcP12_ExifContentPv:
   25|  55.8k|void data_func(ExifContent *content, void *user_data) {
   26|       |  exif_content_foreach_entry(content, content_func, NULL);
   27|  55.8k|}
LLVMFuzzerTestOneInput:
   56|  11.5k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   57|  11.5k|  ExifLoader *loader = exif_loader_new();
   58|  11.5k|  ExifData *exif_data;
   59|  11.5k|  if (!loader) {
  ------------------
  |  Branch (59:7): [True: 0, False: 11.5k]
  ------------------
   60|      0|    return 0;
   61|      0|  }
   62|  11.5k|  exif_loader_write(loader, const_cast<unsigned char*>(data), size);
   63|  11.5k|  exif_data = exif_loader_get_data(loader);
   64|  11.5k|  if(!exif_data) {
  ------------------
  |  Branch (64:6): [True: 347, False: 11.1k]
  ------------------
   65|    347|    exif_loader_unref(loader);
   66|    347|    return 0;
   67|    347|  }
   68|  11.1k|  exif_data_foreach_content(exif_data, data_func, NULL);
   69|  11.1k|  test_exif_data (exif_data);
   70|  11.1k|  exif_loader_unref(loader);
   71|  11.1k|  exif_data_unref(exif_data);
   72|  11.1k|  return 0;
   73|  11.5k|}
exif_loader_fuzzer.cc:_ZL14test_exif_dataP9_ExifData:
   30|  11.1k|test_exif_data (ExifData *d) {
   31|  11.1k|  unsigned int i, c;
   32|  11.1k|  char v[1024], *p;
   33|  11.1k|  ExifMnoteData *md;
   34|       |
   35|  11.1k|  md = exif_data_get_mnote_data (d);
   36|  11.1k|  if (!md) {
  ------------------
  |  Branch (36:7): [True: 4.00k, False: 7.15k]
  ------------------
   37|  4.00k|    return;
   38|  4.00k|  }
   39|       |
   40|  7.15k|  exif_mnote_data_ref (md);
   41|  7.15k|  exif_mnote_data_unref (md);
   42|       |
   43|  7.15k|  c = exif_mnote_data_count (md);
   44|  1.75M|  for (i = 0; i < c; i++) {
  ------------------
  |  Branch (44:15): [True: 1.74M, False: 5.04k]
  ------------------
   45|  1.74M|    const char *name = exif_mnote_data_get_name (md, i);
   46|  1.74M|    if (!name) {
  ------------------
  |  Branch (46:9): [True: 2.10k, False: 1.74M]
  ------------------
   47|  2.10k|      break;
   48|  2.10k|    }
   49|  1.74M|    exif_mnote_data_get_title (md, i);
   50|  1.74M|    exif_mnote_data_get_description (md, i);
   51|  1.74M|    exif_mnote_data_get_value (md, i, v, sizeof (v));
   52|  1.74M|  }
   53|  7.15k|}

exif_mnote_data_canon_identify:
  396|  3.25k|{
  397|  3.25k|	char value[8];
  398|       |
  399|  3.25k|	ExifEntry *em = exif_data_get_entry (ed, EXIF_TAG_MAKE);
  ------------------
  |  |  253|  3.25k|	(exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ?			\
  |  |  ------------------
  |  |  |  Branch (253:3): [True: 877, False: 2.37k]
  |  |  ------------------
  |  |  254|  3.25k|	 exif_content_get_entry(d->ifd[EXIF_IFD_0],t) :			\
  |  |  255|  3.25k|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ?			\
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 201, False: 2.17k]
  |  |  ------------------
  |  |  256|  2.37k|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) :			\
  |  |  257|  2.37k|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ?		\
  |  |  ------------------
  |  |  |  Branch (257:3): [True: 0, False: 2.17k]
  |  |  ------------------
  |  |  258|  2.17k|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) :		\
  |  |  259|  2.17k|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ?		\
  |  |  ------------------
  |  |  |  Branch (259:3): [True: 0, False: 2.17k]
  |  |  ------------------
  |  |  260|  2.17k|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) :		\
  |  |  261|  2.17k|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ?	\
  |  |  ------------------
  |  |  |  Branch (261:3): [True: 0, False: 2.17k]
  |  |  ------------------
  |  |  262|  2.17k|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)
  ------------------
  400|  3.25k|	if (!em) 
  ------------------
  |  Branch (400:6): [True: 2.17k, False: 1.07k]
  ------------------
  401|  2.17k|		return 0;
  402|       |
  403|  1.07k|	(void) e;  /* unused */
  404|  1.07k|	return !strcmp (exif_entry_get_value (em, value, sizeof (value)), "Canon");
  405|  3.25k|}
exif_mnote_data_canon_new:
  409|    934|{
  410|    934|	ExifMnoteData *d;
  411|    934|	ExifMnoteDataCanon *dc;
  412|       |
  413|    934|	if (!mem) return NULL;
  ------------------
  |  Branch (413:6): [True: 0, False: 934]
  ------------------
  414|       |
  415|    934|	d = exif_mem_alloc (mem, sizeof (ExifMnoteDataCanon));
  416|    934|	if (!d)
  ------------------
  |  Branch (416:6): [True: 0, False: 934]
  ------------------
  417|      0|		return NULL;
  418|       |
  419|    934|	exif_mnote_data_construct (d, mem);
  420|       |
  421|       |	/* Set up function pointers */
  422|    934|	d->methods.free            = exif_mnote_data_canon_free;
  423|    934|	d->methods.set_byte_order  = exif_mnote_data_canon_set_byte_order;
  424|    934|	d->methods.set_offset      = exif_mnote_data_canon_set_offset;
  425|    934|	d->methods.load            = exif_mnote_data_canon_load;
  426|    934|	d->methods.save            = exif_mnote_data_canon_save;
  427|    934|	d->methods.count           = exif_mnote_data_canon_count;
  428|    934|	d->methods.get_id          = exif_mnote_data_canon_get_id;
  429|    934|	d->methods.get_name        = exif_mnote_data_canon_get_name;
  430|    934|	d->methods.get_title       = exif_mnote_data_canon_get_title;
  431|    934|	d->methods.get_description = exif_mnote_data_canon_get_description;
  432|    934|	d->methods.get_value       = exif_mnote_data_canon_get_value;
  433|       |
  434|    934|	dc = (ExifMnoteDataCanon*)d;
  435|    934|	dc->options = o;
  436|    934|	return d;
  437|    934|}
exif-mnote-data-canon.c:exif_mnote_data_canon_free:
   61|    934|{
   62|    934|	if (!n) return;
  ------------------
  |  Branch (62:6): [True: 0, False: 934]
  ------------------
   63|       |
   64|    934|	exif_mnote_data_canon_clear ((ExifMnoteDataCanon *) n);
   65|    934|}
exif-mnote-data-canon.c:exif_mnote_data_canon_clear:
   41|  1.86k|{
   42|  1.86k|	ExifMnoteData *d = (ExifMnoteData *) n;
   43|  1.86k|	unsigned int i;
   44|       |
   45|  1.86k|	if (!n) return;
  ------------------
  |  Branch (45:6): [True: 0, False: 1.86k]
  ------------------
   46|       |
   47|  1.86k|	if (n->entries) {
  ------------------
  |  Branch (47:6): [True: 928, False: 934]
  ------------------
   48|  12.1k|		for (i = 0; i < n->count; i++)
  ------------------
  |  Branch (48:15): [True: 11.2k, False: 928]
  ------------------
   49|  11.2k|			if (n->entries[i].data) {
  ------------------
  |  Branch (49:8): [True: 11.2k, False: 0]
  ------------------
   50|  11.2k|				exif_mem_free (d->mem, n->entries[i].data);
   51|  11.2k|				n->entries[i].data = NULL;
   52|  11.2k|			}
   53|    928|		exif_mem_free (d->mem, n->entries);
   54|       |		n->entries = NULL;
   55|    928|		n->count = 0;
   56|    928|	}
   57|  1.86k|}
exif-mnote-data-canon.c:exif_mnote_data_canon_set_byte_order:
  100|    934|{
  101|    934|	ExifByteOrder o_orig;
  102|    934|	ExifMnoteDataCanon *n = (ExifMnoteDataCanon *) d;
  103|    934|	unsigned int i;
  104|       |
  105|    934|	if (!n) return;
  ------------------
  |  Branch (105:6): [True: 0, False: 934]
  ------------------
  106|       |
  107|    934|	o_orig = n->order;
  108|    934|	n->order = o;
  109|    934|	for (i = 0; i < n->count; i++) {
  ------------------
  |  Branch (109:14): [True: 0, False: 934]
  ------------------
  110|      0|		if (n->entries[i].components && (n->entries[i].size/n->entries[i].components < exif_format_get_size (n->entries[i].format)))
  ------------------
  |  Branch (110:7): [True: 0, False: 0]
  |  Branch (110:35): [True: 0, False: 0]
  ------------------
  111|      0|			continue;
  112|      0|		n->entries[i].order = o;
  113|      0|		exif_array_set_byte_order (n->entries[i].format, n->entries[i].data,
  114|      0|				n->entries[i].components, o_orig, o);
  115|      0|	}
  116|    934|}
exif-mnote-data-canon.c:exif_mnote_data_canon_set_offset:
  120|    934|{
  121|    934|	if (n) ((ExifMnoteDataCanon *) n)->offset = o;
  ------------------
  |  Branch (121:6): [True: 934, False: 0]
  ------------------
  122|    934|}
exif-mnote-data-canon.c:exif_mnote_data_canon_load:
  209|    934|{
  210|    934|	ExifMnoteDataCanon *n = (ExifMnoteDataCanon *) ne;
  211|    934|	ExifShort c;
  212|    934|	size_t i, tcount, o, datao;
  213|    934|	long failsafe_size = 0;
  214|       |
  215|    934|	if (!n) return;
  ------------------
  |  Branch (215:6): [True: 0, False: 934]
  ------------------
  216|       |
  217|    934|	if (!buf || !buf_size) {
  ------------------
  |  Branch (217:6): [True: 0, False: 934]
  |  Branch (217:14): [True: 0, False: 934]
  ------------------
  218|      0|		exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  219|      0|			  "ExifMnoteCanon", "Short MakerNote");
  220|      0|		return;
  221|      0|	}
  222|    934|	if (exif_check_overflow (n->offset, buf_size, 8)) {
  ------------------
  |  Branch (222:6): [True: 0, False: 934]
  ------------------
  223|      0|		exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  224|      0|			  "ExifMnoteCanon", "Short MakerNote");
  225|      0|		return;
  226|      0|	}
  227|    934|	datao = 6 + n->offset;
  228|       |
  229|       |	/* Read the number of tags */
  230|    934|	c = exif_get_short (buf + datao, n->order);
  231|    934|	datao += 2;
  232|       |	/* Just use an arbitrary max tag limit here to avoid needing to much memory or time. There are 24 named tags currently.
  233|       |	 * current 2020 camera EOS M6 Mark 2 had 156 entries.
  234|       |	 * The format allows specifying the same range of memory as often as it can, so this multiplies quickly. */
  235|    934|	if (c > 250) {
  ------------------
  |  Branch (235:6): [True: 6, False: 928]
  ------------------
  236|      6|		exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteCanon", "Too much tags (%d) in Canon MakerNote", c);
  237|      6|		return;
  238|      6|	}
  239|       |
  240|       |	/* Remove any old entries */
  241|    928|	exif_mnote_data_canon_clear (n);
  242|       |
  243|       |	/* Reserve enough space for all the possible MakerNote tags */
  244|    928|	n->entries = exif_mem_alloc (ne->mem, sizeof (MnoteCanonEntry) * c);
  245|    928|	if (!n->entries) {
  ------------------
  |  Branch (245:6): [True: 0, False: 928]
  ------------------
  246|      0|		EXIF_LOG_NO_MEMORY(ne->log, "ExifMnoteCanon", sizeof (MnoteCanonEntry) * c);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  247|      0|		return;
  248|      0|	}
  249|       |
  250|       |	/* Parse the entries */
  251|    928|	tcount = 0;
  252|  49.6k|	for (i = c, o = datao; i; --i, o += 12) {
  ------------------
  |  Branch (252:25): [True: 49.5k, False: 132]
  ------------------
  253|  49.5k|		size_t s;
  254|       |
  255|  49.5k|		memset(&n->entries[tcount], 0, sizeof(MnoteCanonEntry));
  256|  49.5k|		if (exif_check_overflow (o,buf_size,12)) {
  ------------------
  |  Branch (256:7): [True: 787, False: 48.7k]
  ------------------
  257|    787|			exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  258|    787|				"ExifMnoteCanon", "Short MakerNote");
  259|    787|			break;
  260|    787|		}
  261|       |
  262|  48.7k|		n->entries[tcount].tag        = exif_get_short (buf + o, n->order);
  263|  48.7k|		n->entries[tcount].format     = exif_get_short (buf + o + 2, n->order);
  264|  48.7k|		n->entries[tcount].components = exif_get_long (buf + o + 4, n->order);
  265|  48.7k|		n->entries[tcount].order      = n->order;
  266|       |
  267|  48.7k|		exif_log (ne->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteCanon",
  268|  48.7k|			"Loading entry 0x%x ('%s')...", n->entries[tcount].tag,
  269|  48.7k|			 mnote_canon_tag_get_name (n->entries[tcount].tag));
  270|       |
  271|       |		/* Check if we overflow the multiplication. Use buf_size as the max size for integer overflow detection,
  272|       |		 * we will check the buffer sizes closer later. */
  273|  48.7k|		if (exif_check_mul_overflow (exif_format_get_size (n->entries[tcount].format),
  ------------------
  |  Branch (273:7): [True: 4.14k, False: 44.6k]
  ------------------
  274|  48.7k|				n->entries[tcount].components, buf_size, &s)) {
  275|  4.14k|			exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  276|  4.14k|				  "ExifMnoteCanon", "Tag size overflow detected (%u * %lu)", exif_format_get_size (n->entries[tcount].format), n->entries[tcount].components);
  277|  4.14k|			continue;
  278|  4.14k|		}
  279|       |
  280|       |		/*
  281|       |		 * Size? If bigger than 4 bytes, the actual data is not
  282|       |		 * in the entry but somewhere else (offset).
  283|       |		 */
  284|  44.6k|		n->entries[tcount].size = s;
  285|  44.6k|		if (!s) {
  ------------------
  |  Branch (285:7): [True: 32.4k, False: 12.2k]
  ------------------
  286|  32.4k|			exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  287|  32.4k|				  "ExifMnoteCanon",
  288|  32.4k|				  "Invalid zero-length tag size");
  289|  32.4k|			continue;
  290|       |
  291|  32.4k|		} else {
  292|  12.2k|			size_t dataofs = o + 8;
  293|  12.2k|			if (s > 4) dataofs = exif_get_long (buf + dataofs, n->order) + 6;
  ------------------
  |  Branch (293:8): [True: 8.76k, False: 3.44k]
  ------------------
  294|       |
  295|  12.2k|			if (exif_check_overflow (dataofs, buf_size, s)) {
  ------------------
  |  Branch (295:8): [True: 953, False: 11.2k]
  ------------------
  296|    953|				exif_log (ne->log, EXIF_LOG_CODE_DEBUG,
  297|    953|					"ExifMnoteCanon",
  298|    953|					"Tag data past end of buffer (%u > %u)",
  299|    953|					(unsigned)(dataofs + s), buf_size);
  300|    953|				continue;
  301|    953|			}
  302|       |
  303|  11.2k|			n->entries[tcount].data = exif_mem_alloc (ne->mem, s);
  304|  11.2k|			if (!n->entries[tcount].data) {
  ------------------
  |  Branch (304:8): [True: 0, False: 11.2k]
  ------------------
  305|      0|				EXIF_LOG_NO_MEMORY(ne->log, "ExifMnoteCanon", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  306|      0|				continue;
  307|      0|			}
  308|  11.2k|			memcpy (n->entries[tcount].data, buf + dataofs, s);
  309|  11.2k|		}
  310|       |
  311|       |		/* Track the size of decoded tag data. A malicious file could
  312|       |		 * be crafted to cause extremely large values here without
  313|       |		 * tripping any buffer range checks.  This is especially bad
  314|       |		 * with the libexif representation of Canon MakerNotes because
  315|       |		 * some arrays are turned into individual tags that the
  316|       |		 * application must loop around. */
  317|  11.2k|		failsafe_size += mnote_canon_entry_count_values(&n->entries[tcount]);
  318|       |
  319|  11.2k|		if (failsafe_size > FAILSAFE_SIZE_MAX) {
  ------------------
  |  |   37|  11.2k|#define FAILSAFE_SIZE_MAX 1000000L
  ------------------
  |  Branch (319:7): [True: 9, False: 11.2k]
  ------------------
  320|       |			/* Abort if the total size of the data in the tags extraordinarily large, */
  321|      9|			exif_mem_free (ne->mem, n->entries[tcount].data);
  322|      9|			exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA,
  323|      9|					  "ExifMnoteCanon", "Failsafe tag size overflow (%lu > %ld)",
  324|      9|					  failsafe_size, FAILSAFE_SIZE_MAX);
  ------------------
  |  |   37|      9|#define FAILSAFE_SIZE_MAX 1000000L
  ------------------
  325|      9|			break;
  326|      9|		}
  327|       |
  328|       |		/* Tag was successfully parsed */
  329|  11.2k|		++tcount;
  330|  11.2k|	}
  331|       |	/* Store the count of successfully parsed tags */
  332|    928|	n->count = tcount;
  333|    928|}
exif-mnote-data-canon.c:exif_mnote_data_canon_count:
  337|    934|{
  338|    934|	ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) n;
  339|    934|	unsigned int i, c;
  340|       |
  341|  12.1k|	for (i = c = 0; dc && (i < dc->count); i++)
  ------------------
  |  Branch (341:18): [True: 12.1k, False: 0]
  |  Branch (341:24): [True: 11.2k, False: 934]
  ------------------
  342|  11.2k|		c += mnote_canon_entry_count_values (&dc->entries[i]);
  343|    934|	return c;
  344|    934|}
exif-mnote-data-canon.c:exif_mnote_data_canon_get_tags:
   70|  6.68M|{
   71|  6.68M|	unsigned int from = 0, to;
   72|       |
   73|  6.68M|	if (s) *s = 0;
  ------------------
  |  Branch (73:6): [True: 5.01M, False: 1.67M]
  ------------------
   74|       |
   75|  6.68M|	if (!dc || !m) return;
  ------------------
  |  Branch (75:6): [True: 0, False: 6.68M]
  |  Branch (75:13): [True: 0, False: 6.68M]
  ------------------
   76|   155M|	for (*m = 0; *m < dc->count; (*m)++) {
  ------------------
  |  Branch (76:15): [True: 155M, False: 0]
  ------------------
   77|   155M|		to = from + mnote_canon_entry_count_values (&dc->entries[*m]);
   78|   155M|		if (to > n) {
  ------------------
  |  Branch (78:7): [True: 6.68M, False: 148M]
  ------------------
   79|  6.68M|			if (s) *s = n - from;
  ------------------
  |  Branch (79:8): [True: 5.01M, False: 1.67M]
  ------------------
   80|  6.68M|			break;
   81|  6.68M|		}
   82|   148M|		from = to;
   83|   148M|	}
   84|  6.68M|}
exif-mnote-data-canon.c:exif_mnote_data_canon_get_name:
  360|  1.67M|{
  361|  1.67M|	ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) note;
  362|  1.67M|	unsigned int m, s;
  363|       |
  364|  1.67M|	if (!dc) return NULL;
  ------------------
  |  Branch (364:6): [True: 0, False: 1.67M]
  ------------------
  365|  1.67M|	exif_mnote_data_canon_get_tags (dc, i, &m, &s);
  366|  1.67M|	if (m >= dc->count) return NULL;
  ------------------
  |  Branch (366:6): [True: 0, False: 1.67M]
  ------------------
  367|  1.67M|	return mnote_canon_tag_get_name_sub (dc->entries[m].tag, s, dc->options);
  368|  1.67M|}
exif-mnote-data-canon.c:exif_mnote_data_canon_get_title:
  372|  1.67M|{
  373|  1.67M|	ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) note;
  374|  1.67M|	unsigned int m, s;
  375|       |
  376|  1.67M|	if (!dc) return NULL;
  ------------------
  |  Branch (376:6): [True: 0, False: 1.67M]
  ------------------
  377|  1.67M|	exif_mnote_data_canon_get_tags (dc, i, &m, &s);
  378|  1.67M|	if (m >= dc->count) return NULL;
  ------------------
  |  Branch (378:6): [True: 0, False: 1.67M]
  ------------------
  379|  1.67M|	return mnote_canon_tag_get_title_sub (dc->entries[m].tag, s, dc->options);
  380|  1.67M|}
exif-mnote-data-canon.c:exif_mnote_data_canon_get_description:
  384|  1.67M|{
  385|  1.67M|	ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) note;
  386|  1.67M|	unsigned int m;
  387|       |
  388|  1.67M|	if (!dc) return NULL;
  ------------------
  |  Branch (388:6): [True: 0, False: 1.67M]
  ------------------
  389|  1.67M|	exif_mnote_data_canon_get_tags (dc, i, &m, NULL);
  390|  1.67M|	if (m >= dc->count) return NULL;
  ------------------
  |  Branch (390:6): [True: 0, False: 1.67M]
  ------------------
  391|  1.67M|	return mnote_canon_tag_get_description (dc->entries[m].tag);
  392|  1.67M|}
exif-mnote-data-canon.c:exif_mnote_data_canon_get_value:
   88|  1.67M|{
   89|  1.67M|	ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) note;
   90|  1.67M|	unsigned int m, s;
   91|       |
   92|  1.67M|	if (!dc) return NULL;
  ------------------
  |  Branch (92:6): [True: 0, False: 1.67M]
  ------------------
   93|  1.67M|	exif_mnote_data_canon_get_tags (dc, n, &m, &s);
   94|  1.67M|	if (m >= dc->count) return NULL;
  ------------------
  |  Branch (94:6): [True: 0, False: 1.67M]
  ------------------
   95|  1.67M|	return mnote_canon_entry_get_value (&dc->entries[m], s, val, maxlen);
   96|  1.67M|}

mnote_canon_entry_count_values:
  505|   155M|{
  506|   155M|	unsigned int  val;
  507|       |
  508|   155M|	if (!entry) return 0;
  ------------------
  |  Branch (508:6): [True: 0, False: 155M]
  ------------------
  509|       |
  510|   155M|	switch (entry->tag) {
  511|   160k|	case MNOTE_CANON_TAG_FOCAL_LENGTH:
  ------------------
  |  Branch (511:2): [True: 160k, False: 155M]
  ------------------
  512|   160k|	case MNOTE_CANON_TAG_PANORAMA:
  ------------------
  |  Branch (512:2): [True: 465, False: 155M]
  ------------------
  513|   160k|		return entry->components;
  514|   491k|	case MNOTE_CANON_TAG_SETTINGS_1:
  ------------------
  |  Branch (514:2): [True: 491k, False: 155M]
  ------------------
  515|  1.34M|	case MNOTE_CANON_TAG_SETTINGS_2:
  ------------------
  |  Branch (515:2): [True: 856k, False: 154M]
  ------------------
  516|   151M|	case MNOTE_CANON_TAG_CUSTOM_FUNCS:
  ------------------
  |  Branch (516:2): [True: 150M, False: 5.46M]
  ------------------
  517|   151M|	case MNOTE_CANON_TAG_COLOR_INFORMATION:
  ------------------
  |  Branch (517:2): [True: 78.8k, False: 155M]
  ------------------
  518|   151M|		if (entry->format != EXIF_FORMAT_SHORT) return 0;
  ------------------
  |  Branch (518:7): [True: 24.2k, False: 151M]
  ------------------
  519|       |
  520|   151M|		val = exif_get_short (entry->data, entry->order);
  521|       |		/* val is buffer size, i.e. # of values plus 1 */
  522|   151M|		return MIN (entry->size - 2, val) / 2;
  ------------------
  |  |  182|   151M|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 147M, False: 4.26M]
  |  |  ------------------
  ------------------
  523|  3.87M|	default:
  ------------------
  |  Branch (523:2): [True: 3.87M, False: 151M]
  ------------------
  524|  3.87M|		return 1;
  525|   155M|	}
  526|   155M|}
mnote_canon_entry_get_value:
  552|  1.67M|{
  553|  1.67M|	char buf[128];
  554|  1.67M|	ExifLong vl;
  555|  1.67M|	ExifSLong vsl;
  556|  1.67M|	ExifShort vs, n;
  557|  1.67M|	ExifSShort vss;
  558|  1.67M|	unsigned char *data;
  559|  1.67M|	size_t	size;
  560|  1.67M|	double d;
  561|       |
  562|  1.67M|	if (!entry) 
  ------------------
  |  Branch (562:6): [True: 0, False: 1.67M]
  ------------------
  563|      0|		return NULL;
  564|  1.67M|	if (maxlen < 1)
  ------------------
  |  Branch (564:6): [True: 0, False: 1.67M]
  ------------------
  565|      0|		return NULL;
  566|       |
  567|  1.67M|	data = entry->data;
  568|  1.67M|	size = entry->size;
  569|       |
  570|  1.67M|	memset (val, 0, maxlen);
  571|  1.67M|	maxlen--;
  572|       |
  573|  1.67M|	switch (entry->tag) {
  574|  3.43k|	case MNOTE_CANON_TAG_SETTINGS_1:
  ------------------
  |  Branch (574:2): [True: 3.43k, False: 1.66M]
  ------------------
  575|  3.43k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|  3.43k|#define CF(format,target,v,maxlen)                              \
  |  |   37|  3.43k|{                                                               \
  |  |   38|  3.43k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 0, False: 3.43k]
  |  |  ------------------
  |  |   39|      0|                snprintf (v, maxlen,                            \
  |  |   40|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|      0|                        "expected '%s'."),                      \
  |  |   42|      0|                        exif_format_get_name (format),          \
  |  |   43|      0|                        exif_format_get_name (target));         \
  |  |   44|      0|                break;                                          \
  |  |   45|      0|        }                                                       \
  |  |   46|  3.43k|}
  ------------------
  576|       |
  577|  3.43k|		if (size < 2) return NULL;
  ------------------
  |  Branch (577:7): [True: 0, False: 3.43k]
  ------------------
  578|  3.43k|		n = exif_get_short (data, entry->order) / 2;
  579|  3.43k|		if (t >= n) return NULL;
  ------------------
  |  Branch (579:7): [True: 0, False: 3.43k]
  ------------------
  580|       |
  581|  3.43k|		CC (entry->components, n, val, maxlen)
  ------------------
  |  |   48|  3.43k|#define CC(number,target,v,maxlen)                                      \
  |  |   49|  3.43k|{                                                                       \
  |  |   50|  3.43k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 920, False: 2.51k]
  |  |  ------------------
  |  |   51|    920|                snprintf (v, maxlen,                                    \
  |  |   52|    920|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    920|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    920|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    920|                break;                                                  \
  |  |   55|    920|        }                                                               \
  |  |   56|  3.43k|}
  ------------------
  582|       |
  583|  2.51k|		if (size < 2 + t*2 + 2) return NULL;
  ------------------
  |  Branch (583:7): [True: 0, False: 2.51k]
  ------------------
  584|  2.51k|		vs = exif_get_short (data + 2 + t * 2, entry->order);
  585|  2.51k|		switch (t) {
  586|    515|		case 1:
  ------------------
  |  Branch (586:3): [True: 515, False: 1.99k]
  ------------------
  587|    515|			if (!vs) {
  ------------------
  |  Branch (587:8): [True: 199, False: 316]
  ------------------
  588|    199|				strncpy(val, _("Off"), maxlen);
  ------------------
  |  |   31|    199|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  589|    199|				break;
  590|    199|			}
  591|    316|			snprintf (val, maxlen, _("%i (ms)"), vs * 100);
  ------------------
  |  |   31|    316|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  592|    316|			break;
  593|      0|		case 15:
  ------------------
  |  Branch (593:3): [True: 0, False: 2.51k]
  ------------------
  594|      0|			if (((vs & 0xC000) == 0x4000) && (vs != 0x7FFF)) {
  ------------------
  |  Branch (594:8): [True: 0, False: 0]
  |  Branch (594:37): [True: 0, False: 0]
  ------------------
  595|       |				/* Canon S3 IS - directly specified value */
  596|      0|				snprintf (val, maxlen, "%i", vs & ~0x4000);
  597|      0|			} else {
  598|       |				/* Standard Canon - index into lookup table */
  599|      0|				canon_search_table_value (entries_settings_1, t, vs, val, maxlen);
  600|      0|			}
  601|      0|			break;
  602|      0|		case 22:
  ------------------
  |  Branch (602:3): [True: 0, False: 2.51k]
  ------------------
  603|      0|		case 23:
  ------------------
  |  Branch (603:3): [True: 0, False: 2.51k]
  ------------------
  604|      0|		case 24:
  ------------------
  |  Branch (604:3): [True: 0, False: 2.51k]
  ------------------
  605|      0|			snprintf (val, maxlen, "%u", vs);
  606|      0|			break;
  607|      0|		case 25:
  ------------------
  |  Branch (607:3): [True: 0, False: 2.51k]
  ------------------
  608|      0|		case 26:
  ------------------
  |  Branch (608:3): [True: 0, False: 2.51k]
  ------------------
  609|      0|			snprintf (val, maxlen, "%.2f", apex_value_to_aperture (vs / 32.0));
  610|      0|			break;
  611|      0|		case 28:
  ------------------
  |  Branch (611:3): [True: 0, False: 2.51k]
  ------------------
  612|      0|			canon_search_table_bitfield(entries_settings_1, t, vs, val, maxlen);
  613|      0|			break;
  614|      0|		case 34:
  ------------------
  |  Branch (614:3): [True: 0, False: 2.51k]
  ------------------
  615|      0|			snprintf (val, maxlen, "%.2f", vs / 10.0);
  616|      0|			break;
  617|      0|		case 35:
  ------------------
  |  Branch (617:3): [True: 0, False: 2.51k]
  ------------------
  618|      0|		case 36:
  ------------------
  |  Branch (618:3): [True: 0, False: 2.51k]
  ------------------
  619|      0|			snprintf (val, maxlen, "%u", vs);
  620|      0|			break;
  621|  1.99k|		default:
  ------------------
  |  Branch (621:3): [True: 1.99k, False: 515]
  ------------------
  622|  1.99k|			canon_search_table_value (entries_settings_1, t, vs, val, maxlen);
  623|  2.51k|		}
  624|  2.51k|		break;
  625|       |
  626|  2.51k|	case MNOTE_CANON_TAG_FOCAL_LENGTH:
  ------------------
  |  Branch (626:2): [True: 1.46k, False: 1.67M]
  ------------------
  627|  1.46k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|  1.46k|#define CF(format,target,v,maxlen)                              \
  |  |   37|  1.46k|{                                                               \
  |  |   38|  1.46k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 371, False: 1.09k]
  |  |  ------------------
  |  |   39|    371|                snprintf (v, maxlen,                            \
  |  |   40|    371|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    371|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|    371|                        "expected '%s'."),                      \
  |  |   42|    371|                        exif_format_get_name (format),          \
  |  |   43|    371|                        exif_format_get_name (target));         \
  |  |   44|    371|                break;                                          \
  |  |   45|    371|        }                                                       \
  |  |   46|  1.46k|}
  ------------------
  628|  1.09k|		if (size < t*2 + 2) return NULL;
  ------------------
  |  Branch (628:7): [True: 0, False: 1.09k]
  ------------------
  629|  1.09k|		vs = exif_get_short (data + t * 2, entry->order);
  630|  1.09k|		switch (t) {
  631|    278|		case 1:
  ------------------
  |  Branch (631:3): [True: 278, False: 820]
  ------------------
  632|    278|			snprintf (val, maxlen, "%u", vs);
  633|    278|			break;
  634|    268|		case 2:
  ------------------
  |  Branch (634:3): [True: 268, False: 830]
  ------------------
  635|    534|		case 3:
  ------------------
  |  Branch (635:3): [True: 266, False: 832]
  ------------------
  636|    534|			snprintf (val, maxlen, _("%.2f mm"), vs * 25.4 / 1000);
  ------------------
  |  |   31|    534|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  637|    534|			break;
  638|    286|		default:
  ------------------
  |  Branch (638:3): [True: 286, False: 812]
  ------------------
  639|    286|			canon_search_table_value (entries_focal_length, t, vs, val, maxlen);
  640|  1.09k|		}
  641|  1.09k|		break;
  642|       |
  643|  6.25k|	case MNOTE_CANON_TAG_SETTINGS_2:
  ------------------
  |  Branch (643:2): [True: 6.25k, False: 1.66M]
  ------------------
  644|  6.25k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|  6.25k|#define CF(format,target,v,maxlen)                              \
  |  |   37|  6.25k|{                                                               \
  |  |   38|  6.25k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 0, False: 6.25k]
  |  |  ------------------
  |  |   39|      0|                snprintf (v, maxlen,                            \
  |  |   40|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|      0|                        "expected '%s'."),                      \
  |  |   42|      0|                        exif_format_get_name (format),          \
  |  |   43|      0|                        exif_format_get_name (target));         \
  |  |   44|      0|                break;                                          \
  |  |   45|      0|        }                                                       \
  |  |   46|  6.25k|}
  ------------------
  645|  6.25k|		if (size < 2) return NULL;
  ------------------
  |  Branch (645:7): [True: 0, False: 6.25k]
  ------------------
  646|  6.25k|		n = exif_get_short (data, entry->order) / 2;
  647|  6.25k|		if (t >= n) return NULL;
  ------------------
  |  Branch (647:7): [True: 0, False: 6.25k]
  ------------------
  648|  6.25k|		CC (entry->components, n, val, maxlen)
  ------------------
  |  |   48|  6.25k|#define CC(number,target,v,maxlen)                                      \
  |  |   49|  6.25k|{                                                                       \
  |  |   50|  6.25k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 860, False: 5.39k]
  |  |  ------------------
  |  |   51|    860|                snprintf (v, maxlen,                                    \
  |  |   52|    860|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    860|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    860|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    860|                break;                                                  \
  |  |   55|    860|        }                                                               \
  |  |   56|  6.25k|}
  ------------------
  649|  5.39k|		if (size < 2 + t*2 + 2) return NULL;
  ------------------
  |  Branch (649:7): [True: 0, False: 5.39k]
  ------------------
  650|  5.39k|		vss = exif_get_sshort (data + 2 + t * 2, entry->order);
  651|  5.39k|		switch (t) {
  652|    636|		case 0:
  ------------------
  |  Branch (652:3): [True: 636, False: 4.75k]
  ------------------
  653|    636|			snprintf (val, maxlen, "%.3f", pow (2, vss / 32.0));
  654|    636|			break;
  655|    636|		case 1:
  ------------------
  |  Branch (655:3): [True: 636, False: 4.75k]
  ------------------
  656|    636|			snprintf (val, maxlen, "%.0f", apex_value_to_iso_speed (vss / 32.0));
  657|    636|			break;
  658|    636|		case 2:
  ------------------
  |  Branch (658:3): [True: 636, False: 4.75k]
  ------------------
  659|  1.18k|		case 5:
  ------------------
  |  Branch (659:3): [True: 553, False: 4.84k]
  ------------------
  660|  1.18k|		case 14:
  ------------------
  |  Branch (660:3): [True: 0, False: 5.39k]
  ------------------
  661|  1.18k|		case 16:
  ------------------
  |  Branch (661:3): [True: 0, False: 5.39k]
  ------------------
  662|  1.18k|			snprintf (val, maxlen, _("%.2f EV"), vss / 32.0);
  ------------------
  |  |   31|  1.18k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  663|  1.18k|			break;
  664|    636|		case 3:
  ------------------
  |  Branch (664:3): [True: 636, False: 4.75k]
  ------------------
  665|    636|		case 20:
  ------------------
  |  Branch (665:3): [True: 0, False: 5.39k]
  ------------------
  666|    636|			snprintf (val, maxlen, "%.2f", apex_value_to_aperture (vss / 32.0));
  667|    636|			break;
  668|    636|		case 4:
  ------------------
  |  Branch (668:3): [True: 636, False: 4.75k]
  ------------------
  669|    636|		case 21:
  ------------------
  |  Branch (669:3): [True: 0, False: 5.39k]
  ------------------
  670|    636|			d = apex_value_to_shutter_speed (vss / 32.0);
  671|    636|			if (d < 1)
  ------------------
  |  Branch (671:8): [True: 290, False: 346]
  ------------------
  672|    290|				snprintf (val, maxlen, _("1/%.0f"), 1.0 / d);
  ------------------
  |  |   31|    290|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  673|    346|			else
  674|    346|				snprintf (val, maxlen, "%.0f", d);
  675|    636|			break;
  676|    549|		case 8:
  ------------------
  |  Branch (676:3): [True: 549, False: 4.84k]
  ------------------
  677|    549|			snprintf (val, maxlen, "%u", vss);
  678|    549|			break;
  679|      0|		case 12:
  ------------------
  |  Branch (679:3): [True: 0, False: 5.39k]
  ------------------
  680|      0|			snprintf (val, maxlen, "%.2f", vss / 32.0);
  681|      0|			break;
  682|      0|		case 18:
  ------------------
  |  Branch (682:3): [True: 0, False: 5.39k]
  ------------------
  683|      0|		case 19:
  ------------------
  |  Branch (683:3): [True: 0, False: 5.39k]
  ------------------
  684|      0|			snprintf (val, maxlen, _("%u mm"), vss);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  685|      0|			break;
  686|      0|		case 28:
  ------------------
  |  Branch (686:3): [True: 0, False: 5.39k]
  ------------------
  687|      0|			if (vss <= 0) {
  ------------------
  |  Branch (687:8): [True: 0, False: 0]
  ------------------
  688|      0|				strncpy(val, _("Off"), maxlen);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  689|      0|				break;
  690|      0|			}
  691|      0|			snprintf (val, maxlen, _("%i (ms)"), vss * 100);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  692|      0|			break;
  693|  1.11k|		default:
  ------------------
  |  Branch (693:3): [True: 1.11k, False: 4.28k]
  ------------------
  694|  1.11k|			canon_search_table_value (entries_settings_2, t, vss, val, maxlen);
  695|  5.39k|		}
  696|  5.39k|		break;
  697|       |
  698|  5.39k|	case MNOTE_CANON_TAG_PANORAMA:
  ------------------
  |  Branch (698:2): [True: 0, False: 1.67M]
  ------------------
  699|      0|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|      0|#define CF(format,target,v,maxlen)                              \
  |  |   37|      0|{                                                               \
  |  |   38|      0|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   39|      0|                snprintf (v, maxlen,                            \
  |  |   40|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|      0|                        "expected '%s'."),                      \
  |  |   42|      0|                        exif_format_get_name (format),          \
  |  |   43|      0|                        exif_format_get_name (target));         \
  |  |   44|      0|                break;                                          \
  |  |   45|      0|        }                                                       \
  |  |   46|      0|}
  ------------------
  700|      0|		if (size < t*2 + 2) return NULL;
  ------------------
  |  Branch (700:7): [True: 0, False: 0]
  ------------------
  701|      0|		vs = exif_get_short (data + t * 2, entry->order);
  702|      0|		canon_search_table_value (entries_panorama, t, vs, val, maxlen);
  703|      0|		break;
  704|       |
  705|    424|	case MNOTE_CANON_TAG_OWNER:
  ------------------
  |  Branch (705:2): [True: 424, False: 1.67M]
  ------------------
  706|    424|		CC (entry->components, 32, val, maxlen)
  ------------------
  |  |   48|    424|#define CC(number,target,v,maxlen)                                      \
  |  |   49|    424|{                                                                       \
  |  |   50|    424|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 219, False: 205]
  |  |  ------------------
  |  |   51|    219|                snprintf (v, maxlen,                                    \
  |  |   52|    219|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    219|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    219|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    219|                break;                                                  \
  |  |   55|    219|        }                                                               \
  |  |   56|    424|}
  ------------------
  707|       |		/* Fall through; ImageType can have many sizes */
  708|       |		/* fall through */
  709|    916|	case MNOTE_CANON_TAG_IMAGE_TYPE:
  ------------------
  |  Branch (709:2): [True: 711, False: 1.67M]
  ------------------
  710|    916|		CF (entry->format, EXIF_FORMAT_ASCII, val, maxlen)
  ------------------
  |  |   36|    916|#define CF(format,target,v,maxlen)                              \
  |  |   37|    916|{                                                               \
  |  |   38|    916|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 507, False: 409]
  |  |  ------------------
  |  |   39|    507|                snprintf (v, maxlen,                            \
  |  |   40|    507|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    507|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|    507|                        "expected '%s'."),                      \
  |  |   42|    507|                        exif_format_get_name (format),          \
  |  |   43|    507|                        exif_format_get_name (target));         \
  |  |   44|    507|                break;                                          \
  |  |   45|    507|        }                                                       \
  |  |   46|    916|}
  ------------------
  711|    409|		strncpy (val, (char *)data, MIN (entry->size, maxlen));
  ------------------
  |  |  182|    409|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 116, False: 293]
  |  |  ------------------
  ------------------
  712|    409|		break;
  713|       |
  714|    808|	case MNOTE_CANON_TAG_FIRMWARE:
  ------------------
  |  Branch (714:2): [True: 808, False: 1.67M]
  ------------------
  715|    808|		CF (entry->format, EXIF_FORMAT_ASCII, val, maxlen)
  ------------------
  |  |   36|    808|#define CF(format,target,v,maxlen)                              \
  |  |   37|    808|{                                                               \
  |  |   38|    808|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 207, False: 601]
  |  |  ------------------
  |  |   39|    207|                snprintf (v, maxlen,                            \
  |  |   40|    207|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    207|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|    207|                        "expected '%s'."),                      \
  |  |   42|    207|                        exif_format_get_name (format),          \
  |  |   43|    207|                        exif_format_get_name (target));         \
  |  |   44|    207|                break;                                          \
  |  |   45|    207|        }                                                       \
  |  |   46|    808|}
  ------------------
  716|       |/*		CC2 (entry->components, 24, 32, val, maxlen); Can also be 22 */
  717|    601|		strncpy (val, (char *)data, MIN (entry->size, maxlen));
  ------------------
  |  |  182|    601|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 230, False: 371]
  |  |  ------------------
  ------------------
  718|    601|		break;
  719|       |
  720|    978|	case MNOTE_CANON_TAG_IMAGE_NUMBER:
  ------------------
  |  Branch (720:2): [True: 978, False: 1.67M]
  ------------------
  721|    978|		CF (entry->format, EXIF_FORMAT_LONG, val, maxlen)
  ------------------
  |  |   36|    978|#define CF(format,target,v,maxlen)                              \
  |  |   37|    978|{                                                               \
  |  |   38|    978|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 450, False: 528]
  |  |  ------------------
  |  |   39|    450|                snprintf (v, maxlen,                            \
  |  |   40|    450|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    450|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|    450|                        "expected '%s'."),                      \
  |  |   42|    450|                        exif_format_get_name (format),          \
  |  |   43|    450|                        exif_format_get_name (target));         \
  |  |   44|    450|                break;                                          \
  |  |   45|    450|        }                                                       \
  |  |   46|    978|}
  ------------------
  722|    528|		CC (entry->components, 1, val, maxlen)
  ------------------
  |  |   48|    528|#define CC(number,target,v,maxlen)                                      \
  |  |   49|    528|{                                                                       \
  |  |   50|    528|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 320, False: 208]
  |  |  ------------------
  |  |   51|    320|                snprintf (v, maxlen,                                    \
  |  |   52|    320|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    320|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    320|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    320|                break;                                                  \
  |  |   55|    320|        }                                                               \
  |  |   56|    528|}
  ------------------
  723|    208|		if (size < 4) return NULL;
  ------------------
  |  Branch (723:7): [True: 0, False: 208]
  ------------------
  724|    208|		vl = exif_get_long (data, entry->order);
  725|    208|		snprintf (val, maxlen, "%03lu-%04lu",
  726|    208|				(unsigned long) vl/10000,
  727|    208|				(unsigned long) vl%10000);
  728|    208|		break;
  729|       |
  730|    634|	case MNOTE_CANON_TAG_SERIAL_NUMBER:
  ------------------
  |  Branch (730:2): [True: 634, False: 1.67M]
  ------------------
  731|    634|		CF (entry->format, EXIF_FORMAT_LONG, val, maxlen)
  ------------------
  |  |   36|    634|#define CF(format,target,v,maxlen)                              \
  |  |   37|    634|{                                                               \
  |  |   38|    634|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 208, False: 426]
  |  |  ------------------
  |  |   39|    208|                snprintf (v, maxlen,                            \
  |  |   40|    208|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    208|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|    208|                        "expected '%s'."),                      \
  |  |   42|    208|                        exif_format_get_name (format),          \
  |  |   43|    208|                        exif_format_get_name (target));         \
  |  |   44|    208|                break;                                          \
  |  |   45|    208|        }                                                       \
  |  |   46|    634|}
  ------------------
  732|    426|		CC (entry->components, 1, val, maxlen)
  ------------------
  |  |   48|    426|#define CC(number,target,v,maxlen)                                      \
  |  |   49|    426|{                                                                       \
  |  |   50|    426|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 224, False: 202]
  |  |  ------------------
  |  |   51|    224|                snprintf (v, maxlen,                                    \
  |  |   52|    224|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    224|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    224|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    224|                break;                                                  \
  |  |   55|    224|        }                                                               \
  |  |   56|    426|}
  ------------------
  733|    202|		if (size < 4) return NULL;
  ------------------
  |  Branch (733:7): [True: 0, False: 202]
  ------------------
  734|    202|		vl = exif_get_long (data, entry->order);
  735|    202|		snprintf (val, maxlen, "%04X-%05d", (int)vl>>16,(int)vl&0xffff);
  736|    202|		break;
  737|       |
  738|  1.65M|	case MNOTE_CANON_TAG_CUSTOM_FUNCS:
  ------------------
  |  Branch (738:2): [True: 1.65M, False: 19.3k]
  ------------------
  739|  1.65M|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|  1.65M|#define CF(format,target,v,maxlen)                              \
  |  |   37|  1.65M|{                                                               \
  |  |   38|  1.65M|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 0, False: 1.65M]
  |  |  ------------------
  |  |   39|      0|                snprintf (v, maxlen,                            \
  |  |   40|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|      0|                        "expected '%s'."),                      \
  |  |   42|      0|                        exif_format_get_name (format),          \
  |  |   43|      0|                        exif_format_get_name (target));         \
  |  |   44|      0|                break;                                          \
  |  |   45|      0|        }                                                       \
  |  |   46|  1.65M|}
  ------------------
  740|  1.65M|		if (size < 2) return NULL;
  ------------------
  |  Branch (740:7): [True: 0, False: 1.65M]
  ------------------
  741|  1.65M|		n = exif_get_short (data, entry->order) / 2;
  742|  1.65M|		if (t >= n) return NULL;
  ------------------
  |  Branch (742:7): [True: 0, False: 1.65M]
  ------------------
  743|  1.65M|		CC (entry->components, n, val, maxlen)
  ------------------
  |  |   48|  1.65M|#define CC(number,target,v,maxlen)                                      \
  |  |   49|  1.65M|{                                                                       \
  |  |   50|  1.65M|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 1.63M, False: 12.8k]
  |  |  ------------------
  |  |   51|  1.63M|                snprintf (v, maxlen,                                    \
  |  |   52|  1.63M|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|  1.63M|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|  1.63M|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|  1.63M|                break;                                                  \
  |  |   55|  1.63M|        }                                                               \
  |  |   56|  1.65M|}
  ------------------
  744|  12.8k|		if (size < 2 + t*2 + 2) return NULL;
  ------------------
  |  Branch (744:7): [True: 0, False: 12.8k]
  ------------------
  745|  12.8k|		vs = exif_get_short (data + 2 + t * 2, entry->order);
  746|  12.8k|		snprintf (buf, sizeof (buf), "%u", vs);
  747|  12.8k|		strncat (val, buf, maxlen - strlen (val));
  748|  12.8k|		break;
  749|       |
  750|  2.52k|	case MNOTE_CANON_TAG_COLOR_INFORMATION:
  ------------------
  |  Branch (750:2): [True: 2.52k, False: 1.66M]
  ------------------
  751|  2.52k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   36|  2.52k|#define CF(format,target,v,maxlen)                              \
  |  |   37|  2.52k|{                                                               \
  |  |   38|  2.52k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (38:13): [True: 0, False: 2.52k]
  |  |  ------------------
  |  |   39|      0|                snprintf (v, maxlen,                            \
  |  |   40|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   41|      0|                        "expected '%s'."),                      \
  |  |   42|      0|                        exif_format_get_name (format),          \
  |  |   43|      0|                        exif_format_get_name (target));         \
  |  |   44|      0|                break;                                          \
  |  |   45|      0|        }                                                       \
  |  |   46|  2.52k|}
  ------------------
  752|  2.52k|		if (size < 2) return NULL;
  ------------------
  |  Branch (752:7): [True: 0, False: 2.52k]
  ------------------
  753|  2.52k|		n = exif_get_short (data, entry->order) / 2;
  754|  2.52k|		if (t >= n) return NULL;
  ------------------
  |  Branch (754:7): [True: 0, False: 2.52k]
  ------------------
  755|  2.52k|		CC (entry->components, n, val, maxlen)
  ------------------
  |  |   48|  2.52k|#define CC(number,target,v,maxlen)                                      \
  |  |   49|  2.52k|{                                                                       \
  |  |   50|  2.52k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 636, False: 1.88k]
  |  |  ------------------
  |  |   51|    636|                snprintf (v, maxlen,                                    \
  |  |   52|    636|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    636|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   53|    636|                        "expected %i)."), (int) number, (int) target);  \
  |  |   54|    636|                break;                                                  \
  |  |   55|    636|        }                                                               \
  |  |   56|  2.52k|}
  ------------------
  756|  1.88k|		if (size < 2 + t*2 + 2) return NULL;
  ------------------
  |  Branch (756:7): [True: 0, False: 1.88k]
  ------------------
  757|  1.88k|		vs = exif_get_short (data + 2 + t * 2, entry->order);
  758|  1.88k|		canon_search_table_value (color_information, t, vs, val, maxlen);
  759|  1.88k|		break;
  760|       |
  761|  2.14k|	default:
  ------------------
  |  Branch (761:2): [True: 2.14k, False: 1.66M]
  ------------------
  762|  2.14k|		switch (entry->format) {
  763|    237|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (763:3): [True: 237, False: 1.91k]
  ------------------
  764|    237|		  {
  765|    237|			size_t i, len = strlen(val);
  766|  47.1k|			for(i=0; i<entry->components; i++) {
  ------------------
  |  Branch (766:13): [True: 46.9k, False: 237]
  ------------------
  767|  46.9k|				if (size < 2)
  ------------------
  |  Branch (767:9): [True: 0, False: 46.9k]
  ------------------
  768|      0|					break;
  769|  46.9k|				vs = exif_get_short (data, entry->order);
  770|  46.9k|				snprintf (val+len, maxlen-len, "%hu ", vs);
  771|  46.9k|				len = strlen(val);
  772|  46.9k|				data += 2;
  773|  46.9k|				size -= 2;
  774|  46.9k|			}
  775|    237|		  }
  776|    237|		  break;
  777|    273|		case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (777:3): [True: 273, False: 1.87k]
  ------------------
  778|    273|		  {
  779|    273|			size_t i, len = strlen(val);
  780|  46.6k|			for(i=0; i<entry->components; i++) {
  ------------------
  |  Branch (780:13): [True: 46.3k, False: 273]
  ------------------
  781|  46.3k|				if (size < 2)
  ------------------
  |  Branch (781:9): [True: 0, False: 46.3k]
  ------------------
  782|      0|					break;
  783|  46.3k|				vss = exif_get_sshort (data, entry->order);
  784|  46.3k|				snprintf (val+len, maxlen-len, "%hi ", vss);
  785|  46.3k|				data += 2;
  786|  46.3k|				size -= 2;
  787|  46.3k|			}
  788|    273|		  }
  789|    273|		  break;
  790|    225|		case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (790:3): [True: 225, False: 1.92k]
  ------------------
  791|    225|		  {
  792|    225|			size_t i, len = strlen(val);
  793|  20.5k|			for(i=0; i<entry->components; i++) {
  ------------------
  |  Branch (793:13): [True: 20.3k, False: 225]
  ------------------
  794|  20.3k|				if (size < 4)
  ------------------
  |  Branch (794:9): [True: 0, False: 20.3k]
  ------------------
  795|      0|					break;
  796|  20.3k|				vl = exif_get_long (data, entry->order);
  797|  20.3k|				snprintf (val+len, maxlen-len, "%lu ", (long unsigned) vl);
  798|  20.3k|				data += 4;
  799|  20.3k|				size -= 4;
  800|  20.3k|			}
  801|    225|		  }
  802|    225|		  break;
  803|    225|		case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (803:3): [True: 225, False: 1.92k]
  ------------------
  804|    225|		  {
  805|    225|			size_t i, len = strlen(val);
  806|  39.4k|			for(i=0; i<entry->components; i++) {
  ------------------
  |  Branch (806:13): [True: 39.1k, False: 225]
  ------------------
  807|  39.1k|				if (size < 4)
  ------------------
  |  Branch (807:9): [True: 0, False: 39.1k]
  ------------------
  808|      0|					break;
  809|  39.1k|				vsl = exif_get_slong (data, entry->order);
  810|  39.1k|				snprintf (val+len, maxlen-len, "%li ", (long int) vsl);
  811|  39.1k|				data += 4;
  812|  39.1k|				size -= 4;
  813|  39.1k|			}
  814|    225|		  }
  815|    225|		  break;
  816|    910|		case EXIF_FORMAT_ASCII:
  ------------------
  |  Branch (816:3): [True: 910, False: 1.23k]
  ------------------
  817|    910|			strncpy (val, (char *)data, MIN (entry->size, maxlen));
  ------------------
  |  |  182|    910|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 220, False: 690]
  |  |  ------------------
  ------------------
  818|    910|			break;
  819|    277|		default:
  ------------------
  |  Branch (819:3): [True: 277, False: 1.87k]
  ------------------
  820|    277|		  snprintf (val, maxlen, _("%i bytes unknown data"),
  ------------------
  |  |   31|    277|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  821|    277|			  entry->size);
  822|    277|		  break;
  823|  2.14k|		}
  824|  2.14k|		break;
  825|  1.67M|	}
  826|  1.67M|	return val;
  827|  1.67M|}
mnote-canon-entry.c:canon_search_table_value:
  444|  5.27k|{
  445|  5.27k|	unsigned int j;
  446|       |
  447|       |	/* Search the table for the first matching subtag and value. */
  448|  76.3k|	for (j = 0; table[j].name && ((table[j].subtag < t) ||
  ------------------
  |  Branch (448:14): [True: 75.5k, False: 791]
  |  Branch (448:32): [True: 54.4k, False: 21.1k]
  ------------------
  449|  72.1k|			((table[j].subtag == t) && table[j].value <= vs)); j++) {
  ------------------
  |  Branch (449:5): [True: 18.3k, False: 2.81k]
  |  Branch (449:31): [True: 17.6k, False: 652]
  ------------------
  450|  72.1k|		if ((table[j].subtag == t) && (table[j].value == vs)) {
  ------------------
  |  Branch (450:7): [True: 17.6k, False: 54.4k]
  |  Branch (450:33): [True: 1.02k, False: 16.6k]
  ------------------
  451|  1.02k|			break;
  452|  1.02k|		}
  453|  72.1k|	}
  454|  5.27k|	if ((table[j].subtag == t) && (table[j].value == vs) && table[j].name) {
  ------------------
  |  Branch (454:6): [True: 1.95k, False: 3.32k]
  |  Branch (454:32): [True: 1.02k, False: 933]
  |  Branch (454:58): [True: 1.02k, False: 0]
  ------------------
  455|       |		/* Matching subtag and value found. */
  456|  1.02k|		strncpy (val, _(table[j].name), maxlen);
  ------------------
  |  |   31|  1.02k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  457|  4.25k|	} else {
  458|       |		/* No matching subtag and/or value found. */
  459|  4.25k|		snprintf (val, maxlen, "0x%04x", vs);
  460|  4.25k|	}
  461|  5.27k|}
mnote-canon-entry.c:apex_value_to_aperture:
  534|    636|{
  535|    636|	return pow (2, x / 2.);
  536|    636|}
mnote-canon-entry.c:apex_value_to_iso_speed:
  546|    636|{
  547|    636|	return 3.125 * pow (2, x);
  548|    636|}
mnote-canon-entry.c:apex_value_to_shutter_speed:
  540|    636|{
  541|    636|	return 1.0 / pow (2, x);
  542|    636|}

mnote_canon_tag_get_name:
  212|  1.70M|{
  213|  1.70M|	unsigned int i;
  214|       |
  215|  24.1M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (215:14): [True: 24.1M, False: 22.9k]
  ------------------
  216|  24.1M|		if (table[i].tag == t) return table[i].name; /* do not translate */
  ------------------
  |  Branch (216:7): [True: 1.68M, False: 22.4M]
  ------------------
  217|  22.9k|	return NULL;
  218|  1.70M|}
mnote_canon_tag_get_name_sub:
  222|  1.67M|{
  223|  1.67M|	unsigned int i;
  224|  1.67M|	int tag_found = 0;
  225|       |
  226|   143M|	for (i = 0; i < sizeof (table_sub) / sizeof (table_sub[0]); i++) {
  ------------------
  |  Branch (226:14): [True: 141M, False: 1.65M]
  ------------------
  227|   141M|		if (table_sub[i].tag == t) {
  ------------------
  |  Branch (227:7): [True: 62.7k, False: 141M]
  ------------------
  228|  62.7k|			if (table_sub[i].subtag == s)
  ------------------
  |  Branch (228:8): [True: 13.6k, False: 49.1k]
  ------------------
  229|  13.6k|				return table_sub[i].name;
  230|  49.1k|			tag_found = 1;
  231|  49.1k|		}
  232|   141M|	}
  233|  1.65M|	if (!tag_found || !(o & EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS))
  ------------------
  |  Branch (233:6): [True: 1.65M, False: 96]
  |  Branch (233:20): [True: 0, False: 96]
  ------------------
  234|  1.65M|		return mnote_canon_tag_get_name (t);
  235|     96|	else
  236|     96|		return NULL;
  237|  1.65M|}
mnote_canon_tag_get_title:
  241|  1.65M|{
  242|  1.65M|	unsigned int i;
  243|       |
  244|  1.65M|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  245|  21.5M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (245:14): [True: 21.5M, False: 0]
  ------------------
  246|  21.5M|		if (table[i].tag == t) {
  ------------------
  |  Branch (246:7): [True: 1.65M, False: 19.8M]
  ------------------
  247|  1.65M|			if (!table[i].title)
  ------------------
  |  Branch (247:8): [True: 0, False: 1.65M]
  ------------------
  248|      0|				return NULL;
  249|  1.65M|			return _(table[i].title);
  ------------------
  |  |   31|  1.65M|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  250|  1.65M|		}
  251|      0|	return NULL;
  252|  1.65M|}
mnote_canon_tag_get_title_sub:
  256|  1.67M|{
  257|  1.67M|	unsigned int i;
  258|  1.67M|	int tag_found = 0;
  259|       |
  260|   143M|	for (i = 0; i < sizeof (table_sub) / sizeof (table_sub[0]); i++) {
  ------------------
  |  Branch (260:14): [True: 141M, False: 1.65M]
  ------------------
  261|   141M|		if (table_sub[i].tag == t) {
  ------------------
  |  Branch (261:7): [True: 61.3k, False: 141M]
  ------------------
  262|  61.3k|			if (table_sub[i].subtag == s) {
  ------------------
  |  Branch (262:8): [True: 13.6k, False: 47.6k]
  ------------------
  263|  13.6k|				if (!table_sub[i].name)
  ------------------
  |  Branch (263:9): [True: 0, False: 13.6k]
  ------------------
  264|      0|					return NULL;
  265|  13.6k|				return _(table_sub[i].name);
  ------------------
  |  |   31|  13.6k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  266|  13.6k|			}
  267|  47.6k|			tag_found = 1;
  268|  47.6k|		}
  269|   141M|	}
  270|  1.65M|	if (!tag_found || !(o & EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS))
  ------------------
  |  Branch (270:6): [True: 1.65M, False: 0]
  |  Branch (270:20): [True: 0, False: 0]
  ------------------
  271|  1.65M|		return mnote_canon_tag_get_title (t);
  272|      0|	else
  273|      0|		return NULL;
  274|  1.65M|}
mnote_canon_tag_get_description:
  278|  1.67M|{
  279|  1.67M|	unsigned int i;
  280|       |
  281|  21.5M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (281:14): [True: 21.5M, False: 0]
  ------------------
  282|  21.5M|		if (table[i].tag == t) {
  ------------------
  |  Branch (282:7): [True: 1.67M, False: 19.9M]
  ------------------
  283|  1.67M|			if (!table[i].description || !*table[i].description)
  ------------------
  |  Branch (283:8): [True: 0, False: 1.67M]
  |  Branch (283:33): [True: 1.67M, False: 0]
  ------------------
  284|  1.67M|				return "";
  285|      0|			(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  286|      0|			return _(table[i].description);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  287|  1.67M|		}
  288|      0|	return NULL;
  289|  1.67M|}

exif_content_new_mem:
   57|  55.8k|{
   58|  55.8k|	ExifContent *content;
   59|       |
   60|  55.8k|	if (!mem) return NULL;
  ------------------
  |  Branch (60:6): [True: 0, False: 55.8k]
  ------------------
   61|       |
   62|  55.8k|	content = exif_mem_alloc (mem, (ExifLong) sizeof (ExifContent));
   63|  55.8k|	if (!content)
  ------------------
  |  Branch (63:6): [True: 0, False: 55.8k]
  ------------------
   64|      0|		return NULL;
   65|  55.8k|	content->priv = exif_mem_alloc (mem,
   66|  55.8k|				(ExifLong) sizeof (ExifContentPrivate));
   67|  55.8k|	if (!content->priv) {
  ------------------
  |  Branch (67:6): [True: 0, False: 55.8k]
  ------------------
   68|      0|		exif_mem_free (mem, content);
   69|      0|		return NULL;
   70|      0|	}
   71|       |
   72|  55.8k|	content->priv->ref_count = 1;
   73|       |
   74|  55.8k|	content->priv->mem = mem;
   75|  55.8k|	exif_mem_ref (mem);
   76|       |
   77|  55.8k|	return content;
   78|  55.8k|}
exif_content_unref:
   91|  55.8k|{
   92|  55.8k|	if (!content)
  ------------------
  |  Branch (92:6): [True: 0, False: 55.8k]
  ------------------
   93|      0|		return;
   94|       |
   95|  55.8k|	content->priv->ref_count--;
   96|  55.8k|	if (!content->priv->ref_count)
  ------------------
  |  Branch (96:6): [True: 55.8k, False: 0]
  ------------------
   97|  55.8k|		exif_content_free (content);
   98|  55.8k|}
exif_content_free:
  102|  55.8k|{
  103|  55.8k|	ExifMem *mem = (content && content->priv) ? content->priv->mem : NULL;
  ------------------
  |  Branch (103:18): [True: 55.8k, False: 0]
  |  Branch (103:29): [True: 55.8k, False: 0]
  ------------------
  104|  55.8k|	unsigned int i;
  105|       |
  106|  55.8k|	if (!content) return;
  ------------------
  |  Branch (106:6): [True: 0, False: 55.8k]
  ------------------
  107|       |
  108|   127k|	for (i = 0; i < content->count; i++)
  ------------------
  |  Branch (108:14): [True: 71.8k, False: 55.8k]
  ------------------
  109|  71.8k|		exif_entry_unref (content->entries[i]);
  110|  55.8k|	exif_mem_free (mem, content->entries);
  111|       |
  112|  55.8k|	if (content->priv) {
  ------------------
  |  Branch (112:6): [True: 55.8k, False: 0]
  ------------------
  113|  55.8k|		exif_log_unref (content->priv->log);
  114|  55.8k|	}
  115|       |
  116|  55.8k|	exif_mem_free (mem, content->priv);
  117|  55.8k|	exif_mem_free (mem, content);
  118|  55.8k|	exif_mem_unref (mem);
  119|  55.8k|}
exif_content_add_entry:
  142|  81.0k|{
  143|  81.0k|	ExifEntry **entries;
  144|  81.0k|	unsigned int s;
  145|  81.0k|	if (!c || !c->priv || !entry || entry->parent) return;
  ------------------
  |  Branch (145:6): [True: 0, False: 81.0k]
  |  Branch (145:12): [True: 0, False: 81.0k]
  |  Branch (145:24): [True: 0, False: 81.0k]
  |  Branch (145:34): [True: 0, False: 81.0k]
  ------------------
  146|       |
  147|       |	/* One tag can only be added once to an IFD. */
  148|  81.0k|	if (exif_content_get_entry (c, entry->tag)) {
  ------------------
  |  Branch (148:6): [True: 7.84k, False: 73.2k]
  ------------------
  149|  7.84k|		exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "ExifContent",
  150|  7.84k|			"An attempt has been made to add "
  151|  7.84k|			"the tag '%s' twice to an IFD. This is against "
  152|  7.84k|			"specification.", exif_tag_get_name (entry->tag));
  153|  7.84k|		return;
  154|  7.84k|	}
  155|       |
  156|  73.2k|	s = sizeof (ExifEntry*) * (c->count + 1);
  157|  73.2k|	entries = exif_mem_realloc (c->priv->mem, c->entries, s);
  158|  73.2k|	if (!entries) {
  ------------------
  |  Branch (158:6): [True: 0, False: 73.2k]
  ------------------
  159|      0|		EXIF_LOG_NO_MEMORY (c->priv->log, "ExifContent", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  160|      0|		return;
  161|      0|	}
  162|  73.2k|	entry->parent = c;
  163|  73.2k|	entries[c->count++] = entry;
  164|  73.2k|	c->entries = entries;
  165|  73.2k|	exif_entry_ref (entry);
  166|  73.2k|}
exif_content_remove_entry:
  170|  1.36k|{
  171|  1.36k|	unsigned int i;
  172|  1.36k|	ExifEntry **t, *temp;
  173|       |
  174|  1.36k|	if (!c || !c->priv || !e || (e->parent != c)) return;
  ------------------
  |  Branch (174:6): [True: 0, False: 1.36k]
  |  Branch (174:12): [True: 0, False: 1.36k]
  |  Branch (174:24): [True: 0, False: 1.36k]
  |  Branch (174:30): [True: 0, False: 1.36k]
  ------------------
  175|       |
  176|       |	/* Search the entry */
  177|  6.37k|	for (i = 0; i < c->count; i++)
  ------------------
  |  Branch (177:14): [True: 6.37k, False: 0]
  ------------------
  178|  6.37k|			if (c->entries[i] == e)
  ------------------
  |  Branch (178:8): [True: 1.36k, False: 5.00k]
  ------------------
  179|  1.36k|					break;
  180|       |
  181|  1.36k|	if (i == c->count)
  ------------------
  |  Branch (181:6): [True: 0, False: 1.36k]
  ------------------
  182|      0|			return;
  183|       |
  184|       |	/* Remove the entry */
  185|  1.36k|	temp = c->entries[c->count-1];
  186|  1.36k|	if (c->count > 1) {
  ------------------
  |  Branch (186:6): [True: 810, False: 559]
  ------------------
  187|    810|		const unsigned int s = sizeof(ExifEntry*) * (c->count - 1);
  188|    810|		t = exif_mem_realloc (c->priv->mem, c->entries, s);
  189|    810|		if (!t) {
  ------------------
  |  Branch (189:7): [True: 0, False: 810]
  ------------------
  190|      0|			EXIF_LOG_NO_MEMORY (c->priv->log, "ExifContent", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  191|      0|			return;
  192|      0|		}
  193|    810|		c->entries = t;
  194|    810|		c->count--;
  195|    810|		if (i != c->count) { /* we deallocated the last slot already */ 
  ------------------
  |  Branch (195:7): [True: 0, False: 810]
  ------------------
  196|      0|			memmove (&t[i], &t[i + 1], sizeof (ExifEntry*) * (c->count - i - 1));
  197|      0|			t[c->count-1] = temp;
  198|      0|		} 
  199|    810|	} else {
  200|    559|		exif_mem_free (c->priv->mem, c->entries);
  201|    559|		c->entries = NULL;
  202|    559|		c->count = 0;
  203|    559|	}
  204|  1.36k|	e->parent = NULL;
  205|  1.36k|	exif_entry_unref (e);
  206|  1.36k|}
exif_content_get_entry:
  210|   183k|{
  211|   183k|	unsigned int i;
  212|       |
  213|   183k|	if (!content)
  ------------------
  |  Branch (213:6): [True: 0, False: 183k]
  ------------------
  214|      0|		return (NULL);
  215|       |
  216|   452k|	for (i = 0; i < content->count; i++)
  ------------------
  |  Branch (216:14): [True: 294k, False: 158k]
  ------------------
  217|   294k|		if (content->entries[i]->tag == tag)
  ------------------
  |  Branch (217:7): [True: 25.3k, False: 268k]
  ------------------
  218|  25.3k|			return (content->entries[i]);
  219|   158k|	return (NULL);
  220|   183k|}
exif_content_foreach_entry:
  225|   123k|{
  226|   123k|	unsigned int i;
  227|       |
  228|   123k|	if (!content || !func)
  ------------------
  |  Branch (228:6): [True: 0, False: 123k]
  |  Branch (228:18): [True: 0, False: 123k]
  ------------------
  229|      0|		return;
  230|       |
  231|   229k|	for (i = 0; i < content->count; i++)
  ------------------
  |  Branch (231:14): [True: 106k, False: 123k]
  ------------------
  232|   106k|		func (content->entries[i], data);
  233|   123k|}
exif_content_log:
  237|  55.8k|{
  238|  55.8k|	if (!content || !content->priv || !log || content->priv->log == log)
  ------------------
  |  Branch (238:6): [True: 0, False: 55.8k]
  |  Branch (238:18): [True: 0, False: 55.8k]
  |  Branch (238:36): [True: 55.8k, False: 0]
  |  Branch (238:44): [True: 0, False: 0]
  ------------------
  239|  55.8k|		return;
  240|       |
  241|      0|	if (content->priv->log) exif_log_unref (content->priv->log);
  ------------------
  |  Branch (241:6): [True: 0, False: 0]
  ------------------
  242|      0|	content->priv->log = log;
  243|      0|	exif_log_ref (log);
  244|      0|}
exif_content_get_ifd:
  248|   145k|{
  249|   145k|	if (!c || !c->parent) return EXIF_IFD_COUNT;
  ------------------
  |  Branch (249:6): [True: 0, False: 145k]
  |  Branch (249:12): [True: 0, False: 145k]
  ------------------
  250|       |
  251|   145k|	return 
  252|   145k|		((c)->parent->ifd[EXIF_IFD_EXIF] == (c)) ? EXIF_IFD_EXIF :
  ------------------
  |  Branch (252:3): [True: 53.8k, False: 91.7k]
  ------------------
  253|   145k|		((c)->parent->ifd[EXIF_IFD_0] == (c)) ? EXIF_IFD_0 :
  ------------------
  |  Branch (253:3): [True: 44.7k, False: 47.0k]
  ------------------
  254|  91.7k|		((c)->parent->ifd[EXIF_IFD_1] == (c)) ? EXIF_IFD_1 :
  ------------------
  |  Branch (254:3): [True: 10.0k, False: 37.0k]
  ------------------
  255|  47.0k|		((c)->parent->ifd[EXIF_IFD_GPS] == (c)) ? EXIF_IFD_GPS :
  ------------------
  |  Branch (255:3): [True: 18.9k, False: 18.0k]
  ------------------
  256|  37.0k|		((c)->parent->ifd[EXIF_IFD_INTEROPERABILITY] == (c)) ? EXIF_IFD_INTEROPERABILITY :
  ------------------
  |  Branch (256:3): [True: 18.0k, False: 0]
  ------------------
  257|  18.0k|		EXIF_IFD_COUNT;
  258|   145k|}
exif_content_fix:
  292|  34.0k|{
  293|  34.0k|	ExifIfd ifd = exif_content_get_ifd (c);
  294|  34.0k|	ExifDataType dt;
  295|  34.0k|	ExifEntry *e;
  296|  34.0k|	unsigned int i, num;
  297|       |
  298|  34.0k|	if (!c)
  ------------------
  |  Branch (298:6): [True: 0, False: 34.0k]
  ------------------
  299|      0|		return;
  300|       |
  301|  34.0k|	dt = exif_data_get_data_type (c->parent);
  302|       |
  303|       |	/*
  304|       |	 * First of all, fix all existing entries.
  305|       |	 */
  306|  34.0k|	exif_content_foreach_entry (c, fix_func, NULL);
  307|       |
  308|       |	/*
  309|       |	 * Go through each tag and if it's not recorded, remove it. If one
  310|       |	 * is removed, exif_content_foreach_entry() will skip the next entry,
  311|       |	 * so if this happens do the loop again from the beginning to ensure
  312|       |	 * they're all checked. This could be avoided if we stop relying on
  313|       |	 * exif_content_foreach_entry but loop intelligently here.
  314|       |	 */
  315|  34.0k|	do {
  316|  34.0k|		num = c->count;
  317|  34.0k|		exif_content_foreach_entry (c, remove_not_recorded, NULL);
  318|  34.0k|	} while (num != c->count);
  ------------------
  |  Branch (318:11): [True: 0, False: 34.0k]
  ------------------
  319|       |
  320|       |	/*
  321|       |	 * Then check for non-existing mandatory tags and create them if needed
  322|       |	 */
  323|  34.0k|	num = exif_tag_table_count();
  324|  5.79M|	for (i = 0; i < num; ++i) {
  ------------------
  |  Branch (324:14): [True: 5.76M, False: 34.0k]
  ------------------
  325|  5.76M|		const ExifTag t = exif_tag_table_get_tag (i);
  326|  5.76M|		if (exif_tag_get_support_level_in_ifd (t, ifd, dt) ==
  ------------------
  |  Branch (326:7): [True: 51.5k, False: 5.70M]
  ------------------
  327|  5.76M|			EXIF_SUPPORT_LEVEL_MANDATORY) {
  328|  51.5k|			if (exif_content_get_entry (c, t))
  ------------------
  |  Branch (328:8): [True: 231, False: 51.2k]
  ------------------
  329|       |				/* This tag already exists */
  330|    231|				continue;
  331|  51.2k|			exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "exif-content",
  332|  51.2k|					"Tag '%s' is mandatory in IFD '%s' and has therefore been added.",
  333|  51.2k|					exif_tag_get_name_in_ifd (t, ifd), exif_ifd_get_name (ifd));
  334|  51.2k|			e = exif_entry_new ();
  335|  51.2k|			exif_content_add_entry (c, e);
  336|  51.2k|			exif_entry_initialize (e, t);
  337|  51.2k|			exif_entry_unref (e);
  338|  51.2k|		}
  339|  5.76M|	}
  340|  34.0k|}
exif-content.c:fix_func:
  262|  17.0k|{
  263|  17.0k|	exif_entry_fix (e);
  264|  17.0k|}
exif-content.c:remove_not_recorded:
  274|  17.0k|{
  275|  17.0k|	ExifIfd ifd = exif_entry_get_ifd(e) ;
  ------------------
  |  |  182|  17.0k|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 17.0k, False: 0]
  |  |  ------------------
  ------------------
  276|  17.0k|	ExifContent *c = e->parent;
  277|  17.0k|	ExifDataType dt = exif_data_get_data_type (c->parent);
  278|  17.0k|	ExifTag t = e->tag;
  279|       |
  280|  17.0k|	if (exif_tag_get_support_level_in_ifd (t, ifd, dt) ==
  ------------------
  |  Branch (280:6): [True: 0, False: 17.0k]
  ------------------
  281|  17.0k|			 EXIF_SUPPORT_LEVEL_NOT_RECORDED) {
  282|      0|		exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "exif-content",
  283|      0|				"Tag 0x%04x is not recorded in IFD '%s' and has therefore been "
  284|      0|				"removed.", t, exif_ifd_get_name (ifd));
  285|      0|		exif_content_remove_entry (c, e);
  286|      0|	}
  287|       |
  288|  17.0k|}

exif_data_get_mnote_data:
   93|  11.1k|{
   94|  11.1k|	return (d && d->priv) ? d->priv->md : NULL;
  ------------------
  |  Branch (94:10): [True: 11.1k, False: 0]
  |  Branch (94:15): [True: 11.1k, False: 0]
  ------------------
   95|  11.1k|}
exif_data_new_mem:
  110|  11.1k|{
  111|  11.1k|	ExifData *data;
  112|  11.1k|	unsigned int i;
  113|       |
  114|  11.1k|	if (!mem) 
  ------------------
  |  Branch (114:6): [True: 0, False: 11.1k]
  ------------------
  115|      0|		return NULL;
  116|       |
  117|  11.1k|	data = exif_mem_alloc (mem, sizeof (ExifData));
  118|  11.1k|	if (!data) 
  ------------------
  |  Branch (118:6): [True: 0, False: 11.1k]
  ------------------
  119|      0|		return (NULL);
  120|  11.1k|	data->priv = exif_mem_alloc (mem, sizeof (ExifDataPrivate));
  121|  11.1k|	if (!data->priv) { 
  ------------------
  |  Branch (121:6): [True: 0, False: 11.1k]
  ------------------
  122|      0|	  	exif_mem_free (mem, data); 
  123|      0|		return (NULL); 
  124|      0|	}
  125|  11.1k|	data->priv->ref_count = 1;
  126|       |
  127|  11.1k|	data->priv->mem = mem;
  128|  11.1k|	exif_mem_ref (mem);
  129|       |
  130|  66.9k|	for (i = 0; i < EXIF_IFD_COUNT; i++) {
  ------------------
  |  Branch (130:14): [True: 55.8k, False: 11.1k]
  ------------------
  131|  55.8k|		data->ifd[i] = exif_content_new_mem (data->priv->mem);
  132|  55.8k|		if (!data->ifd[i]) {
  ------------------
  |  Branch (132:7): [True: 0, False: 55.8k]
  ------------------
  133|      0|			exif_data_free (data);
  134|      0|			return (NULL);
  135|      0|		}
  136|  55.8k|		data->ifd[i]->parent = data;
  137|  55.8k|	}
  138|       |
  139|       |	/* Default options */
  140|  11.1k|#ifndef NO_VERBOSE_TAG_STRINGS
  141|       |	/*
  142|       |	 * When the tag list is compiled away, setting this option prevents
  143|       |	 * any tags from being loaded
  144|       |	 */
  145|  11.1k|	exif_data_set_option (data, EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS);
  146|  11.1k|#endif
  147|  11.1k|	exif_data_set_option (data, EXIF_DATA_OPTION_FOLLOW_SPECIFICATION);
  148|       |
  149|       |	/* Default data type: none */
  150|  11.1k|	exif_data_set_data_type (data, EXIF_DATA_TYPE_COUNT);
  151|       |
  152|  11.1k|	return (data);
  153|  11.1k|}
exif_data_load_data:
  874|  11.1k|{
  875|  11.1k|	unsigned int l;
  876|  11.1k|	ExifLong offset;
  877|  11.1k|	ExifShort n;
  878|  11.1k|	const unsigned char *d = d_orig;
  879|  11.1k|	unsigned int len, fullds;
  880|       |
  881|  11.1k|	if (!data || !data->priv || !d || !ds)
  ------------------
  |  Branch (881:6): [True: 0, False: 11.1k]
  |  Branch (881:15): [True: 0, False: 11.1k]
  |  Branch (881:30): [True: 0, False: 11.1k]
  |  Branch (881:36): [True: 0, False: 11.1k]
  ------------------
  882|      0|		return;
  883|       |
  884|  11.1k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  885|  11.1k|		  "Parsing %i byte(s) EXIF data...\n", ds);
  886|       |
  887|       |	/*
  888|       |	 * It can be that the data starts with the EXIF header. If it does
  889|       |	 * not, search the EXIF marker.
  890|       |	 */
  891|  11.1k|	if (ds < 6) {
  ------------------
  |  Branch (891:6): [True: 16, False: 11.1k]
  ------------------
  892|     16|		LOG_TOO_SMALL;
  ------------------
  |  |  867|     16|#define LOG_TOO_SMALL \
  |  |  868|     16|exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData", \
  |  |  869|     16|		_("Size of data too small to allow for EXIF data."))
  |  |  ------------------
  |  |  |  |   31|     16|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  ------------------
  893|     16|		return;
  894|     16|	}
  895|  11.1k|	if (!memcmp (d, ExifHeader, 6)) {
  ------------------
  |  Branch (895:6): [True: 10.9k, False: 194]
  ------------------
  896|  10.9k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  897|  10.9k|			  "Found EXIF header at start.");
  898|  10.9k|	} else {
  899|  1.06k|		while (ds >= 3) {
  ------------------
  |  Branch (899:10): [True: 1.04k, False: 18]
  ------------------
  900|  1.35k|			while (ds && (d[0] == 0xff)) {
  ------------------
  |  Branch (900:11): [True: 1.35k, False: 6]
  |  Branch (900:17): [True: 309, False: 1.04k]
  ------------------
  901|    309|				d++;
  902|    309|				ds--;
  903|    309|			}
  904|       |
  905|       |			/* JPEG_MARKER_SOI */
  906|  1.04k|			if (ds && d[0] == JPEG_MARKER_SOI) {
  ------------------
  |  |   47|  1.04k|#define JPEG_MARKER_SOI  0xd8
  ------------------
  |  Branch (906:8): [True: 1.04k, False: 6]
  |  Branch (906:14): [True: 441, False: 601]
  ------------------
  907|    441|				d++;
  908|    441|				ds--;
  909|    441|				continue;
  910|    441|			}
  911|       |
  912|       |			/* JPEG_MARKER_APP1 */
  913|    607|			if (ds && d[0] == JPEG_MARKER_APP1) {
  ------------------
  |  |   51|    601|#define JPEG_MARKER_APP1 0xe1
  ------------------
  |  Branch (913:8): [True: 601, False: 6]
  |  Branch (913:14): [True: 317, False: 284]
  ------------------
  914|       |				/*
  915|       |				 * Verify the exif header
  916|       |				 * (offset 3, length 6).
  917|       |				 * FF E1 NN NN EXIFHEADER
  918|       |				 *    ^^ d points here currently
  919|       |				 */
  920|    317|				if ((ds >= 9) && !memcmp (d+3, ExifHeader, 6))
  ------------------
  |  Branch (920:9): [True: 280, False: 37]
  |  Branch (920:22): [True: 67, False: 213]
  ------------------
  921|     67|					break;
  922|       |				/* fallthrough */
  923|    317|			}
  924|       |			/* Skip irrelevant APP markers. The branch for APP1 must come before this,
  925|       |			   otherwise this code block will cause APP1 to be skipped. This code path
  926|       |			   is only relevant for files that are nonconformant to the EXIF
  927|       |			   specification. For conformant files, the APP1 code path above will be
  928|       |			   taken. */
  929|    540|			if (ds >= 3 && d[0] >= 0xe0 && d[0] <= 0xef) {  /* JPEG_MARKER_APPn */
  ------------------
  |  Branch (929:8): [True: 530, False: 10]
  |  Branch (929:19): [True: 474, False: 56]
  |  Branch (929:35): [True: 469, False: 5]
  ------------------
  930|    469|				d++;
  931|    469|				ds--;
  932|    469|				l = (((unsigned int)d[0]) << 8) | d[1];
  933|    469|				if (l > ds)
  ------------------
  |  Branch (933:9): [True: 38, False: 431]
  ------------------
  934|     38|					return;
  935|    431|				d += l;
  936|    431|				ds -= l;
  937|    431|				continue;
  938|    469|			}
  939|       |
  940|       |			/* Unknown marker or data. Give up. */
  941|     71|			exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
  942|     71|				  "ExifData", _("EXIF marker not found."));
  ------------------
  |  |   31|     71|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  943|     71|			return;
  944|    540|		}
  945|     85|		if (ds < 3) {
  ------------------
  |  Branch (945:7): [True: 18, False: 67]
  ------------------
  946|     18|			LOG_TOO_SMALL;
  ------------------
  |  |  867|     18|#define LOG_TOO_SMALL \
  |  |  868|     18|exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData", \
  |  |  869|     18|		_("Size of data too small to allow for EXIF data."))
  |  |  ------------------
  |  |  |  |   31|     18|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  ------------------
  947|     18|			return;
  948|     18|		}
  949|     67|		d++;
  950|     67|		ds--;
  951|     67|		len = (((unsigned int)d[0]) << 8) | d[1];
  952|     67|		if (len > ds) {
  ------------------
  |  Branch (952:7): [True: 36, False: 31]
  ------------------
  953|     36|			exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
  954|     36|				  "ExifData", _("Read length %d is longer than data length %d."), len, ds);
  ------------------
  |  |   31|     36|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  955|     36|			return;
  956|     36|		}
  957|     31|		if (len < 2) {
  ------------------
  |  Branch (957:7): [True: 2, False: 29]
  ------------------
  958|      2|			exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
  959|      2|				  "ExifData", _("APP Tag too short."));
  ------------------
  |  |   31|      2|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  960|      2|			return;
  961|      2|		}
  962|     29|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  963|     29|			  "We have to deal with %i byte(s) of EXIF data.",
  964|     29|			  len);
  965|     29|		d += 2;
  966|     29|		ds = len - 2;	/* we do not want the full rest size, but only the size of the tag */
  967|     29|	}
  968|       |
  969|       |	/*
  970|       |	 * Verify the exif header
  971|       |	 * (offset 2, length 6).
  972|       |	 */
  973|  10.9k|	if (ds < 6) {
  ------------------
  |  Branch (973:6): [True: 4, False: 10.9k]
  ------------------
  974|      4|		LOG_TOO_SMALL;
  ------------------
  |  |  867|      4|#define LOG_TOO_SMALL \
  |  |  868|      4|exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData", \
  |  |  869|      4|		_("Size of data too small to allow for EXIF data."))
  |  |  ------------------
  |  |  |  |   31|      4|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  ------------------
  975|      4|		return;
  976|      4|	}
  977|  10.9k|	if (memcmp (d, ExifHeader, 6)) {
  ------------------
  |  Branch (977:6): [True: 0, False: 10.9k]
  ------------------
  978|      0|		exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
  979|      0|			  "ExifData", _("EXIF header not found."));
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  980|      0|		return;
  981|      0|	}
  982|       |
  983|  10.9k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  984|  10.9k|		  "Found EXIF header.");
  985|       |
  986|       |	/* Sanity check the data length */
  987|  10.9k|	if (ds < 14)
  ------------------
  |  Branch (987:6): [True: 45, False: 10.9k]
  ------------------
  988|     45|		return;
  989|       |
  990|       |	/* The JPEG APP1 section can be no longer than 64 KiB (including a
  991|       |	   16-bit length), so cap the data length to protect against overflow
  992|       |	   in future offset calculations */
  993|  10.9k|	fullds = ds;
  994|  10.9k|	if (ds > 0xfffe)
  ------------------
  |  Branch (994:6): [True: 11, False: 10.9k]
  ------------------
  995|     11|		ds = 0xfffe;
  996|       |
  997|       |	/* Byte order (offset 6, length 2) */
  998|  10.9k|	if (!memcmp (d + 6, "II", 2))
  ------------------
  |  Branch (998:6): [True: 8.15k, False: 2.77k]
  ------------------
  999|  8.15k|		data->priv->order = EXIF_BYTE_ORDER_INTEL;
 1000|  2.77k|	else if (!memcmp (d + 6, "MM", 2))
  ------------------
  |  Branch (1000:11): [True: 2.69k, False: 78]
  ------------------
 1001|  2.69k|		data->priv->order = EXIF_BYTE_ORDER_MOTOROLA;
 1002|     78|	else {
 1003|     78|		exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
 1004|     78|			  "ExifData", _("Unknown encoding."));
  ------------------
  |  |   31|     78|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1005|     78|		return;
 1006|     78|	}
 1007|       |
 1008|       |	/* Fixed value */
 1009|  10.8k|	if (exif_get_short (d + 8, data->priv->order) != 0x002a)
  ------------------
  |  Branch (1009:6): [True: 21, False: 10.8k]
  ------------------
 1010|     21|		return;
 1011|       |
 1012|       |	/* IFD 0 offset */
 1013|  10.8k|	offset = exif_get_long (d + 10, data->priv->order);
 1014|  10.8k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData", 
 1015|  10.8k|		  "IFD 0 at %i.", (int) offset);
 1016|       |
 1017|       |	/* ds is restricted to 16 bit above, so offset is restricted too, and offset+8 should not overflow. */
 1018|  10.8k|	if (offset > ds || offset + 6 + 2 > ds)
  ------------------
  |  Branch (1018:6): [True: 55, False: 10.7k]
  |  Branch (1018:21): [True: 6, False: 10.7k]
  ------------------
 1019|     61|		return;
 1020|       |
 1021|       |	/* Parse the actual exif data (usually offset 14 from start) */
 1022|  10.7k|	exif_data_load_data_content (data, EXIF_IFD_0, d + 6, ds - 6, offset, 0);
 1023|       |
 1024|       |	/* IFD 1 offset */
 1025|  10.7k|	n = exif_get_short (d + 6 + offset, data->priv->order);
 1026|       |	/* offset < 2<<16, n is 16 bit at most, so this op will not overflow */
 1027|  10.7k|	if (offset + 6 + 2 + 12 * n + 4 > ds)
  ------------------
  |  Branch (1027:6): [True: 2.28k, False: 8.48k]
  ------------------
 1028|  2.28k|		return;
 1029|       |
 1030|  8.48k|	offset = exif_get_long (d + 6 + offset + 2 + 12 * n, data->priv->order);
 1031|  8.48k|	if (offset) {
  ------------------
  |  Branch (1031:6): [True: 8.28k, False: 196]
  ------------------
 1032|  8.28k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
 1033|  8.28k|			  "IFD 1 at %i.", (int) offset);
 1034|       |
 1035|       |		/* Sanity check. ds is ensured to be above 6 above, offset is 16bit */
 1036|  8.28k|		if (offset > ds - 6) {
  ------------------
  |  Branch (1036:7): [True: 1.89k, False: 6.39k]
  ------------------
 1037|  1.89k|			exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA,
 1038|  1.89k|				  "ExifData", "Bogus offset of IFD1.");
 1039|  6.39k|		} else {
 1040|  6.39k|		   exif_data_load_data_content (data, EXIF_IFD_1, d + 6, ds - 6, offset, 0);
 1041|  6.39k|		}
 1042|  8.28k|	}
 1043|       |
 1044|       |	/*
 1045|       |	 * If we got an EXIF_TAG_MAKER_NOTE, try to interpret it. Some
 1046|       |	 * cameras use pointers in the maker note tag that point to the
 1047|       |	 * space between IFDs. Here is the only place where we have access
 1048|       |	 * to that data.
 1049|       |	 */
 1050|  8.48k|	interpret_maker_note(data, d, fullds);
 1051|       |
 1052|       |	/* Fixup tags if requested */
 1053|  8.48k|	if (data->priv->options & EXIF_DATA_OPTION_FOLLOW_SPECIFICATION)
  ------------------
  |  Branch (1053:6): [True: 8.48k, False: 0]
  ------------------
 1054|  8.48k|		exif_data_fix (data);
 1055|  8.48k|}
exif_data_unref:
 1127|  11.1k|{
 1128|  11.1k|	if (!data) 
  ------------------
  |  Branch (1128:6): [True: 0, False: 11.1k]
  ------------------
 1129|      0|		return;
 1130|       |
 1131|  11.1k|	data->priv->ref_count--;
 1132|  11.1k|	if (!data->priv->ref_count) 
  ------------------
  |  Branch (1132:6): [True: 11.1k, False: 0]
  ------------------
 1133|  11.1k|		exif_data_free (data);
 1134|  11.1k|}
exif_data_free:
 1138|  11.1k|{
 1139|  11.1k|	unsigned int i;
 1140|  11.1k|	ExifMem *mem = (data && data->priv) ? data->priv->mem : NULL;
  ------------------
  |  Branch (1140:18): [True: 11.1k, False: 0]
  |  Branch (1140:26): [True: 11.1k, False: 0]
  ------------------
 1141|       |
 1142|  11.1k|	if (!data) 
  ------------------
  |  Branch (1142:6): [True: 0, False: 11.1k]
  ------------------
 1143|      0|		return;
 1144|       |
 1145|  66.9k|	for (i = 0; i < EXIF_IFD_COUNT; i++) {
  ------------------
  |  Branch (1145:14): [True: 55.8k, False: 11.1k]
  ------------------
 1146|  55.8k|		if (data->ifd[i]) {
  ------------------
  |  Branch (1146:7): [True: 55.8k, False: 0]
  ------------------
 1147|  55.8k|			exif_content_unref (data->ifd[i]);
 1148|  55.8k|			data->ifd[i] = NULL;
 1149|  55.8k|		}
 1150|  55.8k|	}
 1151|       |
 1152|  11.1k|	if (data->data) {
  ------------------
  |  Branch (1152:6): [True: 184, False: 10.9k]
  ------------------
 1153|    184|		exif_mem_free (mem, data->data);
 1154|    184|		data->data = NULL;
 1155|    184|	}
 1156|       |
 1157|  11.1k|	if (data->priv) {
  ------------------
  |  Branch (1157:6): [True: 11.1k, False: 0]
  ------------------
 1158|  11.1k|		if (data->priv->log) {
  ------------------
  |  Branch (1158:7): [True: 0, False: 11.1k]
  ------------------
 1159|      0|			exif_log_unref (data->priv->log);
 1160|      0|			data->priv->log = NULL;
 1161|      0|		}
 1162|  11.1k|		if (data->priv->md) {
  ------------------
  |  Branch (1162:7): [True: 7.15k, False: 4.00k]
  ------------------
 1163|  7.15k|			exif_mnote_data_unref (data->priv->md);
 1164|  7.15k|			data->priv->md = NULL;
 1165|  7.15k|		}
 1166|  11.1k|		exif_mem_free (mem, data->priv);
 1167|  11.1k|		exif_mem_free (mem, data);
 1168|  11.1k|	}
 1169|       |
 1170|  11.1k|	exif_mem_unref (mem);
 1171|  11.1k|}
exif_data_get_byte_order:
 1202|   160k|{
 1203|   160k|	if (!data)
  ------------------
  |  Branch (1203:6): [True: 0, False: 160k]
  ------------------
 1204|      0|		return (0);
 1205|       |
 1206|   160k|	return (data->priv->order);
 1207|   160k|}
exif_data_foreach_content:
 1212|  19.6k|{
 1213|  19.6k|	unsigned int i;
 1214|       |
 1215|  19.6k|	if (!data || !func)
  ------------------
  |  Branch (1215:6): [True: 0, False: 19.6k]
  |  Branch (1215:15): [True: 0, False: 19.6k]
  ------------------
 1216|      0|		return;
 1217|       |
 1218|   117k|	for (i = 0; i < EXIF_IFD_COUNT; i++)
  ------------------
  |  Branch (1218:14): [True: 98.2k, False: 19.6k]
  ------------------
 1219|  98.2k|		func (data->ifd[i], user_data);
 1220|  19.6k|}
exif_data_log:
 1262|  11.1k|{
 1263|  11.1k|	unsigned int i;
 1264|       |
 1265|  11.1k|	if (!data || !data->priv) 
  ------------------
  |  Branch (1265:6): [True: 0, False: 11.1k]
  |  Branch (1265:15): [True: 0, False: 11.1k]
  ------------------
 1266|      0|		return;
 1267|  11.1k|	exif_log_unref (data->priv->log);
 1268|  11.1k|	data->priv->log = log;
 1269|  11.1k|	exif_log_ref (log);
 1270|       |
 1271|  66.9k|	for (i = 0; i < EXIF_IFD_COUNT; i++)
  ------------------
  |  Branch (1271:14): [True: 55.8k, False: 11.1k]
  ------------------
 1272|  55.8k|		exif_content_log (data->ifd[i], log);
 1273|  11.1k|}
exif_data_get_log:
 1279|  87.3k|{
 1280|  87.3k|	if (!data || !data->priv) 
  ------------------
  |  Branch (1280:6): [True: 0, False: 87.3k]
  |  Branch (1280:15): [True: 0, False: 87.3k]
  ------------------
 1281|      0|		return NULL;
 1282|  87.3k|	return data->priv->log;
 1283|  87.3k|}
exif_data_set_option:
 1325|  22.3k|{
 1326|  22.3k|	if (!d) 
  ------------------
  |  Branch (1326:6): [True: 0, False: 22.3k]
  ------------------
 1327|      0|		return;
 1328|       |
 1329|  22.3k|	d->priv->options |= o;
 1330|  22.3k|}
exif_data_fix:
 1371|  8.48k|{
 1372|       |	exif_data_foreach_content (d, fix_func, NULL);
 1373|  8.48k|}
exif_data_set_data_type:
 1377|  11.1k|{
 1378|  11.1k|	if (!d || !d->priv) 
  ------------------
  |  Branch (1378:6): [True: 0, False: 11.1k]
  |  Branch (1378:12): [True: 0, False: 11.1k]
  ------------------
 1379|      0|		return;
 1380|       |
 1381|  11.1k|	d->priv->data_type = dt;
 1382|  11.1k|}
exif_data_get_data_type:
 1386|  51.1k|{
 1387|  51.1k|	return (d && d->priv) ? d->priv->data_type : EXIF_DATA_TYPE_UNKNOWN;
  ------------------
  |  Branch (1387:10): [True: 51.1k, False: 0]
  |  Branch (1387:15): [True: 51.1k, False: 0]
  ------------------
 1388|  51.1k|}
exif-data.c:exif_data_load_data_content:
  417|  28.0k|{
  418|  28.0k|	ExifLong o, thumbnail_offset = 0, thumbnail_length = 0;
  419|  28.0k|	ExifShort n;
  420|  28.0k|	ExifEntry *entry;
  421|  28.0k|	unsigned int i;
  422|  28.0k|	ExifTag tag;
  423|       |
  424|  28.0k|	if (!data || !data->priv) 
  ------------------
  |  Branch (424:6): [True: 0, False: 28.0k]
  |  Branch (424:15): [True: 0, False: 28.0k]
  ------------------
  425|      0|		return;
  426|       |
  427|       |	/* check for valid ExifIfd enum range */
  428|  28.0k|	if ((((int)ifd) < 0) || ( ((int)ifd) >= EXIF_IFD_COUNT))
  ------------------
  |  Branch (428:6): [True: 0, False: 28.0k]
  |  Branch (428:26): [True: 0, False: 28.0k]
  ------------------
  429|      0|	  return;
  430|       |
  431|  28.0k|	if (recursion_cost > 170) {
  ------------------
  |  Branch (431:6): [True: 47, False: 27.9k]
  ------------------
  432|       |		/*
  433|       |		 * recursion_cost is a logarithmic-scale indicator of how expensive this
  434|       |		 * recursive call might end up being. It is an indicator of the depth of
  435|       |		 * recursion as well as the potential for worst-case future recursive
  436|       |		 * calls. Since it's difficult to tell ahead of time how often recursion
  437|       |		 * will occur, this assumes the worst by assuming every tag could end up
  438|       |		 * causing recursion.
  439|       |		 * The value of 170 was chosen to limit typical EXIF structures to a
  440|       |		 * recursive depth of about 6, but pathological ones (those with very
  441|       |		 * many tags) to only 2.
  442|       |		 */
  443|     47|		exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
  444|     47|			  "Deep/expensive recursion detected!");
  445|     47|		return;
  446|     47|	}
  447|       |
  448|       |	/* Read the number of entries */
  449|  27.9k|	if (exif_check_overflow (offset, ds, 2)) {
  ------------------
  |  Branch (449:6): [True: 20, False: 27.9k]
  ------------------
  450|     20|		exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
  451|     20|			  "Tag data past end of buffer (%u+2 > %u)", offset, ds);
  452|     20|		return;
  453|     20|	}
  454|  27.9k|	n = exif_get_short (d + offset, data->priv->order);
  455|  27.9k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  456|  27.9k|	          "Loading %hu entries...", n);
  457|  27.9k|	offset += 2;
  458|       |
  459|       |	/* Check if we have enough data. */
  460|  27.9k|	if (exif_check_overflow (offset, ds, 12*n)) {
  ------------------
  |  Branch (460:6): [True: 18.0k, False: 9.90k]
  ------------------
  461|  18.0k|		n = (ds - offset) / 12;
  462|  18.0k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  463|  18.0k|				  "Short data; only loading %hu entries...", n);
  464|  18.0k|	}
  465|       |
  466|  2.07M|	for (i = 0; i < n; i++) {
  ------------------
  |  Branch (466:14): [True: 2.04M, False: 27.3k]
  ------------------
  467|       |
  468|  2.04M|		tag = exif_get_short (d + offset + 12 * i, data->priv->order);
  469|  2.04M|		switch (tag) {
  470|  15.0k|		case EXIF_TAG_EXIF_IFD_POINTER:
  ------------------
  |  Branch (470:3): [True: 15.0k, False: 2.03M]
  ------------------
  471|  18.9k|		case EXIF_TAG_GPS_INFO_IFD_POINTER:
  ------------------
  |  Branch (471:3): [True: 3.86k, False: 2.04M]
  ------------------
  472|  22.7k|		case EXIF_TAG_INTEROPERABILITY_IFD_POINTER:
  ------------------
  |  Branch (472:3): [True: 3.81k, False: 2.04M]
  ------------------
  473|  25.3k|		case EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH:
  ------------------
  |  Branch (473:3): [True: 2.62k, False: 2.04M]
  ------------------
  474|  28.2k|		case EXIF_TAG_JPEG_INTERCHANGE_FORMAT:
  ------------------
  |  Branch (474:3): [True: 2.86k, False: 2.04M]
  ------------------
  475|  28.2k|			o = exif_get_long (d + offset + 12 * i + 8,
  476|  28.2k|					   data->priv->order);
  477|  28.2k|			if (o >= ds) {
  ------------------
  |  Branch (477:8): [True: 2.67k, False: 25.5k]
  ------------------
  478|  2.67k|				exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
  479|  2.67k|					  "Tag data past end of buffer (%u > %u)", offset+2, ds);
  480|  2.67k|				if (recursion_cost > 0)
  ------------------
  |  Branch (480:9): [True: 624, False: 2.05k]
  ------------------
  481|    624|					return;
  482|  2.05k|				break;
  483|  2.67k|			}
  484|       |			/* FIXME: IFD_POINTER tags aren't marked as being in a
  485|       |			 * specific IFD, so exif_tag_get_name_in_ifd won't work
  486|       |			 */
  487|  25.5k|			exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  488|  25.5k|				  "Sub-IFD entry 0x%x ('%s') at %u.", tag,
  489|  25.5k|				  exif_tag_get_name(tag), o);
  490|  25.5k|			switch (tag) {
  491|  14.5k|			case EXIF_TAG_EXIF_IFD_POINTER:
  ------------------
  |  Branch (491:4): [True: 14.5k, False: 11.0k]
  ------------------
  492|  22.5k|				CHECK_REC (EXIF_IFD_EXIF)
  ------------------
  |  |  362|  14.5k|#define CHECK_REC(i) 					\
  |  |  363|  14.5k|if ((i) == ifd) {				\
  |  |  ------------------
  |  |  |  Branch (363:5): [True: 1.70k, False: 12.8k]
  |  |  ------------------
  |  |  364|  1.70k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, \
  |  |  365|  1.70k|		"ExifData", "Recursive entry in IFD "	\
  |  |  366|  1.70k|		"'%s' detected. Skipping...",		\
  |  |  367|  1.70k|		exif_ifd_get_name (i));			\
  |  |  368|  1.70k|	break;						\
  |  |  369|  12.8k|}							\
  |  |  370|  12.8k|if (data->ifd[(i)]->count) {				\
  |  |  ------------------
  |  |  |  Branch (370:5): [True: 3.01k, False: 9.78k]
  |  |  ------------------
  |  |  371|  3.01k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  372|  3.01k|		"ExifData", "Attempt to load IFD "	\
  |  |  373|  3.01k|		"'%s' multiple times detected. "	\
  |  |  374|  3.01k|		"Skipping...",				\
  |  |  375|  3.01k|		exif_ifd_get_name (i));			\
  |  |  376|  3.01k|	break;						\
  |  |  377|  9.78k|}							\
  |  |  378|  9.78k|if (data->priv->ifd_used[i]) {				\
  |  |  ------------------
  |  |  |  Branch (378:5): [True: 553, False: 9.23k]
  |  |  ------------------
  |  |  379|    553|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  380|    553|		"ExifData", "Attempt to load IFD "	\
  |  |  381|    553|		"'%s' multiple times detected. "	\
  |  |  382|    553|		"Skipping...",				\
  |  |  383|    553|		exif_ifd_get_name (i));			\
  |  |  384|    553|	break;						\
  |  |  385|  9.23k|} else {						\
  |  |  386|  9.23k|	data->priv->ifd_used[i] = 1;			\
  |  |  387|  9.23k|}
  ------------------
  493|  9.23k|				exif_data_load_data_content (data, EXIF_IFD_EXIF, d, ds, o,
  494|  9.23k|					recursion_cost + level_cost(n));
  495|  9.23k|				break;
  496|  3.75k|			case EXIF_TAG_GPS_INFO_IFD_POINTER:
  ------------------
  |  Branch (496:4): [True: 3.75k, False: 21.7k]
  ------------------
  497|  4.68k|				CHECK_REC (EXIF_IFD_GPS)
  ------------------
  |  |  362|  3.75k|#define CHECK_REC(i) 					\
  |  |  363|  3.75k|if ((i) == ifd) {				\
  |  |  ------------------
  |  |  |  Branch (363:5): [True: 1.05k, False: 2.70k]
  |  |  ------------------
  |  |  364|  1.05k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, \
  |  |  365|  1.05k|		"ExifData", "Recursive entry in IFD "	\
  |  |  366|  1.05k|		"'%s' detected. Skipping...",		\
  |  |  367|  1.05k|		exif_ifd_get_name (i));			\
  |  |  368|  1.05k|	break;						\
  |  |  369|  2.70k|}							\
  |  |  370|  2.70k|if (data->ifd[(i)]->count) {				\
  |  |  ------------------
  |  |  |  Branch (370:5): [True: 717, False: 1.98k]
  |  |  ------------------
  |  |  371|    717|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  372|    717|		"ExifData", "Attempt to load IFD "	\
  |  |  373|    717|		"'%s' multiple times detected. "	\
  |  |  374|    717|		"Skipping...",				\
  |  |  375|    717|		exif_ifd_get_name (i));			\
  |  |  376|    717|	break;						\
  |  |  377|  1.98k|}							\
  |  |  378|  1.98k|if (data->priv->ifd_used[i]) {				\
  |  |  ------------------
  |  |  |  Branch (378:5): [True: 1.02k, False: 960]
  |  |  ------------------
  |  |  379|  1.02k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  380|  1.02k|		"ExifData", "Attempt to load IFD "	\
  |  |  381|  1.02k|		"'%s' multiple times detected. "	\
  |  |  382|  1.02k|		"Skipping...",				\
  |  |  383|  1.02k|		exif_ifd_get_name (i));			\
  |  |  384|  1.02k|	break;						\
  |  |  385|  1.02k|} else {						\
  |  |  386|    960|	data->priv->ifd_used[i] = 1;			\
  |  |  387|    960|}
  ------------------
  498|    960|				exif_data_load_data_content (data, EXIF_IFD_GPS, d, ds, o,
  499|    960|					recursion_cost + level_cost(n));
  500|    960|				break;
  501|  3.67k|			case EXIF_TAG_INTEROPERABILITY_IFD_POINTER:
  ------------------
  |  Branch (501:4): [True: 3.67k, False: 21.8k]
  ------------------
  502|  4.73k|				CHECK_REC (EXIF_IFD_INTEROPERABILITY)
  ------------------
  |  |  362|  3.67k|#define CHECK_REC(i) 					\
  |  |  363|  3.67k|if ((i) == ifd) {				\
  |  |  ------------------
  |  |  |  Branch (363:5): [True: 957, False: 2.71k]
  |  |  ------------------
  |  |  364|    957|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, \
  |  |  365|    957|		"ExifData", "Recursive entry in IFD "	\
  |  |  366|    957|		"'%s' detected. Skipping...",		\
  |  |  367|    957|		exif_ifd_get_name (i));			\
  |  |  368|    957|	break;						\
  |  |  369|  2.71k|}							\
  |  |  370|  2.71k|if (data->ifd[(i)]->count) {				\
  |  |  ------------------
  |  |  |  Branch (370:5): [True: 693, False: 2.02k]
  |  |  ------------------
  |  |  371|    693|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  372|    693|		"ExifData", "Attempt to load IFD "	\
  |  |  373|    693|		"'%s' multiple times detected. "	\
  |  |  374|    693|		"Skipping...",				\
  |  |  375|    693|		exif_ifd_get_name (i));			\
  |  |  376|    693|	break;						\
  |  |  377|  2.02k|}							\
  |  |  378|  2.02k|if (data->priv->ifd_used[i]) {				\
  |  |  ------------------
  |  |  |  Branch (378:5): [True: 1.35k, False: 667]
  |  |  ------------------
  |  |  379|  1.35k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,	\
  |  |  380|  1.35k|		"ExifData", "Attempt to load IFD "	\
  |  |  381|  1.35k|		"'%s' multiple times detected. "	\
  |  |  382|  1.35k|		"Skipping...",				\
  |  |  383|  1.35k|		exif_ifd_get_name (i));			\
  |  |  384|  1.35k|	break;						\
  |  |  385|  1.35k|} else {						\
  |  |  386|    667|	data->priv->ifd_used[i] = 1;			\
  |  |  387|    667|}
  ------------------
  503|    667|				exif_data_load_data_content (data, EXIF_IFD_INTEROPERABILITY, d, ds, o,
  504|    667|					recursion_cost + level_cost(n));
  505|    667|				break;
  506|  2.30k|			case EXIF_TAG_JPEG_INTERCHANGE_FORMAT:
  ------------------
  |  Branch (506:4): [True: 2.30k, False: 23.2k]
  ------------------
  507|  2.30k|				thumbnail_offset = o;
  508|  2.30k|				if (thumbnail_offset && thumbnail_length)
  ------------------
  |  Branch (508:9): [True: 1.96k, False: 339]
  |  Branch (508:29): [True: 855, False: 1.10k]
  ------------------
  509|    855|					exif_data_load_data_thumbnail (data, d,
  510|    855|								       ds, thumbnail_offset,
  511|    855|								       thumbnail_length);
  512|  2.30k|				break;
  513|  1.30k|			case EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH:
  ------------------
  |  Branch (513:4): [True: 1.30k, False: 24.2k]
  ------------------
  514|  1.30k|				thumbnail_length = o;
  515|  1.30k|				if (thumbnail_offset && thumbnail_length)
  ------------------
  |  Branch (515:9): [True: 708, False: 601]
  |  Branch (515:29): [True: 455, False: 253]
  ------------------
  516|    455|					exif_data_load_data_thumbnail (data, d,
  517|    455|								       ds, thumbnail_offset,
  518|    455|								       thumbnail_length);
  519|  1.30k|				break;
  520|      0|			default:
  ------------------
  |  Branch (520:4): [True: 0, False: 25.5k]
  ------------------
  521|      0|				return;
  522|  25.5k|			}
  523|  25.5k|			break;
  524|  2.01M|		default:
  ------------------
  |  Branch (524:3): [True: 2.01M, False: 28.2k]
  ------------------
  525|       |
  526|       |			/*
  527|       |			 * If we don't know the tag, don't fail. It could be that new 
  528|       |			 * versions of the standard have defined additional tags. Note that
  529|       |			 * 0 is a valid tag in the GPS IFD.
  530|       |			 */
  531|  2.01M|			if (!exif_tag_get_name_in_ifd (tag, ifd)) {
  ------------------
  |  Branch (531:8): [True: 1.81M, False: 206k]
  ------------------
  532|       |
  533|       |				/*
  534|       |				 * Special case: Tag and format 0. That's against specification
  535|       |				 * (at least up to 2.2). But Photoshop writes it anyways.
  536|       |				 */
  537|  1.81M|				if (!memcmp (d + offset + 12 * i, "\0\0\0\0", 4)) {
  ------------------
  |  Branch (537:9): [True: 187k, False: 1.62M]
  ------------------
  538|   187k|					exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  539|   187k|						  "Skipping empty entry at position %u in '%s'.", i, 
  540|   187k|						  exif_ifd_get_name (ifd));
  541|   187k|					break;
  542|   187k|				}
  543|  1.62M|				exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  544|  1.62M|					  "Unknown tag 0x%04x (entry %u in '%s'). Please report this tag "
  545|  1.62M|					  "to <libexif-devel@lists.sourceforge.net>.", tag, i,
  546|  1.62M|					  exif_ifd_get_name (ifd));
  547|  1.62M|				if (data->priv->options & EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS)
  ------------------
  |  Branch (547:9): [True: 1.62M, False: 0]
  ------------------
  548|  1.62M|					break;
  549|  1.62M|			}
  550|   206k|			entry = exif_entry_new_mem (data->priv->mem);
  551|   206k|			if (!entry) {
  ------------------
  |  Branch (551:8): [True: 0, False: 206k]
  ------------------
  552|      0|				  exif_log (data->priv->log, EXIF_LOG_CODE_NO_MEMORY, "ExifData",
  553|      0|                                          "Could not allocate memory");
  554|      0|				  return;
  555|      0|			}
  556|   206k|			if (exif_data_load_data_entry (data, entry, d, ds,
  ------------------
  |  Branch (556:8): [True: 29.8k, False: 176k]
  ------------------
  557|   206k|						   offset + 12 * i))
  558|  29.8k|				exif_content_add_entry (data->ifd[ifd], entry);
  559|   206k|			exif_entry_unref (entry);
  560|   206k|			break;
  561|  2.04M|		}
  562|  2.04M|	}
  563|  27.9k|}
exif-data.c:level_cost:
  396|  10.8k|{
  397|  10.8k|    static const double log_1_1 = 0.09531017980432493;
  398|       |
  399|       |	/* Adding 0.1 protects against the case where n==1 */
  400|  10.8k|	return ceil(log(n + 0.1)/log_1_1);
  401|  10.8k|}
exif-data.c:exif_data_load_data_thumbnail:
  340|  1.31k|{
  341|       |	/* Sanity checks */
  342|  1.31k|	if (o >= ds) {
  ------------------
  |  Branch (342:6): [True: 0, False: 1.31k]
  ------------------
  343|      0|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData", "Bogus thumbnail offset (%u).", o);
  344|      0|		return;
  345|      0|	}
  346|  1.31k|	if (exif_check_overflow (o,ds,s)) {
  ------------------
  |  Branch (346:6): [True: 285, False: 1.02k]
  ------------------
  347|    285|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData", "Bogus thumbnail size (%u), max would be %u.", s, ds-o);
  348|    285|		return;
  349|    285|	}
  350|  1.02k|	if (data->data) 
  ------------------
  |  Branch (350:6): [True: 841, False: 184]
  ------------------
  351|    841|		exif_mem_free (data->priv->mem, data->data);
  352|  1.02k|	if (!(data->data = exif_data_alloc (data, s))) {
  ------------------
  |  Branch (352:6): [True: 0, False: 1.02k]
  ------------------
  353|      0|		EXIF_LOG_NO_MEMORY (data->priv->log, "ExifData", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  354|      0|		data->size = 0;
  355|      0|		return;
  356|      0|	}
  357|  1.02k|	data->size = s;
  358|  1.02k|	memcpy (data->data, d + o, s);
  359|  1.02k|}
exif-data.c:exif_data_load_data_entry:
  169|   206k|{
  170|   206k|	unsigned int s, doff;
  171|   206k|	unsigned char formatsize;
  172|       |
  173|   206k|	entry->tag        = exif_get_short (d + offset + 0, data->priv->order);
  174|   206k|	entry->format     = exif_get_short (d + offset + 2, data->priv->order);
  175|   206k|	entry->components = exif_get_long  (d + offset + 4, data->priv->order);
  176|       |
  177|       |	/* FIXME: should use exif_tag_get_name_in_ifd here but entry->parent 
  178|       |	 * has not been set yet
  179|       |	 */
  180|   206k|	exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  181|   206k|		  "Loading entry 0x%x ('%s')...", entry->tag,
  182|   206k|		  exif_tag_get_name (entry->tag));
  183|       |
  184|       |	/* {0,1,2,4,8} x { 0x00000000 .. 0xffffffff } 
  185|       |	 *   -> { 0x000000000 .. 0x7fffffff8 } */
  186|       |
  187|   206k|	formatsize = exif_format_get_size(entry->format);
  188|   206k|	if (!formatsize || (entry->components >= (0xffffffff / formatsize)))
  ------------------
  |  Branch (188:6): [True: 154k, False: 52.4k]
  |  Branch (188:21): [True: 1.80k, False: 50.6k]
  ------------------
  189|   156k|		return 0;
  190|       |
  191|  50.6k|	s = formatsize * entry->components;
  192|  50.6k|	if ((s < entry->components) || (s == 0)) {
  ------------------
  |  Branch (192:6): [True: 0, False: 50.6k]
  |  Branch (192:33): [True: 3.87k, False: 46.7k]
  ------------------
  193|  3.87k|		return 0;
  194|  3.87k|	}
  195|       |
  196|       |	/*
  197|       |	 * Size? If bigger than 4 bytes, the actual data is not
  198|       |	 * in the entry but somewhere else (offset).
  199|       |	 */
  200|  46.7k|	if (s > 4)
  ------------------
  |  Branch (200:6): [True: 36.7k, False: 9.99k]
  ------------------
  201|  36.7k|		doff = exif_get_long (d + offset + 8, data->priv->order);
  202|  9.99k|	else
  203|  9.99k|		doff = offset + 8;
  204|       |
  205|       |	/* Sanity checks */
  206|  46.7k|	if (doff >= size) {
  ------------------
  |  Branch (206:6): [True: 14.2k, False: 32.4k]
  ------------------
  207|  14.2k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  208|  14.2k|				  "Tag starts past end of buffer (%u > %u)", doff, size);
  209|  14.2k|		return 0;
  210|  14.2k|	}
  211|       |
  212|  32.4k|	if (s > size - doff) {
  ------------------
  |  Branch (212:6): [True: 2.69k, False: 29.8k]
  ------------------
  213|  2.69k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  214|  2.69k|				  "Tag data goes past end of buffer (%u > %u)", doff+s, size);
  215|  2.69k|		return 0;
  216|  2.69k|	}
  217|       |
  218|  29.8k|	entry->data = exif_data_alloc (data, s);
  219|  29.8k|	if (entry->data) {
  ------------------
  |  Branch (219:6): [True: 29.8k, False: 0]
  ------------------
  220|  29.8k|		entry->size = s;
  221|  29.8k|		memcpy (entry->data, d + doff, s);
  222|  29.8k|	} else {
  223|      0|		EXIF_LOG_NO_MEMORY(data->priv->log, "ExifData", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  224|      0|		return 0;
  225|      0|	}
  226|       |
  227|       |	/* If this is the MakerNote, remember the offset */
  228|  29.8k|	if (entry->tag == EXIF_TAG_MAKER_NOTE) {
  ------------------
  |  Branch (228:6): [True: 8.73k, False: 21.0k]
  ------------------
  229|  8.73k|		if (!entry->data) {
  ------------------
  |  Branch (229:7): [True: 0, False: 8.73k]
  ------------------
  230|      0|			exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG, "ExifData",
  231|      0|					  "MakerNote found with empty data");	
  232|  8.73k|		} else if (entry->size > 6) {
  ------------------
  |  Branch (232:14): [True: 7.80k, False: 926]
  ------------------
  233|  7.80k|			exif_log (data->priv->log,
  234|  7.80k|					       EXIF_LOG_CODE_DEBUG, "ExifData",
  235|  7.80k|					       "MakerNote found (%02x %02x %02x %02x "
  236|  7.80k|					       "%02x %02x %02x...).",
  237|  7.80k|					       entry->data[0], entry->data[1], entry->data[2],
  238|  7.80k|					       entry->data[3], entry->data[4], entry->data[5],
  239|  7.80k|					       entry->data[6]);
  240|  7.80k|		}
  241|  8.73k|		data->priv->offset_mnote = doff;
  242|  8.73k|	}
  243|  29.8k|	return 1;
  244|  29.8k|}
exif-data.c:interpret_maker_note:
  818|  8.48k|{
  819|  8.48k|	int mnoteid;
  820|  8.48k|	ExifEntry* e = exif_data_get_entry (data, EXIF_TAG_MAKER_NOTE);
  ------------------
  |  |  253|  8.48k|	(exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ?			\
  |  |  ------------------
  |  |  |  Branch (253:3): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |  254|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_0],t) :			\
  |  |  255|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ?			\
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |  256|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) :			\
  |  |  257|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ?		\
  |  |  ------------------
  |  |  |  Branch (257:3): [True: 7.35k, False: 1.12k]
  |  |  ------------------
  |  |  258|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) :		\
  |  |  259|  8.48k|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ?		\
  |  |  ------------------
  |  |  |  Branch (259:3): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  260|  1.12k|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) :		\
  |  |  261|  1.12k|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ?	\
  |  |  ------------------
  |  |  |  Branch (261:3): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  262|  1.12k|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)
  ------------------
  821|  8.48k|	if (!e)
  ------------------
  |  Branch (821:6): [True: 1.12k, False: 7.35k]
  ------------------
  822|  1.12k|		return;
  823|       |	
  824|  7.35k|	if ((mnoteid = exif_mnote_data_olympus_identify (data, e)) != 0) {
  ------------------
  |  Branch (824:6): [True: 4.10k, False: 3.25k]
  ------------------
  825|  4.10k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,
  826|  4.10k|			"ExifData", "Olympus MakerNote variant type %d", mnoteid);
  827|  4.10k|		data->priv->md = exif_mnote_data_olympus_new (data->priv->mem);
  828|       |
  829|  4.10k|	} else if ((mnoteid = exif_mnote_data_canon_identify (data, e)) != 0) {
  ------------------
  |  Branch (829:13): [True: 934, False: 2.32k]
  ------------------
  830|    934|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,
  831|    934|			"ExifData", "Canon MakerNote variant type %d", mnoteid);
  832|    934|		data->priv->md = exif_mnote_data_canon_new (data->priv->mem, data->priv->options);
  833|       |
  834|  2.32k|	} else if ((mnoteid = exif_mnote_data_fuji_identify (data, e)) != 0) {
  ------------------
  |  Branch (834:13): [True: 1.05k, False: 1.26k]
  ------------------
  835|  1.05k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,
  836|  1.05k|			"ExifData", "Fuji MakerNote variant type %d", mnoteid);
  837|  1.05k|		data->priv->md = exif_mnote_data_fuji_new (data->priv->mem);
  838|       |
  839|       |	/* NOTE: Must do Pentax detection last because some of the
  840|       |	 * heuristics are pretty general. */
  841|  1.26k|	} else if ((mnoteid = exif_mnote_data_pentax_identify (data, e)) != 0) {
  ------------------
  |  Branch (841:13): [True: 1.06k, False: 201]
  ------------------
  842|  1.06k|		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,
  843|  1.06k|			"ExifData", "Pentax MakerNote variant type %d", mnoteid);
  844|  1.06k|		data->priv->md = exif_mnote_data_pentax_new (data->priv->mem);
  845|  1.06k|	}
  846|       |/* Marcus: disabled until apple makernote can also be saved
  847|       |	else if ((mnoteid = exif_mnote_data_apple_identify (data, e)) != 0) {
  848|       |		exif_log (data->priv->log, EXIF_LOG_CODE_DEBUG,
  849|       |			"ExifData", "Apple MakerNote variant type %d", mnoteid);
  850|       |		data->priv->md = exif_mnote_data_apple_new (data->priv->mem);
  851|       |	}
  852|       |*/
  853|       |
  854|       |	/* 
  855|       |	 * If we are able to interpret the maker note, do so.
  856|       |	 */
  857|  7.35k|	if (data->priv->md) {
  ------------------
  |  Branch (857:6): [True: 7.15k, False: 201]
  ------------------
  858|  7.15k|		exif_mnote_data_log (data->priv->md, data->priv->log);
  859|  7.15k|		exif_mnote_data_set_byte_order (data->priv->md,
  860|  7.15k|						data->priv->order);
  861|  7.15k|		exif_mnote_data_set_offset (data->priv->md,
  862|  7.15k|					    data->priv->offset_mnote);
  863|  7.15k|		exif_mnote_data_load (data->priv->md, d, ds);
  864|  7.15k|	}
  865|  7.35k|}
exif-data.c:exif_data_alloc:
   77|  30.8k|{
   78|  30.8k|	void *d;
   79|       |
   80|  30.8k|	if (!data || !i) 
  ------------------
  |  Branch (80:6): [True: 0, False: 30.8k]
  |  Branch (80:15): [True: 0, False: 30.8k]
  ------------------
   81|      0|		return NULL;
   82|       |
   83|  30.8k|	d = exif_mem_alloc (data->priv->mem, i);
   84|  30.8k|	if (d) 
  ------------------
  |  Branch (84:6): [True: 30.8k, False: 0]
  ------------------
   85|  30.8k|		return d;
   86|       |
   87|      0|	EXIF_LOG_NO_MEMORY (data->priv->log, "ExifData", i);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
   88|       |	return NULL;
   89|  30.8k|}
exif-data.c:fix_func:
 1343|  42.4k|{
 1344|  42.4k|	switch (exif_content_get_ifd (c)) {
 1345|  8.48k|	case EXIF_IFD_1:
  ------------------
  |  Branch (1345:2): [True: 8.48k, False: 33.9k]
  ------------------
 1346|  8.48k|		if (c->parent->data)
  ------------------
  |  Branch (1346:7): [True: 154, False: 8.33k]
  ------------------
 1347|    154|			exif_content_fix (c);
 1348|  8.33k|		else if (c->count) {
  ------------------
  |  Branch (1348:12): [True: 559, False: 7.77k]
  ------------------
 1349|    559|			exif_log (c->parent->priv->log, EXIF_LOG_CODE_DEBUG, "exif-data",
 1350|    559|				  "No thumbnail but entries on thumbnail. These entries have been "
 1351|    559|				  "removed.");
 1352|  1.92k|			while (c->count) {
  ------------------
  |  Branch (1352:11): [True: 1.36k, False: 559]
  ------------------
 1353|  1.36k|				unsigned int cnt = c->count;
 1354|  1.36k|				exif_content_remove_entry (c, c->entries[c->count - 1]);
 1355|  1.36k|				if (cnt == c->count) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 1.36k]
  ------------------
 1356|       |					/* safety net */
 1357|      0|					exif_log (c->parent->priv->log, EXIF_LOG_CODE_DEBUG, "exif-data",
 1358|      0|						  "failed to remove entry from entries.");
 1359|      0|					break;
 1360|      0|				}
 1361|  1.36k|			}
 1362|    559|		}
 1363|  8.48k|		break;
 1364|  33.9k|	default:
  ------------------
  |  Branch (1364:2): [True: 33.9k, False: 8.48k]
  ------------------
 1365|  33.9k|		exif_content_fix (c);
 1366|  42.4k|	}
 1367|  42.4k|}

exif_entry_new:
  114|  51.2k|{
  115|  51.2k|	ExifMem *mem = exif_mem_new_default ();
  116|  51.2k|	ExifEntry *e = exif_entry_new_mem (mem);
  117|       |
  118|  51.2k|	exif_mem_unref (mem);
  119|       |
  120|  51.2k|	return e;
  121|  51.2k|}
exif_entry_new_mem:
  125|   258k|{
  126|   258k|	ExifEntry *e = NULL;
  127|       |
  128|   258k|	e = exif_mem_alloc (mem, sizeof (ExifEntry));
  129|   258k|	if (!e) return NULL;
  ------------------
  |  Branch (129:6): [True: 0, False: 258k]
  ------------------
  130|   258k|	e->priv = exif_mem_alloc (mem, sizeof (ExifEntryPrivate));
  131|   258k|	if (!e->priv) { exif_mem_free (mem, e); return NULL; }
  ------------------
  |  Branch (131:6): [True: 0, False: 258k]
  ------------------
  132|   258k|	e->priv->ref_count = 1;
  133|       |
  134|   258k|	e->priv->mem = mem;
  135|   258k|	exif_mem_ref (mem);
  136|       |
  137|   258k|	return e;
  138|   258k|}
exif_entry_ref:
  142|  73.2k|{
  143|  73.2k|	if (!e) return;
  ------------------
  |  Branch (143:6): [True: 0, False: 73.2k]
  ------------------
  144|       |
  145|  73.2k|	e->priv->ref_count++;
  146|  73.2k|}
exif_entry_unref:
  150|   331k|{
  151|   331k|	if (!e) return;
  ------------------
  |  Branch (151:6): [True: 0, False: 331k]
  ------------------
  152|       |
  153|   331k|	e->priv->ref_count--;
  154|   331k|	if (!e->priv->ref_count)
  ------------------
  |  Branch (154:6): [True: 258k, False: 73.2k]
  ------------------
  155|   258k|		exif_entry_free (e);
  156|   331k|}
exif_entry_free:
  160|   258k|{
  161|   258k|	if (!e) return;
  ------------------
  |  Branch (161:6): [True: 0, False: 258k]
  ------------------
  162|       |
  163|   258k|	if (e->priv) {
  ------------------
  |  Branch (163:6): [True: 258k, False: 0]
  ------------------
  164|   258k|		ExifMem *mem = e->priv->mem;
  165|   258k|		if (e->data)
  ------------------
  |  Branch (165:7): [True: 81.0k, False: 176k]
  ------------------
  166|  81.0k|			exif_mem_free (mem, e->data);
  167|   258k|		exif_mem_free (mem, e->priv);
  168|   258k|		exif_mem_free (mem, e);
  169|   258k|		exif_mem_unref (mem);
  170|   258k|	}
  171|   258k|}
exif_entry_fix:
  208|  17.0k|{
  209|  17.0k|	unsigned int i, newsize;
  210|  17.0k|	unsigned char *newdata;
  211|  17.0k|	ExifByteOrder o;
  212|  17.0k|	ExifRational r;
  213|  17.0k|	ExifSRational sr;
  214|       |
  215|  17.0k|	if (!e || !e->priv) return;
  ------------------
  |  Branch (215:6): [True: 0, False: 17.0k]
  |  Branch (215:12): [True: 0, False: 17.0k]
  ------------------
  216|       |
  217|  17.0k|	switch (e->tag) {
  218|       |	
  219|       |	/* These tags all need to be of format SHORT. */
  220|     68|	case EXIF_TAG_YCBCR_SUB_SAMPLING:
  ------------------
  |  Branch (220:2): [True: 68, False: 16.9k]
  ------------------
  221|     81|	case EXIF_TAG_SUBJECT_AREA:
  ------------------
  |  Branch (221:2): [True: 13, False: 17.0k]
  ------------------
  222|    121|	case EXIF_TAG_COLOR_SPACE:
  ------------------
  |  Branch (222:2): [True: 40, False: 17.0k]
  ------------------
  223|    164|	case EXIF_TAG_PLANAR_CONFIGURATION:
  ------------------
  |  Branch (223:2): [True: 43, False: 17.0k]
  ------------------
  224|    187|	case EXIF_TAG_SENSING_METHOD:
  ------------------
  |  Branch (224:2): [True: 23, False: 17.0k]
  ------------------
  225|    242|	case EXIF_TAG_ORIENTATION:
  ------------------
  |  Branch (225:2): [True: 55, False: 17.0k]
  ------------------
  226|    307|	case EXIF_TAG_YCBCR_POSITIONING:
  ------------------
  |  Branch (226:2): [True: 65, False: 16.9k]
  ------------------
  227|    340|	case EXIF_TAG_PHOTOMETRIC_INTERPRETATION:
  ------------------
  |  Branch (227:2): [True: 33, False: 17.0k]
  ------------------
  228|    396|	case EXIF_TAG_CUSTOM_RENDERED:
  ------------------
  |  Branch (228:2): [True: 56, False: 17.0k]
  ------------------
  229|    437|	case EXIF_TAG_EXPOSURE_MODE:
  ------------------
  |  Branch (229:2): [True: 41, False: 17.0k]
  ------------------
  230|    495|	case EXIF_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (230:2): [True: 58, False: 17.0k]
  ------------------
  231|    553|	case EXIF_TAG_SCENE_CAPTURE_TYPE:
  ------------------
  |  Branch (231:2): [True: 58, False: 17.0k]
  ------------------
  232|    593|	case EXIF_TAG_GAIN_CONTROL:
  ------------------
  |  Branch (232:2): [True: 40, False: 17.0k]
  ------------------
  233|    647|	case EXIF_TAG_SATURATION:
  ------------------
  |  Branch (233:2): [True: 54, False: 17.0k]
  ------------------
  234|    681|	case EXIF_TAG_CONTRAST:
  ------------------
  |  Branch (234:2): [True: 34, False: 17.0k]
  ------------------
  235|    698|	case EXIF_TAG_SHARPNESS:
  ------------------
  |  Branch (235:2): [True: 17, False: 17.0k]
  ------------------
  236|    717|	case EXIF_TAG_ISO_SPEED_RATINGS:
  ------------------
  |  Branch (236:2): [True: 19, False: 17.0k]
  ------------------
  237|    717|		switch (e->format) {
  238|     74|		case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (238:3): [True: 74, False: 643]
  ------------------
  239|    112|		case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (239:3): [True: 38, False: 679]
  ------------------
  240|    202|		case EXIF_FORMAT_BYTE:
  ------------------
  |  Branch (240:3): [True: 90, False: 627]
  ------------------
  241|    294|		case EXIF_FORMAT_SBYTE:
  ------------------
  |  Branch (241:3): [True: 92, False: 625]
  ------------------
  242|    356|		case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (242:3): [True: 62, False: 655]
  ------------------
  243|    356|			if (!e->parent || !e->parent->parent) break;
  ------------------
  |  Branch (243:8): [True: 0, False: 356]
  |  Branch (243:22): [True: 0, False: 356]
  ------------------
  244|    356|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  245|    356|				_("Tag '%s' was of format '%s' (which is "
  ------------------
  |  |   31|    356|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  246|    356|				"against specification) and has been "
  247|    356|				"changed to format '%s'."),
  248|    356|				exif_tag_get_name_in_ifd(e->tag,
  249|    356|							exif_entry_get_ifd(e)),
  ------------------
  |  |  182|    356|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 356, False: 0]
  |  |  ------------------
  ------------------
  250|    356|				exif_format_get_name (e->format),
  251|    356|				exif_format_get_name (EXIF_FORMAT_SHORT));
  252|       |
  253|    356|			o = exif_data_get_byte_order (e->parent->parent);
  254|    356|			newsize = e->components * exif_format_get_size (EXIF_FORMAT_SHORT);
  255|    356|			newdata = exif_entry_alloc (e, newsize);
  256|    356|			if (!newdata) {
  ------------------
  |  Branch (256:8): [True: 0, False: 356]
  ------------------
  257|      0|				exif_entry_log (e, EXIF_LOG_CODE_NO_MEMORY,
  258|      0|					"Could not allocate %lu byte(s).", (unsigned long)newsize);
  259|      0|				break;
  260|      0|			}
  261|       |
  262|  37.5k|			for (i = 0; i < e->components; i++)
  ------------------
  |  Branch (262:16): [True: 37.2k, False: 356]
  ------------------
  263|  37.2k|				exif_set_short (
  264|  37.2k|					newdata + i *
  265|  37.2k|					exif_format_get_size (
  266|  37.2k|					 EXIF_FORMAT_SHORT), o,
  267|  37.2k|					 exif_get_short_convert (
  268|  37.2k|					  e->data + i *
  269|  37.2k|					  exif_format_get_size (e->format),
  270|  37.2k|					  e->format, o));
  271|       |
  272|    356|			exif_mem_free (e->priv->mem, e->data);
  273|    356|			e->data = newdata;
  274|    356|			e->size = newsize;
  275|    356|			e->format = EXIF_FORMAT_SHORT;
  276|    356|			break;
  277|    272|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (277:3): [True: 272, False: 445]
  ------------------
  278|       |			/* No conversion necessary */
  279|    272|			break;
  280|     89|		default:
  ------------------
  |  Branch (280:3): [True: 89, False: 628]
  ------------------
  281|     89|			exif_entry_log (e, EXIF_LOG_CODE_CORRUPT_DATA,
  282|     89|				_("Tag '%s' is of format '%s' (which is "
  ------------------
  |  |   31|     89|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  283|     89|				"against specification) but cannot be changed "
  284|     89|				"to format '%s'."),
  285|     89|				exif_tag_get_name_in_ifd(e->tag,
  286|     89|							exif_entry_get_ifd(e)),
  ------------------
  |  |  182|     89|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 89, False: 0]
  |  |  ------------------
  ------------------
  287|     89|				exif_format_get_name (e->format),
  288|     89|				exif_format_get_name (EXIF_FORMAT_SHORT));
  289|     89|			break;
  290|    717|		}
  291|    717|		break;
  292|       |
  293|       |	/* All these tags need to be of format 'Rational'. */
  294|    717|	case EXIF_TAG_FNUMBER:
  ------------------
  |  Branch (294:2): [True: 88, False: 16.9k]
  ------------------
  295|    161|	case EXIF_TAG_APERTURE_VALUE:
  ------------------
  |  Branch (295:2): [True: 73, False: 16.9k]
  ------------------
  296|    260|	case EXIF_TAG_EXPOSURE_TIME:
  ------------------
  |  Branch (296:2): [True: 99, False: 16.9k]
  ------------------
  297|    352|	case EXIF_TAG_FOCAL_LENGTH:
  ------------------
  |  Branch (297:2): [True: 92, False: 16.9k]
  ------------------
  298|    352|		switch (e->format) {
  299|     88|		case EXIF_FORMAT_SRATIONAL:
  ------------------
  |  Branch (299:3): [True: 88, False: 264]
  ------------------
  300|     88|			if (!e->parent || !e->parent->parent) break;
  ------------------
  |  Branch (300:8): [True: 0, False: 88]
  |  Branch (300:22): [True: 0, False: 88]
  ------------------
  301|     88|			o = exif_data_get_byte_order (e->parent->parent);
  302|  31.8k|			for (i = 0; i < e->components; i++) {
  ------------------
  |  Branch (302:16): [True: 31.7k, False: 88]
  ------------------
  303|  31.7k|				sr = exif_get_srational (e->data + i * 
  304|  31.7k|					exif_format_get_size (
  305|  31.7k|						EXIF_FORMAT_SRATIONAL), o);
  306|  31.7k|				r.numerator = (ExifLong) sr.numerator;
  307|  31.7k|				r.denominator = (ExifLong) sr.denominator;
  308|  31.7k|				exif_set_rational (e->data + i *
  309|  31.7k|					exif_format_get_size (
  310|  31.7k|						EXIF_FORMAT_RATIONAL), o, r);
  311|  31.7k|			}
  312|     88|			e->format = EXIF_FORMAT_RATIONAL;
  313|     88|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  314|     88|				_("Tag '%s' was of format '%s' (which is "
  ------------------
  |  |   31|     88|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  315|     88|				"against specification) and has been "
  316|     88|				"changed to format '%s'."),
  317|     88|				exif_tag_get_name_in_ifd(e->tag,
  318|     88|							exif_entry_get_ifd(e)),
  ------------------
  |  |  182|     88|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 88, False: 0]
  |  |  ------------------
  ------------------
  319|     88|				exif_format_get_name (EXIF_FORMAT_SRATIONAL),
  320|     88|				exif_format_get_name (EXIF_FORMAT_RATIONAL));
  321|     88|			break;
  322|    264|		default:
  ------------------
  |  Branch (322:3): [True: 264, False: 88]
  ------------------
  323|    264|			break;
  324|    352|		}
  325|    352|		break;
  326|       |
  327|       |	/* All these tags need to be of format 'SRational'. */
  328|    352|	case EXIF_TAG_EXPOSURE_BIAS_VALUE:
  ------------------
  |  Branch (328:2): [True: 170, False: 16.8k]
  ------------------
  329|    270|	case EXIF_TAG_BRIGHTNESS_VALUE:
  ------------------
  |  Branch (329:2): [True: 100, False: 16.9k]
  ------------------
  330|    416|	case EXIF_TAG_SHUTTER_SPEED_VALUE:
  ------------------
  |  Branch (330:2): [True: 146, False: 16.9k]
  ------------------
  331|    416|		switch (e->format) {
  332|    276|		case EXIF_FORMAT_RATIONAL:
  ------------------
  |  Branch (332:3): [True: 276, False: 140]
  ------------------
  333|    276|			if (!e->parent || !e->parent->parent) break;
  ------------------
  |  Branch (333:8): [True: 0, False: 276]
  |  Branch (333:22): [True: 0, False: 276]
  ------------------
  334|    276|			o = exif_data_get_byte_order (e->parent->parent);
  335|  14.1k|			for (i = 0; i < e->components; i++) {
  ------------------
  |  Branch (335:16): [True: 13.8k, False: 276]
  ------------------
  336|  13.8k|				r = exif_get_rational (e->data + i * 
  337|  13.8k|					exif_format_get_size (
  338|  13.8k|						EXIF_FORMAT_RATIONAL), o);
  339|  13.8k|				sr.numerator = (ExifLong) r.numerator;
  340|  13.8k|				sr.denominator = (ExifLong) r.denominator;
  341|  13.8k|				exif_set_srational (e->data + i *
  342|  13.8k|					exif_format_get_size (
  343|  13.8k|						EXIF_FORMAT_SRATIONAL), o, sr);
  344|  13.8k|			}
  345|    276|			e->format = EXIF_FORMAT_SRATIONAL;
  346|    276|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  347|    276|				_("Tag '%s' was of format '%s' (which is "
  ------------------
  |  |   31|    276|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  348|    276|				"against specification) and has been "
  349|    276|				"changed to format '%s'."),
  350|    276|				exif_tag_get_name_in_ifd(e->tag,
  351|    276|							exif_entry_get_ifd(e)),
  ------------------
  |  |  182|    276|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 276, False: 0]
  |  |  ------------------
  ------------------
  352|    276|				exif_format_get_name (EXIF_FORMAT_RATIONAL),
  353|    276|				exif_format_get_name (EXIF_FORMAT_SRATIONAL));
  354|    276|			break;
  355|    140|		default:
  ------------------
  |  Branch (355:3): [True: 140, False: 276]
  ------------------
  356|    140|			break;
  357|    416|		}
  358|    416|		break;
  359|       |
  360|    416|	case EXIF_TAG_USER_COMMENT:
  ------------------
  |  Branch (360:2): [True: 200, False: 16.8k]
  ------------------
  361|       |
  362|       |		/* Format needs to be UNDEFINED. */
  363|    200|		if (e->format != EXIF_FORMAT_UNDEFINED) {
  ------------------
  |  Branch (363:7): [True: 110, False: 90]
  ------------------
  364|    110|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  365|    110|				_("Tag 'UserComment' had invalid format '%s'. "
  ------------------
  |  |   31|    110|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  366|    110|				"Format has been set to 'undefined'."),
  367|    110|				exif_format_get_name (e->format));
  368|    110|			e->format = EXIF_FORMAT_UNDEFINED;
  369|    110|		}
  370|       |
  371|       |		/* Some packages like Canon ZoomBrowser EX 4.5 store
  372|       |		   only one zero byte followed by 7 bytes of rubbish */
  373|    200|		if ((e->size >= 8) && (e->data[0] == 0)) {
  ------------------
  |  Branch (373:7): [True: 192, False: 8]
  |  Branch (373:25): [True: 66, False: 126]
  ------------------
  374|     66|			memcpy(e->data, "\0\0\0\0\0\0\0\0", 8);
  375|     66|		}
  376|       |
  377|       |		/* There need to be at least 8 bytes. */
  378|    200|		if (e->size < 8) {
  ------------------
  |  Branch (378:7): [True: 8, False: 192]
  ------------------
  379|      8|			e->data = exif_entry_realloc (e, e->data, 8 + e->size);
  380|      8|			if (!e->data) {
  ------------------
  |  Branch (380:8): [True: 0, False: 8]
  ------------------
  381|      0|				clear_entry(e);
  382|      0|				return;
  383|      0|			}
  384|       |
  385|       |			/* Assume ASCII */
  386|      8|			memmove (e->data + 8, e->data, e->size);
  387|      8|			memcpy (e->data, "ASCII\0\0\0", 8);
  388|      8|			e->size += 8;
  389|      8|			e->components += 8;
  390|      8|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  391|      8|				_("Tag 'UserComment' has been expanded to at "
  ------------------
  |  |   31|      8|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  392|      8|				"least 8 bytes in order to follow the "
  393|      8|				"specification."));
  394|      8|			break;
  395|      8|		}
  396|       |
  397|       |		/*
  398|       |		 * If the first 8 bytes are empty and real data starts
  399|       |		 * afterwards, let's assume ASCII and claim the 8 first
  400|       |		 * bytes for the format specifier.
  401|       |		 */
  402|  16.3k|		for (i = 0; (i < e->size) && !e->data[i]; i++);
  ------------------
  |  Branch (402:15): [True: 16.3k, False: 11]
  |  Branch (402:32): [True: 16.1k, False: 181]
  ------------------
  403|    500|		if (!i) for ( ; (i < e->size) && (e->data[i] == ' '); i++);
  ------------------
  |  Branch (403:7): [True: 126, False: 66]
  |  Branch (403:19): [True: 497, False: 3]
  |  Branch (403:36): [True: 374, False: 123]
  ------------------
  404|    192|		if ((i >= 8) && (i < e->size)) {
  ------------------
  |  Branch (404:7): [True: 73, False: 119]
  |  Branch (404:19): [True: 59, False: 14]
  ------------------
  405|     59|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  406|     59|				_("Tag 'UserComment' is not empty but does not "
  ------------------
  |  |   31|     59|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  407|     59|				"start with a format identifier. "
  408|     59|				"This has been fixed."));
  409|     59|			memcpy (e->data, "ASCII\0\0\0", 8);
  410|     59|			break;
  411|     59|		}
  412|       |
  413|       |		/* 
  414|       |		 * First 8 bytes need to follow the specification. If they don't, 
  415|       |		 * assume ASCII.
  416|       |		 */
  417|    133|		if (memcmp (e->data, "ASCII\0\0\0"     , 8) &&
  ------------------
  |  Branch (417:7): [True: 132, False: 1]
  ------------------
  418|    132|		    memcmp (e->data, "UNICODE\0"       , 8) &&
  ------------------
  |  Branch (418:7): [True: 130, False: 2]
  ------------------
  419|    130|		    memcmp (e->data, "JIS\0\0\0\0\0"   , 8) &&
  ------------------
  |  Branch (419:7): [True: 129, False: 1]
  ------------------
  420|    129|		    memcmp (e->data, "\0\0\0\0\0\0\0\0", 8)) {
  ------------------
  |  Branch (420:7): [True: 118, False: 11]
  ------------------
  421|    118|			e->data = exif_entry_realloc (e, e->data, 8 + e->size);
  422|    118|			if (!e->data) {
  ------------------
  |  Branch (422:8): [True: 0, False: 118]
  ------------------
  423|      0|				clear_entry(e);
  424|      0|				break;
  425|      0|			}
  426|       |
  427|       |			/* Assume ASCII */
  428|    118|			memmove (e->data + 8, e->data, e->size);
  429|    118|			memcpy (e->data, "ASCII\0\0\0", 8);
  430|    118|			e->size += 8;
  431|    118|			e->components += 8;
  432|    118|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  433|    118|				_("Tag 'UserComment' did not start with a "
  ------------------
  |  |   31|    118|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  434|    118|				"format identifier. This has been fixed."));
  435|    118|			break;
  436|    118|		}
  437|       |
  438|     15|		break;
  439|  15.3k|	default:
  ------------------
  |  Branch (439:2): [True: 15.3k, False: 1.68k]
  ------------------
  440|  15.3k|		break;
  441|  17.0k|	}
  442|  17.0k|}
exif_entry_get_value:
  855|  73.0k|{
  856|  73.0k|	unsigned int i, j, k;
  857|  73.0k|	ExifShort v_short, v_short2, v_short3, v_short4;
  858|  73.0k|	ExifByte v_byte;
  859|  73.0k|	ExifRational v_rat;
  860|  73.0k|	ExifSRational v_srat;
  861|  73.0k|	char b[64];
  862|  73.0k|	const char *c;
  863|  73.0k|	ExifByteOrder o;
  864|  73.0k|	double d;
  865|  73.0k|	ExifEntry *entry;
  866|  73.0k|	static const struct {
  867|  73.0k|		char label[5];
  868|  73.0k|		char major, minor;
  869|  73.0k|	} versions[] = {
  870|  73.0k|		{"0110", 1,  1},
  871|  73.0k|		{"0120", 1,  2},
  872|  73.0k|		{"0200", 2,  0},
  873|  73.0k|		{"0210", 2,  1},
  874|  73.0k|		{"0220", 2,  2},
  875|  73.0k|		{"0221", 2, 21},
  876|  73.0k|		{"0230", 2,  3},
  877|  73.0k|		{"0231", 2, 31},
  878|  73.0k|		{"0232", 2, 32},
  879|  73.0k|		{""    , 0,  0}
  880|  73.0k|	};
  881|       |
  882|  73.0k|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  883|       |
  884|  73.0k|	if (!e || !e->parent || !e->parent->parent || !maxlen || !val)
  ------------------
  |  Branch (884:6): [True: 0, False: 73.0k]
  |  Branch (884:12): [True: 0, False: 73.0k]
  |  Branch (884:26): [True: 0, False: 73.0k]
  |  Branch (884:48): [True: 0, False: 73.0k]
  |  Branch (884:59): [True: 0, False: 73.0k]
  ------------------
  885|      0|		return val;
  886|       |
  887|       |	/* make sure the returned string is zero terminated */
  888|       |	/* FIXME: this is inefficient in the case of long buffers and should
  889|       |	 * instead be taken care of on each write instead. */
  890|  73.0k|	memset (val, 0, maxlen);
  891|       |
  892|       |	/* We need the byte order */
  893|  73.0k|	o = exif_data_get_byte_order (e->parent->parent);
  894|       |
  895|       |	/* Sanity check */
  896|  73.0k|	if (e->size != e->components * exif_format_get_size (e->format)) {
  ------------------
  |  Branch (896:6): [True: 25, False: 73.0k]
  ------------------
  897|     25|		snprintf (val, maxlen, _("Invalid size of entry (%i, "
  ------------------
  |  |   31|     25|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  898|     25|			"expected %li x %i)."), e->size, e->components,
  899|     25|				exif_format_get_size (e->format));
  900|     25|		return val;
  901|     25|	}
  902|       |
  903|  73.0k|	switch (e->tag) {
  904|    304|	case EXIF_TAG_USER_COMMENT:
  ------------------
  |  Branch (904:2): [True: 304, False: 72.7k]
  ------------------
  905|       |
  906|       |		/*
  907|       |		 * The specification says UNDEFINED, but some
  908|       |		 * manufacturers don't care and use ASCII. If this is the
  909|       |		 * case here, only refuse to read it if there is no chance
  910|       |		 * of finding readable data.
  911|       |		 */
  912|    304|		if ((e->format != EXIF_FORMAT_ASCII) || 
  ------------------
  |  Branch (912:7): [True: 259, False: 45]
  ------------------
  913|     45|		    (e->size <= 8) ||
  ------------------
  |  Branch (913:7): [True: 4, False: 41]
  ------------------
  914|     41|		    ( memcmp (e->data, "ASCII\0\0\0"  , 8) &&
  ------------------
  |  Branch (914:9): [True: 40, False: 1]
  ------------------
  915|     40|		      memcmp (e->data, "UNICODE\0"    , 8) &&
  ------------------
  |  Branch (915:9): [True: 39, False: 1]
  ------------------
  916|     39|		      memcmp (e->data, "JIS\0\0\0\0\0", 8) &&
  ------------------
  |  Branch (916:9): [True: 38, False: 1]
  ------------------
  917|     38|		      memcmp (e->data, "\0\0\0\0\0\0\0\0", 8)))
  ------------------
  |  Branch (917:9): [True: 30, False: 8]
  ------------------
  918|    293|			CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|    293|#define CF(entry,target,v,maxlen)					\
  |  |  647|    293|{									\
  |  |  648|    293|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 39, False: 254]
  |  |  ------------------
  |  |  649|     39|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     39|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     39|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     39|			"format ('%s', expected '%s')."),		\
  |  |  652|     39|			exif_tag_get_name (entry->tag),			\
  |  |  653|     39|			exif_format_get_name (entry->format),		\
  |  |  654|     39|			exif_format_get_name (target));			\
  |  |  655|     39|		break;							\
  |  |  656|     39|	}								\
  |  |  657|    293|}
  ------------------
  919|       |
  920|       |		/*
  921|       |		 * Note that, according to the specification (V2.1, p 40),
  922|       |		 * the user comment field does not have to be 
  923|       |		 * NULL terminated.
  924|       |		 */
  925|    265|		if ((e->size >= 8) && !memcmp (e->data, "ASCII\0\0\0", 8)) {
  ------------------
  |  Branch (925:7): [True: 253, False: 12]
  |  Branch (925:25): [True: 163, False: 90]
  ------------------
  926|    163|			strncpy (val, (char *) e->data + 8, MIN (e->size - 8, maxlen-1));
  ------------------
  |  |  182|    163|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 135, False: 28]
  |  |  ------------------
  ------------------
  927|    163|			break;
  928|    163|		}
  929|    102|		if ((e->size >= 8) && !memcmp (e->data, "UNICODE\0", 8)) {
  ------------------
  |  Branch (929:7): [True: 90, False: 12]
  |  Branch (929:25): [True: 3, False: 87]
  ------------------
  930|      3|			strncpy (val, _("Unsupported UNICODE string"), maxlen-1);
  ------------------
  |  |   31|      3|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  931|       |		/* FIXME: use iconv to convert into the locale encoding.
  932|       |		 * EXIF 2.2 implies (but does not say) that this encoding is
  933|       |		 * UCS-2.
  934|       |		 */
  935|      3|			break;
  936|      3|		}
  937|     99|		if ((e->size >= 8) && !memcmp (e->data, "JIS\0\0\0\0\0", 8)) {
  ------------------
  |  Branch (937:7): [True: 87, False: 12]
  |  Branch (937:25): [True: 2, False: 85]
  ------------------
  938|      2|			strncpy (val, _("Unsupported JIS string"), maxlen-1);
  ------------------
  |  |   31|      2|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  939|       |		/* FIXME: use iconv to convert into the locale encoding */
  940|      2|			break;
  941|      2|		}
  942|       |
  943|       |		/* Check if there is really some information in the tag. */
  944|  4.03k|		for (i = 0; (i < e->size) &&
  ------------------
  |  Branch (944:15): [True: 4.02k, False: 12]
  ------------------
  945|  4.02k|			    (!e->data[i] || (e->data[i] == ' ')); i++);
  ------------------
  |  Branch (945:9): [True: 3.73k, False: 293]
  |  Branch (945:24): [True: 208, False: 85]
  ------------------
  946|     97|		if (i == e->size) break;
  ------------------
  |  Branch (946:7): [True: 12, False: 85]
  ------------------
  947|       |
  948|       |		/*
  949|       |		 * If we reach this point, the tag does not
  950|       | 		 * comply with the standard but seems to contain data.
  951|       |		 * Print as much as possible.
  952|       |		 * Note: make sure we do not overwrite the final \0 at maxlen-1
  953|       |		 */
  954|     85|		exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  955|     85|			_("Tag UserComment contains data but is "
  ------------------
  |  |   31|     85|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  956|     85|			  "against specification."));
  957|  85.1k| 		for (j = 0; (i < e->size) && (j < maxlen-1); i++, j++) {
  ------------------
  |  Branch (957:16): [True: 85.0k, False: 80]
  |  Branch (957:33): [True: 85.0k, False: 5]
  ------------------
  958|  85.0k|			exif_entry_log (e, EXIF_LOG_CODE_DEBUG,
  959|  85.0k|				_("Byte at position %i: 0x%02x"), i, e->data[i]);
  ------------------
  |  |   31|  85.0k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  960|  85.0k| 			val[j] = isprint (e->data[i]) ? e->data[i] : '.';
  ------------------
  |  Branch (960:14): [True: 13.1k, False: 71.9k]
  ------------------
  961|  85.0k|		}
  962|     85|		break;
  963|       |
  964|  8.49k|	case EXIF_TAG_EXIF_VERSION:
  ------------------
  |  Branch (964:2): [True: 8.49k, False: 64.5k]
  ------------------
  965|  8.49k|		CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|  8.49k|#define CF(entry,target,v,maxlen)					\
  |  |  647|  8.49k|{									\
  |  |  648|  8.49k|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 6, False: 8.48k]
  |  |  ------------------
  |  |  649|      6|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      6|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      6|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      6|			"format ('%s', expected '%s')."),		\
  |  |  652|      6|			exif_tag_get_name (entry->tag),			\
  |  |  653|      6|			exif_format_get_name (entry->format),		\
  |  |  654|      6|			exif_format_get_name (target));			\
  |  |  655|      6|		break;							\
  |  |  656|      6|	}								\
  |  |  657|  8.49k|}
  ------------------
  966|  8.48k|		CC (e, 4, val, maxlen)
  ------------------
  |  |  659|  8.48k|#define CC(entry,target,v,maxlen)					\
  |  |  660|  8.48k|{									\
  |  |  661|  8.48k|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 3, False: 8.48k]
  |  |  ------------------
  |  |  662|      3|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      3|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      3|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      3|			  "components (%i, expected %i)."),		\
  |  |  665|      3|			exif_tag_get_name (entry->tag),		\
  |  |  666|      3|			(int) entry->components, (int) target);		\
  |  |  667|      3|		break;							\
  |  |  668|      3|	}								\
  |  |  669|  8.48k|}
  ------------------
  967|  8.48k|		strncpy (val, _("Unknown Exif Version"), maxlen-1);
  ------------------
  |  |   31|  8.48k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  968|  34.0k|		for (i = 0; *versions[i].label; i++) {
  ------------------
  |  Branch (968:15): [True: 34.0k, False: 13]
  ------------------
  969|  34.0k|			if (!memcmp (e->data, versions[i].label, 4)) {
  ------------------
  |  Branch (969:8): [True: 8.47k, False: 25.5k]
  ------------------
  970|  8.47k|    				snprintf (val, maxlen,
  971|  8.47k|					_("Exif Version %d.%d"),
  ------------------
  |  |   31|  8.47k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  972|  8.47k|					versions[i].major,
  973|  8.47k|					versions[i].minor);
  974|  8.47k|    				break;
  975|  8.47k|			}
  976|  34.0k|		}
  977|  8.48k|		break;
  978|  8.49k|	case EXIF_TAG_FLASH_PIX_VERSION:
  ------------------
  |  Branch (978:2): [True: 8.49k, False: 64.5k]
  ------------------
  979|  8.49k|		CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|  8.49k|#define CF(entry,target,v,maxlen)					\
  |  |  647|  8.49k|{									\
  |  |  648|  8.49k|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 8, False: 8.48k]
  |  |  ------------------
  |  |  649|      8|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      8|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      8|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      8|			"format ('%s', expected '%s')."),		\
  |  |  652|      8|			exif_tag_get_name (entry->tag),			\
  |  |  653|      8|			exif_format_get_name (entry->format),		\
  |  |  654|      8|			exif_format_get_name (target));			\
  |  |  655|      8|		break;							\
  |  |  656|      8|	}								\
  |  |  657|  8.49k|}
  ------------------
  980|  8.48k|		CC (e, 4, val, maxlen)
  ------------------
  |  |  659|  8.48k|#define CC(entry,target,v,maxlen)					\
  |  |  660|  8.48k|{									\
  |  |  661|  8.48k|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 6, False: 8.47k]
  |  |  ------------------
  |  |  662|      6|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      6|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      6|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      6|			  "components (%i, expected %i)."),		\
  |  |  665|      6|			exif_tag_get_name (entry->tag),		\
  |  |  666|      6|			(int) entry->components, (int) target);		\
  |  |  667|      6|		break;							\
  |  |  668|      6|	}								\
  |  |  669|  8.48k|}
  ------------------
  981|  8.47k|		if (!memcmp (e->data, "0100", 4))
  ------------------
  |  Branch (981:7): [True: 8.45k, False: 22]
  ------------------
  982|  8.45k|			strncpy (val, _("FlashPix Version 1.0"), maxlen-1);
  ------------------
  |  |   31|  8.45k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  983|     22|		else if (!memcmp (e->data, "0101", 4))
  ------------------
  |  Branch (983:12): [True: 1, False: 21]
  ------------------
  984|      1|			strncpy (val, _("FlashPix Version 1.01"), maxlen-1);
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  985|     21|		else
  986|     21|			strncpy (val, _("Unknown FlashPix Version"), maxlen-1);
  ------------------
  |  |   31|     21|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  987|  8.47k|		break;
  988|    107|	case EXIF_TAG_COPYRIGHT:
  ------------------
  |  Branch (988:2): [True: 107, False: 72.9k]
  ------------------
  989|    107|		CF (e, EXIF_FORMAT_ASCII, val, maxlen)
  ------------------
  |  |  646|    107|#define CF(entry,target,v,maxlen)					\
  |  |  647|    107|{									\
  |  |  648|    107|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 9, False: 98]
  |  |  ------------------
  |  |  649|      9|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      9|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      9|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      9|			"format ('%s', expected '%s')."),		\
  |  |  652|      9|			exif_tag_get_name (entry->tag),			\
  |  |  653|      9|			exif_format_get_name (entry->format),		\
  |  |  654|      9|			exif_format_get_name (target));			\
  |  |  655|      9|		break;							\
  |  |  656|      9|	}								\
  |  |  657|    107|}
  ------------------
  990|       |
  991|       |		/*
  992|       |		 * First part: Photographer.
  993|       |		 * Some cameras store a string like "   " here. Ignore it.
  994|       |		 * Remember that a corrupted tag might not be NUL-terminated
  995|       |		 */
  996|     98|		if (e->size && e->data && match_repeated_char(e->data, ' ', e->size))
  ------------------
  |  Branch (996:7): [True: 98, False: 0]
  |  Branch (996:18): [True: 98, False: 0]
  |  Branch (996:29): [True: 58, False: 40]
  ------------------
  997|     58|			strncpy (val, (char *) e->data, MIN (maxlen-1, e->size));
  ------------------
  |  |  182|     58|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 7, False: 51]
  |  |  ------------------
  ------------------
  998|     40|		else
  999|     40|			strncpy (val, _("[None]"), maxlen-1);
  ------------------
  |  |   31|     40|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1000|     98|		strncat (val, " ", maxlen-1 - strlen (val));
 1001|     98|		strncat (val, _("(Photographer)"), maxlen-1 - strlen (val));
  ------------------
  |  |   31|     98|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1002|       |
 1003|       |		/* Second part: Editor. */
 1004|     98|		strncat (val, " - ", maxlen-1 - strlen (val));
 1005|     98|		k = 0;
 1006|     98|		if (e->size && e->data) {
  ------------------
  |  Branch (1006:7): [True: 98, False: 0]
  |  Branch (1006:18): [True: 98, False: 0]
  ------------------
 1007|     98|			const unsigned char *tagdata = memchr(e->data, 0, e->size);
 1008|     98|			if (tagdata++) {
  ------------------
  |  Branch (1008:8): [True: 84, False: 14]
  ------------------
 1009|     84|				unsigned int editor_ofs = tagdata - e->data;
 1010|     84|				unsigned int remaining = e->size - editor_ofs;
 1011|     84|				if (match_repeated_char(tagdata, ' ', remaining)) {
  ------------------
  |  Branch (1011:9): [True: 62, False: 22]
  ------------------
 1012|     62|					strncat (val, (const char*)tagdata, MIN (maxlen-1 - strlen (val), remaining));
  ------------------
  |  |  182|     62|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 9, False: 53]
  |  |  ------------------
  ------------------
 1013|     62|					++k;
 1014|     62|				}
 1015|     84|			}
 1016|     98|		}
 1017|     98|		if (!k)
  ------------------
  |  Branch (1017:7): [True: 36, False: 62]
  ------------------
 1018|     36|			strncat (val, _("[None]"), maxlen-1 - strlen (val));
  ------------------
  |  |   31|     36|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1019|     98|		strncat (val, " ", maxlen-1 - strlen (val));
 1020|     98|		strncat (val, _("(Editor)"), maxlen-1 - strlen (val));
  ------------------
  |  |   31|     98|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1021|       |
 1022|     98|		break;
 1023|    186|	case EXIF_TAG_FNUMBER:
  ------------------
  |  Branch (1023:2): [True: 186, False: 72.8k]
  ------------------
 1024|    186|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    186|#define CF(entry,target,v,maxlen)					\
  |  |  647|    186|{									\
  |  |  648|    186|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 17, False: 169]
  |  |  ------------------
  |  |  649|     17|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     17|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     17|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     17|			"format ('%s', expected '%s')."),		\
  |  |  652|     17|			exif_tag_get_name (entry->tag),			\
  |  |  653|     17|			exif_format_get_name (entry->format),		\
  |  |  654|     17|			exif_format_get_name (target));			\
  |  |  655|     17|		break;							\
  |  |  656|     17|	}								\
  |  |  657|    186|}
  ------------------
 1025|    169|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    169|#define CC(entry,target,v,maxlen)					\
  |  |  660|    169|{									\
  |  |  661|    169|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 22, False: 147]
  |  |  ------------------
  |  |  662|     22|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     22|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     22|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     22|			  "components (%i, expected %i)."),		\
  |  |  665|     22|			exif_tag_get_name (entry->tag),		\
  |  |  666|     22|			(int) entry->components, (int) target);		\
  |  |  667|     22|		break;							\
  |  |  668|     22|	}								\
  |  |  669|    169|}
  ------------------
 1026|    147|		v_rat = exif_get_rational (e->data, o);
 1027|    147|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1027:7): [True: 34, False: 113]
  ------------------
 1028|     34|			exif_entry_format_value(e, val, maxlen);
 1029|     34|			break;
 1030|     34|		}
 1031|    113|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1032|    113|		snprintf (val, maxlen, "f/%.01f", d);
 1033|    113|		break;
 1034|    119|	case EXIF_TAG_APERTURE_VALUE:
  ------------------
  |  Branch (1034:2): [True: 119, False: 72.8k]
  ------------------
 1035|    277|	case EXIF_TAG_MAX_APERTURE_VALUE:
  ------------------
  |  Branch (1035:2): [True: 158, False: 72.8k]
  ------------------
 1036|    277|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    277|#define CF(entry,target,v,maxlen)					\
  |  |  647|    277|{									\
  |  |  648|    277|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 14, False: 263]
  |  |  ------------------
  |  |  649|     14|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     14|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     14|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     14|			"format ('%s', expected '%s')."),		\
  |  |  652|     14|			exif_tag_get_name (entry->tag),			\
  |  |  653|     14|			exif_format_get_name (entry->format),		\
  |  |  654|     14|			exif_format_get_name (target));			\
  |  |  655|     14|		break;							\
  |  |  656|     14|	}								\
  |  |  657|    277|}
  ------------------
 1037|    263|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    263|#define CC(entry,target,v,maxlen)					\
  |  |  660|    263|{									\
  |  |  661|    263|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 16, False: 247]
  |  |  ------------------
  |  |  662|     16|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     16|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     16|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     16|			  "components (%i, expected %i)."),		\
  |  |  665|     16|			exif_tag_get_name (entry->tag),		\
  |  |  666|     16|			(int) entry->components, (int) target);		\
  |  |  667|     16|		break;							\
  |  |  668|     16|	}								\
  |  |  669|    263|}
  ------------------
 1038|    247|		v_rat = exif_get_rational (e->data, o);
 1039|    247|		if (!v_rat.denominator || (0x80000000 == v_rat.numerator)) {
  ------------------
  |  Branch (1039:7): [True: 48, False: 199]
  |  Branch (1039:29): [True: 4, False: 195]
  ------------------
 1040|     52|			exif_entry_format_value(e, val, maxlen);
 1041|     52|			break;
 1042|     52|		}
 1043|    195|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1044|    195|		snprintf (val, maxlen, _("%.02f EV"), d);
  ------------------
  |  |   31|    195|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1045|    195|		snprintf (b, sizeof (b), _(" (f/%.01f)"), pow (2, d / 2.));
  ------------------
  |  |   31|    195|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1046|    195|		strncat (val, b, maxlen-1 - strlen (val));
 1047|    195|		break;
 1048|    301|	case EXIF_TAG_FOCAL_LENGTH:
  ------------------
  |  Branch (1048:2): [True: 301, False: 72.7k]
  ------------------
 1049|    301|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    301|#define CF(entry,target,v,maxlen)					\
  |  |  647|    301|{									\
  |  |  648|    301|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 8, False: 293]
  |  |  ------------------
  |  |  649|      8|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      8|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      8|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      8|			"format ('%s', expected '%s')."),		\
  |  |  652|      8|			exif_tag_get_name (entry->tag),			\
  |  |  653|      8|			exif_format_get_name (entry->format),		\
  |  |  654|      8|			exif_format_get_name (target));			\
  |  |  655|      8|		break;							\
  |  |  656|      8|	}								\
  |  |  657|    301|}
  ------------------
 1050|    293|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    293|#define CC(entry,target,v,maxlen)					\
  |  |  660|    293|{									\
  |  |  661|    293|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 32, False: 261]
  |  |  ------------------
  |  |  662|     32|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     32|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     32|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     32|			  "components (%i, expected %i)."),		\
  |  |  665|     32|			exif_tag_get_name (entry->tag),		\
  |  |  666|     32|			(int) entry->components, (int) target);		\
  |  |  667|     32|		break;							\
  |  |  668|     32|	}								\
  |  |  669|    293|}
  ------------------
 1051|    261|		v_rat = exif_get_rational (e->data, o);
 1052|    261|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1052:7): [True: 38, False: 223]
  ------------------
 1053|     38|			exif_entry_format_value(e, val, maxlen);
 1054|     38|			break;
 1055|     38|		}
 1056|       |
 1057|       |		/*
 1058|       |		 * For calculation of the 35mm equivalent,
 1059|       |		 * Minolta cameras need a multiplier that depends on the
 1060|       |		 * camera model.
 1061|       |		 */
 1062|    223|		d = 0.;
 1063|    223|		entry = exif_content_get_entry (
 1064|    223|			e->parent->parent->ifd[EXIF_IFD_0], EXIF_TAG_MAKE);
 1065|    223|		if (entry && entry->data && entry->size >= 7 &&
  ------------------
  |  Branch (1065:7): [True: 140, False: 83]
  |  Branch (1065:16): [True: 140, False: 0]
  |  Branch (1065:31): [True: 135, False: 5]
  ------------------
 1066|    135|		    !strncmp ((char *)entry->data, "Minolta", 7)) {
  ------------------
  |  Branch (1066:7): [True: 74, False: 61]
  ------------------
 1067|     74|			entry = exif_content_get_entry (
 1068|     74|					e->parent->parent->ifd[EXIF_IFD_0],
 1069|     74|					EXIF_TAG_MODEL);
 1070|     74|			if (entry && entry->data && entry->size >= 8) {
  ------------------
  |  Branch (1070:8): [True: 73, False: 1]
  |  Branch (1070:17): [True: 73, False: 0]
  |  Branch (1070:32): [True: 71, False: 2]
  ------------------
 1071|     71|				if (!strncmp ((char *)entry->data, "DiMAGE 7", 8))
  ------------------
  |  Branch (1071:9): [True: 1, False: 70]
  ------------------
 1072|      1|					d = 3.9;
 1073|     70|				else if (!strncmp ((char *)entry->data, "DiMAGE 5", 8))
  ------------------
  |  Branch (1073:14): [True: 1, False: 69]
  ------------------
 1074|      1|					d = 4.9;
 1075|     71|			}
 1076|     74|		}
 1077|    223|		if (d)
  ------------------
  |  Branch (1077:7): [True: 2, False: 221]
  ------------------
 1078|      2|			snprintf (b, sizeof (b), _(" (35 equivalent: %.0f mm)"),
  ------------------
  |  |   31|      2|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1079|      2|				  (d * (double) v_rat.numerator /
 1080|      2|				       (double) v_rat.denominator));
 1081|    221|		else
 1082|    221|			b[0] = 0;
 1083|       |
 1084|    223|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1085|    223|		snprintf (val, maxlen, "%.1f mm", d);
 1086|    223|		strncat (val, b, maxlen-1 - strlen (val));
 1087|    223|		break;
 1088|    144|	case EXIF_TAG_SUBJECT_DISTANCE:
  ------------------
  |  Branch (1088:2): [True: 144, False: 72.8k]
  ------------------
 1089|    144|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    144|#define CF(entry,target,v,maxlen)					\
  |  |  647|    144|{									\
  |  |  648|    144|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 7, False: 137]
  |  |  ------------------
  |  |  649|      7|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      7|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      7|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      7|			"format ('%s', expected '%s')."),		\
  |  |  652|      7|			exif_tag_get_name (entry->tag),			\
  |  |  653|      7|			exif_format_get_name (entry->format),		\
  |  |  654|      7|			exif_format_get_name (target));			\
  |  |  655|      7|		break;							\
  |  |  656|      7|	}								\
  |  |  657|    144|}
  ------------------
 1090|    137|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    137|#define CC(entry,target,v,maxlen)					\
  |  |  660|    137|{									\
  |  |  661|    137|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 2, False: 135]
  |  |  ------------------
  |  |  662|      2|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      2|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      2|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      2|			  "components (%i, expected %i)."),		\
  |  |  665|      2|			exif_tag_get_name (entry->tag),		\
  |  |  666|      2|			(int) entry->components, (int) target);		\
  |  |  667|      2|		break;							\
  |  |  668|      2|	}								\
  |  |  669|    137|}
  ------------------
 1091|    135|		v_rat = exif_get_rational (e->data, o);
 1092|    135|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1092:7): [True: 39, False: 96]
  ------------------
 1093|     39|			exif_entry_format_value(e, val, maxlen);
 1094|     39|			break;
 1095|     39|		}
 1096|     96|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1097|     96|		snprintf (val, maxlen, "%.1f m", d);
 1098|     96|		break;
 1099|    164|	case EXIF_TAG_EXPOSURE_TIME:
  ------------------
  |  Branch (1099:2): [True: 164, False: 72.8k]
  ------------------
 1100|    164|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    164|#define CF(entry,target,v,maxlen)					\
  |  |  647|    164|{									\
  |  |  648|    164|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 7, False: 157]
  |  |  ------------------
  |  |  649|      7|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      7|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      7|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      7|			"format ('%s', expected '%s')."),		\
  |  |  652|      7|			exif_tag_get_name (entry->tag),			\
  |  |  653|      7|			exif_format_get_name (entry->format),		\
  |  |  654|      7|			exif_format_get_name (target));			\
  |  |  655|      7|		break;							\
  |  |  656|      7|	}								\
  |  |  657|    164|}
  ------------------
 1101|    157|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    157|#define CC(entry,target,v,maxlen)					\
  |  |  660|    157|{									\
  |  |  661|    157|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 15, False: 142]
  |  |  ------------------
  |  |  662|     15|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     15|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     15|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     15|			  "components (%i, expected %i)."),		\
  |  |  665|     15|			exif_tag_get_name (entry->tag),		\
  |  |  666|     15|			(int) entry->components, (int) target);		\
  |  |  667|     15|		break;							\
  |  |  668|     15|	}								\
  |  |  669|    157|}
  ------------------
 1102|    142|		v_rat = exif_get_rational (e->data, o);
 1103|    142|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1103:7): [True: 35, False: 107]
  ------------------
 1104|     35|			exif_entry_format_value(e, val, maxlen);
 1105|     35|			break;
 1106|     35|		}
 1107|    107|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1108|    107|		if (d < 1 && d)
  ------------------
  |  Branch (1108:7): [True: 67, False: 40]
  |  Branch (1108:16): [True: 64, False: 3]
  ------------------
 1109|     64|			snprintf (val, maxlen, _("1/%.0f"), 1. / d);
  ------------------
  |  |   31|     64|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1110|     43|		else
 1111|     43|			snprintf (val, maxlen, "%.0f", d);
 1112|    107|		strncat (val, _(" sec."), maxlen-1 - strlen (val));
  ------------------
  |  |   31|    107|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1113|    107|		break;
 1114|    163|	case EXIF_TAG_SHUTTER_SPEED_VALUE:
  ------------------
  |  Branch (1114:2): [True: 163, False: 72.8k]
  ------------------
 1115|    163|		CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen)
  ------------------
  |  |  646|    163|#define CF(entry,target,v,maxlen)					\
  |  |  647|    163|{									\
  |  |  648|    163|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 4, False: 159]
  |  |  ------------------
  |  |  649|      4|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      4|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      4|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      4|			"format ('%s', expected '%s')."),		\
  |  |  652|      4|			exif_tag_get_name (entry->tag),			\
  |  |  653|      4|			exif_format_get_name (entry->format),		\
  |  |  654|      4|			exif_format_get_name (target));			\
  |  |  655|      4|		break;							\
  |  |  656|      4|	}								\
  |  |  657|    163|}
  ------------------
 1116|    159|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    159|#define CC(entry,target,v,maxlen)					\
  |  |  660|    159|{									\
  |  |  661|    159|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 22, False: 137]
  |  |  ------------------
  |  |  662|     22|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     22|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     22|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     22|			  "components (%i, expected %i)."),		\
  |  |  665|     22|			exif_tag_get_name (entry->tag),		\
  |  |  666|     22|			(int) entry->components, (int) target);		\
  |  |  667|     22|		break;							\
  |  |  668|     22|	}								\
  |  |  669|    159|}
  ------------------
 1117|    137|		v_srat = exif_get_srational (e->data, o);
 1118|    137|		if (!v_srat.denominator) {
  ------------------
  |  Branch (1118:7): [True: 34, False: 103]
  ------------------
 1119|     34|			exif_entry_format_value(e, val, maxlen);
 1120|     34|			break;
 1121|     34|		}
 1122|    103|		d = (double) v_srat.numerator / (double) v_srat.denominator;
 1123|    103|		snprintf (val, maxlen, _("%.02f EV"), d);
  ------------------
  |  |   31|    103|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1124|    103|		if (pow (2, d))
  ------------------
  |  Branch (1124:7): [True: 92, False: 11]
  ------------------
 1125|     92|			d = 1. / pow (2, d);
 1126|    103|		if (d < 1 && d)
  ------------------
  |  Branch (1126:7): [True: 80, False: 23]
  |  Branch (1126:16): [True: 66, False: 14]
  ------------------
 1127|     66|		  snprintf (b, sizeof (b), _(" (1/%.0f sec.)"), 1. / d);
  ------------------
  |  |   31|     66|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1128|     37|		else
 1129|     37|		  snprintf (b, sizeof (b), _(" (%.0f sec.)"), d);
  ------------------
  |  |   31|     37|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1130|    103|		strncat (val, b, maxlen-1 - strlen (val));
 1131|    103|		break;
 1132|    119|	case EXIF_TAG_BRIGHTNESS_VALUE:
  ------------------
  |  Branch (1132:2): [True: 119, False: 72.8k]
  ------------------
 1133|    119|		CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen)
  ------------------
  |  |  646|    119|#define CF(entry,target,v,maxlen)					\
  |  |  647|    119|{									\
  |  |  648|    119|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 11, False: 108]
  |  |  ------------------
  |  |  649|     11|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     11|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     11|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     11|			"format ('%s', expected '%s')."),		\
  |  |  652|     11|			exif_tag_get_name (entry->tag),			\
  |  |  653|     11|			exif_format_get_name (entry->format),		\
  |  |  654|     11|			exif_format_get_name (target));			\
  |  |  655|     11|		break;							\
  |  |  656|     11|	}								\
  |  |  657|    119|}
  ------------------
 1134|    108|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    108|#define CC(entry,target,v,maxlen)					\
  |  |  660|    108|{									\
  |  |  661|    108|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 30, False: 78]
  |  |  ------------------
  |  |  662|     30|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     30|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     30|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     30|			  "components (%i, expected %i)."),		\
  |  |  665|     30|			exif_tag_get_name (entry->tag),		\
  |  |  666|     30|			(int) entry->components, (int) target);		\
  |  |  667|     30|		break;							\
  |  |  668|     30|	}								\
  |  |  669|    108|}
  ------------------
 1135|     78|		v_srat = exif_get_srational (e->data, o);
 1136|     78|		if (!v_srat.denominator) {
  ------------------
  |  Branch (1136:7): [True: 8, False: 70]
  ------------------
 1137|      8|			exif_entry_format_value(e, val, maxlen);
 1138|      8|			break;
 1139|      8|		}
 1140|     70|		d = (double) v_srat.numerator / (double) v_srat.denominator;
 1141|     70|		snprintf (val, maxlen, _("%.02f EV"), d);
  ------------------
  |  |   31|     70|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1142|     70|		snprintf (b, sizeof (b), _(" (%.02f cd/m^2)"),
  ------------------
  |  |   31|     70|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1143|     70|			1. / (M_PI * 0.3048 * 0.3048) * pow (2, d));
 1144|     70|		strncat (val, b, maxlen-1 - strlen (val));
 1145|     70|		break;
 1146|     27|	case EXIF_TAG_FILE_SOURCE:
  ------------------
  |  Branch (1146:2): [True: 27, False: 72.9k]
  ------------------
 1147|     27|		CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|     27|#define CF(entry,target,v,maxlen)					\
  |  |  647|     27|{									\
  |  |  648|     27|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 3, False: 24]
  |  |  ------------------
  |  |  649|      3|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      3|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      3|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      3|			"format ('%s', expected '%s')."),		\
  |  |  652|      3|			exif_tag_get_name (entry->tag),			\
  |  |  653|      3|			exif_format_get_name (entry->format),		\
  |  |  654|      3|			exif_format_get_name (target));			\
  |  |  655|      3|		break;							\
  |  |  656|      3|	}								\
  |  |  657|     27|}
  ------------------
 1148|     24|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|     24|#define CC(entry,target,v,maxlen)					\
  |  |  660|     24|{									\
  |  |  661|     24|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 5, False: 19]
  |  |  ------------------
  |  |  662|      5|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      5|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      5|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      5|			  "components (%i, expected %i)."),		\
  |  |  665|      5|			exif_tag_get_name (entry->tag),		\
  |  |  666|      5|			(int) entry->components, (int) target);		\
  |  |  667|      5|		break;							\
  |  |  668|      5|	}								\
  |  |  669|     24|}
  ------------------
 1149|     19|		v_byte = e->data[0];
 1150|     19|		if (v_byte == 3)
  ------------------
  |  Branch (1150:7): [True: 10, False: 9]
  ------------------
 1151|     10|			strncpy (val, _("DSC"), maxlen-1);
  ------------------
  |  |   31|     10|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1152|      9|		else
 1153|      9|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|      9|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1154|      9|				  "value %i)"), v_byte);
 1155|     19|		break;
 1156|     62|	case EXIF_TAG_COMPONENTS_CONFIGURATION:
  ------------------
  |  Branch (1156:2): [True: 62, False: 72.9k]
  ------------------
 1157|     62|		CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|     62|#define CF(entry,target,v,maxlen)					\
  |  |  647|     62|{									\
  |  |  648|     62|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 9, False: 53]
  |  |  ------------------
  |  |  649|      9|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      9|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      9|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      9|			"format ('%s', expected '%s')."),		\
  |  |  652|      9|			exif_tag_get_name (entry->tag),			\
  |  |  653|      9|			exif_format_get_name (entry->format),		\
  |  |  654|      9|			exif_format_get_name (target));			\
  |  |  655|      9|		break;							\
  |  |  656|      9|	}								\
  |  |  657|     62|}
  ------------------
 1158|     53|		CC (e, 4, val, maxlen)
  ------------------
  |  |  659|     53|#define CC(entry,target,v,maxlen)					\
  |  |  660|     53|{									\
  |  |  661|     53|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 19, False: 34]
  |  |  ------------------
  |  |  662|     19|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     19|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     19|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     19|			  "components (%i, expected %i)."),		\
  |  |  665|     19|			exif_tag_get_name (entry->tag),		\
  |  |  666|     19|			(int) entry->components, (int) target);		\
  |  |  667|     19|		break;							\
  |  |  668|     19|	}								\
  |  |  669|     53|}
  ------------------
 1159|    170|		for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1159:15): [True: 136, False: 34]
  ------------------
 1160|    136|			switch (e->data[i]) {
 1161|     30|			case 0: c = _("-"); break;
  ------------------
  |  |   31|     30|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1161:4): [True: 30, False: 106]
  ------------------
 1162|     18|			case 1: c = _("Y"); break;
  ------------------
  |  |   31|     18|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1162:4): [True: 18, False: 118]
  ------------------
 1163|     20|			case 2: c = _("Cb"); break;
  ------------------
  |  |   31|     20|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1163:4): [True: 20, False: 116]
  ------------------
 1164|     22|			case 3: c = _("Cr"); break;
  ------------------
  |  |   31|     22|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1164:4): [True: 22, False: 114]
  ------------------
 1165|      1|			case 4: c = _("R"); break;
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1165:4): [True: 1, False: 135]
  ------------------
 1166|      9|			case 5: c = _("G"); break;
  ------------------
  |  |   31|      9|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1166:4): [True: 9, False: 127]
  ------------------
 1167|      5|			case 6: c = _("B"); break;
  ------------------
  |  |   31|      5|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1167:4): [True: 5, False: 131]
  ------------------
 1168|     31|			default: c = _("Reserved"); break;
  ------------------
  |  |   31|     31|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (1168:4): [True: 31, False: 105]
  ------------------
 1169|    136|			}
 1170|    136|			strncat (val, c, maxlen-1 - strlen (val));
 1171|    136|			if (i < 3)
  ------------------
  |  Branch (1171:8): [True: 102, False: 34]
  ------------------
 1172|    102|				strncat (val, " ", maxlen-1 - strlen (val));
 1173|    136|		}
 1174|     34|		break;
 1175|    191|	case EXIF_TAG_EXPOSURE_BIAS_VALUE:
  ------------------
  |  Branch (1175:2): [True: 191, False: 72.8k]
  ------------------
 1176|    191|		CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen)
  ------------------
  |  |  646|    191|#define CF(entry,target,v,maxlen)					\
  |  |  647|    191|{									\
  |  |  648|    191|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 8, False: 183]
  |  |  ------------------
  |  |  649|      8|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      8|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      8|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      8|			"format ('%s', expected '%s')."),		\
  |  |  652|      8|			exif_tag_get_name (entry->tag),			\
  |  |  653|      8|			exif_format_get_name (entry->format),		\
  |  |  654|      8|			exif_format_get_name (target));			\
  |  |  655|      8|		break;							\
  |  |  656|      8|	}								\
  |  |  657|    191|}
  ------------------
 1177|    183|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    183|#define CC(entry,target,v,maxlen)					\
  |  |  660|    183|{									\
  |  |  661|    183|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 24, False: 159]
  |  |  ------------------
  |  |  662|     24|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     24|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     24|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     24|			  "components (%i, expected %i)."),		\
  |  |  665|     24|			exif_tag_get_name (entry->tag),		\
  |  |  666|     24|			(int) entry->components, (int) target);		\
  |  |  667|     24|		break;							\
  |  |  668|     24|	}								\
  |  |  669|    183|}
  ------------------
 1178|    159|		v_srat = exif_get_srational (e->data, o);
 1179|    159|		if (!v_srat.denominator) {
  ------------------
  |  Branch (1179:7): [True: 37, False: 122]
  ------------------
 1180|     37|			exif_entry_format_value(e, val, maxlen);
 1181|     37|			break;
 1182|     37|		}
 1183|    122|		d = (double) v_srat.numerator / (double) v_srat.denominator;
 1184|    122|		snprintf (val, maxlen, _("%.02f EV"), d);
  ------------------
  |  |   31|    122|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1185|    122|		break;
 1186|     30|	case EXIF_TAG_SCENE_TYPE:
  ------------------
  |  Branch (1186:2): [True: 30, False: 72.9k]
  ------------------
 1187|     30|		CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |  646|     30|#define CF(entry,target,v,maxlen)					\
  |  |  647|     30|{									\
  |  |  648|     30|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 5, False: 25]
  |  |  ------------------
  |  |  649|      5|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      5|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      5|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      5|			"format ('%s', expected '%s')."),		\
  |  |  652|      5|			exif_tag_get_name (entry->tag),			\
  |  |  653|      5|			exif_format_get_name (entry->format),		\
  |  |  654|      5|			exif_format_get_name (target));			\
  |  |  655|      5|		break;							\
  |  |  656|      5|	}								\
  |  |  657|     30|}
  ------------------
 1188|     25|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|     25|#define CC(entry,target,v,maxlen)					\
  |  |  660|     25|{									\
  |  |  661|     25|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 7, False: 18]
  |  |  ------------------
  |  |  662|      7|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      7|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      7|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      7|			  "components (%i, expected %i)."),		\
  |  |  665|      7|			exif_tag_get_name (entry->tag),		\
  |  |  666|      7|			(int) entry->components, (int) target);		\
  |  |  667|      7|		break;							\
  |  |  668|      7|	}								\
  |  |  669|     25|}
  ------------------
 1189|     18|		v_byte = e->data[0];
 1190|     18|		if (v_byte == 1)
  ------------------
  |  Branch (1190:7): [True: 17, False: 1]
  ------------------
 1191|     17|			strncpy (val, _("Directly photographed"), maxlen-1);
  ------------------
  |  |   31|     17|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1192|      1|		else
 1193|      1|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1194|      1|				  "value %i)"), v_byte);
 1195|     18|		break;
 1196|    115|	case EXIF_TAG_YCBCR_SUB_SAMPLING:
  ------------------
  |  Branch (1196:2): [True: 115, False: 72.9k]
  ------------------
 1197|    115|		CF (e, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |  646|    115|#define CF(entry,target,v,maxlen)					\
  |  |  647|    115|{									\
  |  |  648|    115|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 13, False: 102]
  |  |  ------------------
  |  |  649|     13|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     13|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     13|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     13|			"format ('%s', expected '%s')."),		\
  |  |  652|     13|			exif_tag_get_name (entry->tag),			\
  |  |  653|     13|			exif_format_get_name (entry->format),		\
  |  |  654|     13|			exif_format_get_name (target));			\
  |  |  655|     13|		break;							\
  |  |  656|     13|	}								\
  |  |  657|    115|}
  ------------------
 1198|    102|		CC (e, 2, val, maxlen)
  ------------------
  |  |  659|    102|#define CC(entry,target,v,maxlen)					\
  |  |  660|    102|{									\
  |  |  661|    102|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 48, False: 54]
  |  |  ------------------
  |  |  662|     48|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     48|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     48|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     48|			  "components (%i, expected %i)."),		\
  |  |  665|     48|			exif_tag_get_name (entry->tag),		\
  |  |  666|     48|			(int) entry->components, (int) target);		\
  |  |  667|     48|		break;							\
  |  |  668|     48|	}								\
  |  |  669|    102|}
  ------------------
 1199|     54|		v_short  = exif_get_short (e->data, o);
 1200|     54|		v_short2 = exif_get_short (
 1201|     54|			e->data + exif_format_get_size (e->format),
 1202|     54|			o);
 1203|     54|		if ((v_short == 2) && (v_short2 == 1))
  ------------------
  |  Branch (1203:7): [True: 29, False: 25]
  |  Branch (1203:25): [True: 3, False: 26]
  ------------------
 1204|      3|			strncpy (val, _("YCbCr4:2:2"), maxlen-1);
  ------------------
  |  |   31|      3|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1205|     51|		else if ((v_short == 2) && (v_short2 == 2))
  ------------------
  |  Branch (1205:12): [True: 26, False: 25]
  |  Branch (1205:30): [True: 4, False: 22]
  ------------------
 1206|      4|			strncpy (val, _("YCbCr4:2:0"), maxlen-1);
  ------------------
  |  |   31|      4|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1207|     47|		else
 1208|     47|			snprintf (val, maxlen, "%u, %u", v_short, v_short2);
 1209|     54|		break;
 1210|     21|	case EXIF_TAG_SUBJECT_AREA:
  ------------------
  |  Branch (1210:2): [True: 21, False: 72.9k]
  ------------------
 1211|     21|		CF (e, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |  646|     21|#define CF(entry,target,v,maxlen)					\
  |  |  647|     21|{									\
  |  |  648|     21|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 7, False: 14]
  |  |  ------------------
  |  |  649|      7|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|      7|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|      7|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|      7|			"format ('%s', expected '%s')."),		\
  |  |  652|      7|			exif_tag_get_name (entry->tag),			\
  |  |  653|      7|			exif_format_get_name (entry->format),		\
  |  |  654|      7|			exif_format_get_name (target));			\
  |  |  655|      7|		break;							\
  |  |  656|      7|	}								\
  |  |  657|     21|}
  ------------------
 1212|     14|		switch (e->components) {
 1213|      1|		case 2:
  ------------------
  |  Branch (1213:3): [True: 1, False: 13]
  ------------------
 1214|      1|			v_short  = exif_get_short (e->data, o);
 1215|      1|			v_short2 = exif_get_short (e->data + 2, o);
 1216|      1|			snprintf (val, maxlen, "(x,y) = (%i,%i)",
 1217|      1|				  v_short, v_short2);
 1218|      1|			break;
 1219|      1|		case 3:
  ------------------
  |  Branch (1219:3): [True: 1, False: 13]
  ------------------
 1220|      1|			v_short  = exif_get_short (e->data, o);
 1221|      1|			v_short2 = exif_get_short (e->data + 2, o);
 1222|      1|			v_short3 = exif_get_short (e->data + 4, o);
 1223|      1|			snprintf (val, maxlen, _("Within distance %i of "
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1224|      1|				"(x,y) = (%i,%i)"), v_short3, v_short,
 1225|      1|				v_short2);
 1226|      1|			break;
 1227|      1|		case 4:
  ------------------
  |  Branch (1227:3): [True: 1, False: 13]
  ------------------
 1228|      1|			v_short  = exif_get_short (e->data, o);
 1229|      1|			v_short2 = exif_get_short (e->data + 2, o);
 1230|      1|			v_short3 = exif_get_short (e->data + 4, o);
 1231|      1|			v_short4 = exif_get_short (e->data + 6, o);
 1232|      1|			snprintf (val, maxlen, _("Within rectangle "
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1233|      1|				"(width %i, height %i) around "
 1234|      1|				"(x,y) = (%i,%i)"), v_short3, v_short4,
 1235|      1|				v_short, v_short2);
 1236|      1|			break;
 1237|     11|		default:
  ------------------
  |  Branch (1237:3): [True: 11, False: 3]
  ------------------
 1238|     11|			snprintf (val, maxlen, _("Unexpected number "
  ------------------
  |  |   31|     11|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1239|     11|				"of components (%li, expected 2, 3, or 4)."),
 1240|     11|				e->components);	
 1241|     14|		}
 1242|     14|		break;
 1243|    135|	case EXIF_TAG_GPS_VERSION_ID:
  ------------------
  |  Branch (1243:2): [True: 135, False: 72.8k]
  ------------------
 1244|       |		/* This is only valid in the GPS IFD */
 1245|    135|		CF (e, EXIF_FORMAT_BYTE, val, maxlen)
  ------------------
  |  |  646|    135|#define CF(entry,target,v,maxlen)					\
  |  |  647|    135|{									\
  |  |  648|    135|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 111, False: 24]
  |  |  ------------------
  |  |  649|    111|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|    111|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|    111|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|    111|			"format ('%s', expected '%s')."),		\
  |  |  652|    111|			exif_tag_get_name (entry->tag),			\
  |  |  653|    111|			exif_format_get_name (entry->format),		\
  |  |  654|    111|			exif_format_get_name (target));			\
  |  |  655|    111|		break;							\
  |  |  656|    111|	}								\
  |  |  657|    135|}
  ------------------
 1246|     24|		CC (e, 4, val, maxlen)
  ------------------
  |  |  659|     24|#define CC(entry,target,v,maxlen)					\
  |  |  660|     24|{									\
  |  |  661|     24|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 21, False: 3]
  |  |  ------------------
  |  |  662|     21|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     21|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     21|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     21|			  "components (%i, expected %i)."),		\
  |  |  665|     21|			exif_tag_get_name (entry->tag),		\
  |  |  666|     21|			(int) entry->components, (int) target);		\
  |  |  667|     21|		break;							\
  |  |  668|     21|	}								\
  |  |  669|     24|}
  ------------------
 1247|      3|		v_byte = e->data[0];
 1248|      3|		snprintf (val, maxlen, "%u", v_byte);
 1249|     12|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (1249:15): [True: 9, False: 3]
  ------------------
 1250|      9|			v_byte = e->data[i];
 1251|      9|			snprintf (b, sizeof (b), ".%u", v_byte);
 1252|      9|			strncat (val, b, maxlen-1 - strlen (val));
 1253|      9|		}
 1254|      3|		break;
 1255|    174|	case EXIF_TAG_INTEROPERABILITY_VERSION:
  ------------------
  |  Branch (1255:2): [True: 174, False: 72.8k]
  ------------------
 1256|       |	/* a.k.a. case EXIF_TAG_GPS_LATITUDE: */
 1257|       |		/* This tag occurs in EXIF_IFD_INTEROPERABILITY */
 1258|    174|		if (e->format == EXIF_FORMAT_UNDEFINED) {
  ------------------
  |  Branch (1258:7): [True: 39, False: 135]
  ------------------
 1259|     39|			strncpy (val, (char *) e->data, MIN (maxlen-1, e->size));
  ------------------
  |  |  182|     39|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 5, False: 34]
  |  |  ------------------
  ------------------
 1260|     39|			break;
 1261|     39|		}
 1262|       |		/* EXIF_TAG_GPS_LATITUDE is the same numerically as
 1263|       |		 * EXIF_TAG_INTEROPERABILITY_VERSION but in EXIF_IFD_GPS
 1264|       |		 */
 1265|    135|		exif_entry_format_value(e, val, maxlen);
 1266|    135|		break;
 1267|     71|	case EXIF_TAG_GPS_ALTITUDE_REF:
  ------------------
  |  Branch (1267:2): [True: 71, False: 72.9k]
  ------------------
 1268|       |		/* This is only valid in the GPS IFD */
 1269|     71|		CF (e, EXIF_FORMAT_BYTE, val, maxlen)
  ------------------
  |  |  646|     71|#define CF(entry,target,v,maxlen)					\
  |  |  647|     71|{									\
  |  |  648|     71|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 23, False: 48]
  |  |  ------------------
  |  |  649|     23|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     23|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     23|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     23|			"format ('%s', expected '%s')."),		\
  |  |  652|     23|			exif_tag_get_name (entry->tag),			\
  |  |  653|     23|			exif_format_get_name (entry->format),		\
  |  |  654|     23|			exif_format_get_name (target));			\
  |  |  655|     23|		break;							\
  |  |  656|     23|	}								\
  |  |  657|     71|}
  ------------------
 1270|     48|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|     48|#define CC(entry,target,v,maxlen)					\
  |  |  660|     48|{									\
  |  |  661|     48|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 33, False: 15]
  |  |  ------------------
  |  |  662|     33|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     33|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     33|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     33|			  "components (%i, expected %i)."),		\
  |  |  665|     33|			exif_tag_get_name (entry->tag),		\
  |  |  666|     33|			(int) entry->components, (int) target);		\
  |  |  667|     33|		break;							\
  |  |  668|     33|	}								\
  |  |  669|     48|}
  ------------------
 1271|     15|		v_byte = e->data[0];
 1272|     15|		if (v_byte == 0)
  ------------------
  |  Branch (1272:7): [True: 2, False: 13]
  ------------------
 1273|      2|			strncpy (val, _("Sea level"), maxlen-1);
  ------------------
  |  |   31|      2|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1274|     13|		else if (v_byte == 1)
  ------------------
  |  Branch (1274:12): [True: 1, False: 12]
  ------------------
 1275|      1|			strncpy (val, _("Sea level reference"), maxlen-1);
  ------------------
  |  |   31|      1|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1276|     12|		else
 1277|     12|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|     12|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1278|     12|				  "value %i)"), v_byte);
 1279|     15|		break;
 1280|    337|	case EXIF_TAG_GPS_TIME_STAMP:
  ------------------
  |  Branch (1280:2): [True: 337, False: 72.6k]
  ------------------
 1281|       |		/* This is only valid in the GPS IFD */
 1282|    337|		CF (e, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |  646|    337|#define CF(entry,target,v,maxlen)					\
  |  |  647|    337|{									\
  |  |  648|    337|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 27, False: 310]
  |  |  ------------------
  |  |  649|     27|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     27|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     27|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     27|			"format ('%s', expected '%s')."),		\
  |  |  652|     27|			exif_tag_get_name (entry->tag),			\
  |  |  653|     27|			exif_format_get_name (entry->format),		\
  |  |  654|     27|			exif_format_get_name (target));			\
  |  |  655|     27|		break;							\
  |  |  656|     27|	}								\
  |  |  657|    337|}
  ------------------
 1283|    310|		CC (e, 3, val, maxlen)
  ------------------
  |  |  659|    310|#define CC(entry,target,v,maxlen)					\
  |  |  660|    310|{									\
  |  |  661|    310|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 4, False: 306]
  |  |  ------------------
  |  |  662|      4|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|      4|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|      4|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|      4|			  "components (%i, expected %i)."),		\
  |  |  665|      4|			exif_tag_get_name (entry->tag),		\
  |  |  666|      4|			(int) entry->components, (int) target);		\
  |  |  667|      4|		break;							\
  |  |  668|      4|	}								\
  |  |  669|    310|}
  ------------------
 1284|       |
 1285|    306|		v_rat  = exif_get_rational (e->data, o);
 1286|    306|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1286:7): [True: 34, False: 272]
  ------------------
 1287|     34|			exif_entry_format_value(e, val, maxlen);
 1288|     34|			break;
 1289|     34|		}
 1290|    272|		i = v_rat.numerator / v_rat.denominator;
 1291|       |
 1292|    272|		v_rat = exif_get_rational (e->data +
 1293|    272|					     exif_format_get_size (e->format),
 1294|    272|					   o);
 1295|    272|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1295:7): [True: 32, False: 240]
  ------------------
 1296|     32|			exif_entry_format_value(e, val, maxlen);
 1297|     32|			break;
 1298|     32|		}
 1299|    240|		j = v_rat.numerator / v_rat.denominator;
 1300|       |
 1301|    240|		v_rat = exif_get_rational (e->data +
 1302|    240|					     2*exif_format_get_size (e->format),
 1303|    240|					     o);
 1304|    240|		if (!v_rat.denominator) {
  ------------------
  |  Branch (1304:7): [True: 53, False: 187]
  ------------------
 1305|     53|			exif_entry_format_value(e, val, maxlen);
 1306|     53|			break;
 1307|     53|		}
 1308|    187|		d = (double) v_rat.numerator / (double) v_rat.denominator;
 1309|    187|		snprintf (val, maxlen, "%02u:%02u:%05.2f", i, j, d);
 1310|    187|		break;
 1311|       |
 1312|     86|	case EXIF_TAG_METERING_MODE:
  ------------------
  |  Branch (1312:2): [True: 86, False: 72.9k]
  ------------------
 1313|    284|	case EXIF_TAG_COMPRESSION:
  ------------------
  |  Branch (1313:2): [True: 198, False: 72.8k]
  ------------------
 1314|    313|	case EXIF_TAG_LIGHT_SOURCE:
  ------------------
  |  Branch (1314:2): [True: 29, False: 72.9k]
  ------------------
 1315|    336|	case EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT:
  ------------------
  |  Branch (1315:2): [True: 23, False: 72.9k]
  ------------------
 1316|  8.98k|	case EXIF_TAG_RESOLUTION_UNIT:
  ------------------
  |  Branch (1316:2): [True: 8.65k, False: 64.3k]
  ------------------
 1317|  9.03k|	case EXIF_TAG_EXPOSURE_PROGRAM:
  ------------------
  |  Branch (1317:2): [True: 44, False: 72.9k]
  ------------------
 1318|  9.03k|	case EXIF_TAG_SENSITIVITY_TYPE:
  ------------------
  |  Branch (1318:2): [True: 5, False: 73.0k]
  ------------------
 1319|  9.09k|	case EXIF_TAG_FLASH:
  ------------------
  |  Branch (1319:2): [True: 61, False: 72.9k]
  ------------------
 1320|  9.10k|	case EXIF_TAG_SUBJECT_DISTANCE_RANGE:
  ------------------
  |  Branch (1320:2): [True: 9, False: 73.0k]
  ------------------
 1321|  17.5k|	case EXIF_TAG_COLOR_SPACE:
  ------------------
  |  Branch (1321:2): [True: 8.48k, False: 64.5k]
  ------------------
 1322|  17.5k|	case EXIF_TAG_COMPOSITE_IMAGE:
  ------------------
  |  Branch (1322:2): [True: 2, False: 73.0k]
  ------------------
 1323|  17.5k|		CF (e,EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |  646|  17.5k|#define CF(entry,target,v,maxlen)					\
  |  |  647|  17.5k|{									\
  |  |  648|  17.5k|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 50, False: 17.5k]
  |  |  ------------------
  |  |  649|     50|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|     50|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|     50|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|     50|			"format ('%s', expected '%s')."),		\
  |  |  652|     50|			exif_tag_get_name (entry->tag),			\
  |  |  653|     50|			exif_format_get_name (entry->format),		\
  |  |  654|     50|			exif_format_get_name (target));			\
  |  |  655|     50|		break;							\
  |  |  656|     50|	}								\
  |  |  657|  17.5k|}
  ------------------
 1324|  17.5k|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|  17.5k|#define CC(entry,target,v,maxlen)					\
  |  |  660|  17.5k|{									\
  |  |  661|  17.5k|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 53, False: 17.4k]
  |  |  ------------------
  |  |  662|     53|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|     53|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|     53|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|     53|			  "components (%i, expected %i)."),		\
  |  |  665|     53|			exif_tag_get_name (entry->tag),		\
  |  |  666|     53|			(int) entry->components, (int) target);		\
  |  |  667|     53|		break;							\
  |  |  668|     53|	}								\
  |  |  669|  17.5k|}
  ------------------
 1325|  17.4k|		v_short = exif_get_short (e->data, o);
 1326|       |
 1327|       |		/* Search the tag */
 1328|   129k|		for (i = 0; list2[i].tag && (list2[i].tag != e->tag); i++);
  ------------------
  |  Branch (1328:15): [True: 129k, False: 0]
  |  Branch (1328:31): [True: 111k, False: 17.4k]
  ------------------
 1329|  17.4k|		if (!list2[i].tag) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 17.4k]
  ------------------
 1330|      0|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1331|      0|				  "value %i)"), v_short);
 1332|      0|			break;
 1333|      0|		}
 1334|       |
 1335|       |		/* Find the value */
 1336|  36.0k|		for (j = 0; list2[i].elem[j].values[0] &&
  ------------------
  |  Branch (1336:15): [True: 35.9k, False: 98]
  ------------------
 1337|  35.9k|			    (list2[i].elem[j].index < v_short); j++);
  ------------------
  |  Branch (1337:8): [True: 18.5k, False: 17.3k]
  ------------------
 1338|  17.4k|		if (list2[i].elem[j].index != v_short) {
  ------------------
  |  Branch (1338:7): [True: 281, False: 17.2k]
  ------------------
 1339|    281|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|    281|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1340|    281|				  "value %i)"), v_short);
 1341|    281|			break;
 1342|    281|		}
 1343|       |
 1344|       |		/* Find a short enough value */
 1345|  17.2k|		memset (val, 0, maxlen);
 1346|  43.0k|		for (k = 0; list2[i].elem[j].values[k]; k++) {
  ------------------
  |  Branch (1346:15): [True: 25.8k, False: 17.2k]
  ------------------
 1347|  25.8k|			size_t l = strlen (_(list2[i].elem[j].values[k]));
  ------------------
  |  |   31|  25.8k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1348|  25.8k|			if ((maxlen > l) && (strlen (val) < l))
  ------------------
  |  Branch (1348:8): [True: 25.8k, False: 0]
  |  Branch (1348:24): [True: 17.2k, False: 8.67k]
  ------------------
 1349|  17.2k|				strncpy (val, _(list2[i].elem[j].values[k]), maxlen-1);
  ------------------
  |  |   31|  17.2k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1350|  25.8k|		}
 1351|  17.2k|		if (!val[0]) snprintf (val, maxlen, "%i", v_short);
  ------------------
  |  Branch (1351:7): [True: 0, False: 17.2k]
  ------------------
 1352|       |
 1353|  17.2k|		break;
 1354|       |
 1355|     50|	case EXIF_TAG_PLANAR_CONFIGURATION:
  ------------------
  |  Branch (1355:2): [True: 50, False: 72.9k]
  ------------------
 1356|     75|	case EXIF_TAG_SENSING_METHOD:
  ------------------
  |  Branch (1356:2): [True: 25, False: 72.9k]
  ------------------
 1357|    149|	case EXIF_TAG_ORIENTATION:
  ------------------
  |  Branch (1357:2): [True: 74, False: 72.9k]
  ------------------
 1358|    242|	case EXIF_TAG_YCBCR_POSITIONING:
  ------------------
  |  Branch (1358:2): [True: 93, False: 72.9k]
  ------------------
 1359|    281|	case EXIF_TAG_PHOTOMETRIC_INTERPRETATION:
  ------------------
  |  Branch (1359:2): [True: 39, False: 72.9k]
  ------------------
 1360|    348|	case EXIF_TAG_CUSTOM_RENDERED:
  ------------------
  |  Branch (1360:2): [True: 67, False: 72.9k]
  ------------------
 1361|    395|	case EXIF_TAG_EXPOSURE_MODE:
  ------------------
  |  Branch (1361:2): [True: 47, False: 72.9k]
  ------------------
 1362|    459|	case EXIF_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (1362:2): [True: 64, False: 72.9k]
  ------------------
 1363|    521|	case EXIF_TAG_SCENE_CAPTURE_TYPE:
  ------------------
  |  Branch (1363:2): [True: 62, False: 72.9k]
  ------------------
 1364|    566|	case EXIF_TAG_GAIN_CONTROL:
  ------------------
  |  Branch (1364:2): [True: 45, False: 72.9k]
  ------------------
 1365|    626|	case EXIF_TAG_SATURATION:
  ------------------
  |  Branch (1365:2): [True: 60, False: 72.9k]
  ------------------
 1366|    666|	case EXIF_TAG_CONTRAST:
  ------------------
  |  Branch (1366:2): [True: 40, False: 72.9k]
  ------------------
 1367|    687|	case EXIF_TAG_SHARPNESS:
  ------------------
  |  Branch (1367:2): [True: 21, False: 72.9k]
  ------------------
 1368|    687|		CF (e, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |  646|    687|#define CF(entry,target,v,maxlen)					\
  |  |  647|    687|{									\
  |  |  648|    687|	if (entry->format != target) {					\
  |  |  ------------------
  |  |  |  Branch (648:6): [True: 102, False: 585]
  |  |  ------------------
  |  |  649|    102|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  650|    102|			_("The tag '%s' contains data of an invalid "	\
  |  |  ------------------
  |  |  |  |   31|    102|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  651|    102|			"format ('%s', expected '%s')."),		\
  |  |  652|    102|			exif_tag_get_name (entry->tag),			\
  |  |  653|    102|			exif_format_get_name (entry->format),		\
  |  |  654|    102|			exif_format_get_name (target));			\
  |  |  655|    102|		break;							\
  |  |  656|    102|	}								\
  |  |  657|    687|}
  ------------------
 1369|    585|		CC (e, 1, val, maxlen)
  ------------------
  |  |  659|    585|#define CC(entry,target,v,maxlen)					\
  |  |  660|    585|{									\
  |  |  661|    585|	if (entry->components != target) {				\
  |  |  ------------------
  |  |  |  Branch (661:6): [True: 209, False: 376]
  |  |  ------------------
  |  |  662|    209|		exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA,	\
  |  |  663|    209|			_("The tag '%s' contains an invalid number of "	\
  |  |  ------------------
  |  |  |  |   31|    209|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |  664|    209|			  "components (%i, expected %i)."),		\
  |  |  665|    209|			exif_tag_get_name (entry->tag),		\
  |  |  666|    209|			(int) entry->components, (int) target);		\
  |  |  667|    209|		break;							\
  |  |  668|    209|	}								\
  |  |  669|    585|}
  ------------------
 1370|    376|		v_short = exif_get_short (e->data, o);
 1371|       |
 1372|       |		/* Search the tag */
 1373|  2.40k|		for (i = 0; list[i].tag && (list[i].tag != e->tag); i++);
  ------------------
  |  Branch (1373:15): [True: 2.40k, False: 0]
  |  Branch (1373:30): [True: 2.03k, False: 376]
  ------------------
 1374|    376|		if (!list[i].tag) {
  ------------------
  |  Branch (1374:7): [True: 0, False: 376]
  ------------------
 1375|      0|			snprintf (val, maxlen, _("Internal error (unknown "
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1376|      0|				  "value %i)"), v_short);
 1377|      0|			break;
 1378|      0|		}
 1379|       |
 1380|       |		/* Find the value */
 1381|  1.14k|		for (j = 0; list[i].strings[j] && (j < v_short); j++);
  ------------------
  |  Branch (1381:15): [True: 1.00k, False: 139]
  |  Branch (1381:37): [True: 767, False: 237]
  ------------------
 1382|    376|		if (!list[i].strings[j])
  ------------------
  |  Branch (1382:7): [True: 139, False: 237]
  ------------------
 1383|    139|			snprintf (val, maxlen, "%i", v_short);
 1384|    237|		else if (!*list[i].strings[j])
  ------------------
  |  Branch (1384:12): [True: 27, False: 210]
  ------------------
 1385|     27|			snprintf (val, maxlen, _("Unknown value %i"), v_short);
  ------------------
  |  |   31|     27|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1386|    210|		else
 1387|    210|			strncpy (val, _(list[i].strings[j]), maxlen-1);
  ------------------
  |  |   31|    210|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1388|    376|		break;
 1389|       |
 1390|     31|	case EXIF_TAG_XP_TITLE:
  ------------------
  |  Branch (1390:2): [True: 31, False: 72.9k]
  ------------------
 1391|     61|	case EXIF_TAG_XP_COMMENT:
  ------------------
  |  Branch (1391:2): [True: 30, False: 72.9k]
  ------------------
 1392|     71|	case EXIF_TAG_XP_AUTHOR:
  ------------------
  |  Branch (1392:2): [True: 10, False: 73.0k]
  ------------------
 1393|     90|	case EXIF_TAG_XP_KEYWORDS:
  ------------------
  |  Branch (1393:2): [True: 19, False: 72.9k]
  ------------------
 1394|    114|	case EXIF_TAG_XP_SUBJECT:
  ------------------
  |  Branch (1394:2): [True: 24, False: 72.9k]
  ------------------
 1395|    114|	{
 1396|    114|		unsigned char *utf16;
 1397|    114|		unsigned int s;
 1398|       |
 1399|       |		/* Sanity check the size to prevent overflow. Note EXIF files are 64kb at most. */
 1400|    114|		if (e->size >= 65536 - sizeof(uint16_t)*2) break;
  ------------------
  |  Branch (1400:7): [True: 0, False: 114]
  ------------------
 1401|       |
 1402|       |		/* The tag may not be U+0000-terminated , so make a local
 1403|       |		   U+0000-terminated copy before converting it */
 1404|    114|		s = e->size+sizeof(uint16_t)+1;
 1405|    114|		utf16 = exif_mem_alloc (e->priv->mem, s);
 1406|    114|		if (!utf16) {
  ------------------
  |  Branch (1406:7): [True: 0, False: 114]
  ------------------
 1407|      0|			exif_entry_log (e, EXIF_LOG_CODE_NO_MEMORY,
 1408|      0|				"Could not allocate %lu byte(s).", (unsigned long)s);
 1409|      0|			break;
 1410|      0|		}
 1411|    114|		memcpy(utf16, e->data, e->size);
 1412|       |
 1413|       |		/* NUL terminate the string. If the size is odd (which isn't possible
 1414|       |		 * for a valid UTF16 string), then this will overwrite the high byte of
 1415|       |		 * the final half word, plus add a full zero NUL word at the end.
 1416|       |		 */
 1417|    114|		utf16[e->size] = 0;
 1418|    114|		utf16[e->size+1] = 0;
 1419|    114|		utf16[e->size+2] = 0;
 1420|       |
 1421|       |		/* Warning! The texts are converted from UTF16 to UTF8 */
 1422|       |		/* FIXME: use iconv to convert into the locale encoding */
 1423|    114|		exif_convert_utf16_to_utf8(val, maxlen, utf16, e->size+3);
 1424|    114|		exif_mem_free(e->priv->mem, utf16);
 1425|    114|		break;
 1426|    114|	}
 1427|       |
 1428|  34.7k|	default:
  ------------------
  |  Branch (1428:2): [True: 34.7k, False: 38.3k]
  ------------------
 1429|       |		/* Use a generic value formatting */
 1430|  34.7k|		exif_entry_format_value(e, val, maxlen);
 1431|  73.0k|	}
 1432|       |
 1433|  73.0k|	return val;
 1434|  73.0k|}
exif_entry_initialize:
 1475|  51.2k|{
 1476|  51.2k|	ExifRational r;
 1477|  51.2k|	ExifByteOrder o;
 1478|       |
 1479|  51.2k|	if (!e || !e->parent || e->data || !e->parent->parent)
  ------------------
  |  Branch (1479:6): [True: 0, False: 51.2k]
  |  Branch (1479:12): [True: 0, False: 51.2k]
  |  Branch (1479:26): [True: 0, False: 51.2k]
  |  Branch (1479:37): [True: 0, False: 51.2k]
  ------------------
 1480|      0|		return;
 1481|       |	/* We need the byte order */
 1482|  51.2k|	o = exif_data_get_byte_order (e->parent->parent);
 1483|       |
 1484|  51.2k|	e->tag = tag;
 1485|       |
 1486|  51.2k|	if(exif_entry_get_ifd(e) == EXIF_IFD_GPS) {
  ------------------
  |  |  182|  51.2k|#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
  |  |  ------------------
  |  |  |  Branch (182:32): [True: 51.2k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1486:5): [True: 0, False: 51.2k]
  ------------------
 1487|      0|	  exif_entry_initialize_gps(e, tag);
 1488|      0|      return;
 1489|      0|	}
 1490|       |
 1491|  51.2k|	switch (tag) {
 1492|       |
 1493|       |	/* LONG, 1 component, no default */
 1494|      0|	case EXIF_TAG_PIXEL_X_DIMENSION:
  ------------------
  |  Branch (1494:2): [True: 0, False: 51.2k]
  ------------------
 1495|      0|	case EXIF_TAG_PIXEL_Y_DIMENSION:
  ------------------
  |  Branch (1495:2): [True: 0, False: 51.2k]
  ------------------
 1496|      0|	case EXIF_TAG_EXIF_IFD_POINTER:
  ------------------
  |  Branch (1496:2): [True: 0, False: 51.2k]
  ------------------
 1497|      0|	case EXIF_TAG_GPS_INFO_IFD_POINTER:
  ------------------
  |  Branch (1497:2): [True: 0, False: 51.2k]
  ------------------
 1498|      0|	case EXIF_TAG_INTEROPERABILITY_IFD_POINTER:
  ------------------
  |  Branch (1498:2): [True: 0, False: 51.2k]
  ------------------
 1499|      0|	case EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH:
  ------------------
  |  Branch (1499:2): [True: 0, False: 51.2k]
  ------------------
 1500|      0|	case EXIF_TAG_JPEG_INTERCHANGE_FORMAT:
  ------------------
  |  Branch (1500:2): [True: 0, False: 51.2k]
  ------------------
 1501|      0|	case EXIF_TAG_STANDARD_OUTPUT_SENSITIVITY:
  ------------------
  |  Branch (1501:2): [True: 0, False: 51.2k]
  ------------------
 1502|      0|	case EXIF_TAG_RECOMMENDED_EXPOSURE_INDEX:
  ------------------
  |  Branch (1502:2): [True: 0, False: 51.2k]
  ------------------
 1503|      0|	case EXIF_TAG_ISO_SPEED:
  ------------------
  |  Branch (1503:2): [True: 0, False: 51.2k]
  ------------------
 1504|      0|	case EXIF_TAG_ISO_SPEEDLatitudeYYY:
  ------------------
  |  Branch (1504:2): [True: 0, False: 51.2k]
  ------------------
 1505|      0|	case EXIF_TAG_ISO_SPEEDLatitudeZZZ:
  ------------------
  |  Branch (1505:2): [True: 0, False: 51.2k]
  ------------------
 1506|      0|		e->components = 1;
 1507|      0|		e->format = EXIF_FORMAT_LONG;
 1508|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1509|      0|		e->data = exif_entry_alloc (e, e->size);
 1510|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1510:7): [True: 0, False: 0]
  ------------------
 1511|      0|		break;
 1512|       |
 1513|       |	/* SHORT, 1 component, no default */
 1514|      0|	case EXIF_TAG_SUBJECT_LOCATION:
  ------------------
  |  Branch (1514:2): [True: 0, False: 51.2k]
  ------------------
 1515|      0|	case EXIF_TAG_SENSING_METHOD:
  ------------------
  |  Branch (1515:2): [True: 0, False: 51.2k]
  ------------------
 1516|      0|	case EXIF_TAG_PHOTOMETRIC_INTERPRETATION:
  ------------------
  |  Branch (1516:2): [True: 0, False: 51.2k]
  ------------------
 1517|    144|	case EXIF_TAG_COMPRESSION:
  ------------------
  |  Branch (1517:2): [True: 144, False: 51.1k]
  ------------------
 1518|    144|	case EXIF_TAG_EXPOSURE_MODE:
  ------------------
  |  Branch (1518:2): [True: 0, False: 51.2k]
  ------------------
 1519|    144|	case EXIF_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (1519:2): [True: 0, False: 51.2k]
  ------------------
 1520|    144|	case EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM:
  ------------------
  |  Branch (1520:2): [True: 0, False: 51.2k]
  ------------------
 1521|    144|	case EXIF_TAG_GAIN_CONTROL:
  ------------------
  |  Branch (1521:2): [True: 0, False: 51.2k]
  ------------------
 1522|    144|	case EXIF_TAG_SUBJECT_DISTANCE_RANGE:
  ------------------
  |  Branch (1522:2): [True: 0, False: 51.2k]
  ------------------
 1523|    144|	case EXIF_TAG_FLASH:
  ------------------
  |  Branch (1523:2): [True: 0, False: 51.2k]
  ------------------
 1524|    144|	case EXIF_TAG_ISO_SPEED_RATINGS:
  ------------------
  |  Branch (1524:2): [True: 0, False: 51.2k]
  ------------------
 1525|    144|	case EXIF_TAG_SENSITIVITY_TYPE:
  ------------------
  |  Branch (1525:2): [True: 0, False: 51.2k]
  ------------------
 1526|    144|	case EXIF_TAG_COMPOSITE_IMAGE:
  ------------------
  |  Branch (1526:2): [True: 0, False: 51.2k]
  ------------------
 1527|       |
 1528|       |	/* SHORT, 1 component, default 0 */
 1529|    144|	case EXIF_TAG_IMAGE_WIDTH:
  ------------------
  |  Branch (1529:2): [True: 0, False: 51.2k]
  ------------------
 1530|    144|	case EXIF_TAG_IMAGE_LENGTH:
  ------------------
  |  Branch (1530:2): [True: 0, False: 51.2k]
  ------------------
 1531|    144|	case EXIF_TAG_EXPOSURE_PROGRAM:
  ------------------
  |  Branch (1531:2): [True: 0, False: 51.2k]
  ------------------
 1532|    144|	case EXIF_TAG_LIGHT_SOURCE:
  ------------------
  |  Branch (1532:2): [True: 0, False: 51.2k]
  ------------------
 1533|    144|	case EXIF_TAG_METERING_MODE:
  ------------------
  |  Branch (1533:2): [True: 0, False: 51.2k]
  ------------------
 1534|    144|	case EXIF_TAG_CUSTOM_RENDERED:
  ------------------
  |  Branch (1534:2): [True: 0, False: 51.2k]
  ------------------
 1535|    144|	case EXIF_TAG_SCENE_CAPTURE_TYPE:
  ------------------
  |  Branch (1535:2): [True: 0, False: 51.2k]
  ------------------
 1536|    144|	case EXIF_TAG_CONTRAST:
  ------------------
  |  Branch (1536:2): [True: 0, False: 51.2k]
  ------------------
 1537|    144|	case EXIF_TAG_SATURATION:
  ------------------
  |  Branch (1537:2): [True: 0, False: 51.2k]
  ------------------
 1538|    144|	case EXIF_TAG_SHARPNESS:
  ------------------
  |  Branch (1538:2): [True: 0, False: 51.2k]
  ------------------
 1539|    144|		e->components = 1;
 1540|    144|		e->format = EXIF_FORMAT_SHORT;
 1541|    144|		e->size = exif_format_get_size (e->format) * e->components;
 1542|    144|		e->data = exif_entry_alloc (e, e->size);
 1543|    144|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1543:7): [True: 0, False: 144]
  ------------------
 1544|    144|		exif_set_short (e->data, o, 0);
 1545|    144|		break;
 1546|       |
 1547|       |	/* SHORT, 1 component, default 1 */
 1548|      0|	case EXIF_TAG_ORIENTATION:
  ------------------
  |  Branch (1548:2): [True: 0, False: 51.2k]
  ------------------
 1549|      0|	case EXIF_TAG_PLANAR_CONFIGURATION:
  ------------------
  |  Branch (1549:2): [True: 0, False: 51.2k]
  ------------------
 1550|      0|	case EXIF_TAG_YCBCR_POSITIONING:
  ------------------
  |  Branch (1550:2): [True: 0, False: 51.2k]
  ------------------
 1551|      0|		e->components = 1;
 1552|      0|		e->format = EXIF_FORMAT_SHORT;
 1553|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1554|      0|		e->data = exif_entry_alloc (e, e->size);
 1555|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1555:7): [True: 0, False: 0]
  ------------------
 1556|      0|		exif_set_short (e->data, o, 1);
 1557|      0|		break;
 1558|       |
 1559|       |	/* SHORT, 1 component, default 2 */
 1560|  8.59k|	case EXIF_TAG_RESOLUTION_UNIT:
  ------------------
  |  Branch (1560:2): [True: 8.59k, False: 42.6k]
  ------------------
 1561|  8.59k|	case EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT:
  ------------------
  |  Branch (1561:2): [True: 0, False: 51.2k]
  ------------------
 1562|  8.59k|		e->components = 1;
 1563|  8.59k|		e->format = EXIF_FORMAT_SHORT;
 1564|  8.59k|		e->size = exif_format_get_size (e->format) * e->components;
 1565|  8.59k|		e->data = exif_entry_alloc (e, e->size);
 1566|  8.59k|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1566:7): [True: 0, False: 8.59k]
  ------------------
 1567|  8.59k|		exif_set_short (e->data, o, 2);
 1568|  8.59k|		break;
 1569|       |
 1570|       |	/* SHORT, 1 component, default 3 */
 1571|      0|	case EXIF_TAG_SAMPLES_PER_PIXEL:
  ------------------
  |  Branch (1571:2): [True: 0, False: 51.2k]
  ------------------
 1572|      0|		e->components = 1;
 1573|      0|		e->format = EXIF_FORMAT_SHORT;
 1574|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1575|      0|		e->data = exif_entry_alloc (e, e->size);
 1576|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1576:7): [True: 0, False: 0]
  ------------------
 1577|      0|		exif_set_short (e->data, o, 3);
 1578|      0|		break;
 1579|       |
 1580|       |	/* SHORT, 1 component, default 0xffff */
 1581|  8.44k|	case EXIF_TAG_COLOR_SPACE:
  ------------------
  |  Branch (1581:2): [True: 8.44k, False: 42.8k]
  ------------------
 1582|  8.44k|		e->components = 1;
 1583|  8.44k|		e->format = EXIF_FORMAT_SHORT;
 1584|  8.44k|		e->size = exif_format_get_size (e->format) * e->components;
 1585|  8.44k|		e->data = exif_entry_alloc (e, e->size);
 1586|  8.44k|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1586:7): [True: 0, False: 8.44k]
  ------------------
 1587|  8.44k|		exif_set_short (e->data, o, 0xffff);
 1588|  8.44k|		break;
 1589|       |
 1590|       |	/* SHORT, 3 components, default 8 8 8 */
 1591|      0|	case EXIF_TAG_BITS_PER_SAMPLE:
  ------------------
  |  Branch (1591:2): [True: 0, False: 51.2k]
  ------------------
 1592|      0|		e->components = 3;
 1593|      0|		e->format = EXIF_FORMAT_SHORT;
 1594|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1595|      0|		e->data = exif_entry_alloc (e, e->size);
 1596|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1596:7): [True: 0, False: 0]
  ------------------
 1597|      0|		exif_set_short (e->data, o, 8);
 1598|      0|		exif_set_short (
 1599|      0|			e->data + exif_format_get_size (e->format),
 1600|      0|			o, 8);
 1601|      0|		exif_set_short (
 1602|      0|			e->data + 2 * exif_format_get_size (e->format),
 1603|      0|			o, 8);
 1604|      0|		break;
 1605|       |
 1606|       |	/* SHORT, 2 components, default 0 0 */
 1607|      0|	case EXIF_TAG_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE:
  ------------------
  |  Branch (1607:2): [True: 0, False: 51.2k]
  ------------------
 1608|      0|		e->components = 2;
 1609|      0|		e->format = EXIF_FORMAT_SHORT;
 1610|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1611|      0|		e->data = exif_entry_alloc (e, e->size);
 1612|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1612:7): [True: 0, False: 0]
  ------------------
 1613|      0|		exif_set_short (e->data, o, 0);
 1614|      0|		exif_set_short (
 1615|      0|			e->data + exif_format_get_size (e->format),
 1616|      0|			o, 0);
 1617|      0|		break;
 1618|       |
 1619|       |	/* SHORT, 2 components, default 2 1 */
 1620|      0|	case EXIF_TAG_YCBCR_SUB_SAMPLING:
  ------------------
  |  Branch (1620:2): [True: 0, False: 51.2k]
  ------------------
 1621|      0|		e->components = 2;
 1622|      0|		e->format = EXIF_FORMAT_SHORT;
 1623|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1624|      0|		e->data = exif_entry_alloc (e, e->size);
 1625|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1625:7): [True: 0, False: 0]
  ------------------
 1626|      0|		exif_set_short (e->data, o, 2);
 1627|      0|		exif_set_short (
 1628|      0|			e->data + exif_format_get_size (e->format),
 1629|      0|			o, 1);
 1630|      0|		break;
 1631|       |
 1632|       |	/* SRATIONAL, 1 component, no default */
 1633|      0|	case EXIF_TAG_EXPOSURE_BIAS_VALUE:
  ------------------
  |  Branch (1633:2): [True: 0, False: 51.2k]
  ------------------
 1634|      0|	case EXIF_TAG_BRIGHTNESS_VALUE:
  ------------------
  |  Branch (1634:2): [True: 0, False: 51.2k]
  ------------------
 1635|      0|	case EXIF_TAG_SHUTTER_SPEED_VALUE:
  ------------------
  |  Branch (1635:2): [True: 0, False: 51.2k]
  ------------------
 1636|      0|		e->components = 1;
 1637|      0|		e->format = EXIF_FORMAT_SRATIONAL;
 1638|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1639|      0|		e->data = exif_entry_alloc (e, e->size);
 1640|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1640:7): [True: 0, False: 0]
  ------------------
 1641|      0|		break;
 1642|       |
 1643|       |	/* RATIONAL, 1 component, no default */
 1644|      0|	case EXIF_TAG_EXPOSURE_TIME:
  ------------------
  |  Branch (1644:2): [True: 0, False: 51.2k]
  ------------------
 1645|      0|	case EXIF_TAG_FOCAL_PLANE_X_RESOLUTION:
  ------------------
  |  Branch (1645:2): [True: 0, False: 51.2k]
  ------------------
 1646|      0|	case EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION:
  ------------------
  |  Branch (1646:2): [True: 0, False: 51.2k]
  ------------------
 1647|      0|	case EXIF_TAG_EXPOSURE_INDEX:
  ------------------
  |  Branch (1647:2): [True: 0, False: 51.2k]
  ------------------
 1648|      0|	case EXIF_TAG_FLASH_ENERGY:
  ------------------
  |  Branch (1648:2): [True: 0, False: 51.2k]
  ------------------
 1649|      0|	case EXIF_TAG_FNUMBER:
  ------------------
  |  Branch (1649:2): [True: 0, False: 51.2k]
  ------------------
 1650|      0|	case EXIF_TAG_FOCAL_LENGTH:
  ------------------
  |  Branch (1650:2): [True: 0, False: 51.2k]
  ------------------
 1651|      0|	case EXIF_TAG_SUBJECT_DISTANCE:
  ------------------
  |  Branch (1651:2): [True: 0, False: 51.2k]
  ------------------
 1652|      0|	case EXIF_TAG_MAX_APERTURE_VALUE:
  ------------------
  |  Branch (1652:2): [True: 0, False: 51.2k]
  ------------------
 1653|      0|	case EXIF_TAG_APERTURE_VALUE:
  ------------------
  |  Branch (1653:2): [True: 0, False: 51.2k]
  ------------------
 1654|      0|	case EXIF_TAG_COMPRESSED_BITS_PER_PIXEL:
  ------------------
  |  Branch (1654:2): [True: 0, False: 51.2k]
  ------------------
 1655|      0|	case EXIF_TAG_PRIMARY_CHROMATICITIES:
  ------------------
  |  Branch (1655:2): [True: 0, False: 51.2k]
  ------------------
 1656|      0|	case EXIF_TAG_DIGITAL_ZOOM_RATIO:
  ------------------
  |  Branch (1656:2): [True: 0, False: 51.2k]
  ------------------
 1657|      0|	case EXIF_TAG_GAMMA:
  ------------------
  |  Branch (1657:2): [True: 0, False: 51.2k]
  ------------------
 1658|      0|		e->components = 1;
 1659|      0|		e->format = EXIF_FORMAT_RATIONAL;
 1660|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1661|      0|		e->data = exif_entry_alloc (e, e->size);
 1662|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1662:7): [True: 0, False: 0]
  ------------------
 1663|      0|		break;
 1664|       |
 1665|       |	/* RATIONAL, 1 component, default 72/1 */
 1666|  8.60k|	case EXIF_TAG_X_RESOLUTION:
  ------------------
  |  Branch (1666:2): [True: 8.60k, False: 42.6k]
  ------------------
 1667|  17.2k|	case EXIF_TAG_Y_RESOLUTION:
  ------------------
  |  Branch (1667:2): [True: 8.61k, False: 42.6k]
  ------------------
 1668|  17.2k|		e->components = 1;
 1669|  17.2k|		e->format = EXIF_FORMAT_RATIONAL;
 1670|  17.2k|		e->size = exif_format_get_size (e->format) * e->components;
 1671|  17.2k|		e->data = exif_entry_alloc (e, e->size);
 1672|  17.2k|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1672:7): [True: 0, False: 17.2k]
  ------------------
 1673|  17.2k|		r.numerator = 72;
 1674|  17.2k|		r.denominator = 1;
 1675|  17.2k|		exif_set_rational (e->data, o, r);
 1676|  17.2k|		break;
 1677|       |
 1678|       |	/* RATIONAL, 2 components, no default */
 1679|      0|	case EXIF_TAG_WHITE_POINT:
  ------------------
  |  Branch (1679:2): [True: 0, False: 51.2k]
  ------------------
 1680|      0|		e->components = 2;
 1681|      0|		e->format = EXIF_FORMAT_RATIONAL;
 1682|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1683|      0|		e->data = exif_entry_alloc (e, e->size);
 1684|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1684:7): [True: 0, False: 0]
  ------------------
 1685|      0|		break;
 1686|       |
 1687|       |	/* RATIONAL, 4 components, no default */
 1688|      0|	case EXIF_TAG_LENS_SPECIFICATION:
  ------------------
  |  Branch (1688:2): [True: 0, False: 51.2k]
  ------------------
 1689|      0|		e->components = 4;
 1690|      0|		e->format = EXIF_FORMAT_RATIONAL;
 1691|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1692|      0|		e->data = exif_entry_alloc (e, e->size);
 1693|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1693:7): [True: 0, False: 0]
  ------------------
 1694|      0|		break;
 1695|       |
 1696|       |	/* RATIONAL, 6 components */
 1697|      0|	case EXIF_TAG_REFERENCE_BLACK_WHITE:
  ------------------
  |  Branch (1697:2): [True: 0, False: 51.2k]
  ------------------
 1698|      0|		e->components = 6;
 1699|      0|		e->format = EXIF_FORMAT_RATIONAL;
 1700|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1701|      0|		e->data = exif_entry_alloc (e, e->size);
 1702|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1702:7): [True: 0, False: 0]
  ------------------
 1703|      0|		r.denominator = 1;
 1704|      0|		r.numerator = 0;
 1705|      0|		exif_set_rational (e->data, o, r);
 1706|      0|		r.numerator = 255;
 1707|      0|		exif_set_rational (
 1708|      0|			e->data + exif_format_get_size (e->format), o, r);
 1709|      0|		r.numerator = 0;
 1710|      0|		exif_set_rational (
 1711|      0|			e->data + 2 * exif_format_get_size (e->format), o, r);
 1712|      0|		r.numerator = 255;
 1713|      0|		exif_set_rational (
 1714|      0|			e->data + 3 * exif_format_get_size (e->format), o, r);
 1715|      0|		r.numerator = 0;
 1716|      0|		exif_set_rational (
 1717|      0|			e->data + 4 * exif_format_get_size (e->format), o, r);
 1718|      0|		r.numerator = 255;
 1719|      0|		exif_set_rational (
 1720|      0|			e->data + 5 * exif_format_get_size (e->format), o, r);
 1721|      0|		break;
 1722|       |
 1723|       |	/* ASCII, 20 components */
 1724|      0|	case EXIF_TAG_DATE_TIME:
  ------------------
  |  Branch (1724:2): [True: 0, False: 51.2k]
  ------------------
 1725|      0|	case EXIF_TAG_DATE_TIME_ORIGINAL:
  ------------------
  |  Branch (1725:2): [True: 0, False: 51.2k]
  ------------------
 1726|      0|	case EXIF_TAG_DATE_TIME_DIGITIZED:
  ------------------
  |  Branch (1726:2): [True: 0, False: 51.2k]
  ------------------
 1727|      0|	{
 1728|      0|		time_t t;
 1729|      0|#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S)
 1730|      0|		struct tm tms;
 1731|      0|#endif
 1732|      0|		struct tm *tm;
 1733|       |
 1734|      0|		t = time (NULL);
 1735|       |#if defined(HAVE_LOCALTIME_S)
 1736|       |		localtime_s (&tms, &t);
 1737|       |		tm = &tms;
 1738|       |#elif defined(HAVE_LOCALTIME_R)
 1739|       |		tm = localtime_r (&t, &tms);
 1740|       |#else
 1741|       |		tm = localtime (&t);
 1742|       |#endif
 1743|      0|		e->components = 20;
 1744|      0|		e->format = EXIF_FORMAT_ASCII;
 1745|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1746|      0|		e->data = exif_entry_alloc (e, e->size);
 1747|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1747:7): [True: 0, False: 0]
  ------------------
 1748|      0|		snprintf ((char *) e->data, e->size,
 1749|      0|			  "%04i:%02i:%02i %02i:%02i:%02i",
 1750|      0|			  tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
 1751|      0|			  tm->tm_hour, tm->tm_min, tm->tm_sec);
 1752|      0|		break;
 1753|      0|	}
 1754|       |
 1755|       |	/* ASCII, no default */
 1756|      0|	case EXIF_TAG_SUB_SEC_TIME:
  ------------------
  |  Branch (1756:2): [True: 0, False: 51.2k]
  ------------------
 1757|      0|	case EXIF_TAG_SUB_SEC_TIME_ORIGINAL:
  ------------------
  |  Branch (1757:2): [True: 0, False: 51.2k]
  ------------------
 1758|      0|	case EXIF_TAG_SUB_SEC_TIME_DIGITIZED:
  ------------------
  |  Branch (1758:2): [True: 0, False: 51.2k]
  ------------------
 1759|      0|	case EXIF_TAG_OFFSET_TIME:
  ------------------
  |  Branch (1759:2): [True: 0, False: 51.2k]
  ------------------
 1760|      0|	case EXIF_TAG_OFFSET_TIME_ORIGINAL:
  ------------------
  |  Branch (1760:2): [True: 0, False: 51.2k]
  ------------------
 1761|      0|	case EXIF_TAG_OFFSET_TIME_DIGITIZED:
  ------------------
  |  Branch (1761:2): [True: 0, False: 51.2k]
  ------------------
 1762|      0|		e->components = 0;
 1763|      0|		e->format = EXIF_FORMAT_ASCII;
 1764|      0|		e->size = 0;
 1765|      0|		e->data = NULL;
 1766|      0|		break;
 1767|       |
 1768|       |	/* ASCII, default "[None]" */
 1769|      0|	case EXIF_TAG_IMAGE_DESCRIPTION:
  ------------------
  |  Branch (1769:2): [True: 0, False: 51.2k]
  ------------------
 1770|      0|	case EXIF_TAG_MAKE:
  ------------------
  |  Branch (1770:2): [True: 0, False: 51.2k]
  ------------------
 1771|      0|	case EXIF_TAG_MODEL:
  ------------------
  |  Branch (1771:2): [True: 0, False: 51.2k]
  ------------------
 1772|      0|	case EXIF_TAG_SOFTWARE:
  ------------------
  |  Branch (1772:2): [True: 0, False: 51.2k]
  ------------------
 1773|      0|	case EXIF_TAG_ARTIST:
  ------------------
  |  Branch (1773:2): [True: 0, False: 51.2k]
  ------------------
 1774|      0|	case EXIF_TAG_CAMERA_OWNER_NAME:
  ------------------
  |  Branch (1774:2): [True: 0, False: 51.2k]
  ------------------
 1775|      0|	case EXIF_TAG_BODY_SERIAL_NUMBER:
  ------------------
  |  Branch (1775:2): [True: 0, False: 51.2k]
  ------------------
 1776|      0|	case EXIF_TAG_LENS_MAKE:
  ------------------
  |  Branch (1776:2): [True: 0, False: 51.2k]
  ------------------
 1777|      0|	case EXIF_TAG_LENS_MODEL:
  ------------------
  |  Branch (1777:2): [True: 0, False: 51.2k]
  ------------------
 1778|      0|	case EXIF_TAG_LENS_SERIAL_NUMBER:
  ------------------
  |  Branch (1778:2): [True: 0, False: 51.2k]
  ------------------
 1779|      0|		e->components = strlen (_("[None]")) + 1;
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1780|      0|		e->format = EXIF_FORMAT_ASCII;
 1781|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1782|      0|		e->data = exif_entry_alloc (e, e->size);
 1783|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1783:7): [True: 0, False: 0]
  ------------------
 1784|      0|		strncpy ((char *)e->data, _("[None]"), e->size);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1785|      0|		break;
 1786|       |	/* ASCII, default "[None]\0[None]\0" */
 1787|      0|	case EXIF_TAG_COPYRIGHT:
  ------------------
  |  Branch (1787:2): [True: 0, False: 51.2k]
  ------------------
 1788|      0|		e->components = (strlen (_("[None]")) + 1) * 2;
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1789|      0|		e->format = EXIF_FORMAT_ASCII;
 1790|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1791|      0|		e->data = exif_entry_alloc (e, e->size);
 1792|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1792:7): [True: 0, False: 0]
  ------------------
 1793|      0|		strcpy (((char *)e->data) + 0, _("[None]"));
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1794|      0|		strcpy (((char *)e->data) + strlen (_("[None]")) + 1, _("[None]"));
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
              		strcpy (((char *)e->data) + strlen (_("[None]")) + 1, _("[None]"));
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
 1795|      0|		break;
 1796|       |
 1797|       |	/* UNDEFINED, 1 component, default 1 */
 1798|      0|	case EXIF_TAG_SCENE_TYPE:
  ------------------
  |  Branch (1798:2): [True: 0, False: 51.2k]
  ------------------
 1799|      0|		e->components = 1;
 1800|      0|		e->format = EXIF_FORMAT_UNDEFINED;
 1801|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1802|      0|		e->data = exif_entry_alloc (e, e->size);
 1803|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1803:7): [True: 0, False: 0]
  ------------------
 1804|      0|		e->data[0] = 0x01;
 1805|      0|		break;
 1806|       |
 1807|       |	/* UNDEFINED, 1 component, default 3 */
 1808|      0|	case EXIF_TAG_FILE_SOURCE:
  ------------------
  |  Branch (1808:2): [True: 0, False: 51.2k]
  ------------------
 1809|      0|		e->components = 1;
 1810|      0|		e->format = EXIF_FORMAT_UNDEFINED;
 1811|      0|		e->size = exif_format_get_size (e->format) * e->components;
 1812|      0|		e->data = exif_entry_alloc (e, e->size);
 1813|      0|		if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1813:7): [True: 0, False: 0]
  ------------------
 1814|      0|		e->data[0] = 0x03;
 1815|      0|		break;
 1816|       |
 1817|       |	/* UNDEFINED, 4 components, default 48 49 48 48 */
 1818|  8.44k|        case EXIF_TAG_FLASH_PIX_VERSION:
  ------------------
  |  Branch (1818:9): [True: 8.44k, False: 42.8k]
  ------------------
 1819|  8.44k|                e->components = 4;
 1820|  8.44k|                e->format = EXIF_FORMAT_UNDEFINED;
 1821|  8.44k|                e->size = exif_format_get_size (e->format) * e->components;
 1822|  8.44k|                e->data = exif_entry_alloc (e, e->size);
 1823|  8.44k|                if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1823:21): [True: 0, False: 8.44k]
  ------------------
 1824|  8.44k|                memcpy (e->data, "0100", 4);
 1825|  8.44k|                break;
 1826|       |
 1827|       |        /* UNDEFINED, 4 components, default 48 50 49 48 */
 1828|  8.44k|        case EXIF_TAG_EXIF_VERSION:
  ------------------
  |  Branch (1828:9): [True: 8.44k, False: 42.8k]
  ------------------
 1829|  8.44k|                e->components = 4;
 1830|  8.44k|                e->format = EXIF_FORMAT_UNDEFINED;
 1831|  8.44k|                e->size = exif_format_get_size (e->format) * e->components;
 1832|  8.44k|                e->data = exif_entry_alloc (e, e->size);
 1833|  8.44k|                if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1833:21): [True: 0, False: 8.44k]
  ------------------
 1834|  8.44k|                memcpy (e->data, "0210", 4);
 1835|  8.44k|                break;
 1836|       |
 1837|       |        /* UNDEFINED, 4 components, default 1 2 3 0 */
 1838|      0|        case EXIF_TAG_COMPONENTS_CONFIGURATION:
  ------------------
  |  Branch (1838:9): [True: 0, False: 51.2k]
  ------------------
 1839|      0|                e->components = 4;
 1840|      0|                e->format = EXIF_FORMAT_UNDEFINED;
 1841|      0|                e->size = exif_format_get_size (e->format) * e->components;
 1842|      0|                e->data = exif_entry_alloc (e, e->size);
 1843|      0|                if (!e->data) { clear_entry(e); break; }
  ------------------
  |  Branch (1843:21): [True: 0, False: 0]
  ------------------
 1844|      0|		e->data[0] = 1;
 1845|      0|		e->data[1] = 2;
 1846|      0|		e->data[2] = 3;
 1847|      0|		e->data[3] = 0;
 1848|      0|                break;
 1849|       |
 1850|       |	/* UNDEFINED, no components, no default */
 1851|       |	/* Use this if the tag is otherwise unsupported */
 1852|      0|	case EXIF_TAG_MAKER_NOTE:
  ------------------
  |  Branch (1852:2): [True: 0, False: 51.2k]
  ------------------
 1853|      0|	case EXIF_TAG_USER_COMMENT:
  ------------------
  |  Branch (1853:2): [True: 0, False: 51.2k]
  ------------------
 1854|      0|	default:
  ------------------
  |  Branch (1854:2): [True: 0, False: 51.2k]
  ------------------
 1855|      0|		e->components = 0;
 1856|      0|		e->format = EXIF_FORMAT_UNDEFINED;
 1857|      0|		e->size = 0;
 1858|       |		e->data = NULL;
 1859|      0|		break;
 1860|  51.2k|	}
 1861|  51.2k|}
exif-entry.c:exif_entry_log:
   56|  87.3k|{
   57|  87.3k|	va_list args;
   58|  87.3k|	ExifLog *l = NULL;
   59|       |
   60|  87.3k|	if (e && e->parent && e->parent->parent)
  ------------------
  |  Branch (60:6): [True: 87.3k, False: 0]
  |  Branch (60:11): [True: 87.3k, False: 0]
  |  Branch (60:24): [True: 87.3k, False: 0]
  ------------------
   61|  87.3k|		l = exif_data_get_log (e->parent->parent);
   62|  87.3k|	va_start (args, format);
   63|  87.3k|	exif_logv (l, code, "ExifEntry", format, args);
   64|       |	va_end (args);
   65|  87.3k|}
exif-entry.c:exif_entry_alloc:
   78|  51.6k|{
   79|  51.6k|	void *d;
   80|  51.6k|	ExifLog *l = NULL;
   81|       |
   82|  51.6k|	if (!e || !e->priv || !i) return NULL;
  ------------------
  |  Branch (82:6): [True: 0, False: 51.6k]
  |  Branch (82:12): [True: 0, False: 51.6k]
  |  Branch (82:24): [True: 0, False: 51.6k]
  ------------------
   83|       |
   84|  51.6k|	d = exif_mem_alloc (e->priv->mem, i);
   85|  51.6k|	if (d) return d;
  ------------------
  |  Branch (85:6): [True: 51.6k, False: 0]
  ------------------
   86|       |
   87|      0|	if (e->parent && e->parent->parent)
  ------------------
  |  Branch (87:6): [True: 0, False: 0]
  |  Branch (87:19): [True: 0, False: 0]
  ------------------
   88|      0|		l = exif_data_get_log (e->parent->parent);
   89|      0|	EXIF_LOG_NO_MEMORY (l, "ExifEntry", i);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
   90|       |	return NULL;
   91|  51.6k|}
exif-entry.c:exif_get_short_convert:
  187|  37.2k|{
  188|  37.2k|	switch (format) {
  189|    866|	case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (189:2): [True: 866, False: 36.3k]
  ------------------
  190|    866|		return (ExifShort) exif_get_long (buf, order);
  191|    415|	case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (191:2): [True: 415, False: 36.8k]
  ------------------
  192|    415|		return (ExifShort) exif_get_slong (buf, order);
  193|      0|	case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (193:2): [True: 0, False: 37.2k]
  ------------------
  194|      0|		return (ExifShort) exif_get_short (buf, order);
  195|  1.85k|	case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (195:2): [True: 1.85k, False: 35.3k]
  ------------------
  196|  1.85k|		return (ExifShort) exif_get_sshort (buf, order);
  197|  30.6k|	case EXIF_FORMAT_BYTE:
  ------------------
  |  Branch (197:2): [True: 30.6k, False: 6.51k]
  ------------------
  198|  34.0k|	case EXIF_FORMAT_SBYTE:
  ------------------
  |  Branch (198:2): [True: 3.38k, False: 33.8k]
  ------------------
  199|  34.0k|		return (ExifShort) buf[0];
  200|      0|	default:
  ------------------
  |  Branch (200:2): [True: 0, False: 37.2k]
  ------------------
  201|       |		/* Unsupported type */
  202|      0|		return (ExifShort) 0;
  203|  37.2k|	}
  204|  37.2k|}
exif-entry.c:exif_entry_realloc:
   95|    126|{
   96|    126|	void *d;
   97|    126|	ExifLog *l = NULL;
   98|       |
   99|    126|	if (!e || !e->priv) return NULL;
  ------------------
  |  Branch (99:6): [True: 0, False: 126]
  |  Branch (99:12): [True: 0, False: 126]
  ------------------
  100|       |
  101|    126|	if (!i) { exif_mem_free (e->priv->mem, d_orig); return NULL; }
  ------------------
  |  Branch (101:6): [True: 0, False: 126]
  ------------------
  102|       |
  103|    126|	d = exif_mem_realloc (e->priv->mem, d_orig, i);
  104|    126|	if (d) return d;
  ------------------
  |  Branch (104:6): [True: 126, False: 0]
  ------------------
  105|       |
  106|      0|	if (e->parent && e->parent->parent)
  ------------------
  |  Branch (106:6): [True: 0, False: 0]
  |  Branch (106:19): [True: 0, False: 0]
  ------------------
  107|      0|		l = exif_data_get_log (e->parent->parent);
  108|      0|	EXIF_LOG_NO_MEMORY (l, "ExifEntry", i);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  109|       |	return NULL;
  110|    126|}
exif-entry.c:match_repeated_char:
  633|    182|{
  634|    182|	int i;
  635|    622|	for (i=n; i; --i, ++data) {
  ------------------
  |  Branch (635:12): [True: 601, False: 21]
  ------------------
  636|    601|		if (*data == 0) {
  ------------------
  |  Branch (636:7): [True: 41, False: 560]
  ------------------
  637|     41|			i = 0;	/* all bytes before NUL matched */
  638|     41|			break;
  639|     41|		}
  640|    560|		if (*data != ch)
  ------------------
  |  Branch (640:7): [True: 120, False: 440]
  ------------------
  641|    120|			break;
  642|    560|	}
  643|    182|	return i;
  644|    182|}
exif-entry.c:exif_entry_format_value:
  454|  35.2k|{
  455|  35.2k|	ExifByte v_byte;
  456|  35.2k|	ExifShort v_short;
  457|  35.2k|	ExifSShort v_sshort;
  458|  35.2k|	ExifLong v_long;
  459|  35.2k|	ExifRational v_rat;
  460|  35.2k|	ExifSRational v_srat;
  461|  35.2k|	ExifSLong v_slong;
  462|  35.2k|	unsigned int i;
  463|  35.2k|	size_t len;
  464|  35.2k|	const ExifByteOrder o = exif_data_get_byte_order (e->parent->parent);
  465|       |
  466|  35.2k|	if (!e->size || !maxlen)
  ------------------
  |  Branch (466:6): [True: 0, False: 35.2k]
  |  Branch (466:18): [True: 0, False: 35.2k]
  ------------------
  467|      0|		return;
  468|  35.2k|	switch (e->format) {
  469|  1.36k|	case EXIF_FORMAT_UNDEFINED:
  ------------------
  |  Branch (469:2): [True: 1.36k, False: 33.8k]
  ------------------
  470|  1.36k|		snprintf (val, maxlen, _("%i bytes undefined data"), e->size);
  ------------------
  |  |   31|  1.36k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  471|  1.36k|		break;
  472|  3.18k|	case EXIF_FORMAT_BYTE:
  ------------------
  |  Branch (472:2): [True: 3.18k, False: 32.0k]
  ------------------
  473|  4.83k|	case EXIF_FORMAT_SBYTE:
  ------------------
  |  Branch (473:2): [True: 1.64k, False: 33.5k]
  ------------------
  474|  4.83k|		v_byte = e->data[0];
  475|  4.83k|		snprintf (val, maxlen, "0x%02x", v_byte);
  476|  4.83k|		len = strlen (val);
  477|   229k|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (477:15): [True: 224k, False: 4.74k]
  ------------------
  478|   224k|			v_byte = e->data[i];
  479|   224k|			snprintf (val+len, maxlen-len, ", 0x%02x", v_byte);
  480|   224k|			len += strlen (val+len);
  481|   224k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (481:8): [True: 87, False: 224k]
  ------------------
  482|   224k|		}
  483|  4.83k|		break;
  484|  2.35k|	case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (484:2): [True: 2.35k, False: 32.8k]
  ------------------
  485|  2.35k|		v_short = exif_get_short (e->data, o);
  486|  2.35k|		snprintf (val, maxlen, "%u", v_short);
  487|  2.35k|		len = strlen (val);
  488|   146k|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (488:15): [True: 144k, False: 2.29k]
  ------------------
  489|   144k|			v_short = exif_get_short (e->data +
  490|   144k|				exif_format_get_size (e->format) * i, o);
  491|   144k|			snprintf (val+len, maxlen-len, ", %u", v_short);
  492|   144k|			len += strlen (val+len);
  493|   144k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (493:8): [True: 61, False: 144k]
  ------------------
  494|   144k|		}
  495|  2.35k|		break;
  496|    867|	case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (496:2): [True: 867, False: 34.3k]
  ------------------
  497|    867|		v_sshort = exif_get_sshort (e->data, o);
  498|    867|		snprintf (val, maxlen, "%i", v_sshort);
  499|    867|		len = strlen (val);
  500|   115k|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (500:15): [True: 114k, False: 814]
  ------------------
  501|   114k|			v_sshort = exif_get_short (e->data +
  502|   114k|				exif_format_get_size (e->format) *
  503|   114k|				i, o);
  504|   114k|			snprintf (val+len, maxlen-len, ", %i", v_sshort);
  505|   114k|			len += strlen (val+len);
  506|   114k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (506:8): [True: 53, False: 114k]
  ------------------
  507|   114k|		}
  508|    867|		break;
  509|  1.07k|	case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (509:2): [True: 1.07k, False: 34.1k]
  ------------------
  510|  1.07k|		v_long = exif_get_long (e->data, o);
  511|  1.07k|		snprintf (val, maxlen, "%lu", (unsigned long) v_long);
  512|  1.07k|		len = strlen (val);
  513|  61.9k|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (513:15): [True: 60.8k, False: 1.02k]
  ------------------
  514|  60.8k|			v_long = exif_get_long (e->data +
  515|  60.8k|				exif_format_get_size (e->format) *
  516|  60.8k|				i, o);
  517|  60.8k|			snprintf (val+len, maxlen-len, ", %lu", (unsigned long) v_long);
  518|  60.8k|			len += strlen (val+len);
  519|  60.8k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (519:8): [True: 44, False: 60.8k]
  ------------------
  520|  60.8k|		}
  521|  1.07k|		break;
  522|    831|	case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (522:2): [True: 831, False: 34.4k]
  ------------------
  523|    831|		v_slong = exif_get_slong (e->data, o);
  524|    831|		snprintf (val, maxlen, "%li", (long) v_slong);
  525|    831|		len = strlen (val);
  526|  62.6k|		for (i = 1; i < e->components; i++) {
  ------------------
  |  Branch (526:15): [True: 61.8k, False: 783]
  ------------------
  527|  61.8k|			v_slong = exif_get_slong (e->data +
  528|  61.8k|				exif_format_get_size (e->format) * i, o);
  529|  61.8k|			snprintf (val+len, maxlen-len, ", %li", (long) v_slong);
  530|  61.8k|			len += strlen (val+len);
  531|  61.8k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (531:8): [True: 48, False: 61.7k]
  ------------------
  532|  61.8k|		}
  533|    831|		break;
  534|  4.71k|	case EXIF_FORMAT_ASCII:
  ------------------
  |  Branch (534:2): [True: 4.71k, False: 30.5k]
  ------------------
  535|  4.71k|		strncpy (val, (char *) e->data, MIN (maxlen-1, e->size));
  ------------------
  |  |  182|  4.71k|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 204, False: 4.50k]
  |  |  ------------------
  ------------------
  536|  4.71k|		val[MIN (maxlen-1, e->size)] = 0;
  ------------------
  |  |  182|  4.71k|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 204, False: 4.50k]
  |  |  ------------------
  ------------------
  537|  4.71k|		break;
  538|  18.1k|	case EXIF_FORMAT_RATIONAL:
  ------------------
  |  Branch (538:2): [True: 18.1k, False: 17.0k]
  ------------------
  539|  18.1k|		len = 0;
  540|  83.6k|		for (i = 0; i < e->components; i++) {
  ------------------
  |  Branch (540:15): [True: 65.5k, False: 18.1k]
  ------------------
  541|  65.5k|			if (i > 0) {
  ------------------
  |  Branch (541:8): [True: 47.3k, False: 18.1k]
  ------------------
  542|  47.3k|				snprintf (val+len, maxlen-len, ", ");
  543|  47.3k|				len += strlen (val+len);
  544|  47.3k|			}
  545|  65.5k|			v_rat = exif_get_rational (
  546|  65.5k|				e->data + 8 * i, o);
  547|  65.5k|			if (v_rat.denominator) {
  ------------------
  |  Branch (547:8): [True: 62.0k, False: 3.42k]
  ------------------
  548|       |				/*
  549|       |				 * Choose the number of significant digits to
  550|       |				 * display based on the size of the denominator.
  551|       |				 * It is scaled so that denominators within the
  552|       |				 * range 13..120 will show 2 decimal points.
  553|       |				 */
  554|  62.0k|				int decimals = (int)(log10(v_rat.denominator)-0.08+1.0);
  555|  62.0k|				snprintf (val+len, maxlen-len, "%2.*f",
  556|  62.0k|					  decimals,
  557|  62.0k|					  (double) v_rat.numerator /
  558|  62.0k|					  (double) v_rat.denominator);
  559|  62.0k|			} else
  560|  3.42k|				snprintf (val+len, maxlen-len, "%lu/%lu",
  561|  3.42k|				  (unsigned long) v_rat.numerator,
  562|  3.42k|				  (unsigned long) v_rat.denominator);
  563|  65.5k|			len += strlen (val+len);
  564|  65.5k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (564:8): [True: 41, False: 65.4k]
  ------------------
  565|  65.5k|		}
  566|  18.1k|		break;
  567|    651|	case EXIF_FORMAT_SRATIONAL:
  ------------------
  |  Branch (567:2): [True: 651, False: 34.5k]
  ------------------
  568|    651|		len = 0;
  569|  39.7k|		for (i = 0; i < e->components; i++) {
  ------------------
  |  Branch (569:15): [True: 39.1k, False: 616]
  ------------------
  570|  39.1k|			if (i > 0) {
  ------------------
  |  Branch (570:8): [True: 38.5k, False: 651]
  ------------------
  571|  38.5k|				snprintf (val+len, maxlen-len, ", ");
  572|  38.5k|				len += strlen (val+len);
  573|  38.5k|			}
  574|  39.1k|			v_srat = exif_get_srational (
  575|  39.1k|				e->data + 8 * i, o);
  576|  39.1k|			if (v_srat.denominator && v_srat.denominator > INT32_MIN) {
  ------------------
  |  Branch (576:8): [True: 36.3k, False: 2.79k]
  |  Branch (576:30): [True: 36.1k, False: 288]
  ------------------
  577|  36.1k|				int decimals = (int)(log10(abs(v_srat.denominator))-0.08+1.0);
  578|  36.1k|				snprintf (val+len, maxlen-len, "%2.*f",
  579|  36.1k|					  decimals,
  580|  36.1k|					  (double) v_srat.numerator /
  581|  36.1k|					  (double) v_srat.denominator);
  582|  36.1k|			} else
  583|  3.08k|				snprintf (val+len, maxlen-len, "%li/%li",
  584|  3.08k|				  (long) v_srat.numerator,
  585|  3.08k|				  (long) v_srat.denominator);
  586|  39.1k|			len += strlen (val+len);
  587|  39.1k|			if (len >= maxlen-1) break;
  ------------------
  |  Branch (587:8): [True: 35, False: 39.1k]
  ------------------
  588|  39.1k|		}
  589|    651|		break;
  590|     14|	case EXIF_FORMAT_DOUBLE:
  ------------------
  |  Branch (590:2): [True: 14, False: 35.2k]
  ------------------
  591|    356|	case EXIF_FORMAT_FLOAT:
  ------------------
  |  Branch (591:2): [True: 342, False: 34.8k]
  ------------------
  592|    356|	default:
  ------------------
  |  Branch (592:2): [True: 0, False: 35.2k]
  ------------------
  593|       |		snprintf (val, maxlen, _("%i bytes unsupported data type"),
  ------------------
  |  |   31|    356|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  594|    356|			  e->size);
  595|    356|		break;
  596|  35.2k|	}
  597|  35.2k|}

exif_format_get_name:
   56|  43.8k|{
   57|  43.8k|	unsigned int i;
   58|       |
   59|  43.8k|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   60|       |
   61|   267k|	for (i = 0; ExifFormatTable[i].name; i++)
  ------------------
  |  Branch (61:14): [True: 255k, False: 11.3k]
  ------------------
   62|   255k|		if (ExifFormatTable[i].format == format)
  ------------------
  |  Branch (62:7): [True: 32.5k, False: 223k]
  ------------------
   63|  32.5k|			return _(ExifFormatTable[i].name);
  ------------------
  |  |   31|  32.5k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
   64|  11.3k|	return NULL;
   65|  43.8k|}
exif_format_get_size:
   69|  1.07M|{
   70|  1.07M|	unsigned int i;
   71|       |
   72|  6.97M|	for (i = 0; ExifFormatTable[i].size; i++)
  ------------------
  |  Branch (72:14): [True: 6.72M, False: 253k]
  ------------------
   73|  6.72M|		if (ExifFormatTable[i].format == format)
  ------------------
  |  Branch (73:7): [True: 819k, False: 5.90M]
  ------------------
   74|   819k|			return ExifFormatTable[i].size;
   75|   253k|	return 0;
   76|  1.07M|}

exif_ifd_get_name:
   43|  1.87M|{
   44|  1.87M|	unsigned int i;
   45|       |
   46|  5.23M|	for (i = 0; ExifIfdTable[i].name; i++)
  ------------------
  |  Branch (46:14): [True: 5.23M, False: 0]
  ------------------
   47|  5.23M|		if (ExifIfdTable[i].ifd == ifd)
  ------------------
  |  Branch (47:7): [True: 1.87M, False: 3.36M]
  ------------------
   48|  1.87M|			break;
   49|       |
   50|  1.87M|	return (ExifIfdTable[i].name);
   51|  1.87M|}

exif_loader_write:
  171|  11.5k|{
  172|  11.5k|	unsigned int i;
  173|       |
  174|  72.1k|begin:
  175|  72.1k|	if (!eld || (len && !buf)) 
  ------------------
  |  Branch (175:6): [True: 0, False: 72.1k]
  |  Branch (175:15): [True: 71.8k, False: 249]
  |  Branch (175:22): [True: 0, False: 71.8k]
  ------------------
  176|      0|		return 0;
  177|       |
  178|  72.1k|	switch (eld->state) {
  179|    219|	case EL_EXIF_FOUND:
  ------------------
  |  Branch (179:2): [True: 219, False: 71.8k]
  ------------------
  180|    219|		return exif_loader_copy (eld, buf, len);
  181|    944|	case EL_SKIP_BYTES:
  ------------------
  |  Branch (181:2): [True: 944, False: 71.1k]
  ------------------
  182|    944|		if (eld->size > len) { 
  ------------------
  |  Branch (182:7): [True: 155, False: 789]
  ------------------
  183|    155|			eld->size -= len; 
  184|    155|			return 1; 
  185|    155|		}
  186|    789|		len -= eld->size;
  187|    789|		buf += eld->size;
  188|    789|		eld->size = 0;
  189|    789|		eld->b_len = 0;
  190|    789|		switch (eld->data_format) {
  191|     30|		case EL_DATA_FORMAT_FUJI_RAW:
  ------------------
  |  Branch (191:3): [True: 30, False: 759]
  ------------------
  192|     30|			eld->state = EL_READ_SIZE_BYTE_24;
  193|     30|			break;
  194|    759|		default:
  ------------------
  |  Branch (194:3): [True: 759, False: 30]
  ------------------
  195|    759|			eld->state = EL_READ;
  196|    759|			break;
  197|    789|		}
  198|    789|		break;
  199|       |
  200|  70.4k|	case EL_READ:
  ------------------
  |  Branch (200:2): [True: 70.4k, False: 1.66k]
  ------------------
  201|  70.9k|	default:
  ------------------
  |  Branch (201:2): [True: 499, False: 71.6k]
  ------------------
  202|  70.9k|		break;
  203|  72.1k|	}
  204|       |
  205|  71.7k|	if (!len)
  ------------------
  |  Branch (205:6): [True: 82, False: 71.6k]
  ------------------
  206|     82|		return 1;
  207|  71.6k|	exif_log (eld->log, EXIF_LOG_CODE_DEBUG, "ExifLoader",
  208|  71.6k|		  "Scanning %i byte(s) of data...", len);
  209|       |
  210|       |	/*
  211|       |	 * First fill the small buffer. Only continue if the buffer
  212|       |	 * is filled. Note that EXIF data contains at least 12 bytes.
  213|       |	 */
  214|  71.6k|	i = MIN (len, sizeof (eld->b) - eld->b_len);
  ------------------
  |  |  182|  71.6k|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 11, False: 71.6k]
  |  |  ------------------
  ------------------
  215|  71.6k|	if (i) {
  ------------------
  |  Branch (215:6): [True: 71.6k, False: 0]
  ------------------
  216|  71.6k|		memcpy (&eld->b[eld->b_len], buf, i);
  217|  71.6k|		eld->b_len += i;
  218|  71.6k|		if (eld->b_len < sizeof (eld->b)) 
  ------------------
  |  Branch (218:7): [True: 11, False: 71.6k]
  ------------------
  219|     11|			return 1;
  220|  71.6k|		buf += i;
  221|  71.6k|		len -= i;
  222|  71.6k|	}
  223|       |
  224|  71.6k|	switch (eld->data_format) {
  225|  11.7k|	case EL_DATA_FORMAT_UNKNOWN:
  ------------------
  |  Branch (225:2): [True: 11.7k, False: 59.8k]
  ------------------
  226|       |
  227|       |		/* Check the small buffer against known formats. */
  228|  11.7k|		if (!memcmp (eld->b, "FUJIFILM", 8)) {
  ------------------
  |  Branch (228:7): [True: 31, False: 11.7k]
  ------------------
  229|       |
  230|       |			/* Skip to byte 84. There is another offset there. */
  231|     31|			eld->data_format = EL_DATA_FORMAT_FUJI_RAW;
  232|     31|			eld->size = 84;
  233|     31|			eld->state = EL_SKIP_BYTES;
  234|     31|			eld->size = 84;
  235|       |
  236|  11.7k|		} else if (!memcmp (eld->b + 2, ExifHeader, sizeof (ExifHeader))) {
  ------------------
  |  Branch (236:14): [True: 10.9k, False: 824]
  ------------------
  237|       |
  238|       |			/* Read the size (2 bytes). */
  239|  10.9k|			eld->data_format = EL_DATA_FORMAT_EXIF;
  240|  10.9k|			eld->state = EL_READ_SIZE_BYTE_08;
  241|  10.9k|		}
  242|  71.6k|	default:
  ------------------
  |  Branch (242:2): [True: 59.8k, False: 11.7k]
  ------------------
  243|  71.6k|		break;
  244|  71.6k|	}
  245|       |
  246|   825k|	for (i = 0; i < sizeof (eld->b); i++) {
  ------------------
  |  Branch (246:14): [True: 764k, False: 60.5k]
  ------------------
  247|   764k|		switch (eld->state) {
  248|  10.9k|		case EL_EXIF_FOUND:
  ------------------
  |  Branch (248:3): [True: 10.9k, False: 753k]
  ------------------
  249|  10.9k|			if (!exif_loader_copy (eld, eld->b + i,
  ------------------
  |  Branch (249:8): [True: 10, False: 10.9k]
  ------------------
  250|  10.9k|					sizeof (eld->b) - i)) 
  251|     10|				return 0;
  252|  10.9k|			return exif_loader_copy (eld, buf, len);
  253|  7.11k|		case EL_SKIP_BYTES:
  ------------------
  |  Branch (253:3): [True: 7.11k, False: 757k]
  ------------------
  254|  7.11k|			switch (eld->size) {
  255|  4.54k|                            case 0:
  ------------------
  |  Branch (255:29): [True: 4.54k, False: 2.56k]
  ------------------
  256|  4.54k|			        eld->state = EL_READ;
  257|  4.54k|				i--;   /* reprocess this byte */
  258|  4.54k|				break;
  259|  1.14k|                            case 1:
  ------------------
  |  Branch (259:29): [True: 1.14k, False: 5.97k]
  ------------------
  260|  1.14k|                                eld->size = 0;
  261|  1.14k|			        eld->state = EL_READ;
  262|  1.14k|				break;
  263|  1.42k|                            default:
  ------------------
  |  Branch (263:29): [True: 1.42k, False: 5.68k]
  ------------------
  264|  1.42k|                                eld->size--;
  265|  1.42k|				break;
  266|  7.11k|			}
  267|  7.11k|			break;
  268|       |
  269|  7.11k|		case EL_READ_SIZE_BYTE_24:
  ------------------
  |  Branch (269:3): [True: 29, False: 764k]
  ------------------
  270|     29|			eld->size |= (unsigned int)eld->b[i] << 24;
  271|     29|			eld->state = EL_READ_SIZE_BYTE_16;
  272|     29|			break;
  273|     29|		case EL_READ_SIZE_BYTE_16:
  ------------------
  |  Branch (273:3): [True: 29, False: 764k]
  ------------------
  274|     29|			eld->size |= (unsigned int)eld->b[i] << 16;
  275|     29|			eld->state = EL_READ_SIZE_BYTE_08;
  276|     29|			break;
  277|  17.7k|		case EL_READ_SIZE_BYTE_08:
  ------------------
  |  Branch (277:3): [True: 17.7k, False: 747k]
  ------------------
  278|  17.7k|			eld->size |= (unsigned int)eld->b[i] << 8;
  279|  17.7k|			eld->state = EL_READ_SIZE_BYTE_00;
  280|  17.7k|			break;
  281|  17.7k|		case EL_READ_SIZE_BYTE_00:
  ------------------
  |  Branch (281:3): [True: 17.7k, False: 747k]
  ------------------
  282|  17.7k|			eld->size |= eld->b[i] << 0;
  283|  17.7k|			switch (eld->data_format) {
  284|  6.56k|			case EL_DATA_FORMAT_JPEG:
  ------------------
  |  Branch (284:4): [True: 6.56k, False: 11.2k]
  ------------------
  285|  6.56k|				eld->state = EL_SKIP_BYTES;
  286|  6.56k|				if (eld->size < 2) {
  ------------------
  |  Branch (286:9): [True: 2.60k, False: 3.96k]
  ------------------
  287|       |				    /* Actually it's malformed... */
  288|  2.60k|				    eld->size = 0;
  289|  2.60k|				} else
  290|  3.96k|				    eld->size -= 2;
  291|  6.56k|				break;
  292|     29|			case EL_DATA_FORMAT_FUJI_RAW:
  ------------------
  |  Branch (292:4): [True: 29, False: 17.7k]
  ------------------
  293|     29|				eld->data_format = EL_DATA_FORMAT_EXIF;
  294|     29|				eld->state = EL_SKIP_BYTES;
  295|     29|				if (eld->size < 86) {
  ------------------
  |  Branch (295:9): [True: 1, False: 28]
  ------------------
  296|       |				    /* Actually it's malformed... */
  297|      1|				    eld->size = 0;
  298|      1|				} else
  299|     28|				    eld->size -= 86;	/* and put this in an else */
  300|     29|				break;
  301|  11.1k|			case EL_DATA_FORMAT_EXIF:
  ------------------
  |  Branch (301:4): [True: 11.1k, False: 6.59k]
  ------------------
  302|  11.1k|				eld->state = EL_EXIF_FOUND;
  303|  11.1k|				break;
  304|      0|			default:
  ------------------
  |  Branch (304:4): [True: 0, False: 17.7k]
  ------------------
  305|      0|				break;
  306|  17.7k|			}
  307|  17.7k|			break;
  308|       |
  309|   711k|		default:
  ------------------
  |  Branch (309:3): [True: 711k, False: 53.7k]
  ------------------
  310|   711k|			switch (eld->b[i]) {
  311|  1.61k|			case JPEG_MARKER_APP1:
  ------------------
  |  |   46|  1.61k|#define JPEG_MARKER_APP1 0xe1
  ------------------
  |  Branch (311:4): [True: 1.61k, False: 709k]
  ------------------
  312|  1.61k|			  if (!memcmp (eld->b + i + 3, ExifHeader, MIN((ptrdiff_t)(sizeof(ExifHeader)), MAX(0, ((ptrdiff_t)(sizeof(eld->b))) - ((ptrdiff_t)i) - 3)))) {
  ------------------
  |  |  182|  3.22k|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 523, False: 1.08k]
  |  |  |  Branch (182:29): [True: 1, False: 1.60k]
  |  |  |  Branch (182:42): [True: 1, False: 1.08k]
  |  |  ------------------
  ------------------
  |  Branch (312:10): [True: 271, False: 1.33k]
  ------------------
  313|    271|					eld->data_format = EL_DATA_FORMAT_EXIF;
  314|  1.33k|				} else {
  315|  1.33k|					eld->data_format = EL_DATA_FORMAT_JPEG; /* Probably JFIF - keep searching for APP1 EXIF*/
  316|  1.33k|				}
  317|  1.61k|				eld->size = 0;
  318|  1.61k|				eld->state = EL_READ_SIZE_BYTE_08;
  319|  1.61k|				break;
  320|    288|			case JPEG_MARKER_DCT:
  ------------------
  |  |   36|    288|#define JPEG_MARKER_DCT  0xc0
  ------------------
  |  Branch (320:4): [True: 288, False: 710k]
  ------------------
  321|    486|			case JPEG_MARKER_DHT:
  ------------------
  |  |   38|    486|#define JPEG_MARKER_DHT  0xc4
  ------------------
  |  Branch (321:4): [True: 198, False: 711k]
  ------------------
  322|    689|			case JPEG_MARKER_DQT:
  ------------------
  |  |   42|    689|#define JPEG_MARKER_DQT  0xdb
  ------------------
  |  Branch (322:4): [True: 203, False: 711k]
  ------------------
  323|  1.74k|			case JPEG_MARKER_APP0:
  ------------------
  |  |   44|  1.74k|#define JPEG_MARKER_APP0 0xe0
  ------------------
  |  Branch (323:4): [True: 1.05k, False: 710k]
  ------------------
  324|  2.39k|			case JPEG_MARKER_APP2:
  ------------------
  |  |   48|  2.39k|#define JPEG_MARKER_APP2 0xe2
  ------------------
  |  Branch (324:4): [True: 653, False: 710k]
  ------------------
  325|  2.63k|			case JPEG_MARKER_APP3:
  ------------------
  |  |   50|  2.63k|#define JPEG_MARKER_APP3 0xe3
  ------------------
  |  Branch (325:4): [True: 233, False: 711k]
  ------------------
  326|  3.00k|			case JPEG_MARKER_APP4:
  ------------------
  |  |   52|  3.00k|#define JPEG_MARKER_APP4 0xe4
  ------------------
  |  Branch (326:4): [True: 372, False: 710k]
  ------------------
  327|  3.25k|			case JPEG_MARKER_APP5:
  ------------------
  |  |   54|  3.25k|#define JPEG_MARKER_APP5 0xe5
  ------------------
  |  Branch (327:4): [True: 256, False: 710k]
  ------------------
  328|  3.70k|			case JPEG_MARKER_APP10:
  ------------------
  |  |   56|  3.70k|#define JPEG_MARKER_APP10 0xea
  ------------------
  |  Branch (328:4): [True: 447, False: 710k]
  ------------------
  329|  3.97k|			case JPEG_MARKER_APP11:
  ------------------
  |  |   58|  3.97k|#define JPEG_MARKER_APP11 0xeb
  ------------------
  |  Branch (329:4): [True: 272, False: 710k]
  ------------------
  330|  4.17k|			case JPEG_MARKER_APP13:
  ------------------
  |  |   60|  4.17k|#define JPEG_MARKER_APP13 0xed
  ------------------
  |  Branch (330:4): [True: 196, False: 711k]
  ------------------
  331|  4.70k|			case JPEG_MARKER_APP14:
  ------------------
  |  |   62|  4.70k|#define JPEG_MARKER_APP14 0xee
  ------------------
  |  Branch (331:4): [True: 534, False: 710k]
  ------------------
  332|  5.24k|			case JPEG_MARKER_COM:
  ------------------
  |  |   64|  5.24k|#define JPEG_MARKER_COM 0xfe
  ------------------
  |  Branch (332:4): [True: 542, False: 710k]
  ------------------
  333|  5.24k|				eld->data_format = EL_DATA_FORMAT_JPEG;
  334|  5.24k|				eld->size = 0;
  335|  5.24k|				eld->state = EL_READ_SIZE_BYTE_08;
  336|  5.24k|				break;
  337|   703k|			case 0xff:
  ------------------
  |  Branch (337:4): [True: 703k, False: 7.49k]
  ------------------
  338|   704k|			case JPEG_MARKER_SOI:
  ------------------
  |  |   40|   704k|#define JPEG_MARKER_SOI  0xd8
  ------------------
  |  Branch (338:4): [True: 562, False: 710k]
  ------------------
  339|   704k|				break;
  340|     77|			default:
  ------------------
  |  Branch (340:4): [True: 77, False: 711k]
  ------------------
  341|     77|				exif_log (eld->log,
  342|     77|					EXIF_LOG_CODE_CORRUPT_DATA,
  343|     77|					"ExifLoader", _("The data supplied "
  ------------------
  |  |   31|     77|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  344|     77|						"does not seem to contain "
  345|     77|						"EXIF data. JPEG Marker type 0x%02x"), eld->b[i]);
  346|     77|				exif_loader_reset (eld);
  347|     77|				return 0;
  348|   711k|			}
  349|   764k|		}
  350|   764k|	}
  351|       |
  352|       |	/*
  353|       |	 * If we reach this point, the buffer has not been big enough
  354|       |	 * to read all data we need. Fill it with new data.
  355|       |	 */
  356|  60.5k|	eld->b_len = 0;
  357|  60.5k|	goto begin;
  358|  71.6k|}
exif_loader_new:
  362|  11.5k|{
  363|  11.5k|	ExifMem *mem = exif_mem_new_default ();
  364|  11.5k|	ExifLoader *l = exif_loader_new_mem (mem);
  365|       |
  366|  11.5k|	exif_mem_unref (mem);
  367|       |
  368|  11.5k|	return l;
  369|  11.5k|}
exif_loader_new_mem:
  373|  11.5k|{
  374|  11.5k|	ExifLoader *loader;
  375|       |
  376|  11.5k|	if (!mem) 
  ------------------
  |  Branch (376:6): [True: 0, False: 11.5k]
  ------------------
  377|      0|		return NULL;
  378|       |	
  379|  11.5k|	loader = exif_mem_alloc (mem, sizeof (ExifLoader));
  380|  11.5k|	if (!loader) 
  ------------------
  |  Branch (380:6): [True: 0, False: 11.5k]
  ------------------
  381|      0|		return NULL;
  382|  11.5k|	loader->ref_count = 1;
  383|       |
  384|  11.5k|	loader->mem = mem;
  385|  11.5k|	exif_mem_ref (mem);
  386|       |
  387|  11.5k|	return loader;
  388|  11.5k|}
exif_loader_unref:
  414|  11.5k|{
  415|  11.5k|	if (!loader) 
  ------------------
  |  Branch (415:6): [True: 0, False: 11.5k]
  ------------------
  416|      0|		return;
  417|  11.5k|	if (!--loader->ref_count)
  ------------------
  |  Branch (417:6): [True: 11.5k, False: 0]
  ------------------
  418|  11.5k|		exif_loader_free (loader);
  419|  11.5k|}
exif_loader_reset:
  423|  11.5k|{
  424|  11.5k|	if (!loader) 
  ------------------
  |  Branch (424:6): [True: 0, False: 11.5k]
  ------------------
  425|      0|		return;
  426|  11.5k|	exif_mem_free (loader->mem, loader->buf); loader->buf = NULL;
  427|  11.5k|	loader->size = 0;
  428|  11.5k|	loader->bytes_read = 0;
  429|  11.5k|	loader->state = 0;
  430|  11.5k|	loader->b_len = 0;
  431|  11.5k|	loader->data_format = EL_DATA_FORMAT_UNKNOWN;
  432|  11.5k|}
exif_loader_get_data:
  436|  11.5k|{
  437|  11.5k|	ExifData *ed;
  438|       |
  439|  11.5k|	if (!loader || (loader->data_format == EL_DATA_FORMAT_UNKNOWN) ||
  ------------------
  |  Branch (439:6): [True: 0, False: 11.5k]
  |  Branch (439:17): [True: 90, False: 11.4k]
  ------------------
  440|  11.4k|	    !loader->bytes_read)
  ------------------
  |  Branch (440:6): [True: 257, False: 11.1k]
  ------------------
  441|    347|		return NULL;
  442|       |
  443|  11.1k|	ed = exif_data_new_mem (loader->mem);
  444|  11.1k|	exif_data_log (ed, loader->log);
  445|  11.1k|	exif_data_load_data (ed, loader->buf, loader->bytes_read);
  446|       |
  447|  11.1k|	return ed;
  448|  11.5k|}
exif-loader.c:exif_loader_copy:
  151|  22.1k|{
  152|  22.1k|	if (!eld || (len && !buf) || (eld->bytes_read >= eld->size)) 
  ------------------
  |  Branch (152:6): [True: 0, False: 22.1k]
  |  Branch (152:15): [True: 22.0k, False: 46]
  |  Branch (152:22): [True: 0, False: 22.0k]
  |  Branch (152:31): [True: 3, False: 22.1k]
  ------------------
  153|      3|		return 0;
  154|       |
  155|       |	/* If needed, allocate the buffer. */
  156|  22.1k|	if (!eld->buf) 
  ------------------
  |  Branch (156:6): [True: 11.1k, False: 10.9k]
  ------------------
  157|  11.1k|		eld->buf = exif_loader_alloc (eld, eld->size);
  158|  22.1k|	if (!eld->buf) 
  ------------------
  |  Branch (158:6): [True: 0, False: 22.1k]
  ------------------
  159|      0|		return 0;
  160|       |
  161|       |	/* Copy memory */
  162|  22.1k|	len = MIN (len, eld->size - eld->bytes_read);
  ------------------
  |  |  182|  22.1k|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 22.0k, False: 91]
  |  |  ------------------
  ------------------
  163|  22.1k|	memcpy (eld->buf + eld->bytes_read, buf, len);
  164|  22.1k|	eld->bytes_read += len;
  165|       |
  166|  22.1k|	return (eld->bytes_read >= eld->size) ? 0 : 1;
  ------------------
  |  Branch (166:9): [True: 91, False: 22.0k]
  ------------------
  167|  22.1k|}
exif-loader.c:exif_loader_alloc:
  109|  11.1k|{
  110|  11.1k|	void *d;
  111|       |
  112|  11.1k|	if (!l || !i) 
  ------------------
  |  Branch (112:6): [True: 0, False: 11.1k]
  |  Branch (112:12): [True: 0, False: 11.1k]
  ------------------
  113|      0|		return NULL;
  114|       |
  115|  11.1k|	d = exif_mem_alloc (l->mem, i);
  116|  11.1k|	if (d) 
  ------------------
  |  Branch (116:6): [True: 11.1k, False: 0]
  ------------------
  117|  11.1k|		return d;
  118|       |
  119|      0|	EXIF_LOG_NO_MEMORY (l->log, "ExifLog", i);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  120|       |	return NULL;
  121|  11.1k|}
exif-loader.c:exif_loader_free:
  399|  11.5k|{
  400|  11.5k|	ExifMem *mem;
  401|       |
  402|  11.5k|	if (!loader) 
  ------------------
  |  Branch (402:6): [True: 0, False: 11.5k]
  ------------------
  403|      0|		return;
  404|       |
  405|  11.5k|	mem = loader->mem;
  406|  11.5k|	exif_loader_reset (loader);
  407|  11.5k|	exif_log_unref (loader->log);
  408|  11.5k|	exif_mem_free (mem, loader);
  409|  11.5k|	exif_mem_unref (mem);
  410|  11.5k|}

exif_log_ref:
  100|  18.3k|{
  101|  18.3k|	if (!log) return;
  ------------------
  |  Branch (101:6): [True: 18.3k, False: 0]
  ------------------
  102|      0|	log->ref_count++;
  103|      0|}
exif_log_unref:
  107|  92.7k|{
  108|  92.7k|	if (!log) return;
  ------------------
  |  Branch (108:6): [True: 92.7k, False: 0]
  ------------------
  109|      0|	if (log->ref_count > 0) log->ref_count--;
  ------------------
  |  Branch (109:6): [True: 0, False: 0]
  ------------------
  110|      0|	if (!log->ref_count) exif_log_free (log);
  ------------------
  |  Branch (110:6): [True: 0, False: 0]
  ------------------
  111|      0|}
exif_log:
  139|  2.56M|{
  140|  2.56M|	va_list args;
  141|       |
  142|  2.56M|	va_start (args, format);
  143|  2.56M|	exif_logv (log, code, domain, format, args);
  144|       |	va_end (args);
  145|  2.56M|}
exif_logv:
  150|  2.64M|{
  151|  2.64M|	if (!log) return;
  ------------------
  |  Branch (151:6): [True: 2.64M, False: 0]
  ------------------
  152|      0|	if (!log->func) return;
  ------------------
  |  Branch (152:6): [True: 0, False: 0]
  ------------------
  153|      0|	log->func (log, code, domain, format, args, log->data);
  154|      0|}

exif_mem_new:
   58|  62.7k|{
   59|  62.7k|	ExifMem *mem;
   60|       |
   61|  62.7k|	if (!alloc_func && !realloc_func) 
  ------------------
  |  Branch (61:6): [True: 0, False: 62.7k]
  |  Branch (61:21): [True: 0, False: 0]
  ------------------
   62|      0|		return NULL;
   63|  62.7k|	mem = alloc_func ? alloc_func (sizeof (ExifMem)) :
  ------------------
  |  Branch (63:8): [True: 62.7k, False: 0]
  ------------------
   64|  62.7k|		           realloc_func (NULL, sizeof (ExifMem));
   65|  62.7k|	if (!mem) return NULL;
  ------------------
  |  Branch (65:6): [True: 0, False: 62.7k]
  ------------------
   66|  62.7k|	mem->ref_count = 1;
   67|       |
   68|  62.7k|	mem->alloc_func   = alloc_func;
   69|  62.7k|	mem->realloc_func = realloc_func;
   70|  62.7k|	mem->free_func    = free_func;
   71|       |
   72|  62.7k|	return mem;
   73|  62.7k|}
exif_mem_ref:
   77|   343k|{
   78|   343k|	if (!mem) return;
  ------------------
  |  Branch (78:6): [True: 0, False: 343k]
  ------------------
   79|   343k|	mem->ref_count++;
   80|   343k|}
exif_mem_unref:
   84|   406k|{
   85|   406k|	if (!mem) return;
  ------------------
  |  Branch (85:6): [True: 0, False: 406k]
  ------------------
   86|   406k|	if (!--mem->ref_count)
  ------------------
  |  Branch (86:6): [True: 62.7k, False: 343k]
  ------------------
   87|  62.7k|		exif_mem_free (mem, mem);
   88|   406k|}
exif_mem_free:
   92|   956k|{
   93|   956k|	if (!mem) return;
  ------------------
  |  Branch (93:6): [True: 0, False: 956k]
  ------------------
   94|   956k|	if (mem->free_func) {
  ------------------
  |  Branch (94:6): [True: 956k, False: 0]
  ------------------
   95|   956k|		mem->free_func (d);
   96|   956k|		return;
   97|   956k|	}
   98|   956k|}
exif_mem_alloc:
  102|   836k|{
  103|   836k|	if (!mem) return NULL;
  ------------------
  |  Branch (103:6): [True: 0, False: 836k]
  ------------------
  104|   836k|	if (mem->alloc_func || mem->realloc_func)
  ------------------
  |  Branch (104:6): [True: 836k, False: 0]
  |  Branch (104:25): [True: 0, False: 0]
  ------------------
  105|   836k|		return mem->alloc_func ? mem->alloc_func (ds) :
  ------------------
  |  Branch (105:10): [True: 836k, False: 0]
  ------------------
  106|   836k|					 mem->realloc_func (NULL, ds);
  107|      0|	return NULL;
  108|   836k|}
exif_mem_realloc:
  112|  74.1k|{
  113|  74.1k|	return (mem && mem->realloc_func) ? mem->realloc_func (d, ds) : NULL;
  ------------------
  |  Branch (113:10): [True: 74.1k, False: 0]
  |  Branch (113:17): [True: 74.1k, False: 0]
  ------------------
  114|  74.1k|}
exif_mem_new_default:
  118|  62.7k|{
  119|  62.7k|	return exif_mem_new (exif_mem_alloc_func, exif_mem_realloc_func,
  120|  62.7k|			     exif_mem_free_func);
  121|  62.7k|}
exif-mem.c:exif_mem_alloc_func:
   37|   899k|{
   38|   899k|	return calloc ((size_t) ds, 1);
   39|   899k|}
exif-mem.c:exif_mem_realloc_func:
   44|  74.1k|{
   45|  74.1k|	return realloc (d, (size_t) ds);
   46|  74.1k|}
exif-mem.c:exif_mem_free_func:
   51|   956k|{
   52|   956k|	free (d);
   53|   956k|}

exif_mnote_data_construct:
   38|  7.15k|{
   39|  7.15k|	if (!d || !mem) return;
  ------------------
  |  Branch (39:6): [True: 0, False: 7.15k]
  |  Branch (39:12): [True: 0, False: 7.15k]
  ------------------
   40|  7.15k|	if (d->priv) return;
  ------------------
  |  Branch (40:6): [True: 0, False: 7.15k]
  ------------------
   41|  7.15k|	d->priv = exif_mem_alloc (mem, sizeof (ExifMnoteDataPriv));
   42|  7.15k|	if (!d->priv) {
  ------------------
  |  Branch (42:6): [True: 0, False: 7.15k]
  ------------------
   43|      0|		EXIF_LOG_NO_MEMORY (d->log, "ExifMnoteData", sizeof (ExifMnoteDataPriv));
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
   44|      0|		return;
   45|      0|	}
   46|       |
   47|  7.15k|	d->priv->ref_count = 1;
   48|       |
   49|  7.15k|	d->mem = mem;
   50|  7.15k|	exif_mem_ref (mem);
   51|  7.15k|}
exif_mnote_data_ref:
   55|  7.15k|{
   56|  7.15k|	if (d && d->priv) d->priv->ref_count++;
  ------------------
  |  Branch (56:6): [True: 7.15k, False: 0]
  |  Branch (56:11): [True: 7.15k, False: 0]
  ------------------
   57|  7.15k|}
exif_mnote_data_unref:
   77|  14.3k|{
   78|  14.3k|	if (!d || !d->priv) return;
  ------------------
  |  Branch (78:6): [True: 0, False: 14.3k]
  |  Branch (78:12): [True: 0, False: 14.3k]
  ------------------
   79|  14.3k|	if (d->priv->ref_count > 0) d->priv->ref_count--;
  ------------------
  |  Branch (79:6): [True: 14.3k, False: 0]
  ------------------
   80|  14.3k|	if (!d->priv->ref_count)
  ------------------
  |  Branch (80:6): [True: 7.15k, False: 7.15k]
  ------------------
   81|  7.15k|		exif_mnote_data_free (d);
   82|  14.3k|}
exif_mnote_data_load:
   87|  7.15k|{
   88|  7.15k|	if (!d || !d->methods.load) return;
  ------------------
  |  Branch (88:6): [True: 0, False: 7.15k]
  |  Branch (88:12): [True: 0, False: 7.15k]
  ------------------
   89|  7.15k|	d->methods.load (d, buf, buf_size);
   90|  7.15k|}
exif_mnote_data_set_byte_order:
  102|  7.15k|{
  103|  7.15k|	if (!d || !d->methods.set_byte_order) return;
  ------------------
  |  Branch (103:6): [True: 0, False: 7.15k]
  |  Branch (103:12): [True: 0, False: 7.15k]
  ------------------
  104|  7.15k|	d->methods.set_byte_order (d, o);
  105|  7.15k|}
exif_mnote_data_set_offset:
  109|  7.15k|{
  110|  7.15k|	if (!d || !d->methods.set_offset) return;
  ------------------
  |  Branch (110:6): [True: 0, False: 7.15k]
  |  Branch (110:12): [True: 0, False: 7.15k]
  ------------------
  111|  7.15k|	d->methods.set_offset (d, o);
  112|  7.15k|}
exif_mnote_data_count:
  116|  7.15k|{
  117|  7.15k|	if (!d || !d->methods.count) return 0;
  ------------------
  |  Branch (117:6): [True: 0, False: 7.15k]
  |  Branch (117:12): [True: 0, False: 7.15k]
  ------------------
  118|  7.15k|	return d->methods.count (d);
  119|  7.15k|}
exif_mnote_data_get_name:
  130|  1.74M|{
  131|  1.74M|	if (!d || !d->methods.get_name) return NULL;
  ------------------
  |  Branch (131:6): [True: 0, False: 1.74M]
  |  Branch (131:12): [True: 0, False: 1.74M]
  ------------------
  132|  1.74M|	return d->methods.get_name (d, n);
  133|  1.74M|}
exif_mnote_data_get_title:
  137|  1.74M|{
  138|  1.74M|	if (!d || !d->methods.get_title) return NULL;
  ------------------
  |  Branch (138:6): [True: 0, False: 1.74M]
  |  Branch (138:12): [True: 0, False: 1.74M]
  ------------------
  139|  1.74M|	return d->methods.get_title (d, n);
  140|  1.74M|}
exif_mnote_data_get_description:
  144|  1.74M|{
  145|  1.74M|	if (!d || !d->methods.get_description) return NULL;
  ------------------
  |  Branch (145:6): [True: 0, False: 1.74M]
  |  Branch (145:12): [True: 0, False: 1.74M]
  ------------------
  146|  1.74M|	return d->methods.get_description (d, n);
  147|  1.74M|}
exif_mnote_data_get_value:
  151|  1.74M|{
  152|  1.74M|	if (!d || !d->methods.get_value) return NULL;
  ------------------
  |  Branch (152:6): [True: 0, False: 1.74M]
  |  Branch (152:12): [True: 0, False: 1.74M]
  ------------------
  153|  1.74M|	return d->methods.get_value (d, n, val, maxlen);
  154|  1.74M|}
exif_mnote_data_log:
  158|  7.15k|{
  159|  7.15k|	if (!d) return;
  ------------------
  |  Branch (159:6): [True: 0, False: 7.15k]
  ------------------
  160|  7.15k|	exif_log_unref (d->log);
  161|  7.15k|	d->log = log;
  162|  7.15k|	exif_log_ref (log);
  163|  7.15k|}
exif-mnote-data.c:exif_mnote_data_free:
   61|  7.15k|{
   62|  7.15k|	ExifMem *mem = d ? d->mem : NULL;
  ------------------
  |  Branch (62:17): [True: 7.15k, False: 0]
  ------------------
   63|       |
   64|  7.15k|	if (!d) return;
  ------------------
  |  Branch (64:6): [True: 0, False: 7.15k]
  ------------------
   65|  7.15k|	if (d->priv) {
  ------------------
  |  Branch (65:6): [True: 7.15k, False: 0]
  ------------------
   66|  7.15k|		if (d->methods.free) d->methods.free (d);
  ------------------
  |  Branch (66:7): [True: 7.15k, False: 0]
  ------------------
   67|  7.15k|		exif_mem_free (mem, d->priv);
   68|       |		d->priv = NULL;
   69|  7.15k|	}
   70|  7.15k|	exif_log_unref (d->log);
   71|  7.15k|	exif_mem_free (mem, d);
   72|  7.15k|	exif_mem_unref (mem);
   73|  7.15k|}

exif-data.c:exif_check_overflow:
   60|  57.2k|{
   61|  57.2k|	return (offset >= datasize) || (structsize > datasize) ||
  ------------------
  |  Branch (61:9): [True: 29, False: 57.2k]
  |  Branch (61:33): [True: 17.9k, False: 39.2k]
  ------------------
   62|  39.2k|	       (offset > datasize - structsize);
  ------------------
  |  Branch (62:9): [True: 376, False: 38.8k]
  ------------------
   63|  57.2k|}
exif-mnote-data-canon.c:exif_check_overflow:
   60|  62.7k|{
   61|  62.7k|	return (offset >= datasize) || (structsize > datasize) ||
  ------------------
  |  Branch (61:9): [True: 1.13k, False: 61.5k]
  |  Branch (61:33): [True: 0, False: 61.5k]
  ------------------
   62|  61.5k|	       (offset > datasize - structsize);
  ------------------
  |  Branch (62:9): [True: 602, False: 60.9k]
  ------------------
   63|  62.7k|}
exif-mnote-data-canon.c:exif_check_mul_overflow:
   75|  48.7k|{
   76|  48.7k|	if (a && (b > max / a))
  ------------------
  |  Branch (76:6): [True: 16.7k, False: 31.9k]
  |  Branch (76:11): [True: 4.14k, False: 12.6k]
  ------------------
   77|  4.14k|		return 1;
   78|  44.6k|	*res = a * b;
   79|  44.6k|	return 0;
   80|  48.7k|}
exif-mnote-data-fuji.c:exif_check_overflow:
   60|  31.9k|{
   61|  31.9k|	return (offset >= datasize) || (structsize > datasize) ||
  ------------------
  |  Branch (61:9): [True: 759, False: 31.1k]
  |  Branch (61:33): [True: 0, False: 31.1k]
  ------------------
   62|  31.1k|	       (offset > datasize - structsize);
  ------------------
  |  Branch (62:9): [True: 674, False: 30.5k]
  ------------------
   63|  31.9k|}
exif-mnote-data-fuji.c:exif_check_mul_overflow:
   75|  23.1k|{
   76|  23.1k|	if (a && (b > max / a))
  ------------------
  |  Branch (76:6): [True: 9.04k, False: 14.1k]
  |  Branch (76:11): [True: 1.20k, False: 7.84k]
  ------------------
   77|  1.20k|		return 1;
   78|  21.9k|	*res = a * b;
   79|  21.9k|	return 0;
   80|  23.1k|}
exif-mnote-data-olympus.c:exif_check_overflow:
   60|   144k|{
   61|   144k|	return (offset >= datasize) || (structsize > datasize) ||
  ------------------
  |  Branch (61:9): [True: 3.38k, False: 141k]
  |  Branch (61:33): [True: 63, False: 141k]
  ------------------
   62|   141k|	       (offset > datasize - structsize);
  ------------------
  |  Branch (62:9): [True: 1.66k, False: 139k]
  ------------------
   63|   144k|}
exif-mnote-data-olympus.c:exif_check_mul_overflow:
   75|  93.7k|{
   76|  93.7k|	if (a && (b > max / a))
  ------------------
  |  Branch (76:6): [True: 50.1k, False: 43.6k]
  |  Branch (76:11): [True: 3.95k, False: 46.1k]
  ------------------
   77|  3.95k|		return 1;
   78|  89.8k|	*res = a * b;
   79|  89.8k|	return 0;
   80|  93.7k|}
exif-mnote-data-pentax.c:exif_check_overflow:
   60|  27.4k|{
   61|  27.4k|	return (offset >= datasize) || (structsize > datasize) ||
  ------------------
  |  Branch (61:9): [True: 936, False: 26.5k]
  |  Branch (61:33): [True: 0, False: 26.5k]
  ------------------
   62|  26.5k|	       (offset > datasize - structsize);
  ------------------
  |  Branch (62:9): [True: 330, False: 26.1k]
  ------------------
   63|  27.4k|}
exif-mnote-data-pentax.c:exif_check_mul_overflow:
   75|  18.0k|{
   76|  18.0k|	if (a && (b > max / a))
  ------------------
  |  Branch (76:6): [True: 9.11k, False: 8.91k]
  |  Branch (76:11): [True: 185, False: 8.92k]
  ------------------
   77|    185|		return 1;
   78|  17.8k|	*res = a * b;
   79|  17.8k|	return 0;
   80|  18.0k|}

exif_tag_table_count:
  978|  14.4M|{
  979|  14.4M|	return sizeof (ExifTagTable) / sizeof (ExifTagTable[0]);
  980|  14.4M|}
exif_tag_table_get_tag:
  985|  5.76M|{
  986|  5.76M|	return (n < exif_tag_table_count ()) ? ExifTagTable[n].tag : 0;
  ------------------
  |  Branch (986:9): [True: 5.76M, False: 0]
  ------------------
  987|  5.76M|}
exif_tag_get_name_in_ifd:
 1043|  2.88M|{
 1044|  2.88M|	unsigned int i;
 1045|  2.88M|	int first;
 1046|       |
 1047|  2.88M|	if (ifd >= EXIF_IFD_COUNT)
  ------------------
  |  Branch (1047:6): [True: 0, False: 2.88M]
  ------------------
 1048|      0|		return NULL;
 1049|  2.88M|	first = exif_tag_table_first(tag);
 1050|  2.88M|	if (first < 0)
  ------------------
  |  Branch (1050:6): [True: 1.12M, False: 1.76M]
  ------------------
 1051|  1.12M|		return NULL;
 1052|       |
 1053|  3.18M|	for (i = first; ExifTagTable[i].name; i++) {
  ------------------
  |  Branch (1053:18): [True: 3.18M, False: 217]
  ------------------
 1054|  3.18M|		if (ExifTagTable[i].tag == tag) {
  ------------------
  |  Branch (1054:7): [True: 1.90M, False: 1.28M]
  ------------------
 1055|  1.90M|		   if (RECORDED)
  ------------------
  |  | 1035|  1.90M|#define RECORDED \
  |  | 1036|  1.90M|((ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
  |  |  ------------------
  |  |  |  Branch (1036:2): [True: 472k, False: 1.43M]
  |  |  ------------------
  |  | 1037|  1.90M| (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
  |  |  ------------------
  |  |  |  Branch (1037:2): [True: 0, False: 1.43M]
  |  |  ------------------
  |  | 1038|  1.90M| (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_YCC] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
  |  |  ------------------
  |  |  |  Branch (1038:2): [True: 1.65k, False: 1.42M]
  |  |  ------------------
  |  | 1039|  1.90M| (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_COMPRESSED] != EXIF_SUPPORT_LEVEL_NOT_RECORDED))
  |  |  ------------------
  |  |  |  Branch (1039:2): [True: 4.16k, False: 1.42M]
  |  |  ------------------
  ------------------
 1056|   478k|			   break;
 1057|  1.90M|		} else
 1058|  1.28M|			return NULL; /* Recorded tag not found in the table */
 1059|  3.18M|	}
 1060|   478k|	return ExifTagTable[i].name;
 1061|  1.76M|}
exif_tag_get_name:
 1152|   241k|{
 1153|   241k|	return exif_tag_get_stuff(tag, exif_tag_get_name_in_ifd);
 1154|   241k|}
exif_tag_get_support_level_in_ifd:
 1261|  5.77M|{
 1262|  5.77M|	if (ifd >= EXIF_IFD_COUNT)
  ------------------
  |  Branch (1262:6): [True: 0, False: 5.77M]
  ------------------
 1263|      0|		return EXIF_SUPPORT_LEVEL_UNKNOWN;
 1264|       |
 1265|  5.77M|	if (t >= EXIF_DATA_TYPE_COUNT)
  ------------------
  |  Branch (1265:6): [True: 5.77M, False: 0]
  ------------------
 1266|  5.77M|		return get_support_level_any_type (tag, ifd);
 1267|       |
 1268|      0|	return get_support_level_in_ifd (tag, ifd, t);
 1269|  5.77M|}
exif-tag.c:exif_tag_table_first:
 1016|  8.66M|{
 1017|  8.66M|	int i;
 1018|  8.66M|	const struct TagEntry *entry = bsearch(&tag, ExifTagTable,
 1019|  8.66M|		exif_tag_table_count()-1, sizeof(struct TagEntry), match_tag);
 1020|  8.66M|	if (!entry)
  ------------------
  |  Branch (1020:6): [True: 1.12M, False: 7.54M]
  ------------------
 1021|  1.12M|		return -1;	/* Not found */
 1022|       |
 1023|       |	/* Calculate index of found entry */
 1024|  7.54M|	i = entry - ExifTagTable;
 1025|       |
 1026|       |	/* There may be other entries with the same tag number, so search
 1027|       |	 * backwards to find the first
 1028|       |	 */
 1029|  7.84M|	while ((i > 0) && (ExifTagTable[i-1].tag == tag)) {
  ------------------
  |  Branch (1029:9): [True: 6.91M, False: 927k]
  |  Branch (1029:20): [True: 306k, False: 6.61M]
  ------------------
 1030|   306k|		--i;
 1031|   306k|	}
 1032|  7.54M|	return i;
 1033|  8.66M|}
exif-tag.c:match_tag:
 1003|  58.5M|{
 1004|  58.5M|	return *(int*)tag - ((struct TagEntry *)entry)->tag;
 1005|  58.5M|}
exif-tag.c:exif_tag_get_stuff:
 1130|   241k|{
 1131|       |	/* Search IFDs in this order, in decreasing order of number of valid tags */
 1132|   241k|	static const ExifIfd ifds[EXIF_IFD_COUNT] = {
 1133|   241k|		EXIF_IFD_EXIF,
 1134|   241k|		EXIF_IFD_0,
 1135|   241k|		EXIF_IFD_1,
 1136|   241k|		EXIF_IFD_INTEROPERABILITY,
 1137|   241k|		EXIF_IFD_GPS
 1138|   241k|	};
 1139|   241k|	int i;
 1140|   834k|	for (i=0; i<EXIF_IFD_COUNT; i++) {
  ------------------
  |  Branch (1140:12): [True: 812k, False: 21.9k]
  ------------------
 1141|   812k|		const char *result = func(tag, ifds[i]);
 1142|   812k|		if (result != NULL) {
  ------------------
  |  Branch (1142:7): [True: 219k, False: 592k]
  ------------------
 1143|   219k|			return result;
 1144|   219k|		}
 1145|   812k|	}
 1146|  21.9k|	return (const char *) NULL;
 1147|   241k|}
exif-tag.c:get_support_level_any_type:
 1227|  5.77M|{
 1228|  5.77M|	unsigned int i;
 1229|  5.77M|	int first = exif_tag_table_first(tag);
 1230|  5.77M|	if (first < 0)
  ------------------
  |  Branch (1230:6): [True: 0, False: 5.77M]
  ------------------
 1231|      0|		return EXIF_SUPPORT_LEVEL_UNKNOWN;
 1232|       |
 1233|  9.83M|	for (i = first; ExifTagTable[i].name; i++) {
  ------------------
  |  Branch (1233:18): [True: 9.82M, False: 17.1k]
  ------------------
 1234|  9.82M|		if (ExifTagTable[i].tag == tag) {
  ------------------
  |  Branch (1234:7): [True: 5.88M, False: 3.94M]
  ------------------
 1235|       |			/*
 1236|       |			 * Check whether the support level is the same for all possible
 1237|       |			 * data types and isn't marked not recorded.
 1238|       |			 */
 1239|  5.88M|			const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][0];
 1240|       |			/* If level is not recorded, keep searching for another */
 1241|  5.88M|			if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED) {
  ------------------
  |  Branch (1241:8): [True: 1.90M, False: 3.97M]
  ------------------
 1242|  1.90M|				unsigned int dt;
 1243|  9.43M|				for (dt = 0; dt < EXIF_DATA_TYPE_COUNT; ++dt) {
  ------------------
  |  Branch (1243:18): [True: 7.61M, False: 1.82M]
  ------------------
 1244|  7.61M|					if (ExifTagTable[i].esl[ifd][dt] != supp)
  ------------------
  |  Branch (1244:10): [True: 86.5k, False: 7.52M]
  ------------------
 1245|  86.5k|						break;
 1246|  7.61M|				}
 1247|  1.90M|				if (dt == EXIF_DATA_TYPE_COUNT)
  ------------------
  |  Branch (1247:9): [True: 1.82M, False: 86.5k]
  ------------------
 1248|       |					/* Support level is always the same, so return it */
 1249|  1.82M|					return supp;
 1250|  1.90M|			}
 1251|       |			/* Keep searching the table for another tag for our IFD */
 1252|  5.88M|		} else {
 1253|  3.94M|			break; /* We've reached the end of the matching tags */
 1254|  3.94M|		}
 1255|  9.82M|	}
 1256|  3.95M|	return EXIF_SUPPORT_LEVEL_UNKNOWN;
 1257|  5.77M|}

exif_get_sshort:
   90|   156M|{
   91|   156M|	if (!buf) return 0;
  ------------------
  |  Branch (91:6): [True: 564, False: 156M]
  ------------------
   92|   156M|        switch (order) {
  ------------------
  |  Branch (92:17): [True: 156M, False: 0]
  ------------------
   93|  96.1k|        case EXIF_BYTE_ORDER_MOTOROLA:
  ------------------
  |  Branch (93:9): [True: 96.1k, False: 156M]
  ------------------
   94|  96.1k|                return (((unsigned int)buf[0] << 8) | buf[1]);
   95|   156M|        case EXIF_BYTE_ORDER_INTEL:
  ------------------
  |  Branch (95:9): [True: 156M, False: 96.1k]
  ------------------
   96|   156M|                return (((unsigned int)buf[1] << 8) | buf[0]);
   97|   156M|        }
   98|       |
   99|       |	/* Won't be reached */
  100|      0|	return (0);
  101|   156M|}
exif_get_short:
  105|   156M|{
  106|   156M|	return (exif_get_sshort (buf, order) & 0xffff);
  107|   156M|}
exif_set_sshort:
  111|  54.4k|{
  112|  54.4k|	if (!b) return;
  ------------------
  |  Branch (112:6): [True: 0, False: 54.4k]
  ------------------
  113|  54.4k|	switch (order) {
  ------------------
  |  Branch (113:10): [True: 54.4k, False: 0]
  ------------------
  114|  4.22k|	case EXIF_BYTE_ORDER_MOTOROLA:
  ------------------
  |  Branch (114:2): [True: 4.22k, False: 50.1k]
  ------------------
  115|  4.22k|		b[0] = (unsigned char) (value >> 8);
  116|  4.22k|		b[1] = (unsigned char) value;
  117|  4.22k|		break;
  118|  50.1k|	case EXIF_BYTE_ORDER_INTEL:
  ------------------
  |  Branch (118:2): [True: 50.1k, False: 4.22k]
  ------------------
  119|  50.1k|		b[0] = (unsigned char) value;
  120|  50.1k|		b[1] = (unsigned char) (value >> 8);
  121|  50.1k|		break;
  122|  54.4k|	}
  123|  54.4k|}
exif_set_short:
  127|  54.4k|{
  128|  54.4k|	exif_set_sshort (b, order, value);
  129|  54.4k|}
exif_get_slong:
  133|  1.07M|{
  134|  1.07M|	if (!b) return 0;
  ------------------
  |  Branch (134:6): [True: 444, False: 1.07M]
  ------------------
  135|  1.07M|        switch (order) {
  ------------------
  |  Branch (135:17): [True: 1.07M, False: 0]
  ------------------
  136|  68.2k|        case EXIF_BYTE_ORDER_MOTOROLA:
  ------------------
  |  Branch (136:9): [True: 68.2k, False: 1.01M]
  ------------------
  137|  68.2k|                return (((uint32_t)b[0] << 24) | ((uint32_t)b[1] << 16) | ((uint32_t)b[2] << 8) | (uint32_t)b[3]);
  138|  1.01M|        case EXIF_BYTE_ORDER_INTEL:
  ------------------
  |  Branch (138:9): [True: 1.01M, False: 68.2k]
  ------------------
  139|  1.01M|                return (((uint32_t)b[3] << 24) | ((uint32_t)b[2] << 16) | ((uint32_t)b[1] << 8) | (uint32_t)b[0]);
  140|  1.07M|        }
  141|       |
  142|       |	/* Won't be reached */
  143|      0|	return (0);
  144|  1.07M|}
exif_set_slong:
  148|   125k|{
  149|   125k|	if (!b) return;
  ------------------
  |  Branch (149:6): [True: 0, False: 125k]
  ------------------
  150|   125k|	switch (order) {
  ------------------
  |  Branch (150:10): [True: 125k, False: 0]
  ------------------
  151|  6.93k|	case EXIF_BYTE_ORDER_MOTOROLA:
  ------------------
  |  Branch (151:2): [True: 6.93k, False: 118k]
  ------------------
  152|  6.93k|		b[0] = (unsigned char) (value >> 24);
  153|  6.93k|		b[1] = (unsigned char) (value >> 16);
  154|  6.93k|		b[2] = (unsigned char) (value >> 8);
  155|  6.93k|		b[3] = (unsigned char) value;
  156|  6.93k|		break;
  157|   118k|	case EXIF_BYTE_ORDER_INTEL:
  ------------------
  |  Branch (157:2): [True: 118k, False: 6.93k]
  ------------------
  158|   118k|		b[3] = (unsigned char) (value >> 24);
  159|   118k|		b[2] = (unsigned char) (value >> 16);
  160|   118k|		b[1] = (unsigned char) (value >> 8);
  161|   118k|		b[0] = (unsigned char) value;
  162|   118k|		break;
  163|   125k|	}
  164|   125k|}
exif_get_long:
  168|   805k|{
  169|   805k|        return (exif_get_slong (buf, order) & 0xffffffff);
  170|   805k|}
exif_set_long:
  174|  98.0k|{
  175|  98.0k|	exif_set_slong (b, order, value);
  176|  98.0k|}
exif_get_srational:
  180|  72.3k|{
  181|  72.3k|	ExifSRational r;
  182|       |
  183|  72.3k|	r.numerator   = buf ? exif_get_slong (buf, order) : 0;
  ------------------
  |  Branch (183:18): [True: 72.1k, False: 200]
  ------------------
  184|  72.3k|	r.denominator = buf ? exif_get_slong (buf + 4, order) : 0;
  ------------------
  |  Branch (184:18): [True: 72.1k, False: 200]
  ------------------
  185|       |
  186|  72.3k|	return (r);
  187|  72.3k|}
exif_get_rational:
  191|  94.3k|{
  192|  94.3k|	ExifRational r;
  193|       |
  194|  94.3k|	r.numerator   = buf ? exif_get_long (buf, order) : 0;
  ------------------
  |  Branch (194:18): [True: 94.2k, False: 85]
  ------------------
  195|  94.3k|	r.denominator = buf ? exif_get_long (buf + 4, order) : 0;
  ------------------
  |  Branch (195:18): [True: 94.2k, False: 85]
  ------------------
  196|       |
  197|  94.3k|	return (r);
  198|  94.3k|}
exif_set_rational:
  203|  49.0k|{
  204|  49.0k|	if (!buf) return;
  ------------------
  |  Branch (204:6): [True: 0, False: 49.0k]
  ------------------
  205|  49.0k|	exif_set_long (buf, order, value.numerator);
  206|  49.0k|	exif_set_long (buf + 4, order, value.denominator);
  207|  49.0k|}
exif_set_srational:
  212|  13.8k|{
  213|  13.8k|	if (!buf) return;
  ------------------
  |  Branch (213:6): [True: 0, False: 13.8k]
  ------------------
  214|  13.8k|	exif_set_slong (buf, order, value.numerator);
  215|  13.8k|	exif_set_slong (buf + 4, order, value.denominator);
  216|  13.8k|}
exif_convert_utf16_to_utf8:
  223|    114|{
  224|    114|	if (!outlen) {
  ------------------
  |  Branch (224:6): [True: 0, False: 114]
  ------------------
  225|      0|		return;
  226|      0|	}
  227|   106k|	for (;;) {
  228|   106k|		ExifShort v;
  229|   106k|		if (inlen < 2)
  ------------------
  |  Branch (229:7): [True: 0, False: 106k]
  ------------------
  230|      0|			break;
  231|   106k|		v = exif_get_short(in, EXIF_BYTE_ORDER_INTEL);
  232|   106k|		if (!v)
  ------------------
  |  Branch (232:7): [True: 84, False: 106k]
  ------------------
  233|     84|			break;
  234|   106k|		if (v < 0x80) {
  ------------------
  |  Branch (234:7): [True: 950, False: 105k]
  ------------------
  235|    950|			if (outlen > 1) {
  ------------------
  |  Branch (235:8): [True: 940, False: 10]
  ------------------
  236|    940|				*out++ = (char)v;
  237|    940|				outlen--;
  238|    940|			} else {
  239|     10|				break;
  240|     10|			}
  241|   105k|		} else if (v < 0x800) {
  ------------------
  |  Branch (241:14): [True: 2.47k, False: 102k]
  ------------------
  242|  2.47k|			if (outlen > 2) {
  ------------------
  |  Branch (242:8): [True: 2.46k, False: 10]
  ------------------
  243|  2.46k|				*out++ = ((v >> 6) & 0x1F) | 0xC0;
  244|  2.46k|				*out++ = (v & 0x3F) | 0x80;
  245|  2.46k|				outlen -= 2;
  246|  2.46k|			} else {
  247|     10|				break;
  248|     10|			}
  249|   102k|		} else {
  250|   102k|			if (outlen > 3) {
  ------------------
  |  Branch (250:8): [True: 102k, False: 10]
  ------------------
  251|   102k|				*out++ = ((v >> 12) & 0x0F) | 0xE0;
  252|   102k|				*out++ = ((v >> 6) & 0x3F) | 0x80;
  253|   102k|				*out++ = (v & 0x3F) | 0x80;
  254|   102k|				outlen -= 3;
  255|   102k|			} else {
  256|     10|				break;
  257|     10|			}
  258|   102k|		}
  259|   106k|		in += 2;
  260|   106k|		inlen -= 2;
  261|   106k|	}
  262|    114|	*out = 0;
  263|    114|}

exif_mnote_data_fuji_identify:
  345|  2.32k|{
  346|  2.32k|	(void) ed;  /* unused */
  347|  2.32k|	return ((e->size >= 12) && !memcmp (e->data, "FUJIFILM", 8));
  ------------------
  |  Branch (347:10): [True: 1.99k, False: 331]
  |  Branch (347:29): [True: 1.05k, False: 936]
  ------------------
  348|  2.32k|}
exif_mnote_data_fuji_new:
  352|  1.05k|{
  353|  1.05k|	ExifMnoteData *d;
  354|       |
  355|  1.05k|	if (!mem) return NULL;
  ------------------
  |  Branch (355:6): [True: 0, False: 1.05k]
  ------------------
  356|       |
  357|  1.05k|	d = exif_mem_alloc (mem, sizeof (ExifMnoteDataFuji));
  358|  1.05k|	if (!d) return NULL;
  ------------------
  |  Branch (358:6): [True: 0, False: 1.05k]
  ------------------
  359|       |
  360|  1.05k|	exif_mnote_data_construct (d, mem);
  361|       |
  362|       |	/* Set up function pointers */
  363|  1.05k|	d->methods.free            = exif_mnote_data_fuji_free;
  364|  1.05k|	d->methods.set_byte_order  = exif_mnote_data_fuji_set_byte_order;
  365|  1.05k|	d->methods.set_offset      = exif_mnote_data_fuji_set_offset;
  366|  1.05k|	d->methods.load            = exif_mnote_data_fuji_load;
  367|  1.05k|	d->methods.save            = exif_mnote_data_fuji_save;
  368|  1.05k|	d->methods.count           = exif_mnote_data_fuji_count;
  369|  1.05k|	d->methods.get_id          = exif_mnote_data_fuji_get_id;
  370|  1.05k|	d->methods.get_name        = exif_mnote_data_fuji_get_name;
  371|  1.05k|	d->methods.get_title       = exif_mnote_data_fuji_get_title;
  372|  1.05k|	d->methods.get_description = exif_mnote_data_fuji_get_description;
  373|  1.05k|	d->methods.get_value       = exif_mnote_data_fuji_get_value;
  374|       |
  375|  1.05k|	return d;
  376|  1.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_free:
   60|  1.05k|{
   61|  1.05k|	if (!n) return;
  ------------------
  |  Branch (61:6): [True: 0, False: 1.05k]
  ------------------
   62|       |
   63|  1.05k|	exif_mnote_data_fuji_clear ((ExifMnoteDataFuji *) n);
   64|  1.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_clear:
   40|  2.05k|{
   41|  2.05k|	ExifMnoteData *d = (ExifMnoteData *) n;
   42|  2.05k|	unsigned int i;
   43|       |
   44|  2.05k|	if (!n) return;
  ------------------
  |  Branch (44:6): [True: 0, False: 2.05k]
  ------------------
   45|       |
   46|  2.05k|	if (n->entries) {
  ------------------
  |  Branch (46:6): [True: 995, False: 1.05k]
  ------------------
   47|  22.4k|		for (i = 0; i < n->count; i++)
  ------------------
  |  Branch (47:15): [True: 21.4k, False: 995]
  ------------------
   48|  21.4k|			if (n->entries[i].data) {
  ------------------
  |  Branch (48:8): [True: 5.27k, False: 16.2k]
  ------------------
   49|  5.27k|				exif_mem_free (d->mem, n->entries[i].data);
   50|  5.27k|				n->entries[i].data = NULL;
   51|  5.27k|			}
   52|    995|		exif_mem_free (d->mem, n->entries);
   53|       |		n->entries = NULL;
   54|    995|		n->count = 0;
   55|    995|	}
   56|  2.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_set_byte_order:
  319|  1.05k|{
  320|  1.05k|	ExifByteOrder o_orig;
  321|  1.05k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
  322|  1.05k|	unsigned int i;
  323|       |
  324|  1.05k|	if (!n) return;
  ------------------
  |  Branch (324:6): [True: 0, False: 1.05k]
  ------------------
  325|       |
  326|  1.05k|	o_orig = n->order;
  327|  1.05k|	n->order = o;
  328|  1.05k|	for (i = 0; i < n->count; i++) {
  ------------------
  |  Branch (328:14): [True: 0, False: 1.05k]
  ------------------
  329|      0|		if (n->entries[i].components && (n->entries[i].size/n->entries[i].components < exif_format_get_size (n->entries[i].format)))
  ------------------
  |  Branch (329:7): [True: 0, False: 0]
  |  Branch (329:35): [True: 0, False: 0]
  ------------------
  330|      0|			continue;
  331|      0|		n->entries[i].order = o;
  332|      0|		exif_array_set_byte_order (n->entries[i].format, n->entries[i].data,
  333|      0|				n->entries[i].components, o_orig, o);
  334|      0|	}
  335|  1.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_set_offset:
  339|  1.05k|{
  340|  1.05k|	if (n) ((ExifMnoteDataFuji *) n)->offset = o;
  ------------------
  |  Branch (340:6): [True: 1.05k, False: 0]
  ------------------
  341|  1.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_load:
  159|  1.05k|{
  160|  1.05k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji*) en;
  161|  1.05k|	ExifLong c;
  162|  1.05k|	size_t i, tcount, o, datao;
  163|       |
  164|  1.05k|	if (!n) return;
  ------------------
  |  Branch (164:6): [True: 0, False: 1.05k]
  ------------------
  165|       |
  166|  1.05k|	if (!buf || !buf_size) {
  ------------------
  |  Branch (166:6): [True: 0, False: 1.05k]
  |  Branch (166:14): [True: 0, False: 1.05k]
  ------------------
  167|      0|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  168|      0|			  "ExifMnoteDataFuji", "Short MakerNote");
  169|      0|		return;
  170|      0|	}
  171|  1.05k|	if (exif_check_overflow (n->offset, buf_size, 6+8+4)) {
  ------------------
  |  Branch (171:6): [True: 1, False: 1.05k]
  ------------------
  172|      1|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  173|      1|			  "ExifMnoteDataFuji", "Short MakerNote");
  174|      1|		return;
  175|      1|	}
  176|  1.05k|	datao = 6 + n->offset;
  177|       |
  178|  1.05k|	n->order = EXIF_BYTE_ORDER_INTEL;
  179|       |
  180|  1.05k|	datao += exif_get_long (buf + datao + 8, EXIF_BYTE_ORDER_INTEL);
  181|  1.05k|	if (exif_check_overflow (datao, buf_size, 2)) {
  ------------------
  |  Branch (181:6): [True: 45, False: 1.00k]
  ------------------
  182|     45|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  183|     45|			  "ExifMnoteDataFuji", "Short MakerNote");
  184|     45|		return;
  185|     45|	}
  186|       |
  187|       |	/* Read the number of tags */
  188|  1.00k|	c = exif_get_short (buf + datao, EXIF_BYTE_ORDER_INTEL);
  189|  1.00k|	datao += 2;
  190|       |
  191|       |	/* Just use an arbitrary max tag limit here to avoid needing to much memory or time. There are 50 named tags currently.
  192|       |	 * Fuji XT2 had 56 entries or so, GFX500 has 68. 150 seems a safe upper bound currently.
  193|       |	 * The format allows specifying the same range of memory as often as it can, so this multiplies quickly. */
  194|  1.00k|	if (c > 150) {
  ------------------
  |  Branch (194:6): [True: 14, False: 995]
  ------------------
  195|     14|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataFuji", "Too much tags (%d) in Fuji MakerNote", c);
  196|     14|		return;
  197|     14|	}
  198|       |
  199|       |	/* Remove any old entries */
  200|    995|	exif_mnote_data_fuji_clear (n);
  201|       |
  202|       |	/* Reserve enough space for all the possible MakerNote tags */
  203|    995|	n->entries = exif_mem_alloc (en->mem, sizeof (MnoteFujiEntry) * c);
  204|    995|	if (!n->entries) {
  ------------------
  |  Branch (204:6): [True: 0, False: 995]
  ------------------
  205|      0|		EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteDataFuji", sizeof (MnoteFujiEntry) * c);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  206|      0|		return;
  207|      0|	}
  208|       |
  209|       |	/* Parse all c entries, storing ones that are successfully parsed */
  210|    995|	tcount = 0;
  211|  24.1k|	for (i = c, o = datao; i; --i, o += 12) {
  ------------------
  |  Branch (211:25): [True: 24.0k, False: 74]
  ------------------
  212|  24.0k|		size_t s;
  213|       |
  214|  24.0k|		memset(&n->entries[tcount], 0, sizeof(MnoteFujiEntry));
  215|  24.0k|		if (exif_check_overflow (o, buf_size, 12)) {
  ------------------
  |  Branch (215:7): [True: 921, False: 23.1k]
  ------------------
  216|    921|			exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  217|    921|				  "ExifMnoteDataFuji", "Short MakerNote");
  218|    921|			break;
  219|    921|		}
  220|       |
  221|  23.1k|		n->entries[tcount].tag        = exif_get_short (buf + o, n->order);
  222|  23.1k|		n->entries[tcount].format     = exif_get_short (buf + o + 2, n->order);
  223|  23.1k|		n->entries[tcount].components = exif_get_long (buf + o + 4, n->order);
  224|  23.1k|		n->entries[tcount].order      = n->order;
  225|       |
  226|  23.1k|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataFuji",
  227|  23.1k|			  "Loading entry 0x%x ('%s')...", n->entries[tcount].tag,
  228|  23.1k|			  mnote_fuji_tag_get_name (n->entries[tcount].tag));
  229|       |
  230|       |		/* Check if we overflow the multiplication. Use buf_size as the max size for integer overflow detection,
  231|       |		 * we will check the buffer sizes closer later. */
  232|  23.1k|		if (exif_check_mul_overflow (exif_format_get_size (n->entries[tcount].format),
  ------------------
  |  Branch (232:7): [True: 1.20k, False: 21.9k]
  ------------------
  233|  23.1k|				n->entries[tcount].components, buf_size, &s)) {
  234|  1.20k|			exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  235|  1.20k|					  "ExifMnoteDataFuji", "Tag size overflow detected (%u * %lu)", exif_format_get_size (n->entries[tcount].format), n->entries[tcount].components);
  236|  1.20k|			continue;
  237|  1.20k|		}
  238|       |		/*
  239|       |		 * Size? If bigger than 4 bytes, the actual data is not
  240|       |		 * in the entry but somewhere else (offset).
  241|       |		 */
  242|  21.9k|		n->entries[tcount].size = s;
  243|  21.9k|		if (s) {
  ------------------
  |  Branch (243:7): [True: 5.74k, False: 16.2k]
  ------------------
  244|  5.74k|			size_t dataofs = o + 8;
  245|  5.74k|			if (s > 4)
  ------------------
  |  Branch (245:8): [True: 2.91k, False: 2.82k]
  ------------------
  246|       |				/* The data in this case is merely a pointer */
  247|  2.91k|				dataofs = exif_get_long (buf + dataofs, n->order) + 6 + n->offset;
  248|       |
  249|  5.74k|			if (exif_check_overflow (dataofs, buf_size, s)) {
  ------------------
  |  Branch (249:8): [True: 466, False: 5.27k]
  ------------------
  250|    466|				exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  251|    466|						  "ExifMnoteDataFuji", "Tag data past end of "
  252|    466|					  "buffer (%u >= %u)", (unsigned)(dataofs + s), buf_size);
  253|    466|				continue;
  254|    466|			}
  255|       |
  256|  5.27k|			n->entries[tcount].data = exif_mem_alloc (en->mem, s);
  257|  5.27k|			if (!n->entries[tcount].data) {
  ------------------
  |  Branch (257:8): [True: 0, False: 5.27k]
  ------------------
  258|      0|				EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteDataFuji", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  259|      0|				continue;
  260|      0|			}
  261|  5.27k|			memcpy (n->entries[tcount].data, buf + dataofs, s);
  262|  5.27k|		}
  263|       |
  264|       |		/* Tag was successfully parsed */
  265|  21.4k|		++tcount;
  266|  21.4k|	}
  267|       |	/* Store the count of successfully parsed tags */
  268|    995|	n->count = tcount;
  269|    995|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_count:
  273|  1.05k|{
  274|  1.05k|	return n ? ((ExifMnoteDataFuji *) n)->count : 0;
  ------------------
  |  Branch (274:9): [True: 1.05k, False: 0]
  ------------------
  275|  1.05k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_get_name:
  289|  10.7k|{
  290|  10.7k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
  291|       |
  292|  10.7k|	if (!n) return NULL;
  ------------------
  |  Branch (292:6): [True: 0, False: 10.7k]
  ------------------
  293|  10.7k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (293:6): [True: 0, False: 10.7k]
  ------------------
  294|  10.7k|	return mnote_fuji_tag_get_name (n->entries[i].tag);
  295|  10.7k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_get_title:
  299|  10.2k|{
  300|  10.2k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
  301|       |	
  302|  10.2k|	if (!n) return NULL;
  ------------------
  |  Branch (302:6): [True: 0, False: 10.2k]
  ------------------
  303|  10.2k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (303:6): [True: 0, False: 10.2k]
  ------------------
  304|  10.2k|        return mnote_fuji_tag_get_title (n->entries[i].tag);
  305|  10.2k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_get_description:
  309|  10.2k|{
  310|  10.2k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
  311|       |	
  312|  10.2k|	if (!n) return NULL;
  ------------------
  |  Branch (312:6): [True: 0, False: 10.2k]
  ------------------
  313|  10.2k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (313:6): [True: 0, False: 10.2k]
  ------------------
  314|  10.2k|        return mnote_fuji_tag_get_description (n->entries[i].tag);
  315|  10.2k|}
exif-mnote-data-fuji.c:exif_mnote_data_fuji_get_value:
   68|  10.2k|{
   69|  10.2k|	ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
   70|       |
   71|  10.2k|	if (!d || !val) return NULL;
  ------------------
  |  Branch (71:6): [True: 0, False: 10.2k]
  |  Branch (71:12): [True: 0, False: 10.2k]
  ------------------
   72|  10.2k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (72:6): [True: 0, False: 10.2k]
  ------------------
   73|       |/*
   74|       |	exif_log (d->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataFuji",
   75|       |		  "Querying value for tag '%s'...",
   76|       |		  mnote_fuji_tag_get_name (n->entries[i].tag));
   77|       |*/
   78|  10.2k|	return mnote_fuji_entry_get_value (&n->entries[i], val, maxlen);
   79|  10.2k|}

mnote_fuji_entry_get_value:
  194|  10.2k|{
  195|  10.2k|	ExifLong  vl;
  196|  10.2k|	ExifSLong vsl;
  197|  10.2k|	ExifShort vs, vs2;
  198|  10.2k|	ExifSShort vss;
  199|  10.2k|	ExifRational vr;
  200|  10.2k|	ExifSRational vsr;
  201|  10.2k|	int i, j;
  202|       |
  203|  10.2k|	if (!entry) return (NULL);
  ------------------
  |  Branch (203:6): [True: 0, False: 10.2k]
  ------------------
  204|  10.2k|	if (maxlen < 1) return NULL;
  ------------------
  |  Branch (204:6): [True: 0, False: 10.2k]
  ------------------
  205|       |
  206|  10.2k|	memset (val, 0, maxlen);
  207|  10.2k|	maxlen--;
  208|       |
  209|  10.2k|	switch (entry->tag) {
  210|  1.11k|	  case MNOTE_FUJI_TAG_VERSION:
  ------------------
  |  Branch (210:4): [True: 1.11k, False: 9.11k]
  ------------------
  211|  1.11k|		CF (entry->format, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |   33|  1.11k|#define CF(format,target,v,maxlen)                              \
  |  |   34|  1.11k|{                                                               \
  |  |   35|  1.11k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (35:13): [True: 575, False: 544]
  |  |  ------------------
  |  |   36|    575|                snprintf (v, maxlen,	                        \
  |  |   37|    575|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    575|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   38|    575|                        "expected '%s'."),                      \
  |  |   39|    575|                        exif_format_get_name (format),          \
  |  |   40|    575|                        exif_format_get_name (target));         \
  |  |   41|    575|                break;                                          \
  |  |   42|    575|        }                                                       \
  |  |   43|  1.11k|}
  ------------------
  212|    544|		CC (entry->components, 4, val, maxlen)
  ------------------
  |  |   45|    544|#define CC(number,target,v,maxlen)                                      \
  |  |   46|    544|{                                                                       \
  |  |   47|    544|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 343, False: 201]
  |  |  ------------------
  |  |   48|    343|                snprintf (v, maxlen,                                    \
  |  |   49|    343|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    343|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   50|    343|                        "expected %i)."), (int) number, (int) target);  \
  |  |   51|    343|                break;                                                  \
  |  |   52|    343|        }                                                               \
  |  |   53|    544|}
  ------------------
  213|    201|		memcpy (val, entry->data, MIN(maxlen, entry->size));
  ------------------
  |  |  182|    201|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 201]
  |  |  ------------------
  ------------------
  214|    201|		break;
  215|    206|	  case MNOTE_FUJI_TAG_SHARPNESS:
  ------------------
  |  Branch (215:4): [True: 206, False: 10.0k]
  ------------------
  216|    639|	  case MNOTE_FUJI_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (216:4): [True: 433, False: 9.80k]
  ------------------
  217|    854|	  case MNOTE_FUJI_TAG_COLOR:
  ------------------
  |  Branch (217:4): [True: 215, False: 10.0k]
  ------------------
  218|  1.14k|  	  case MNOTE_FUJI_TAG_TONE:
  ------------------
  |  Branch (218:6): [True: 295, False: 9.93k]
  ------------------
  219|  1.39k|	  case MNOTE_FUJI_TAG_FLASH_MODE:
  ------------------
  |  Branch (219:4): [True: 249, False: 9.98k]
  ------------------
  220|  1.62k|	  case MNOTE_FUJI_TAG_MACRO:
  ------------------
  |  Branch (220:4): [True: 228, False: 10.0k]
  ------------------
  221|  1.98k|	  case MNOTE_FUJI_TAG_FOCUS_MODE:
  ------------------
  |  Branch (221:4): [True: 357, False: 9.87k]
  ------------------
  222|  2.19k|	  case MNOTE_FUJI_TAG_SLOW_SYNC:
  ------------------
  |  Branch (222:4): [True: 209, False: 10.0k]
  ------------------
  223|  2.49k|	  case MNOTE_FUJI_TAG_PICTURE_MODE:
  ------------------
  |  Branch (223:4): [True: 298, False: 9.93k]
  ------------------
  224|  2.69k|	  case MNOTE_FUJI_TAG_CONT_TAKING:
  ------------------
  |  Branch (224:4): [True: 208, False: 10.0k]
  ------------------
  225|  2.91k|	  case MNOTE_FUJI_TAG_FINEPIX_COLOR:
  ------------------
  |  Branch (225:4): [True: 216, False: 10.0k]
  ------------------
  226|  3.13k|	  case MNOTE_FUJI_TAG_BLUR_CHECK:
  ------------------
  |  Branch (226:4): [True: 219, False: 10.0k]
  ------------------
  227|  3.33k|	  case MNOTE_FUJI_TAG_FOCUS_CHECK:
  ------------------
  |  Branch (227:4): [True: 200, False: 10.0k]
  ------------------
  228|  3.55k|	  case MNOTE_FUJI_TAG_AUTO_EXPOSURE_CHECK:
  ------------------
  |  Branch (228:4): [True: 217, False: 10.0k]
  ------------------
  229|  3.93k|	  case MNOTE_FUJI_TAG_DYNAMIC_RANGE:
  ------------------
  |  Branch (229:4): [True: 388, False: 9.84k]
  ------------------
  230|  4.17k|	  case MNOTE_FUJI_TAG_FILM_MODE:
  ------------------
  |  Branch (230:4): [True: 234, False: 9.99k]
  ------------------
  231|  4.39k|	  case MNOTE_FUJI_TAG_DYNAMIC_RANGE_SETTING:
  ------------------
  |  Branch (231:4): [True: 225, False: 10.0k]
  ------------------
  232|  4.39k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   33|  4.39k|#define CF(format,target,v,maxlen)                              \
  |  |   34|  4.39k|{                                                               \
  |  |   35|  4.39k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (35:13): [True: 2.15k, False: 2.24k]
  |  |  ------------------
  |  |   36|  2.15k|                snprintf (v, maxlen,	                        \
  |  |   37|  2.15k|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|  2.15k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   38|  2.15k|                        "expected '%s'."),                      \
  |  |   39|  2.15k|                        exif_format_get_name (format),          \
  |  |   40|  2.15k|                        exif_format_get_name (target));         \
  |  |   41|  2.15k|                break;                                          \
  |  |   42|  2.15k|        }                                                       \
  |  |   43|  4.39k|}
  ------------------
  233|  2.24k|		CC (entry->components, 1, val, maxlen)
  ------------------
  |  |   45|  2.24k|#define CC(number,target,v,maxlen)                                      \
  |  |   46|  2.24k|{                                                                       \
  |  |   47|  2.24k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 330, False: 1.91k]
  |  |  ------------------
  |  |   48|    330|                snprintf (v, maxlen,                                    \
  |  |   49|    330|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    330|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   50|    330|                        "expected %i)."), (int) number, (int) target);  \
  |  |   51|    330|                break;                                                  \
  |  |   52|    330|        }                                                               \
  |  |   53|  2.24k|}
  ------------------
  234|  1.91k|		vs = exif_get_short (entry->data, entry->order);
  235|       |
  236|       |		/* search the tag */
  237|  14.5k|		for (i = 0; (items[i].tag && items[i].tag != entry->tag); i++);
  ------------------
  |  Branch (237:16): [True: 14.5k, False: 0]
  |  Branch (237:32): [True: 12.6k, False: 1.91k]
  ------------------
  238|  1.91k|		if (!items[i].tag) {
  ------------------
  |  Branch (238:7): [True: 0, False: 1.91k]
  ------------------
  239|      0|			snprintf (val, maxlen,
  240|      0|				  _("Internal error (unknown value %i)"), vs);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  241|      0|		  	break;
  242|      0|		}
  243|       |
  244|       |		/* find the value */
  245|  10.2k|		for (j = 0; items[i].elem[j].string &&
  ------------------
  |  Branch (245:15): [True: 9.36k, False: 912]
  ------------------
  246|  9.36k|		    (items[i].elem[j].index < vs); j++);
  ------------------
  |  Branch (246:7): [True: 8.36k, False: 998]
  ------------------
  247|  1.91k|		if (items[i].elem[j].index != vs) {
  ------------------
  |  Branch (247:7): [True: 1.15k, False: 752]
  ------------------
  248|  1.15k|			snprintf (val, maxlen,
  249|  1.15k|				  _("Internal error (unknown value %i)"), vs);
  ------------------
  |  |   31|  1.15k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  250|  1.15k|			break;
  251|  1.15k|		}
  252|    752|		strncpy (val, _(items[i].elem[j].string), maxlen);
  ------------------
  |  |   31|    752|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  253|    752|		break;
  254|    607|	  case MNOTE_FUJI_TAG_FOCUS_POINT:
  ------------------
  |  Branch (254:4): [True: 607, False: 9.62k]
  ------------------
  255|    607|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   33|    607|#define CF(format,target,v,maxlen)                              \
  |  |   34|    607|{                                                               \
  |  |   35|    607|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (35:13): [True: 210, False: 397]
  |  |  ------------------
  |  |   36|    210|                snprintf (v, maxlen,	                        \
  |  |   37|    210|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    210|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   38|    210|                        "expected '%s'."),                      \
  |  |   39|    210|                        exif_format_get_name (format),          \
  |  |   40|    210|                        exif_format_get_name (target));         \
  |  |   41|    210|                break;                                          \
  |  |   42|    210|        }                                                       \
  |  |   43|    607|}
  ------------------
  256|    397|		CC (entry->components, 2, val, maxlen)
  ------------------
  |  |   45|    397|#define CC(number,target,v,maxlen)                                      \
  |  |   46|    397|{                                                                       \
  |  |   47|    397|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 195, False: 202]
  |  |  ------------------
  |  |   48|    195|                snprintf (v, maxlen,                                    \
  |  |   49|    195|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    195|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   50|    195|                        "expected %i)."), (int) number, (int) target);  \
  |  |   51|    195|                break;                                                  \
  |  |   52|    195|        }                                                               \
  |  |   53|    397|}
  ------------------
  257|    202|		vs = exif_get_short (entry->data, entry->order);
  258|    202|		vs2 = exif_get_short (entry->data+2, entry->order);
  259|    202|		snprintf (val, maxlen, "%i, %i", vs, vs2);
  260|    202|		break;
  261|    333|	  case MNOTE_FUJI_TAG_MIN_FOCAL_LENGTH:
  ------------------
  |  Branch (261:4): [True: 333, False: 9.90k]
  ------------------
  262|  1.28k|	  case MNOTE_FUJI_TAG_MAX_FOCAL_LENGTH:
  ------------------
  |  Branch (262:4): [True: 951, False: 9.28k]
  ------------------
  263|  1.28k|		CF (entry->format, EXIF_FORMAT_RATIONAL, val, maxlen)
  ------------------
  |  |   33|  1.28k|#define CF(format,target,v,maxlen)                              \
  |  |   34|  1.28k|{                                                               \
  |  |   35|  1.28k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (35:13): [True: 448, False: 836]
  |  |  ------------------
  |  |   36|    448|                snprintf (v, maxlen,	                        \
  |  |   37|    448|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    448|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   38|    448|                        "expected '%s'."),                      \
  |  |   39|    448|                        exif_format_get_name (format),          \
  |  |   40|    448|                        exif_format_get_name (target));         \
  |  |   41|    448|                break;                                          \
  |  |   42|    448|        }                                                       \
  |  |   43|  1.28k|}
  ------------------
  264|    836|		CC (entry->components, 1, val, maxlen)
  ------------------
  |  |   45|    836|#define CC(number,target,v,maxlen)                                      \
  |  |   46|    836|{                                                                       \
  |  |   47|    836|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 205, False: 631]
  |  |  ------------------
  |  |   48|    205|                snprintf (v, maxlen,                                    \
  |  |   49|    205|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    205|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   50|    205|                        "expected %i)."), (int) number, (int) target);  \
  |  |   51|    205|                break;                                                  \
  |  |   52|    205|        }                                                               \
  |  |   53|    836|}
  ------------------
  265|    631|		vr = exif_get_rational (entry->data, entry->order);
  266|    631|		if (!vr.denominator) break;
  ------------------
  |  Branch (266:7): [True: 232, False: 399]
  ------------------
  267|    399|		snprintf (val, maxlen, _("%2.2f mm"), (double) vr.numerator /
  ------------------
  |  |   31|    399|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  268|    399|			  vr.denominator);
  269|    399|		break;
  270|       |
  271|  2.82k|	default:
  ------------------
  |  Branch (271:2): [True: 2.82k, False: 7.40k]
  ------------------
  272|  2.82k|		switch (entry->format) {
  273|    253|		case EXIF_FORMAT_ASCII:
  ------------------
  |  Branch (273:3): [True: 253, False: 2.57k]
  ------------------
  274|    253|		  strncpy (val, (char *)entry->data, MIN(maxlen, entry->size));
  ------------------
  |  |  182|    253|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 85, False: 168]
  |  |  ------------------
  ------------------
  275|    253|		  break;
  276|    215|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (276:3): [True: 215, False: 2.61k]
  ------------------
  277|    215|		  vs = exif_get_short (entry->data, entry->order);
  278|    215|		  snprintf (val, maxlen, "%hu", vs);
  279|    215|		  break;
  280|    374|		case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (280:3): [True: 374, False: 2.45k]
  ------------------
  281|    374|		  vss = exif_get_sshort (entry->data, entry->order);
  282|    374|		  snprintf (val, maxlen, "%hi", vss);
  283|    374|		  break;
  284|    203|		case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (284:3): [True: 203, False: 2.62k]
  ------------------
  285|    203|		  vl = exif_get_long (entry->data, entry->order);
  286|    203|		  snprintf (val, maxlen, "%lu", (long unsigned) vl);
  287|    203|		  break;
  288|    247|		case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (288:3): [True: 247, False: 2.57k]
  ------------------
  289|    247|		  vsl = exif_get_slong (entry->data, entry->order);
  290|    247|		  snprintf (val, maxlen, "%li", (long int) vsl);
  291|    247|		  break;
  292|    647|		case EXIF_FORMAT_RATIONAL:
  ------------------
  |  Branch (292:3): [True: 647, False: 2.17k]
  ------------------
  293|    647|		  vr = exif_get_rational (entry->data, entry->order);
  294|    647|		  if (!vr.denominator) break;
  ------------------
  |  Branch (294:9): [True: 114, False: 533]
  ------------------
  295|    533|		  snprintf (val, maxlen, "%2.4f", (double) vr.numerator /
  296|    533|						    vr.denominator);
  297|    533|		  break;
  298|    526|		case EXIF_FORMAT_SRATIONAL:
  ------------------
  |  Branch (298:3): [True: 526, False: 2.30k]
  ------------------
  299|    526|		  vsr = exif_get_srational (entry->data, entry->order);
  300|    526|		  if (!vsr.denominator) break;
  ------------------
  |  Branch (300:9): [True: 233, False: 293]
  ------------------
  301|    293|		  snprintf (val, maxlen, "%2.4f", (double) vsr.numerator /
  302|    293|			  vsr.denominator);
  303|    293|		  break;
  304|      0|		case EXIF_FORMAT_UNDEFINED:
  ------------------
  |  Branch (304:3): [True: 0, False: 2.82k]
  ------------------
  305|    361|		default:
  ------------------
  |  Branch (305:3): [True: 361, False: 2.46k]
  ------------------
  306|    361|		  snprintf (val, maxlen, _("%i bytes unknown data"),
  ------------------
  |  |   31|    361|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  307|    361| 			  entry->size);
  308|    361|		  break;
  309|  2.82k|		}
  310|  2.82k|		break;
  311|  10.2k|	}
  312|       |
  313|  10.2k|	return (val);
  314|  10.2k|}

mnote_fuji_tag_get_name:
   75|  33.9k|{
   76|  33.9k|	unsigned int i;
   77|       |
   78|   553k|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (78:14): [True: 544k, False: 9.25k]
  ------------------
   79|   544k|		if (table[i].tag == t) return (table[i].name);
  ------------------
  |  Branch (79:7): [True: 24.6k, False: 519k]
  ------------------
   80|  9.25k|	return NULL;
   81|  33.9k|}
mnote_fuji_tag_get_title:
   85|  10.2k|{
   86|  10.2k|	unsigned int i;
   87|       |
   88|  10.2k|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   89|   117k|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (89:14): [True: 117k, False: 0]
  ------------------
   90|   117k|		if (table[i].tag == t) {
  ------------------
  |  Branch (90:7): [True: 10.2k, False: 107k]
  ------------------
   91|  10.2k|			if (!table[i].title)
  ------------------
  |  Branch (91:8): [True: 0, False: 10.2k]
  ------------------
   92|      0|				return NULL;
   93|  10.2k|			return _(table[i].title);
  ------------------
  |  |   31|  10.2k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
   94|  10.2k|		}
   95|      0|	return NULL;
   96|  10.2k|}
mnote_fuji_tag_get_description:
  100|  10.2k|{
  101|  10.2k|	unsigned int i;
  102|       |
  103|   117k|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (103:14): [True: 117k, False: 0]
  ------------------
  104|   117k|		if (table[i].tag == t) {
  ------------------
  |  Branch (104:7): [True: 10.2k, False: 107k]
  ------------------
  105|  10.2k|			if (!table[i].description || !*table[i].description)
  ------------------
  |  Branch (105:8): [True: 0, False: 10.2k]
  |  Branch (105:33): [True: 9.24k, False: 989]
  ------------------
  106|  9.24k|				return "";
  107|    989|			(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  108|    989|			return _(table[i].description);
  ------------------
  |  |   31|    989|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  109|  10.2k|		}
  110|      0|	return NULL;
  111|  10.2k|}

exif_mnote_data_olympus_identify:
  623|  7.35k|{
  624|  7.35k|	int variant = exif_mnote_data_olympus_identify_variant(e->data, e->size);
  625|       |
  626|  7.35k|	if (variant == nikonV0) {
  ------------------
  |  Branch (626:6): [True: 512, False: 6.84k]
  ------------------
  627|       |		/* This variant needs some extra checking with the Make */
  628|    512|		char value[5];
  629|    512|		ExifEntry *em = exif_data_get_entry (ed, EXIF_TAG_MAKE);
  ------------------
  |  |  253|    512|	(exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ?			\
  |  |  ------------------
  |  |  |  Branch (253:3): [True: 13, False: 499]
  |  |  ------------------
  |  |  254|    512|	 exif_content_get_entry(d->ifd[EXIF_IFD_0],t) :			\
  |  |  255|    512|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ?			\
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 65, False: 434]
  |  |  ------------------
  |  |  256|    499|	 exif_content_get_entry(d->ifd[EXIF_IFD_1],t) :			\
  |  |  257|    499|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ?		\
  |  |  ------------------
  |  |  |  Branch (257:3): [True: 0, False: 434]
  |  |  ------------------
  |  |  258|    434|	 exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) :		\
  |  |  259|    434|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ?		\
  |  |  ------------------
  |  |  |  Branch (259:3): [True: 0, False: 434]
  |  |  ------------------
  |  |  260|    434|	 exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) :		\
  |  |  261|    434|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ?	\
  |  |  ------------------
  |  |  |  Branch (261:3): [True: 0, False: 434]
  |  |  ------------------
  |  |  262|    434|	 exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)
  ------------------
  630|    512|		variant = unrecognized;
  631|       |
  632|    512|		if (em) {
  ------------------
  |  Branch (632:7): [True: 78, False: 434]
  ------------------
  633|     78|			const char *v = exif_entry_get_value (em, value, sizeof(value));
  634|     78|			if (v && (!strncmp (v, "Nikon", sizeof(value)) || 
  ------------------
  |  Branch (634:8): [True: 78, False: 0]
  |  Branch (634:14): [True: 0, False: 78]
  ------------------
  635|     78|					  !strncmp (v, "NIKON", sizeof(value)) ))
  ------------------
  |  Branch (635:8): [True: 0, False: 78]
  ------------------
  636|       |				/* When saved, this variant will be written out like the
  637|       |				 * alternative nikonV2 form above instead
  638|       |				 */
  639|      0|				variant = nikonV0;
  640|     78|		}
  641|    512|	}
  642|       |
  643|  7.35k|	return variant;
  644|  7.35k|}
exif_mnote_data_olympus_new:
  649|  4.10k|{
  650|  4.10k|	ExifMnoteData *d;
  651|       |
  652|  4.10k|	if (!mem) return NULL;
  ------------------
  |  Branch (652:6): [True: 0, False: 4.10k]
  ------------------
  653|       |	
  654|  4.10k|	d = exif_mem_alloc (mem, sizeof (ExifMnoteDataOlympus));
  655|  4.10k|	if (!d) return NULL;
  ------------------
  |  Branch (655:6): [True: 0, False: 4.10k]
  ------------------
  656|       |
  657|  4.10k|	exif_mnote_data_construct (d, mem);
  658|       |
  659|       |	/* Set up function pointers */
  660|  4.10k|	d->methods.free            = exif_mnote_data_olympus_free;
  661|  4.10k|	d->methods.set_byte_order  = exif_mnote_data_olympus_set_byte_order;
  662|  4.10k|	d->methods.set_offset      = exif_mnote_data_olympus_set_offset;
  663|  4.10k|	d->methods.load            = exif_mnote_data_olympus_load;
  664|  4.10k|	d->methods.save            = exif_mnote_data_olympus_save;
  665|  4.10k|	d->methods.count           = exif_mnote_data_olympus_count;
  666|  4.10k|	d->methods.get_id          = exif_mnote_data_olympus_get_id;
  667|  4.10k|	d->methods.get_name        = exif_mnote_data_olympus_get_name;
  668|  4.10k|	d->methods.get_title       = exif_mnote_data_olympus_get_title;
  669|  4.10k|	d->methods.get_description = exif_mnote_data_olympus_get_description;
  670|  4.10k|	d->methods.get_value       = exif_mnote_data_olympus_get_value;
  671|       |
  672|  4.10k|	return d;
  673|  4.10k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_identify_variant:
  592|  11.4k|{
  593|       |	/* Olympus, Nikon, Sanyo, Epson */
  594|  11.4k|	if (buf_size >= 8) {
  ------------------
  |  Branch (594:6): [True: 11.2k, False: 248]
  ------------------
  595|       |		/* Match the terminating NUL character, too */
  596|  11.2k|		if (!memcmp (buf, "OLYMPUS", 8))
  ------------------
  |  Branch (596:7): [True: 1.04k, False: 10.1k]
  ------------------
  597|  1.04k|			   return olympusV2;
  598|  10.1k|		else if (!memcmp (buf, "OLYMP", 6))
  ------------------
  |  Branch (598:12): [True: 2.44k, False: 7.71k]
  ------------------
  599|  2.44k|			   return olympusV1;
  600|  7.71k|		else if (!memcmp (buf, "SANYO", 6))
  ------------------
  |  Branch (600:12): [True: 2.94k, False: 4.77k]
  ------------------
  601|  2.94k|			   return sanyoV1;
  602|  4.77k|		else if (!memcmp (buf, "EPSON", 6))
  ------------------
  |  Branch (602:12): [True: 1.32k, False: 3.45k]
  ------------------
  603|  1.32k|			   return epsonV1;
  604|  3.45k|		else if (!memcmp (buf, "Nikon", 6)) {
  ------------------
  |  Branch (604:12): [True: 394, False: 3.05k]
  ------------------
  605|    394|			switch (buf[6]) {
  606|    136|				case 1:  return nikonV1;
  ------------------
  |  Branch (606:5): [True: 136, False: 258]
  ------------------
  607|    250|				case 2:  return nikonV2;
  ------------------
  |  Branch (607:5): [True: 250, False: 144]
  ------------------
  608|      8|				default: return 0; /* Unrecognized Nikon variant */
  ------------------
  |  Branch (608:5): [True: 8, False: 386]
  ------------------
  609|    394|			}
  610|    394|		}
  611|  11.2k|	}
  612|       |
  613|       |	/* Another variant of Nikon */
  614|  3.30k|	if ((buf_size >= 2) && (buf[0] == 0x00) && (buf[1] == 0x1b)) {
  ------------------
  |  Branch (614:6): [True: 3.29k, False: 12]
  |  Branch (614:25): [True: 571, False: 2.72k]
  |  Branch (614:45): [True: 528, False: 43]
  ------------------
  615|    528|		return nikonV0;
  616|    528|	}
  617|       |
  618|  2.77k|	return unrecognized;
  619|  3.30k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_free:
   68|  4.10k|{
   69|  4.10k|	if (!n) return;
  ------------------
  |  Branch (69:6): [True: 0, False: 4.10k]
  ------------------
   70|       |
   71|  4.10k|	exif_mnote_data_olympus_clear ((ExifMnoteDataOlympus *) n);
   72|  4.10k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_clear:
   48|  7.95k|{
   49|  7.95k|	ExifMnoteData *d = (ExifMnoteData *) n;
   50|  7.95k|	unsigned int i;
   51|       |
   52|  7.95k|	if (!n) return;
  ------------------
  |  Branch (52:6): [True: 0, False: 7.95k]
  ------------------
   53|       |
   54|  7.95k|	if (n->entries) {
  ------------------
  |  Branch (54:6): [True: 3.85k, False: 4.10k]
  ------------------
   55|  91.8k|		for (i = 0; i < n->count; i++)
  ------------------
  |  Branch (55:15): [True: 88.0k, False: 3.85k]
  ------------------
   56|  88.0k|			if (n->entries[i].data) {
  ------------------
  |  Branch (56:8): [True: 37.0k, False: 51.0k]
  ------------------
   57|  37.0k|				exif_mem_free (d->mem, n->entries[i].data);
   58|  37.0k|				n->entries[i].data = NULL;
   59|  37.0k|			}
   60|  3.85k|		exif_mem_free (d->mem, n->entries);
   61|       |		n->entries = NULL;
   62|  3.85k|		n->count = 0;
   63|  3.85k|	}
   64|  7.95k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_set_byte_order:
  565|  4.10k|{
  566|  4.10k|	ExifByteOrder o_orig;
  567|  4.10k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
  568|  4.10k|	unsigned int i;
  569|       |
  570|  4.10k|	if (!n) return;
  ------------------
  |  Branch (570:6): [True: 0, False: 4.10k]
  ------------------
  571|       |
  572|  4.10k|	o_orig = n->order;
  573|  4.10k|	n->order = o;
  574|  4.10k|	for (i = 0; i < n->count; i++) {
  ------------------
  |  Branch (574:14): [True: 0, False: 4.10k]
  ------------------
  575|      0|		if (n->entries[i].components && (n->entries[i].size/n->entries[i].components < exif_format_get_size (n->entries[i].format)))
  ------------------
  |  Branch (575:7): [True: 0, False: 0]
  |  Branch (575:35): [True: 0, False: 0]
  ------------------
  576|      0|			continue;
  577|      0|		n->entries[i].order = o;
  578|      0|		exif_array_set_byte_order (n->entries[i].format, n->entries[i].data,
  579|      0|				n->entries[i].components, o_orig, o);
  580|      0|	}
  581|  4.10k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_set_offset:
  585|  4.10k|{
  586|  4.10k|	if (n) ((ExifMnoteDataOlympus *) n)->offset = o;
  ------------------
  |  Branch (586:6): [True: 4.10k, False: 0]
  ------------------
  587|  4.10k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_load:
  241|  4.10k|{
  242|  4.10k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) en;
  243|  4.10k|	ExifShort c;
  244|  4.10k|	size_t i, tcount, o, o2, datao = 6, base = 0;
  245|       |
  246|  4.10k|	if (!n) return;
  ------------------
  |  Branch (246:6): [True: 0, False: 4.10k]
  ------------------
  247|       |
  248|  4.10k|	if (!buf || !buf_size) {
  ------------------
  |  Branch (248:6): [True: 0, False: 4.10k]
  |  Branch (248:14): [True: 0, False: 4.10k]
  ------------------
  249|      0|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  250|      0|			  "ExifMnoteDataOlympus", "Short MakerNote");
  251|      0|		return;
  252|      0|	}
  253|  4.10k|	o2 = 6 + n->offset; /* Start of interesting data */
  254|  4.10k|	if (exif_check_overflow (o2,buf_size,10)) {
  ------------------
  |  Branch (254:6): [True: 7, False: 4.09k]
  ------------------
  255|      7|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  256|      7|			  "ExifMnoteDataOlympus", "Short MakerNote");
  257|      7|		return;
  258|      7|	}
  259|       |
  260|       |	/*
  261|       |	 * Olympus headers start with "OLYMP" and need to have at least
  262|       |	 * a size of 22 bytes (6 for 'OLYMP', 2 other bytes, 2 for the
  263|       |	 * number of entries, and 12 for one entry.
  264|       |	 *
  265|       |	 * Sanyo format is identical and uses identical tags except that
  266|       |	 * header starts with "SANYO".
  267|       |	 *
  268|       |	 * Epson format is identical and uses identical tags except that
  269|       |	 * header starts with "EPSON".
  270|       |	 *
  271|       |	 * Nikon headers start with "Nikon" (6 bytes including '\0'), 
  272|       |	 * version number (1 or 2).
  273|       |	 * 
  274|       |	 * Version 1 continues with 0, 1, 0, number_of_tags,
  275|       |	 * or just with number_of_tags (models D1H, D1X...).
  276|       |	 * 
  277|       |	 * Version 2 continues with an unknown byte (0 or 10),
  278|       |	 * two unknown bytes (0), "MM" or "II", another byte 0 and 
  279|       |	 * lastly 0x2A.
  280|       |	 */
  281|  4.09k|	n->version = exif_mnote_data_olympus_identify_variant(buf+o2, buf_size-o2);
  282|  4.09k|	switch (n->version) {
  283|  1.20k|	case olympusV1:
  ------------------
  |  Branch (283:2): [True: 1.20k, False: 2.88k]
  ------------------
  284|  2.67k|	case sanyoV1:
  ------------------
  |  Branch (284:2): [True: 1.46k, False: 2.63k]
  ------------------
  285|  3.30k|	case epsonV1:
  ------------------
  |  Branch (285:2): [True: 639, False: 3.45k]
  ------------------
  286|  3.30k|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  287|  3.30k|			"Parsing Olympus/Sanyo/Epson maker note v1...");
  288|       |
  289|       |		/* The number of entries is at position 8. */
  290|  3.30k|		if (buf[o2 + 6] == 1)
  ------------------
  |  Branch (290:7): [True: 108, False: 3.20k]
  ------------------
  291|    108|			n->order = EXIF_BYTE_ORDER_INTEL;
  292|  3.20k|		else if (buf[o2 + 6 + 1] == 1)
  ------------------
  |  Branch (292:12): [True: 21, False: 3.18k]
  ------------------
  293|     21|			n->order = EXIF_BYTE_ORDER_MOTOROLA;
  294|  3.30k|		o2 += 8;
  295|  3.30k|		c = exif_get_short (buf + o2, n->order);
  296|  3.30k|		if ((!(c & 0xFF)) && (c > 0x500)) {
  ------------------
  |  Branch (296:7): [True: 806, False: 2.50k]
  |  Branch (296:24): [True: 616, False: 190]
  ------------------
  297|    616|			if (n->order == EXIF_BYTE_ORDER_INTEL) {
  ------------------
  |  Branch (297:8): [True: 581, False: 35]
  ------------------
  298|    581|				n->order = EXIF_BYTE_ORDER_MOTOROLA;
  299|    581|			} else {
  300|     35|				n->order = EXIF_BYTE_ORDER_INTEL;
  301|     35|			}
  302|    616|		}
  303|  3.30k|		break;
  304|       |
  305|    518|	case olympusV2:
  ------------------
  |  Branch (305:2): [True: 518, False: 3.57k]
  ------------------
  306|       |		/* Olympus S760, S770 */
  307|    518|		datao = o2;
  308|    518|		o2 += 8;
  309|    518|		if (exif_check_overflow (o2,buf_size,4)) return;
  ------------------
  |  Branch (309:7): [True: 2, False: 516]
  ------------------
  310|    516|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  311|    516|			"Parsing Olympus maker note v2 (0x%02x, %02x, %02x, %02x)...",
  312|    516|			buf[o2 + 0], buf[o2 + 1], buf[o2 + 2], buf[o2 + 3]);
  313|       |
  314|    516|		if ((buf[o2] == 'I') && (buf[o2 + 1] == 'I'))
  ------------------
  |  Branch (314:7): [True: 7, False: 509]
  |  Branch (314:27): [True: 1, False: 6]
  ------------------
  315|      1|			n->order = EXIF_BYTE_ORDER_INTEL;
  316|    515|		else if ((buf[o2] == 'M') && (buf[o2 + 1] == 'M'))
  ------------------
  |  Branch (316:12): [True: 13, False: 502]
  |  Branch (316:32): [True: 1, False: 12]
  ------------------
  317|      1|			n->order = EXIF_BYTE_ORDER_MOTOROLA;
  318|       |
  319|       |		/* The number of entries is at position 8+4. */
  320|    516|		o2 += 4;
  321|    516|		break;
  322|       |
  323|     66|	case nikonV1:
  ------------------
  |  Branch (323:2): [True: 66, False: 4.02k]
  ------------------
  324|     66|		o2 += 6;
  325|     66|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  326|     66|			"Parsing Nikon maker note v1 (0x%02x, %02x, %02x, "
  327|     66|			"%02x)...",
  328|     66|			buf[o2 + 0], buf[o2 + 1], buf[o2 + 2], buf[o2 + 3]);
  329|       |
  330|       |		/* Skip version number */
  331|     66|		o2 += 1;
  332|       |
  333|       |		/* Skip an unknown byte (00 or 0A). */
  334|     66|		o2 += 1;
  335|       |
  336|     66|		base = MNOTE_NIKON1_TAG_BASE;
  337|       |		/* Fix endianness, if needed */
  338|     66|		c = exif_get_short (buf + o2, n->order);
  339|     66|		if ((!(c & 0xFF)) && (c > 0x500)) {
  ------------------
  |  Branch (339:7): [True: 17, False: 49]
  |  Branch (339:24): [True: 12, False: 5]
  ------------------
  340|     12|			if (n->order == EXIF_BYTE_ORDER_INTEL) {
  ------------------
  |  Branch (340:8): [True: 4, False: 8]
  ------------------
  341|      4|				n->order = EXIF_BYTE_ORDER_MOTOROLA;
  342|      8|			} else {
  343|      8|				n->order = EXIF_BYTE_ORDER_INTEL;
  344|      8|			}
  345|     12|		}
  346|     66|		break;
  347|       |
  348|    142|	case nikonV2:
  ------------------
  |  Branch (348:2): [True: 142, False: 3.95k]
  ------------------
  349|    142|		o2 += 6;
  350|    142|		if (exif_check_overflow (o2,buf_size,12)) return;
  ------------------
  |  Branch (350:7): [True: 5, False: 137]
  ------------------
  351|    137|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  352|    137|			"Parsing Nikon maker note v2 (0x%02x, %02x, %02x, "
  353|    137|			"%02x, %02x, %02x, %02x, %02x)...",
  354|    137|			buf[o2 + 0], buf[o2 + 1], buf[o2 + 2], buf[o2 + 3],
  355|    137|			buf[o2 + 4], buf[o2 + 5], buf[o2 + 6], buf[o2 + 7]);
  356|       |
  357|       |		/* Skip version number */
  358|    137|		o2 += 1;
  359|       |
  360|       |		/* Skip an unknown byte (00 or 0A). */
  361|    137|		o2 += 1;
  362|       |
  363|       |		/* Skip 2 unknown bytes (00 00). */
  364|    137|		o2 += 2;
  365|       |
  366|       |		/*
  367|       |		 * Byte order. From here the data offset
  368|       |		 * gets calculated.
  369|       |		 */
  370|    137|		datao = o2;
  371|    137|		if (!strncmp ((char *)&buf[o2], "II", 2))
  ------------------
  |  Branch (371:7): [True: 80, False: 57]
  ------------------
  372|     80|			n->order = EXIF_BYTE_ORDER_INTEL;
  373|     57|		else if (!strncmp ((char *)&buf[o2], "MM", 2))
  ------------------
  |  Branch (373:12): [True: 27, False: 30]
  ------------------
  374|     27|			n->order = EXIF_BYTE_ORDER_MOTOROLA;
  375|     30|		else {
  376|     30|			exif_log (en->log, EXIF_LOG_CODE_DEBUG,
  377|     30|				"ExifMnoteDataOlympus", "Unknown "
  378|     30|				"byte order '%c%c'", buf[o2],
  379|     30|				buf[o2 + 1]);
  380|     30|			return;
  381|     30|		}
  382|    107|		o2 += 2;
  383|       |
  384|       |		/* Skip 2 unknown bytes (00 2A). */
  385|    107|		o2 += 2;
  386|       |
  387|       |		/* Go to where the number of entries is. */
  388|    107|		if (exif_check_overflow (o2,buf_size,exif_get_long (buf + o2, n->order))) return;
  ------------------
  |  Branch (388:7): [True: 84, False: 23]
  ------------------
  389|     23|		o2 = datao + exif_get_long (buf + o2, n->order);
  390|     23|		break;
  391|       |
  392|     16|	case nikonV0:
  ------------------
  |  Branch (392:2): [True: 16, False: 4.07k]
  ------------------
  393|     16|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  394|     16|			"Parsing Nikon maker note v0 (0x%02x, %02x, %02x, "
  395|     16|			"%02x, %02x, %02x, %02x, %02x)...",
  396|     16|			buf[o2 + 0], buf[o2 + 1], buf[o2 + 2], buf[o2 + 3], 
  397|     16|			buf[o2 + 4], buf[o2 + 5], buf[o2 + 6], buf[o2 + 7]);
  398|       |		/* 00 1b is # of entries in Motorola order - the rest should also be in MM order */
  399|     16|		n->order = EXIF_BYTE_ORDER_MOTOROLA;
  400|     16|		break;
  401|       |
  402|     42|	default:
  ------------------
  |  Branch (402:2): [True: 42, False: 4.05k]
  ------------------
  403|     42|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
  404|     42|			"Unknown Olympus variant %i.", n->version);
  405|     42|		return;
  406|  4.09k|	}
  407|       |
  408|       |	/* Sanity check the offset */
  409|  3.93k|	if (exif_check_overflow (o2,buf_size,2)) {
  ------------------
  |  Branch (409:6): [True: 28, False: 3.90k]
  ------------------
  410|     28|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  411|     28|			  "ExifMnoteOlympus", "Short MakerNote");
  412|     28|		return;
  413|     28|	}
  414|       |
  415|       |	/* Read the number of tags */
  416|  3.90k|	c = exif_get_short (buf + o2, n->order);
  417|  3.90k|	o2 += 2;
  418|       |
  419|       |	/* Just use an arbitrary max tag limit here to avoid needing to much memory or time. There are 150 named tags currently.
  420|       |	 * The format allows specifying the same range of memory as often as it can, so this multiplies quickly. */
  421|  3.90k|	if (c > 300) {
  ------------------
  |  Branch (421:6): [True: 46, False: 3.85k]
  ------------------
  422|     46|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteOlympus", "Too much tags (%d) in Olympus MakerNote", c);
  423|     46|		return;
  424|     46|	}
  425|       |
  426|       |	/* Remove any old entries */
  427|  3.85k|	exif_mnote_data_olympus_clear (n);
  428|       |
  429|       |	/* Reserve enough space for all the possible MakerNote tags */
  430|  3.85k|	n->entries = exif_mem_alloc (en->mem, sizeof (MnoteOlympusEntry) * c);
  431|  3.85k|	if (!n->entries) {
  ------------------
  |  Branch (431:6): [True: 0, False: 3.85k]
  ------------------
  432|      0|		EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteOlympus", sizeof (MnoteOlympusEntry) * c);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  433|      0|		return;
  434|      0|	}
  435|       |
  436|       |	/* Parse all c entries, storing ones that are successfully parsed */
  437|  3.85k|	tcount = 0;
  438|  97.6k|	for (i = c, o = o2; i; --i, o += 12) {
  ------------------
  |  Branch (438:22): [True: 96.9k, False: 679]
  ------------------
  439|  96.9k|		size_t s;
  440|  96.9k|		memset(&n->entries[tcount], 0, sizeof(MnoteOlympusEntry));
  441|  96.9k|		if (exif_check_overflow (o, buf_size, 12)) {
  ------------------
  |  Branch (441:7): [True: 3.17k, False: 93.7k]
  ------------------
  442|  3.17k|			exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  443|  3.17k|				  "ExifMnoteOlympus", "Short MakerNote");
  444|  3.17k|			break;
  445|  3.17k|		}
  446|       |
  447|  93.7k|	    n->entries[tcount].tag        = exif_get_short (buf + o, n->order) + base;
  448|  93.7k|	    n->entries[tcount].format     = exif_get_short (buf + o + 2, n->order);
  449|  93.7k|	    n->entries[tcount].components = exif_get_long (buf + o + 4, n->order);
  450|  93.7k|	    n->entries[tcount].order      = n->order;
  451|       |
  452|  93.7k|	    exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteOlympus",
  453|  93.7k|		      "Loading entry 0x%x ('%s')...", n->entries[tcount].tag,
  454|  93.7k|		      mnote_olympus_tag_get_name (n->entries[tcount].tag));
  455|       |/*	    exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteOlympus",
  456|       |			    "0x%x %d %ld*(%d)",
  457|       |		    n->entries[tcount].tag,
  458|       |		    n->entries[tcount].format,
  459|       |		    n->entries[tcount].components,
  460|       |		    (int)exif_format_get_size(n->entries[tcount].format)); */
  461|       |
  462|       |	    /* Check if we overflow the multiplication. Use buf_size as the max size for integer overflow detection,
  463|       |	     * we will check the buffer sizes closer later. */
  464|  93.7k|	    if (exif_check_mul_overflow (exif_format_get_size (n->entries[tcount].format),
  ------------------
  |  Branch (464:10): [True: 3.95k, False: 89.8k]
  ------------------
  465|  93.7k|			n->entries[tcount].components, buf_size, &s)) {
  466|  3.95k|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteOlympus", "Tag size overflow detected (%u * %lu)", exif_format_get_size (n->entries[tcount].format), n->entries[tcount].components);
  467|  3.95k|		continue;
  468|  3.95k|	    }
  469|       |	    /*
  470|       |	     * Size? If bigger than 4 bytes, the actual data is not
  471|       |	     * in the entry but somewhere else (offset).
  472|       |	     */
  473|  89.8k|		n->entries[tcount].size = s;
  474|  89.8k|		if (s) {
  ------------------
  |  Branch (474:7): [True: 38.8k, False: 51.0k]
  ------------------
  475|  38.8k|			size_t dataofs = o + 8;
  476|  38.8k|			if (s > 4) {
  ------------------
  |  Branch (476:8): [True: 19.9k, False: 18.9k]
  ------------------
  477|       |				/* The data in this case is merely a pointer */
  478|  19.9k|				dataofs = exif_get_long (buf + dataofs, n->order) + datao;
  479|       |#ifdef EXIF_OVERCOME_SANYO_OFFSET_BUG
  480|       |				/* Some Sanyo models (e.g. VPC-C5, C40) suffer from a bug when
  481|       |				 * writing the offset for the MNOTE_OLYMPUS_TAG_THUMBNAILIMAGE
  482|       |				 * tag in its MakerNote. The offset is actually the absolute
  483|       |				 * position in the file instead of the position within the IFD.
  484|       |				 */
  485|       |			    if (dataofs > (buf_size - s) && n->version == sanyoV1) {
  486|       |					/* fix pointer */
  487|       |					dataofs -= datao + 6;
  488|       |					exif_log (en->log, EXIF_LOG_CODE_DEBUG,
  489|       |						  "ExifMnoteOlympus",
  490|       |						  "Inconsistent thumbnail tag offset; attempting to recover");
  491|       |			    }
  492|       |#endif
  493|  19.9k|			}
  494|  38.8k|			if (exif_check_overflow (dataofs, buf_size, s)) {
  ------------------
  |  Branch (494:8): [True: 1.80k, False: 37.0k]
  ------------------
  495|  1.80k|				exif_log (en->log, EXIF_LOG_CODE_DEBUG,
  496|  1.80k|					  "ExifMnoteOlympus",
  497|  1.80k|					  "Tag data past end of buffer (%u > %u)",
  498|  1.80k|					  (unsigned)(dataofs + s), buf_size);
  499|  1.80k|				continue;
  500|  1.80k|			}
  501|       |
  502|  37.0k|			n->entries[tcount].data = exif_mem_alloc (en->mem, s);
  503|  37.0k|			if (!n->entries[tcount].data) {
  ------------------
  |  Branch (503:8): [True: 0, False: 37.0k]
  ------------------
  504|      0|				EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteOlympus", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  505|      0|				continue;
  506|      0|			}
  507|  37.0k|			memcpy (n->entries[tcount].data, buf + dataofs, s);
  508|  37.0k|		}
  509|       |
  510|       |		/* Tag was successfully parsed */
  511|  88.0k|		++tcount;
  512|  88.0k|	}
  513|       |	/* Store the count of successfully parsed tags */
  514|  3.85k|	n->count = tcount;
  515|  3.85k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_count:
  519|  4.10k|{
  520|  4.10k|	return n ? ((ExifMnoteDataOlympus *) n)->count : 0;
  ------------------
  |  Branch (520:9): [True: 4.10k, False: 0]
  ------------------
  521|  4.10k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_get_name:
  535|  52.1k|{
  536|  52.1k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
  537|       |
  538|  52.1k|	if (!n) return NULL;
  ------------------
  |  Branch (538:6): [True: 0, False: 52.1k]
  ------------------
  539|  52.1k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (539:6): [True: 0, False: 52.1k]
  ------------------
  540|  52.1k|	return mnote_olympus_tag_get_name (n->entries[i].tag);
  541|  52.1k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_get_title:
  545|  51.1k|{
  546|  51.1k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
  547|       |	
  548|  51.1k|	if (!n) return NULL;
  ------------------
  |  Branch (548:6): [True: 0, False: 51.1k]
  ------------------
  549|  51.1k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (549:6): [True: 0, False: 51.1k]
  ------------------
  550|  51.1k|        return mnote_olympus_tag_get_title (n->entries[i].tag);
  551|  51.1k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_get_description:
  555|  51.1k|{
  556|  51.1k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
  557|       |	
  558|  51.1k|	if (!n) return NULL;
  ------------------
  |  Branch (558:6): [True: 0, False: 51.1k]
  ------------------
  559|  51.1k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (559:6): [True: 0, False: 51.1k]
  ------------------
  560|  51.1k|        return mnote_olympus_tag_get_description (n->entries[i].tag);
  561|  51.1k|}
exif-mnote-data-olympus.c:exif_mnote_data_olympus_get_value:
   76|  51.1k|{
   77|  51.1k|	ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
   78|       |
   79|  51.1k|	if (!d || !val) return NULL;
  ------------------
  |  Branch (79:6): [True: 0, False: 51.1k]
  |  Branch (79:12): [True: 0, False: 51.1k]
  ------------------
   80|  51.1k|	if (i >= n->count) return NULL;
  ------------------
  |  Branch (80:6): [True: 0, False: 51.1k]
  ------------------
   81|       |/*
   82|       |	exif_log (d->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
   83|       |		  "Querying value for tag '%s'...",
   84|       |		  mnote_olympus_tag_get_name (n->entries[i].tag));
   85|       |*/
   86|  51.1k|	return mnote_olympus_entry_get_value (&n->entries[i], val, maxlen);
   87|  51.1k|}

mnote_olympus_entry_get_value:
  276|  51.1k|{
  277|  51.1k|	char         buf[30];
  278|  51.1k|	ExifLong     vl;
  279|  51.1k|	ExifSLong    vsl;
  280|  51.1k|	ExifShort    vs = 0;
  281|  51.1k|	ExifSShort   vss = 0;
  282|  51.1k|	ExifRational vr, vr2;
  283|  51.1k|	ExifSRational vsr;
  284|  51.1k|	int          i, j;
  285|  51.1k|	double       r, b;
  286|       |
  287|  51.1k|	if (!entry)
  ------------------
  |  Branch (287:6): [True: 0, False: 51.1k]
  ------------------
  288|      0|		return (NULL);
  289|  51.1k|	if (maxlen < 1)
  ------------------
  |  Branch (289:6): [True: 0, False: 51.1k]
  ------------------
  290|      0|		return NULL;
  291|       |
  292|  51.1k|	memset (v, 0, maxlen);
  293|  51.1k|	maxlen--;
  294|       |
  295|  51.1k|	if ((!entry->data) && (entry->components > 0)) 
  ------------------
  |  Branch (295:6): [True: 15.3k, False: 35.8k]
  |  Branch (295:24): [True: 2.63k, False: 12.6k]
  ------------------
  296|  2.63k|		return (v);
  297|       |
  298|  48.4k|	if ((!entry->data) && (entry->size > 0))
  ------------------
  |  Branch (298:6): [True: 12.6k, False: 35.8k]
  |  Branch (298:24): [True: 0, False: 12.6k]
  ------------------
  299|      0|		return NULL;  /* internal inconsistency error */
  300|       |
  301|  48.4k|	switch (entry->tag) {
  302|       |	
  303|       |	/* Nikon */
  304|    834|	case MNOTE_NIKON_TAG_FIRMWARE:
  ------------------
  |  Branch (304:2): [True: 834, False: 47.6k]
  ------------------
  305|    834|		CF (entry->format,  EXIF_FORMAT_UNDEFINED, v, maxlen)
  ------------------
  |  |   35|    834|#define CF(format,target,v,maxlen)                              \
  |  |   36|    834|{                                                               \
  |  |   37|    834|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 238, False: 596]
  |  |  ------------------
  |  |   38|    238|                snprintf (v, maxlen,	                        \
  |  |   39|    238|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    238|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    238|                        "expected '%s'."),                      \
  |  |   41|    238|                        exif_format_get_name (format),          \
  |  |   42|    238|                        exif_format_get_name (target));         \
  |  |   43|    238|                break;                                          \
  |  |   44|    238|        }                                                       \
  |  |   45|    834|}
  ------------------
  306|    596|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|    596|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    596|{                                                                       \
  |  |   62|    596|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 201, False: 395]
  |  |  ------------------
  |  |   63|    201|                snprintf (v, maxlen,                                    \
  |  |   64|    201|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    201|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    201|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    201|                break;                                                  \
  |  |   67|    201|        }                                                               \
  |  |   68|    596|}
  ------------------
  307|    395|		vl = exif_get_long (entry->data, EXIF_BYTE_ORDER_INTEL);
  308|    395|		if ((vl & 0xF0F0F0F0) == 0x30303030) {
  ------------------
  |  Branch (308:7): [True: 194, False: 201]
  ------------------
  309|    194|			memcpy (v, entry->data, MIN (maxlen, 4));
  ------------------
  |  |  182|    194|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 194]
  |  |  ------------------
  ------------------
  310|    201|		} else {
  311|    201|			snprintf (v, maxlen, "%04lx", (long unsigned int) vl);
  312|    201|		}
  313|    395|		break;
  314|    648|	case MNOTE_NIKON_TAG_ISO:
  ------------------
  |  Branch (314:2): [True: 648, False: 47.8k]
  ------------------
  315|    648|                CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|    648|#define CF(format,target,v,maxlen)                              \
  |  |   36|    648|{                                                               \
  |  |   37|    648|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 232, False: 416]
  |  |  ------------------
  |  |   38|    232|                snprintf (v, maxlen,	                        \
  |  |   39|    232|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    232|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    232|                        "expected '%s'."),                      \
  |  |   41|    232|                        exif_format_get_name (format),          \
  |  |   42|    232|                        exif_format_get_name (target));         \
  |  |   43|    232|                break;                                          \
  |  |   44|    232|        }                                                       \
  |  |   45|    648|}
  ------------------
  316|    416|                CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|    416|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    416|{                                                                       \
  |  |   62|    416|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 219, False: 197]
  |  |  ------------------
  |  |   63|    219|                snprintf (v, maxlen,                                    \
  |  |   64|    219|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    219|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    219|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    219|                break;                                                  \
  |  |   67|    219|        }                                                               \
  |  |   68|    416|}
  ------------------
  317|       |                /*vs = exif_get_short (entry->data, entry->order);*/
  318|    197|                vs = exif_get_short (entry->data + 2, entry->order);
  319|    197|                snprintf (v, maxlen, "ISO %hd", vs);
  320|    197|                break;
  321|    603|	case MNOTE_NIKON_TAG_ISO2:
  ------------------
  |  Branch (321:2): [True: 603, False: 47.8k]
  ------------------
  322|    603|                CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|    603|#define CF(format,target,v,maxlen)                              \
  |  |   36|    603|{                                                               \
  |  |   37|    603|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 204, False: 399]
  |  |  ------------------
  |  |   38|    204|                snprintf (v, maxlen,	                        \
  |  |   39|    204|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    204|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    204|                        "expected '%s'."),                      \
  |  |   41|    204|                        exif_format_get_name (format),          \
  |  |   42|    204|                        exif_format_get_name (target));         \
  |  |   43|    204|                break;                                          \
  |  |   44|    204|        }                                                       \
  |  |   45|    603|}
  ------------------
  323|    399|                CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|    399|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    399|{                                                                       \
  |  |   62|    399|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 204, False: 195]
  |  |  ------------------
  |  |   63|    204|                snprintf (v, maxlen,                                    \
  |  |   64|    204|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    204|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    204|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    204|                break;                                                  \
  |  |   67|    204|        }                                                               \
  |  |   68|    399|}
  ------------------
  324|       |                /*vs = exif_get_short (entry->data, entry->order);*/
  325|    195|                vs = exif_get_short (entry->data + 2, entry->order);
  326|    195|                snprintf (v, maxlen, "ISO2 %hd", vs);
  327|    195|                break;
  328|    206|	case MNOTE_NIKON_TAG_QUALITY:
  ------------------
  |  Branch (328:2): [True: 206, False: 48.2k]
  ------------------
  329|    427|	case MNOTE_NIKON_TAG_COLORMODE:
  ------------------
  |  Branch (329:2): [True: 221, False: 48.2k]
  ------------------
  330|    666|	case MNOTE_NIKON_TAG_COLORMODE1:
  ------------------
  |  Branch (330:2): [True: 239, False: 48.2k]
  ------------------
  331|    890|	case MNOTE_NIKON_TAG_WHITEBALANCE:
  ------------------
  |  Branch (331:2): [True: 224, False: 48.2k]
  ------------------
  332|  1.13k|	case MNOTE_NIKON_TAG_SHARPENING:
  ------------------
  |  Branch (332:2): [True: 248, False: 48.2k]
  ------------------
  333|  1.53k|	case MNOTE_NIKON_TAG_FOCUSMODE:
  ------------------
  |  Branch (333:2): [True: 395, False: 48.0k]
  ------------------
  334|  1.74k|	case MNOTE_NIKON_TAG_FLASHSETTING:
  ------------------
  |  Branch (334:2): [True: 209, False: 48.2k]
  ------------------
  335|  1.94k|	case MNOTE_NIKON_TAG_ISOSELECTION:
  ------------------
  |  Branch (335:2): [True: 203, False: 48.2k]
  ------------------
  336|  2.15k|	case MNOTE_NIKON_TAG_FLASHMODE:
  ------------------
  |  Branch (336:2): [True: 208, False: 48.2k]
  ------------------
  337|  2.35k|	case MNOTE_NIKON_TAG_IMAGEADJUSTMENT:
  ------------------
  |  Branch (337:2): [True: 201, False: 48.2k]
  ------------------
  338|  2.55k|	case MNOTE_NIKON_TAG_ADAPTER:
  ------------------
  |  Branch (338:2): [True: 196, False: 48.2k]
  ------------------
  339|  2.74k|	case MNOTE_NIKON_TAG_SATURATION2:
  ------------------
  |  Branch (339:2): [True: 199, False: 48.2k]
  ------------------
  340|  2.81k|	case MNOTE_EPSON_TAG_SOFTWARE:
  ------------------
  |  Branch (340:2): [True: 70, False: 48.4k]
  ------------------
  341|  2.81k|		CF (entry->format, EXIF_FORMAT_ASCII, v, maxlen)
  ------------------
  |  |   35|  2.81k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  2.81k|{                                                               \
  |  |   37|  2.81k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2.02k, False: 792]
  |  |  ------------------
  |  |   38|  2.02k|                snprintf (v, maxlen,	                        \
  |  |   39|  2.02k|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|  2.02k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|  2.02k|                        "expected '%s'."),                      \
  |  |   41|  2.02k|                        exif_format_get_name (format),          \
  |  |   42|  2.02k|                        exif_format_get_name (target));         \
  |  |   43|  2.02k|                break;                                          \
  |  |   44|  2.02k|        }                                                       \
  |  |   45|  2.81k|}
  ------------------
  342|    792|		memcpy(v, entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    792|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 332, False: 460]
  |  |  ------------------
  ------------------
  343|    792|		break;
  344|     66|	case MNOTE_NIKON_TAG_TOTALPICTURES:
  ------------------
  |  Branch (344:2): [True: 66, False: 48.4k]
  ------------------
  345|    302|	case MNOTE_EPSON_TAG_IMAGE_WIDTH:
  ------------------
  |  Branch (345:2): [True: 236, False: 48.2k]
  ------------------
  346|    612|	case MNOTE_EPSON_TAG_IMAGE_HEIGHT:
  ------------------
  |  Branch (346:2): [True: 310, False: 48.1k]
  ------------------
  347|    612|		CF (entry->format, EXIF_FORMAT_LONG, v, maxlen)
  ------------------
  |  |   35|    612|#define CF(format,target,v,maxlen)                              \
  |  |   36|    612|{                                                               \
  |  |   37|    612|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 346, False: 266]
  |  |  ------------------
  |  |   38|    346|                snprintf (v, maxlen,	                        \
  |  |   39|    346|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    346|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    346|                        "expected '%s'."),                      \
  |  |   41|    346|                        exif_format_get_name (format),          \
  |  |   42|    346|                        exif_format_get_name (target));         \
  |  |   43|    346|                break;                                          \
  |  |   44|    346|        }                                                       \
  |  |   45|    612|}
  ------------------
  348|    266|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    266|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    266|{                                                                       \
  |  |   62|    266|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 70, False: 196]
  |  |  ------------------
  |  |   63|     70|                snprintf (v, maxlen,                                    \
  |  |   64|     70|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|     70|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|     70|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|     70|                break;                                                  \
  |  |   67|     70|        }                                                               \
  |  |   68|    266|}
  ------------------
  349|    196|		vl =  exif_get_long (entry->data, entry->order);
  350|    196|		snprintf (v, maxlen, "%lu",  (long unsigned int) vl );
  351|    196|		break;
  352|    669|	case MNOTE_NIKON_TAG_LENS_FSTOPS:
  ------------------
  |  Branch (352:2): [True: 669, False: 47.8k]
  ------------------
  353|  1.07k|	case MNOTE_NIKON_TAG_EXPOSUREDIFF: {
  ------------------
  |  Branch (353:2): [True: 406, False: 48.0k]
  ------------------
  354|  1.07k|		unsigned char h,m,l;
  355|  1.07k|		CF (entry->format, EXIF_FORMAT_UNDEFINED, v, maxlen)
  ------------------
  |  |   35|  1.07k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.07k|{                                                               \
  |  |   37|  1.07k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 258, False: 817]
  |  |  ------------------
  |  |   38|    258|                snprintf (v, maxlen,	                        \
  |  |   39|    258|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    258|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    258|                        "expected '%s'."),                      \
  |  |   41|    258|                        exif_format_get_name (format),          \
  |  |   42|    258|                        exif_format_get_name (target));         \
  |  |   43|    258|                break;                                          \
  |  |   44|    258|        }                                                       \
  |  |   45|  1.07k|}
  ------------------
  356|    817|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|    817|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    817|{                                                                       \
  |  |   62|    817|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 212, False: 605]
  |  |  ------------------
  |  |   63|    212|                snprintf (v, maxlen,                                    \
  |  |   64|    212|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    212|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    212|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    212|                break;                                                  \
  |  |   67|    212|        }                                                               \
  |  |   68|    817|}
  ------------------
  357|    605|		vl =  exif_get_long (entry->data, entry->order);
  358|    605|		h = (vl>>24)&0xff; m = (vl>>16)&0xff; l = (vl>>8)&0xff;
  359|    605|		snprintf (v, maxlen, "%.1f",  l?(double)h*((double)m/(double)l):0 );
  ------------------
  |  Branch (359:33): [True: 422, False: 183]
  ------------------
  360|    605|		break;
  361|    817|	}
  362|    224|	case MNOTE_NIKON_TAG_FLASHEXPCOMPENSATION:
  ------------------
  |  Branch (362:2): [True: 224, False: 48.2k]
  ------------------
  363|    627|	case MNOTE_NIKON_TAG_FLASHEXPOSUREBRACKETVAL:
  ------------------
  |  Branch (363:2): [True: 403, False: 48.0k]
  ------------------
  364|    627|		CF (entry->format, EXIF_FORMAT_UNDEFINED, v, maxlen)
  ------------------
  |  |   35|    627|#define CF(format,target,v,maxlen)                              \
  |  |   36|    627|{                                                               \
  |  |   37|    627|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 208, False: 419]
  |  |  ------------------
  |  |   38|    208|                snprintf (v, maxlen,	                        \
  |  |   39|    208|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    208|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    208|                        "expected '%s'."),                      \
  |  |   41|    208|                        exif_format_get_name (format),          \
  |  |   42|    208|                        exif_format_get_name (target));         \
  |  |   43|    208|                break;                                          \
  |  |   44|    208|        }                                                       \
  |  |   45|    627|}
  ------------------
  365|    419|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|    419|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    419|{                                                                       \
  |  |   62|    419|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 221, False: 198]
  |  |  ------------------
  |  |   63|    221|                snprintf (v, maxlen,                                    \
  |  |   64|    221|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    221|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    221|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    221|                break;                                                  \
  |  |   67|    221|        }                                                               \
  |  |   68|    419|}
  ------------------
  366|    198|		vl =  exif_get_long (entry->data, entry->order);
  367|    198|		snprintf (v, maxlen, "%.1f",  ((long unsigned int) vl>>24)/6.0 );
  368|    198|		break;
  369|    788|	case MNOTE_NIKON_TAG_SATURATION:
  ------------------
  |  Branch (369:2): [True: 788, False: 47.7k]
  ------------------
  370|  1.00k|	case MNOTE_NIKON_TAG_WHITEBALANCEFINE:
  ------------------
  |  Branch (370:2): [True: 221, False: 48.2k]
  ------------------
  371|  1.11k|	case MNOTE_NIKON_TAG_HUE:
  ------------------
  |  Branch (371:2): [True: 107, False: 48.3k]
  ------------------
  372|  1.31k|	case MNOTE_OLYMPUS_TAG_SENSORTEMPERATURE:
  ------------------
  |  Branch (372:2): [True: 200, False: 48.2k]
  ------------------
  373|  1.52k|	case MNOTE_OLYMPUS_TAG_LENSTEMPERATURE:
  ------------------
  |  Branch (373:2): [True: 213, False: 48.2k]
  ------------------
  374|  1.52k|		CF (entry->format, EXIF_FORMAT_SSHORT, v, maxlen)
  ------------------
  |  |   35|  1.52k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.52k|{                                                               \
  |  |   37|  1.52k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 682, False: 847]
  |  |  ------------------
  |  |   38|    682|                snprintf (v, maxlen,	                        \
  |  |   39|    682|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    682|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    682|                        "expected '%s'."),                      \
  |  |   41|    682|                        exif_format_get_name (format),          \
  |  |   42|    682|                        exif_format_get_name (target));         \
  |  |   43|    682|                break;                                          \
  |  |   44|    682|        }                                                       \
  |  |   45|  1.52k|}
  ------------------
  375|    847|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    847|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    847|{                                                                       \
  |  |   62|    847|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 402, False: 445]
  |  |  ------------------
  |  |   63|    402|                snprintf (v, maxlen,                                    \
  |  |   64|    402|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    402|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    402|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    402|                break;                                                  \
  |  |   67|    402|        }                                                               \
  |  |   68|    847|}
  ------------------
  376|    445|		vs = exif_get_short (entry->data, entry->order);
  377|    445|		snprintf (v, maxlen, "%hd", vs);
  378|    445|		break;
  379|  1.28k|	case MNOTE_NIKON_TAG_WHITEBALANCERB:
  ------------------
  |  Branch (379:2): [True: 1.28k, False: 47.2k]
  ------------------
  380|  1.28k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.28k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.28k|{                                                               \
  |  |   37|  1.28k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 220, False: 1.06k]
  |  |  ------------------
  |  |   38|    220|                snprintf (v, maxlen,	                        \
  |  |   39|    220|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    220|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    220|                        "expected '%s'."),                      \
  |  |   41|    220|                        exif_format_get_name (format),          \
  |  |   42|    220|                        exif_format_get_name (target));         \
  |  |   43|    220|                break;                                          \
  |  |   44|    220|        }                                                       \
  |  |   45|  1.28k|}
  ------------------
  381|  1.06k|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|  1.06k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.06k|{                                                                       \
  |  |   62|  1.06k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 225, False: 837]
  |  |  ------------------
  |  |   63|    225|                snprintf (v, maxlen,                                    \
  |  |   64|    225|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    225|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    225|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    225|                break;                                                  \
  |  |   67|    225|        }                                                               \
  |  |   68|  1.06k|}
  ------------------
  382|    837|		vr = exif_get_rational (entry->data, entry->order);
  383|    837|		r = R2D(vr);
  ------------------
  |  |   82|    837|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 614, False: 223]
  |  |  ------------------
  ------------------
  384|    837|		vr = exif_get_rational (entry->data+8, entry->order);
  385|    837|		b = R2D(vr);
  ------------------
  |  |   82|    837|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 537, False: 300]
  |  |  ------------------
  ------------------
  386|    837|		snprintf (v, maxlen, _("Red Correction %f, blue Correction %f"), r,b);
  ------------------
  |  |   31|    837|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  387|    837|		break;
  388|  1.04k|	case MNOTE_NIKON_TAG_MANUALFOCUSDISTANCE:
  ------------------
  |  Branch (388:2): [True: 1.04k, False: 47.4k]
  ------------------
  389|  1.04k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.04k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.04k|{                                                               \
  |  |   37|  1.04k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 279, False: 762]
  |  |  ------------------
  |  |   38|    279|                snprintf (v, maxlen,	                        \
  |  |   39|    279|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    279|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    279|                        "expected '%s'."),                      \
  |  |   41|    279|                        exif_format_get_name (format),          \
  |  |   42|    279|                        exif_format_get_name (target));         \
  |  |   43|    279|                break;                                          \
  |  |   44|    279|        }                                                       \
  |  |   45|  1.04k|}
  ------------------
  390|    762|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    762|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    762|{                                                                       \
  |  |   62|    762|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 221, False: 541]
  |  |  ------------------
  |  |   63|    221|                snprintf (v, maxlen,                                    \
  |  |   64|    221|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    221|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    221|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    221|                break;                                                  \
  |  |   67|    221|        }                                                               \
  |  |   68|    762|}
  ------------------
  391|    541|		vr = exif_get_rational (entry->data, entry->order);
  392|    541|		if (!vr.numerator || !vr.denominator) {
  ------------------
  |  Branch (392:7): [True: 194, False: 347]
  |  Branch (392:24): [True: 66, False: 281]
  ------------------
  393|    260|			strncpy (v, _("No manual focus selection"), maxlen);
  ------------------
  |  |   31|    260|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  394|    281|		} else {
  395|    281|			r = R2D(vr);
  ------------------
  |  |   82|    281|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 281, False: 0]
  |  |  ------------------
  ------------------
  396|    281|			snprintf (v, maxlen, _("%2.2f meters"), r);
  ------------------
  |  |   31|    281|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  397|    281|		}
  398|    541|		break;
  399|  1.56k|	case MNOTE_NIKON_TAG_SENSORPIXELSIZE:
  ------------------
  |  Branch (399:2): [True: 1.56k, False: 46.9k]
  ------------------
  400|  1.56k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.56k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.56k|{                                                               \
  |  |   37|  1.56k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 225, False: 1.33k]
  |  |  ------------------
  |  |   38|    225|                snprintf (v, maxlen,	                        \
  |  |   39|    225|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    225|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    225|                        "expected '%s'."),                      \
  |  |   41|    225|                        exif_format_get_name (format),          \
  |  |   42|    225|                        exif_format_get_name (target));         \
  |  |   43|    225|                break;                                          \
  |  |   44|    225|        }                                                       \
  |  |   45|  1.56k|}
  ------------------
  401|  1.33k|		CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|  1.33k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.33k|{                                                                       \
  |  |   62|  1.33k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 268, False: 1.06k]
  |  |  ------------------
  |  |   63|    268|                snprintf (v, maxlen,                                    \
  |  |   64|    268|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    268|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    268|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    268|                break;                                                  \
  |  |   67|    268|        }                                                               \
  |  |   68|  1.33k|}
  ------------------
  402|  1.06k|		vr = exif_get_rational (entry->data, entry->order);
  403|  1.06k|		vr2 = exif_get_rational (entry->data+8, entry->order);
  404|  1.06k|		r = R2D(vr);
  ------------------
  |  |   82|  1.06k|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 825, False: 243]
  |  |  ------------------
  ------------------
  405|  1.06k|		b = R2D(vr2);
  ------------------
  |  |   82|  1.06k|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 813, False: 255]
  |  |  ------------------
  ------------------
  406|  1.06k|		snprintf (v, maxlen, "%2.2f x %2.2f um", r, b);
  407|  1.06k|		break;
  408|  1.08k|	case MNOTE_NIKON_TAG_BRACKETING:
  ------------------
  |  Branch (408:2): [True: 1.08k, False: 47.4k]
  ------------------
  409|  1.08k|		CF2 (entry->format, EXIF_FORMAT_BYTE, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   47|  1.08k|#define CF2(format,target1,target2,v,maxlen)                    \
  |  |   48|  1.08k|{                                                               \
  |  |   49|  1.08k|        if ((format != target1) && (format != target2)) {       \
  |  |  ------------------
  |  |  |  Branch (49:13): [True: 705, False: 377]
  |  |  |  Branch (49:36): [True: 346, False: 359]
  |  |  ------------------
  |  |   50|    346|                snprintf (v, maxlen,	                        \
  |  |   51|    346|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    346|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   52|    346|                        "expected '%s' or '%s'."),              \
  |  |   53|    346|                        exif_format_get_name (format),          \
  |  |   54|    346|                        exif_format_get_name (target1),         \
  |  |   55|    346|                        exif_format_get_name (target2));        \
  |  |   56|    346|                break;                                          \
  |  |   57|    346|        }                                                       \
  |  |   58|  1.08k|}
  ------------------
  410|    736|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    736|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    736|{                                                                       \
  |  |   62|    736|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 217, False: 519]
  |  |  ------------------
  |  |   63|    217|                snprintf (v, maxlen,                                    \
  |  |   64|    217|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    217|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    217|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    217|                break;                                                  \
  |  |   67|    217|        }                                                               \
  |  |   68|    736|}
  ------------------
  411|    519|		if (EXIF_FORMAT_SHORT == entry->format) {
  ------------------
  |  Branch (411:7): [True: 208, False: 311]
  ------------------
  412|    208|			vs = exif_get_short (entry->data, entry->order);
  413|    311|		} else {
  414|    311|			vs = entry->data[0];
  415|    311|		}
  416|    519|		snprintf (v, maxlen, "%hd", vs);
  417|    519|		break;
  418|  2.83k|	case MNOTE_NIKON_TAG_AFFOCUSPOSITION:
  ------------------
  |  Branch (418:2): [True: 2.83k, False: 45.6k]
  ------------------
  419|  2.83k|		CF (entry->format, EXIF_FORMAT_UNDEFINED, v, maxlen)
  ------------------
  |  |   35|  2.83k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  2.83k|{                                                               \
  |  |   37|  2.83k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 203, False: 2.63k]
  |  |  ------------------
  |  |   38|    203|                snprintf (v, maxlen,	                        \
  |  |   39|    203|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    203|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    203|                        "expected '%s'."),                      \
  |  |   41|    203|                        exif_format_get_name (format),          \
  |  |   42|    203|                        exif_format_get_name (target));         \
  |  |   43|    203|                break;                                          \
  |  |   44|    203|        }                                                       \
  |  |   45|  2.83k|}
  ------------------
  420|  2.63k|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|  2.63k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  2.63k|{                                                                       \
  |  |   62|  2.63k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 211, False: 2.42k]
  |  |  ------------------
  |  |   63|    211|                snprintf (v, maxlen,                                    \
  |  |   64|    211|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    211|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    211|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    211|                break;                                                  \
  |  |   67|    211|        }                                                               \
  |  |   68|  2.63k|}
  ------------------
  421|  2.42k|		switch (  *( entry->data+1)  ) {
  422|    221|		  	case  0: strncpy (v, _("AF position: center"), maxlen); break;
  ------------------
  |  |   31|    221|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (422:6): [True: 221, False: 2.20k]
  ------------------
  423|    194|		  	case  1: strncpy (v, _("AF position: top"), maxlen); break;
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (423:6): [True: 194, False: 2.22k]
  ------------------
  424|    206|		  	case  2: strncpy (v, _("AF position: bottom"), maxlen); break;
  ------------------
  |  |   31|    206|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (424:6): [True: 206, False: 2.21k]
  ------------------
  425|    197|		  	case  3: strncpy (v, _("AF position: left"), maxlen); break;
  ------------------
  |  |   31|    197|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (425:6): [True: 197, False: 2.22k]
  ------------------
  426|    197|		  	case  4: strncpy (v, _("AF position: right"), maxlen); break;
  ------------------
  |  |   31|    197|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (426:6): [True: 197, False: 2.22k]
  ------------------
  427|    194|			case  5: strncpy (v, _("AF position: upper-left"), maxlen); break;
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (427:4): [True: 194, False: 2.22k]
  ------------------
  428|    223|		  	case  6: strncpy (v, _("AF position: upper-right"), maxlen); break;
  ------------------
  |  |   31|    223|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (428:6): [True: 223, False: 2.19k]
  ------------------
  429|    195|		  	case  7: strncpy (v, _("AF position: lower-left"), maxlen); break;
  ------------------
  |  |   31|    195|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (429:6): [True: 195, False: 2.22k]
  ------------------
  430|    194|		  	case  8: strncpy (v, _("AF position: lower-right"), maxlen); break;
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (430:6): [True: 194, False: 2.22k]
  ------------------
  431|    195|		  	case  9: strncpy (v, _("AF position: far left"), maxlen); break;
  ------------------
  |  |   31|    195|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (431:6): [True: 195, False: 2.22k]
  ------------------
  432|    194|		  	case  10: strncpy (v, _("AF position: far right"), maxlen); break;
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (432:6): [True: 194, False: 2.22k]
  ------------------
  433|    211|		  	default: strncpy (v, _("Unknown AF position"), maxlen);
  ------------------
  |  |   31|    211|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  |  Branch (433:6): [True: 211, False: 2.21k]
  ------------------
  434|  2.42k|		}     
  435|  2.42k|		break;
  436|  2.42k|	case MNOTE_OLYMPUS_TAG_FLASHDEVICE:
  ------------------
  |  Branch (436:2): [True: 1.25k, False: 47.2k]
  ------------------
  437|  1.25k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  1.25k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.25k|{                                                               \
  |  |   37|  1.25k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 103, False: 1.15k]
  |  |  ------------------
  |  |   38|    103|                snprintf (v, maxlen,	                        \
  |  |   39|    103|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    103|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    103|                        "expected '%s'."),                      \
  |  |   41|    103|                        exif_format_get_name (format),          \
  |  |   42|    103|                        exif_format_get_name (target));         \
  |  |   43|    103|                break;                                          \
  |  |   44|    103|        }                                                       \
  |  |   45|  1.25k|}
  ------------------
  438|  1.15k|		CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|  1.15k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.15k|{                                                                       \
  |  |   62|  1.15k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 202, False: 954]
  |  |  ------------------
  |  |   63|    202|                snprintf (v, maxlen,                                    \
  |  |   64|    202|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    202|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    202|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    202|                break;                                                  \
  |  |   67|    202|        }                                                               \
  |  |   68|  1.15k|}
  ------------------
  439|    954|		vs = exif_get_short(entry->data, entry->order);
  440|       |		/* search for the tag */
  441|  13.3k|		for (i = 0; (items[i].tag && items[i].tag != entry->tag); i++)
  ------------------
  |  Branch (441:16): [True: 13.3k, False: 0]
  |  Branch (441:32): [True: 12.4k, False: 954]
  ------------------
  442|  12.4k|			;
  443|    954|		if (!items[i].tag) {
  ------------------
  |  Branch (443:7): [True: 0, False: 954]
  ------------------
  444|      0|		  	snprintf (v, maxlen, _("Internal error (unknown value %hi)"), vs);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  445|      0|		  	break;
  446|      0|		}
  447|    954|		CF (entry->format, items[i].fmt, v, maxlen)
  ------------------
  |  |   35|    954|#define CF(format,target,v,maxlen)                              \
  |  |   36|    954|{                                                               \
  |  |   37|    954|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 954]
  |  |  ------------------
  |  |   38|      0|                snprintf (v, maxlen,	                        \
  |  |   39|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|      0|                        "expected '%s'."),                      \
  |  |   41|      0|                        exif_format_get_name (format),          \
  |  |   42|      0|                        exif_format_get_name (target));         \
  |  |   43|      0|                break;                                          \
  |  |   44|      0|        }                                                       \
  |  |   45|    954|}
  ------------------
  448|       |		/* find the value */
  449|  2.57k|		for (j = 0; items[i].elem[j].string &&
  ------------------
  |  Branch (449:15): [True: 2.34k, False: 230]
  ------------------
  450|  2.34k|			    (items[i].elem[j].index < vs); j++);
  ------------------
  |  Branch (450:8): [True: 1.62k, False: 724]
  ------------------
  451|    954|		if (items[i].elem[j].index != vs) {
  ------------------
  |  Branch (451:7): [True: 232, False: 722]
  ------------------
  452|    232|			snprintf (v, maxlen, _("Unknown value %hi"), vs);
  ------------------
  |  |   31|    232|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  453|    232|			break;
  454|    232|		}
  455|    722|		strncpy (v, _(items[i].elem[j].string), maxlen);
  ------------------
  |  |   31|    722|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  456|    722|		break;
  457|  1.19k|	case MNOTE_OLYMPUS_TAG_DIGIZOOM:
  ------------------
  |  Branch (457:2): [True: 1.19k, False: 47.3k]
  ------------------
  458|  1.19k|		if (entry->format == EXIF_FORMAT_RATIONAL) {
  ------------------
  |  Branch (458:7): [True: 821, False: 370]
  ------------------
  459|    821|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    821|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    821|{                                                                       \
  |  |   62|    821|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 98, False: 723]
  |  |  ------------------
  |  |   63|     98|                snprintf (v, maxlen,                                    \
  |  |   64|     98|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|     98|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|     98|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|     98|                break;                                                  \
  |  |   67|     98|        }                                                               \
  |  |   68|    821|}
  ------------------
  460|    723|			vr = exif_get_rational (entry->data, entry->order);
  461|    723|			if (!vr.numerator || !vr.denominator) {
  ------------------
  |  Branch (461:8): [True: 204, False: 519]
  |  Branch (461:25): [True: 230, False: 289]
  ------------------
  462|    434|				strncpy (v, _("None"), maxlen);
  ------------------
  |  |   31|    434|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  463|    434|			} else {
  464|    289|				r = R2D(vr);
  ------------------
  |  |   82|    289|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 289, False: 0]
  |  |  ------------------
  ------------------
  465|    289|				snprintf (v, maxlen, "%2.2f", r);
  466|    289|			}
  467|    723|			break;
  468|    821|		}
  469|       |		/* to handle SHORT version of this tag, */
  470|       |		/* fall through */
  471|    567|	case MNOTE_NIKON_TAG_LENSTYPE:
  ------------------
  |  Branch (471:2): [True: 197, False: 48.2k]
  ------------------
  472|    781|	case MNOTE_NIKON_TAG_FLASHUSED:
  ------------------
  |  Branch (472:2): [True: 214, False: 48.2k]
  ------------------
  473|    978|	case MNOTE_NIKON1_TAG_QUALITY:
  ------------------
  |  Branch (473:2): [True: 197, False: 48.2k]
  ------------------
  474|  1.25k|	case MNOTE_NIKON1_TAG_COLORMODE:
  ------------------
  |  Branch (474:2): [True: 272, False: 48.2k]
  ------------------
  475|  1.32k|	case MNOTE_NIKON1_TAG_IMAGEADJUSTMENT:
  ------------------
  |  Branch (475:2): [True: 72, False: 48.4k]
  ------------------
  476|  1.51k|	case MNOTE_NIKON1_TAG_CCDSENSITIVITY:
  ------------------
  |  Branch (476:2): [True: 197, False: 48.2k]
  ------------------
  477|  1.74k|	case MNOTE_NIKON1_TAG_WHITEBALANCE:
  ------------------
  |  Branch (477:2): [True: 223, False: 48.2k]
  ------------------
  478|  1.94k|	case MNOTE_NIKON1_TAG_CONVERTER:
  ------------------
  |  Branch (478:2): [True: 199, False: 48.2k]
  ------------------
  479|  2.16k|	case MNOTE_OLYMPUS_TAG_QUALITY:
  ------------------
  |  Branch (479:2): [True: 225, False: 48.2k]
  ------------------
  480|  2.37k|	case MNOTE_OLYMPUS_TAG_MACRO:
  ------------------
  |  Branch (480:2): [True: 205, False: 48.2k]
  ------------------
  481|  2.71k|	case MNOTE_OLYMPUS_TAG_BWMODE:
  ------------------
  |  Branch (481:2): [True: 344, False: 48.1k]
  ------------------
  482|  2.91k|	case MNOTE_OLYMPUS_TAG_ONETOUCHWB:
  ------------------
  |  Branch (482:2): [True: 204, False: 48.2k]
  ------------------
  483|  3.12k|	case MNOTE_OLYMPUS_TAG_FLASHMODE:
  ------------------
  |  Branch (483:2): [True: 206, False: 48.2k]
  ------------------
  484|  3.32k|	case MNOTE_OLYMPUS_TAG_FOCUSRANGE:
  ------------------
  |  Branch (484:2): [True: 198, False: 48.2k]
  ------------------
  485|  3.74k|	case MNOTE_OLYMPUS_TAG_MANFOCUS:
  ------------------
  |  Branch (485:2): [True: 423, False: 48.0k]
  ------------------
  486|  3.95k|	case MNOTE_OLYMPUS_TAG_SHARPNESS:
  ------------------
  |  Branch (486:2): [True: 211, False: 48.2k]
  ------------------
  487|  4.15k|	case MNOTE_OLYMPUS_TAG_EXTERNALFLASHBOUNCE:
  ------------------
  |  Branch (487:2): [True: 194, False: 48.2k]
  ------------------
  488|  4.49k|	case MNOTE_OLYMPUS_TAG_CONTRAST:
  ------------------
  |  Branch (488:2): [True: 348, False: 48.1k]
  ------------------
  489|  4.69k|	case MNOTE_OLYMPUS_TAG_PREVIEWIMAGEVALID:
  ------------------
  |  Branch (489:2): [True: 195, False: 48.2k]
  ------------------
  490|  4.90k|	case MNOTE_OLYMPUS_TAG_CCDSCANMODE:
  ------------------
  |  Branch (490:2): [True: 213, False: 48.2k]
  ------------------
  491|  5.14k|	case MNOTE_SANYO_TAG_SEQUENTIALSHOT:
  ------------------
  |  Branch (491:2): [True: 242, False: 48.2k]
  ------------------
  492|  5.40k|	case MNOTE_SANYO_TAG_FOCUSMODE:
  ------------------
  |  Branch (492:2): [True: 255, False: 48.2k]
  ------------------
  493|  5.60k|	case MNOTE_SANYO_TAG_RECORDSHUTTERRELEASE:
  ------------------
  |  Branch (493:2): [True: 196, False: 48.2k]
  ------------------
  494|  5.80k|	case MNOTE_SANYO_TAG_RESAVED:
  ------------------
  |  Branch (494:2): [True: 201, False: 48.2k]
  ------------------
  495|  6.00k|	case MNOTE_SANYO_TAG_CCDSENSITIVITY:
  ------------------
  |  Branch (495:2): [True: 199, False: 48.2k]
  ------------------
  496|  6.06k|	case MNOTE_SANYO_TAG_SCENESELECT:
  ------------------
  |  Branch (496:2): [True: 66, False: 48.4k]
  ------------------
  497|  6.43k|	case MNOTE_SANYO_TAG_SEQUENCESHOTINTERVAL:
  ------------------
  |  Branch (497:2): [True: 371, False: 48.1k]
  ------------------
  498|  6.43k|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|  6.43k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  6.43k|{                                                                       \
  |  |   62|  6.43k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 2.40k, False: 4.02k]
  |  |  ------------------
  |  |   63|  2.40k|                snprintf (v, maxlen,                                    \
  |  |   64|  2.40k|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|  2.40k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|  2.40k|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|  2.40k|                break;                                                  \
  |  |   67|  2.40k|        }                                                               \
  |  |   68|  6.43k|}
  ------------------
  499|  4.02k|		switch (entry->format) {
  500|    730|		case EXIF_FORMAT_BYTE:
  ------------------
  |  Branch (500:3): [True: 730, False: 3.29k]
  ------------------
  501|  1.38k|		case EXIF_FORMAT_UNDEFINED:
  ------------------
  |  Branch (501:3): [True: 653, False: 3.37k]
  ------------------
  502|  1.38k|			vs = entry->data[0];
  503|  1.38k|			break;
  504|  1.90k|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (504:3): [True: 1.90k, False: 2.12k]
  ------------------
  505|  1.90k|			vs = exif_get_short(entry->data, entry->order);
  506|  1.90k|			break;
  507|    744|		default:
  ------------------
  |  Branch (507:3): [True: 744, False: 3.28k]
  ------------------
  508|    744|			vs = 0;
  509|    744|			break;
  510|  4.02k|		}
  511|       |		/* search for the tag */
  512|  68.9k|		for (i = 0; (items[i].tag && items[i].tag != entry->tag); i++)
  ------------------
  |  Branch (512:16): [True: 68.6k, False: 206]
  |  Branch (512:32): [True: 64.8k, False: 3.82k]
  ------------------
  513|  64.8k|			;
  514|  4.02k|		if (!items[i].tag) {
  ------------------
  |  Branch (514:7): [True: 206, False: 3.82k]
  ------------------
  515|    206|		  	snprintf (v, maxlen, _("Internal error (unknown value %hi)"), vs);
  ------------------
  |  |   31|    206|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  516|    206|		  	break;
  517|    206|		}
  518|  3.82k|		CF (entry->format, items[i].fmt, v, maxlen)
  ------------------
  |  |   35|  3.82k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  3.82k|{                                                               \
  |  |   37|  3.82k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1.66k, False: 2.15k]
  |  |  ------------------
  |  |   38|  1.66k|                snprintf (v, maxlen,	                        \
  |  |   39|  1.66k|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|  1.66k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|  1.66k|                        "expected '%s'."),                      \
  |  |   41|  1.66k|                        exif_format_get_name (format),          \
  |  |   42|  1.66k|                        exif_format_get_name (target));         \
  |  |   43|  1.66k|                break;                                          \
  |  |   44|  1.66k|        }                                                       \
  |  |   45|  3.82k|}
  ------------------
  519|       |		/* find the value */
  520|  10.2k|		for (j = 0; items[i].elem[j].string &&
  ------------------
  |  Branch (520:15): [True: 9.12k, False: 1.15k]
  ------------------
  521|  9.12k|			    (items[i].elem[j].index < vs); j++);
  ------------------
  |  Branch (521:8): [True: 8.12k, False: 1.00k]
  ------------------
  522|  2.15k|		if (items[i].elem[j].index != vs) {
  ------------------
  |  Branch (522:7): [True: 1.20k, False: 953]
  ------------------
  523|  1.20k|			snprintf (v, maxlen, _("Unknown value %hi"), vs);
  ------------------
  |  |   31|  1.20k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  524|  1.20k|			break;
  525|  1.20k|		}
  526|    953|		strncpy (v, _(items[i].elem[j].string), maxlen);
  ------------------
  |  |   31|    953|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  527|    953|		break;
  528|    201|	case MNOTE_OLYMPUS_TAG_NOISEREDUCTION:
  ------------------
  |  Branch (528:2): [True: 201, False: 48.2k]
  ------------------
  529|    406|	case MNOTE_SANYO_TAG_WIDERANGE:
  ------------------
  |  Branch (529:2): [True: 205, False: 48.2k]
  ------------------
  530|    623|	case MNOTE_SANYO_TAG_COLORADJUSTMENTMODE:
  ------------------
  |  Branch (530:2): [True: 217, False: 48.2k]
  ------------------
  531|    960|	case MNOTE_SANYO_TAG_QUICKSHOT:
  ------------------
  |  Branch (531:2): [True: 337, False: 48.1k]
  ------------------
  532|  1.16k|	case MNOTE_SANYO_TAG_VOICEMEMO:
  ------------------
  |  Branch (532:2): [True: 200, False: 48.2k]
  ------------------
  533|  1.49k|	case MNOTE_SANYO_TAG_FLICKERREDUCE:
  ------------------
  |  Branch (533:2): [True: 332, False: 48.1k]
  ------------------
  534|  1.75k|	case MNOTE_SANYO_TAG_OPTICALZOOM:
  ------------------
  |  Branch (534:2): [True: 264, False: 48.2k]
  ------------------
  535|  1.95k|	case MNOTE_SANYO_TAG_DIGITALZOOM:
  ------------------
  |  Branch (535:2): [True: 195, False: 48.2k]
  ------------------
  536|  2.30k|	case MNOTE_SANYO_TAG_LIGHTSOURCESPECIAL:
  ------------------
  |  Branch (536:2): [True: 352, False: 48.1k]
  ------------------
  537|  2.30k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  2.30k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  2.30k|{                                                               \
  |  |   37|  2.30k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 663, False: 1.64k]
  |  |  ------------------
  |  |   38|    663|                snprintf (v, maxlen,	                        \
  |  |   39|    663|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    663|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    663|                        "expected '%s'."),                      \
  |  |   41|    663|                        exif_format_get_name (format),          \
  |  |   42|    663|                        exif_format_get_name (target));         \
  |  |   43|    663|                break;                                          \
  |  |   44|    663|        }                                                       \
  |  |   45|  2.30k|}
  ------------------
  538|  1.64k|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|  1.64k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.64k|{                                                                       \
  |  |   62|  1.64k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 478, False: 1.16k]
  |  |  ------------------
  |  |   63|    478|                snprintf (v, maxlen,                                    \
  |  |   64|    478|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    478|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    478|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    478|                break;                                                  \
  |  |   67|    478|        }                                                               \
  |  |   68|  1.64k|}
  ------------------
  539|  1.16k|		vs = exif_get_short (entry->data, entry->order);
  540|  1.16k|		switch (vs) {
  541|    397|		case 0:
  ------------------
  |  Branch (541:3): [True: 397, False: 765]
  ------------------
  542|    397|			strncpy (v, _("Off"), maxlen);
  ------------------
  |  |   31|    397|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  543|    397|			break;
  544|    327|		case 1:
  ------------------
  |  Branch (544:3): [True: 327, False: 835]
  ------------------
  545|    327|			strncpy (v, _("On"), maxlen);
  ------------------
  |  |   31|    327|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  546|    327|			break;
  547|    438|		default:
  ------------------
  |  Branch (547:3): [True: 438, False: 724]
  ------------------
  548|    438|			sprintf (buf, _("Unknown %hu"), vs);
  ------------------
  |  |   31|    438|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  549|    438|			strncat (v, buf, maxlen - strlen (v));
  550|    438|			break;
  551|  1.16k|		}
  552|  1.16k|		break;
  553|  1.23k|	case MNOTE_SANYO_TAG_SELFTIMER:
  ------------------
  |  Branch (553:2): [True: 1.23k, False: 47.2k]
  ------------------
  554|  1.23k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  1.23k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.23k|{                                                               \
  |  |   37|  1.23k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 223, False: 1.01k]
  |  |  ------------------
  |  |   38|    223|                snprintf (v, maxlen,	                        \
  |  |   39|    223|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    223|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    223|                        "expected '%s'."),                      \
  |  |   41|    223|                        exif_format_get_name (format),          \
  |  |   42|    223|                        exif_format_get_name (target));         \
  |  |   43|    223|                break;                                          \
  |  |   44|    223|        }                                                       \
  |  |   45|  1.23k|}
  ------------------
  555|  1.01k|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|  1.01k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.01k|{                                                                       \
  |  |   62|  1.01k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 206, False: 804]
  |  |  ------------------
  |  |   63|    206|                snprintf (v, maxlen,                                    \
  |  |   64|    206|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    206|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    206|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    206|                break;                                                  \
  |  |   67|    206|        }                                                               \
  |  |   68|  1.01k|}
  ------------------
  556|    804|		vs = exif_get_short (entry->data, entry->order);
  557|    804|		switch (vs) {
  558|    212|		case 0:
  ------------------
  |  Branch (558:3): [True: 212, False: 592]
  ------------------
  559|    212|			strncpy (v, _("Off"), maxlen);
  ------------------
  |  |   31|    212|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  560|    212|			break;
  561|    197|		case 1:
  ------------------
  |  Branch (561:3): [True: 197, False: 607]
  ------------------
  562|    197|			strncpy (v, _("On"), maxlen);
  ------------------
  |  |   31|    197|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  563|    197|			break;
  564|    194|		case 2:
  ------------------
  |  Branch (564:3): [True: 194, False: 610]
  ------------------
  565|    194|			strncpy (v, _("2 sec."), maxlen);
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  566|    194|			break;
  567|    201|		default:
  ------------------
  |  Branch (567:3): [True: 201, False: 603]
  ------------------
  568|    201|			sprintf (buf, _("Unknown %hu"), vs);
  ------------------
  |  |   31|    201|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  569|    201|			strncat (v, buf, maxlen - strlen (v));
  570|    201|			break;
  571|    804|		}
  572|    804|		break;
  573|  1.84k|	case MNOTE_NIKON_TAG_LENS:
  ------------------
  |  Branch (573:2): [True: 1.84k, False: 46.6k]
  ------------------
  574|  1.84k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.84k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.84k|{                                                               \
  |  |   37|  1.84k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 221, False: 1.62k]
  |  |  ------------------
  |  |   38|    221|                snprintf (v, maxlen,	                        \
  |  |   39|    221|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    221|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    221|                        "expected '%s'."),                      \
  |  |   41|    221|                        exif_format_get_name (format),          \
  |  |   42|    221|                        exif_format_get_name (target));         \
  |  |   43|    221|                break;                                          \
  |  |   44|    221|        }                                                       \
  |  |   45|  1.84k|}
  ------------------
  575|  1.62k|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|  1.62k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.62k|{                                                                       \
  |  |   62|  1.62k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 217, False: 1.40k]
  |  |  ------------------
  |  |   63|    217|                snprintf (v, maxlen,                                    \
  |  |   64|    217|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    217|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    217|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    217|                break;                                                  \
  |  |   67|    217|        }                                                               \
  |  |   68|  1.62k|}
  ------------------
  576|  1.40k|		{
  577|  1.40k|			double ao,ac;
  578|  1.40k|			unsigned long fs,fl;
  579|  1.40k|			vr = exif_get_rational (entry->data, entry->order);
  580|  1.40k|			fs = R2L(vr);
  ------------------
  |  |   81|  1.40k|#define R2L(n) ((n).denominator ? (unsigned long)(n).numerator/(n).denominator : 0L)
  |  |  ------------------
  |  |  |  Branch (81:17): [True: 835, False: 573]
  |  |  ------------------
  ------------------
  581|  1.40k|			vr = exif_get_rational (entry->data+8, entry->order);
  582|  1.40k|			fl = R2L(vr);
  ------------------
  |  |   81|  1.40k|#define R2L(n) ((n).denominator ? (unsigned long)(n).numerator/(n).denominator : 0L)
  |  |  ------------------
  |  |  |  Branch (81:17): [True: 1.17k, False: 234]
  |  |  ------------------
  ------------------
  583|  1.40k|			vr = exif_get_rational (entry->data+16, entry->order);
  584|  1.40k|			ao = R2D(vr);
  ------------------
  |  |   82|  1.40k|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 1.17k, False: 233]
  |  |  ------------------
  ------------------
  585|  1.40k|			vr = exif_get_rational (entry->data+24, entry->order);
  586|  1.40k|			ac = R2D(vr);
  ------------------
  |  |   82|  1.40k|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 1.18k, False: 219]
  |  |  ------------------
  ------------------
  587|  1.40k|			snprintf (v, maxlen, "%ld-%ldmm 1:%3.1f - %3.1f",fs,fl,ao,ac);
  588|  1.40k|		}
  589|  1.40k|		break;
  590|       |
  591|       |	/* Olympus */
  592|  2.16k|	case MNOTE_OLYMPUS_TAG_MODE:
  ------------------
  |  Branch (592:2): [True: 2.16k, False: 46.3k]
  ------------------
  593|  2.16k|		CF (entry->format, EXIF_FORMAT_LONG, v, maxlen)
  ------------------
  |  |   35|  2.16k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  2.16k|{                                                               \
  |  |   37|  2.16k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 222, False: 1.94k]
  |  |  ------------------
  |  |   38|    222|                snprintf (v, maxlen,	                        \
  |  |   39|    222|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    222|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    222|                        "expected '%s'."),                      \
  |  |   41|    222|                        exif_format_get_name (format),          \
  |  |   42|    222|                        exif_format_get_name (target));         \
  |  |   43|    222|                break;                                          \
  |  |   44|    222|        }                                                       \
  |  |   45|  2.16k|}
  ------------------
  594|  1.94k|		CC (entry->components, 3, v, maxlen)
  ------------------
  |  |   60|  1.94k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.94k|{                                                                       \
  |  |   62|  1.94k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 224, False: 1.72k]
  |  |  ------------------
  |  |   63|    224|                snprintf (v, maxlen,                                    \
  |  |   64|    224|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    224|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    224|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    224|                break;                                                  \
  |  |   67|    224|        }                                                               \
  |  |   68|  1.94k|}
  ------------------
  595|  1.72k|		vl = exif_get_long (entry->data, entry->order);
  596|  1.72k|		switch (vl) {
  597|    218|		case 0:
  ------------------
  |  Branch (597:3): [True: 218, False: 1.50k]
  ------------------
  598|    218|			strncpy (v, _("Normal"), maxlen);
  ------------------
  |  |   31|    218|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  599|    218|			break;
  600|    196|		case 1:
  ------------------
  |  Branch (600:3): [True: 196, False: 1.52k]
  ------------------
  601|    196|			strncpy (v, _("Unknown"), maxlen);
  ------------------
  |  |   31|    196|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  602|    196|			break;
  603|    194|		case 2:
  ------------------
  |  Branch (603:3): [True: 194, False: 1.52k]
  ------------------
  604|    194|			strncpy (v, _("Fast"), maxlen);
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  605|    194|			break;
  606|    204|		case 3:
  ------------------
  |  Branch (606:3): [True: 204, False: 1.51k]
  ------------------
  607|    204|			strncpy (v, _("Panorama"), maxlen);
  ------------------
  |  |   31|    204|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  608|    204|			break;
  609|    911|		default:
  ------------------
  |  Branch (609:3): [True: 911, False: 812]
  ------------------
  610|    911|			snprintf (v, maxlen, "%li", (long int) vl);
  611|  1.72k|		}
  612|  1.72k|		vl = exif_get_long (entry->data + 4, entry->order);
  613|  1.72k|		snprintf (buf, sizeof (buf), "/%li/", (long int) vl);
  614|  1.72k|		strncat (v, buf, maxlen - strlen (v));
  615|  1.72k|		vl = exif_get_long (entry->data + 8, entry->order);
  616|  1.72k|		switch (vl) {
  617|    194|		case 1:
  ------------------
  |  Branch (617:3): [True: 194, False: 1.52k]
  ------------------
  618|    194|			strncat (v, _("Left to right"), maxlen - strlen (v));
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  619|    194|			break;
  620|    208|		case 2:
  ------------------
  |  Branch (620:3): [True: 208, False: 1.51k]
  ------------------
  621|    208|			strncat (v, _("Right to left"), maxlen - strlen (v));
  ------------------
  |  |   31|    208|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  622|    208|			break;
  623|    208|		case 3:
  ------------------
  |  Branch (623:3): [True: 208, False: 1.51k]
  ------------------
  624|    208|			strncat (v, _("Bottom to top"), maxlen - strlen (v));
  ------------------
  |  |   31|    208|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  625|    208|			break;
  626|    194|		case 4:
  ------------------
  |  Branch (626:3): [True: 194, False: 1.52k]
  ------------------
  627|    194|			strncat (v, _("Top to bottom"), maxlen - strlen (v));
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  628|    194|			break;
  629|    919|		default:
  ------------------
  |  Branch (629:3): [True: 919, False: 804]
  ------------------
  630|    919|			snprintf (buf, sizeof (buf), "%li",
  631|    919|				  (long int) vl);
  632|    919|			strncat (v, buf, maxlen - strlen (v));
  633|  1.72k|		}
  634|  1.72k|		break;
  635|  1.72k|	case MNOTE_OLYMPUS_TAG_LENSDISTORTION:
  ------------------
  |  Branch (635:2): [True: 1.44k, False: 47.0k]
  ------------------
  636|  1.44k|		if (entry->format == EXIF_FORMAT_SHORT) {
  ------------------
  |  Branch (636:7): [True: 264, False: 1.18k]
  ------------------
  637|       |			/* Epson uses a single SHORT here */
  638|    264|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    264|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    264|{                                                                       \
  |  |   62|    264|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 67, False: 197]
  |  |  ------------------
  |  |   63|     67|                snprintf (v, maxlen,                                    \
  |  |   64|     67|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|     67|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|     67|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|     67|                break;                                                  \
  |  |   67|     67|        }                                                               \
  |  |   68|    264|}
  ------------------
  639|    197|			vs = exif_get_short (entry->data, entry->order);
  640|    197|			sprintf (buf, "%hu", vs);
  641|    197|			strncat (v, buf, maxlen - strlen (v));
  642|  1.18k|		} else {
  643|       |			/* Others use an array of SSHORT here */
  644|  1.18k|			CC (entry->components, 6, v, maxlen)
  ------------------
  |  |   60|  1.18k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.18k|{                                                                       \
  |  |   62|  1.18k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 211, False: 972]
  |  |  ------------------
  |  |   63|    211|                snprintf (v, maxlen,                                    \
  |  |   64|    211|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    211|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    211|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    211|                break;                                                  \
  |  |   67|    211|        }                                                               \
  |  |   68|  1.18k|}
  ------------------
  645|    972|			CF (entry->format, EXIF_FORMAT_SSHORT, v, maxlen)
  ------------------
  |  |   35|    972|#define CF(format,target,v,maxlen)                              \
  |  |   36|    972|{                                                               \
  |  |   37|    972|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 281, False: 691]
  |  |  ------------------
  |  |   38|    281|                snprintf (v, maxlen,	                        \
  |  |   39|    281|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    281|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    281|                        "expected '%s'."),                      \
  |  |   41|    281|                        exif_format_get_name (format),          \
  |  |   42|    281|                        exif_format_get_name (target));         \
  |  |   43|    281|                break;                                          \
  |  |   44|    281|        }                                                       \
  |  |   45|    972|}
  ------------------
  646|  4.83k|			for (i=0; i < (int)entry->components; ++i) {
  ------------------
  |  Branch (646:14): [True: 4.14k, False: 691]
  ------------------
  647|  4.14k|				vss = exif_get_sshort (entry->data+2*i, entry->order);
  648|  4.14k|				sprintf (buf, "%hd ", vss);
  649|  4.14k|				strncat (v, buf, maxlen - strlen (v));
  650|  4.14k|			}
  651|    691|		}
  652|    888|		break;
  653|  1.28k|	case MNOTE_OLYMPUS_TAG_COLORCONTROL:
  ------------------
  |  Branch (653:2): [True: 1.28k, False: 47.2k]
  ------------------
  654|  1.28k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  1.28k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.28k|{                                                               \
  |  |   37|  1.28k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 200, False: 1.08k]
  |  |  ------------------
  |  |   38|    200|                snprintf (v, maxlen,	                        \
  |  |   39|    200|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    200|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    200|                        "expected '%s'."),                      \
  |  |   41|    200|                        exif_format_get_name (format),          \
  |  |   42|    200|                        exif_format_get_name (target));         \
  |  |   43|    200|                break;                                          \
  |  |   44|    200|        }                                                       \
  |  |   45|  1.28k|}
  ------------------
  655|  1.08k|		CC (entry->components, 6, v, maxlen)
  ------------------
  |  |   60|  1.08k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.08k|{                                                                       \
  |  |   62|  1.08k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 205, False: 875]
  |  |  ------------------
  |  |   63|    205|                snprintf (v, maxlen,                                    \
  |  |   64|    205|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    205|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    205|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    205|                break;                                                  \
  |  |   67|    205|        }                                                               \
  |  |   68|  1.08k|}
  ------------------
  656|  6.12k|		for (i=0; i < (int)entry->components; ++i) {
  ------------------
  |  Branch (656:13): [True: 5.25k, False: 875]
  ------------------
  657|  5.25k|			vs = exif_get_short (entry->data+2*i, entry->order);
  658|  5.25k|			sprintf (buf, "%hu ", vs);
  659|  5.25k|			strncat (v, buf, maxlen - strlen (v));
  660|  5.25k|		}
  661|    875|		break;
  662|    864|	case MNOTE_OLYMPUS_TAG_VERSION:
  ------------------
  |  Branch (662:2): [True: 864, False: 47.6k]
  ------------------
  663|    864|		CF (entry->format, EXIF_FORMAT_ASCII, v, maxlen)
  ------------------
  |  |   35|    864|#define CF(format,target,v,maxlen)                              \
  |  |   36|    864|{                                                               \
  |  |   37|    864|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 205, False: 659]
  |  |  ------------------
  |  |   38|    205|                snprintf (v, maxlen,	                        \
  |  |   39|    205|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    205|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    205|                        "expected '%s'."),                      \
  |  |   41|    205|                        exif_format_get_name (format),          \
  |  |   42|    205|                        exif_format_get_name (target));         \
  |  |   43|    205|                break;                                          \
  |  |   44|    205|        }                                                       \
  |  |   45|    864|}
  ------------------
  664|    659|		CC2 (entry->components, 5, 8, v, maxlen)
  ------------------
  |  |   70|    659|#define CC2(number,t1,t2,v,maxlen)                                      \
  |  |   71|    659|{                                                                       \
  |  |   72|    659|	if ((number < t1) || (number > t2)) {                           \
  |  |  ------------------
  |  |  |  Branch (72:6): [True: 201, False: 458]
  |  |  |  Branch (72:23): [True: 221, False: 237]
  |  |  ------------------
  |  |   73|    422|		snprintf (v, maxlen,                                    \
  |  |   74|    422|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    422|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   75|    422|			"expected %i or %i)."), (int) number,		\
  |  |   76|    422|			(int) t1, (int) t2);  				\
  |  |   77|    422|		break;                                                  \
  |  |   78|    422|	}                                                               \
  |  |   79|    659|}
  ------------------
  665|    237|		strncpy (v, (char *)entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    237|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 237]
  |  |  ------------------
  ------------------
  666|    237|		break;
  667|    653|	case MNOTE_OLYMPUS_TAG_SERIALNUMBER2:
  ------------------
  |  Branch (667:2): [True: 653, False: 47.8k]
  ------------------
  668|    653|		CF (entry->format, EXIF_FORMAT_ASCII, v, maxlen)
  ------------------
  |  |   35|    653|#define CF(format,target,v,maxlen)                              \
  |  |   36|    653|{                                                               \
  |  |   37|    653|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 207, False: 446]
  |  |  ------------------
  |  |   38|    207|                snprintf (v, maxlen,	                        \
  |  |   39|    207|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    207|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    207|                        "expected '%s'."),                      \
  |  |   41|    207|                        exif_format_get_name (format),          \
  |  |   42|    207|                        exif_format_get_name (target));         \
  |  |   43|    207|                break;                                          \
  |  |   44|    207|        }                                                       \
  |  |   45|    653|}
  ------------------
  669|    446|		strncpy (v, (char *)entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    446|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 238, False: 208]
  |  |  ------------------
  ------------------
  670|    446|		break;
  671|  1.11k|	case MNOTE_OLYMPUS_TAG_INFO:
  ------------------
  |  Branch (671:2): [True: 1.11k, False: 47.3k]
  ------------------
  672|  1.11k|		CF (entry->format, EXIF_FORMAT_ASCII, v, maxlen)
  ------------------
  |  |   35|  1.11k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.11k|{                                                               \
  |  |   37|  1.11k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 221, False: 894]
  |  |  ------------------
  |  |   38|    221|                snprintf (v, maxlen,	                        \
  |  |   39|    221|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    221|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    221|                        "expected '%s'."),                      \
  |  |   41|    221|                        exif_format_get_name (format),          \
  |  |   42|    221|                        exif_format_get_name (target));         \
  |  |   43|    221|                break;                                          \
  |  |   44|    221|        }                                                       \
  |  |   45|  1.11k|}
  ------------------
  673|    894|		CC2 (entry->components, 52, 60, v, maxlen)
  ------------------
  |  |   70|    894|#define CC2(number,t1,t2,v,maxlen)                                      \
  |  |   71|    894|{                                                                       \
  |  |   72|    894|	if ((number < t1) || (number > t2)) {                           \
  |  |  ------------------
  |  |  |  Branch (72:6): [True: 255, False: 639]
  |  |  |  Branch (72:23): [True: 312, False: 327]
  |  |  ------------------
  |  |   73|    567|		snprintf (v, maxlen,                                    \
  |  |   74|    567|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    567|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   75|    567|			"expected %i or %i)."), (int) number,		\
  |  |   76|    567|			(int) t1, (int) t2);  				\
  |  |   77|    567|		break;                                                  \
  |  |   78|    567|	}                                                               \
  |  |   79|    894|}
  ------------------
  674|    327|		strncpy (v, (char *)entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    327|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 327]
  |  |  ------------------
  ------------------
  675|    327|		break;
  676|    623|	case MNOTE_OLYMPUS_TAG_ID:
  ------------------
  |  Branch (676:2): [True: 623, False: 47.8k]
  ------------------
  677|    623|		CF (entry->format, EXIF_FORMAT_UNDEFINED, v, maxlen)
  ------------------
  |  |   35|    623|#define CF(format,target,v,maxlen)                              \
  |  |   36|    623|{                                                               \
  |  |   37|    623|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 214, False: 409]
  |  |  ------------------
  |  |   38|    214|                snprintf (v, maxlen,	                        \
  |  |   39|    214|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    214|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    214|                        "expected '%s'."),                      \
  |  |   41|    214|                        exif_format_get_name (format),          \
  |  |   42|    214|                        exif_format_get_name (target));         \
  |  |   43|    214|                break;                                          \
  |  |   44|    214|        }                                                       \
  |  |   45|    623|}
  ------------------
  678|    409|		CC (entry->components, 32, v, maxlen)
  ------------------
  |  |   60|    409|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    409|{                                                                       \
  |  |   62|    409|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 213, False: 196]
  |  |  ------------------
  |  |   63|    213|                snprintf (v, maxlen,                                    \
  |  |   64|    213|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    213|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    213|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    213|                break;                                                  \
  |  |   67|    213|        }                                                               \
  |  |   68|    409|}
  ------------------
  679|    196|		strncpy (v, (char *)entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    196|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 196]
  |  |  ------------------
  ------------------
  680|    196|		break;
  681|      0|	case MNOTE_OLYMPUS_TAG_UNKNOWN_4:
  ------------------
  |  Branch (681:2): [True: 0, False: 48.4k]
  ------------------
  682|      0|		CF (entry->format, EXIF_FORMAT_LONG, v, maxlen)
  ------------------
  |  |   35|      0|#define CF(format,target,v,maxlen)                              \
  |  |   36|      0|{                                                               \
  |  |   37|      0|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|                snprintf (v, maxlen,	                        \
  |  |   39|      0|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|      0|                        "expected '%s'."),                      \
  |  |   41|      0|                        exif_format_get_name (format),          \
  |  |   42|      0|                        exif_format_get_name (target));         \
  |  |   43|      0|                break;                                          \
  |  |   44|      0|        }                                                       \
  |  |   45|      0|}
  ------------------
  683|      0|		CC (entry->components, 30, v, maxlen)
  ------------------
  |  |   60|      0|#define CC(number,target,v,maxlen)                                      \
  |  |   61|      0|{                                                                       \
  |  |   62|      0|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   63|      0|                snprintf (v, maxlen,                                    \
  |  |   64|      0|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|      0|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|      0|                break;                                                  \
  |  |   67|      0|        }                                                               \
  |  |   68|      0|}
  ------------------
  684|      0|		for (i=0; i < (int)entry->components; ++i) {
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|			vl = exif_get_long (entry->data+4*i, entry->order);
  686|      0|			sprintf (buf, "%lu ", (unsigned long)vl);
  687|      0|			strncat (v, buf, maxlen - strlen (v));
  688|      0|		}
  689|      0|		break;
  690|  1.20k|	case MNOTE_OLYMPUS_TAG_FOCUSDIST:
  ------------------
  |  Branch (690:2): [True: 1.20k, False: 47.2k]
  ------------------
  691|  1.20k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.20k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.20k|{                                                               \
  |  |   37|  1.20k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 220, False: 981]
  |  |  ------------------
  |  |   38|    220|                snprintf (v, maxlen,	                        \
  |  |   39|    220|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    220|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    220|                        "expected '%s'."),                      \
  |  |   41|    220|                        exif_format_get_name (format),          \
  |  |   42|    220|                        exif_format_get_name (target));         \
  |  |   43|    220|                break;                                          \
  |  |   44|    220|        }                                                       \
  |  |   45|  1.20k|}
  ------------------
  692|    981|		CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    981|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    981|{                                                                       \
  |  |   62|    981|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 227, False: 754]
  |  |  ------------------
  |  |   63|    227|                snprintf (v, maxlen,                                    \
  |  |   64|    227|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    227|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    227|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    227|                break;                                                  \
  |  |   67|    227|        }                                                               \
  |  |   68|    981|}
  ------------------
  693|    754|		vr = exif_get_rational (entry->data, entry->order);
  694|    754|		if (!vr.numerator || !vr.denominator) {
  ------------------
  |  Branch (694:7): [True: 200, False: 554]
  |  Branch (694:24): [True: 231, False: 323]
  ------------------
  695|    431|			strncpy (v, _("Unknown"), maxlen);
  ------------------
  |  |   31|    431|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  696|    431|		}
  697|    323|		else {
  698|    323|			unsigned long tmp = vr.numerator / vr.denominator;
  699|    323|			snprintf (v, maxlen, "%li mm", tmp);
  700|    323|		}
  701|    754|		break;
  702|  1.98k|	case MNOTE_OLYMPUS_TAG_WBALANCE:
  ------------------
  |  Branch (702:2): [True: 1.98k, False: 46.5k]
  ------------------
  703|  1.98k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  1.98k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.98k|{                                                               \
  |  |   37|  1.98k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 78, False: 1.90k]
  |  |  ------------------
  |  |   38|     78|                snprintf (v, maxlen,	                        \
  |  |   39|     78|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|     78|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|     78|                        "expected '%s'."),                      \
  |  |   41|     78|                        exif_format_get_name (format),          \
  |  |   42|     78|                        exif_format_get_name (target));         \
  |  |   43|     78|                break;                                          \
  |  |   44|     78|        }                                                       \
  |  |   45|  1.98k|}
  ------------------
  704|  1.90k|		CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|  1.90k|#define CC(number,target,v,maxlen)                                      \
  |  |   61|  1.90k|{                                                                       \
  |  |   62|  1.90k|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 223, False: 1.67k]
  |  |  ------------------
  |  |   63|    223|                snprintf (v, maxlen,                                    \
  |  |   64|    223|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    223|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    223|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    223|                break;                                                  \
  |  |   67|    223|        }                                                               \
  |  |   68|  1.90k|}
  ------------------
  705|  1.67k|		vs = exif_get_short (entry->data, entry->order);
  706|  1.67k|		switch (vs) {
  707|     67|		case 1:
  ------------------
  |  Branch (707:3): [True: 67, False: 1.61k]
  ------------------
  708|     67|			strncpy (v, _("Automatic"), maxlen);
  ------------------
  |  |   31|     67|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  709|     67|			break;
  710|  1.22k|		case 2:
  ------------------
  |  Branch (710:3): [True: 1.22k, False: 458]
  ------------------
  711|  1.22k|			{
  712|  1.22k|				ExifShort v2 = exif_get_short (entry->data + 2, entry->order);
  713|  1.22k|				unsigned long colorTemp = 0;
  714|  1.22k|				switch (v2) {
  ------------------
  |  Branch (714:13): [True: 1.00k, False: 216]
  ------------------
  715|    195|				case 2:
  ------------------
  |  Branch (715:5): [True: 195, False: 1.02k]
  ------------------
  716|    195|					colorTemp = 3000;
  717|    195|					break;
  718|     74|				case 3:
  ------------------
  |  Branch (718:5): [True: 74, False: 1.14k]
  ------------------
  719|     74|					colorTemp = 3700;
  720|     74|					break;
  721|    211|				case 4:
  ------------------
  |  Branch (721:5): [True: 211, False: 1.01k]
  ------------------
  722|    211|					colorTemp = 4000;
  723|    211|					break;
  724|     66|				case 5:
  ------------------
  |  Branch (724:5): [True: 66, False: 1.15k]
  ------------------
  725|     66|					colorTemp = 4500;
  726|     66|					break;
  727|    199|				case 6:
  ------------------
  |  Branch (727:5): [True: 199, False: 1.02k]
  ------------------
  728|    199|					colorTemp = 5500;
  729|    199|					break;
  730|     66|				case 7:
  ------------------
  |  Branch (730:5): [True: 66, False: 1.15k]
  ------------------
  731|     66|					colorTemp = 6500;
  732|     66|					break;
  733|    194|				case 9:
  ------------------
  |  Branch (733:5): [True: 194, False: 1.02k]
  ------------------
  734|    194|					colorTemp = 7500;
  735|    194|					break;
  736|  1.22k|				}
  737|  1.22k|				if (colorTemp) {
  ------------------
  |  Branch (737:9): [True: 1.00k, False: 216]
  ------------------
  738|  1.00k|					snprintf (v, maxlen, _("Manual: %liK"), colorTemp);
  ------------------
  |  |   31|  1.00k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  739|  1.00k|				}
  740|    216|				else {
  741|    216|					strncpy (v, _("Manual: unknown"), maxlen);
  ------------------
  |  |   31|    216|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  742|    216|				}
  743|       |
  744|  1.22k|			}
  745|      0|			break;
  746|    194|		case 3:
  ------------------
  |  Branch (746:3): [True: 194, False: 1.48k]
  ------------------
  747|    194|			strncpy (v, _("One-touch"), maxlen);
  ------------------
  |  |   31|    194|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  748|    194|			break;
  749|    197|		default:
  ------------------
  |  Branch (749:3): [True: 197, False: 1.48k]
  ------------------
  750|    197|			strncpy (v, _("Unknown"), maxlen);
  ------------------
  |  |   31|    197|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  751|    197|			break;
  752|  1.67k|		}
  753|  1.67k|		break;
  754|  1.67k|	case MNOTE_OLYMPUS_TAG_REDBALANCE:
  ------------------
  |  Branch (754:2): [True: 226, False: 48.2k]
  ------------------
  755|    484|	case MNOTE_OLYMPUS_TAG_BLUEBALANCE:
  ------------------
  |  Branch (755:2): [True: 258, False: 48.2k]
  ------------------
  756|    484|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|    484|#define CF(format,target,v,maxlen)                              \
  |  |   36|    484|{                                                               \
  |  |   37|    484|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 218, False: 266]
  |  |  ------------------
  |  |   38|    218|                snprintf (v, maxlen,	                        \
  |  |   39|    218|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    218|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    218|                        "expected '%s'."),                      \
  |  |   41|    218|                        exif_format_get_name (format),          \
  |  |   42|    218|                        exif_format_get_name (target));         \
  |  |   43|    218|                break;                                          \
  |  |   44|    218|        }                                                       \
  |  |   45|    484|}
  ------------------
  757|    266|		CC (entry->components, 2, v, maxlen)
  ------------------
  |  |   60|    266|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    266|{                                                                       \
  |  |   62|    266|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 69, False: 197]
  |  |  ------------------
  |  |   63|     69|                snprintf (v, maxlen,                                    \
  |  |   64|     69|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|     69|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|     69|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|     69|                break;                                                  \
  |  |   67|     69|        }                                                               \
  |  |   68|    266|}
  ------------------
  758|    197|		vs = exif_get_short (entry->data, entry->order);
  759|    197|		snprintf (v, maxlen, "%hu ", vs);
  760|    197|		vs = exif_get_short (entry->data + 2, entry->order);
  761|    197|		sprintf (buf, "%hu", vs);
  762|    197|		strncat (v, buf, maxlen - strlen (v));
  763|    197|		break;
  764|    195|	case MNOTE_OLYMPUS_TAG_BLACKLEVEL:
  ------------------
  |  Branch (764:2): [True: 195, False: 48.2k]
  ------------------
  765|    664|	case MNOTE_NIKON_TAG_IMAGEBOUNDARY:
  ------------------
  |  Branch (765:2): [True: 469, False: 48.0k]
  ------------------
  766|    664|		CC (entry->components, 4, v, maxlen)
  ------------------
  |  |   60|    664|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    664|{                                                                       \
  |  |   62|    664|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 359, False: 305]
  |  |  ------------------
  |  |   63|    359|                snprintf (v, maxlen,                                    \
  |  |   64|    359|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    359|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    359|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    359|                break;                                                  \
  |  |   67|    359|        }                                                               \
  |  |   68|    664|}
  ------------------
  767|       |		/* Fall through to COLORMATRIX */
  768|       |		/* fall through */
  769|  1.06k|	case MNOTE_OLYMPUS_TAG_COLORMATRIX:
  ------------------
  |  Branch (769:2): [True: 764, False: 47.7k]
  ------------------
  770|  1.06k|		CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen)
  ------------------
  |  |   35|  1.06k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.06k|{                                                               \
  |  |   37|  1.06k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 246, False: 823]
  |  |  ------------------
  |  |   38|    246|                snprintf (v, maxlen,	                        \
  |  |   39|    246|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    246|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    246|                        "expected '%s'."),                      \
  |  |   41|    246|                        exif_format_get_name (format),          \
  |  |   42|    246|                        exif_format_get_name (target));         \
  |  |   43|    246|                break;                                          \
  |  |   44|    246|        }                                                       \
  |  |   45|  1.06k|}
  ------------------
  771|    823|		if (entry->tag == MNOTE_OLYMPUS_TAG_COLORMATRIX)
  ------------------
  |  Branch (771:7): [True: 545, False: 278]
  ------------------
  772|    545|			CC (entry->components, 9, v, maxlen)
  ------------------
  |  |   60|    545|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    545|{                                                                       \
  |  |   62|    545|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 217, False: 328]
  |  |  ------------------
  |  |   63|    217|                snprintf (v, maxlen,                                    \
  |  |   64|    217|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    217|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    217|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    217|                break;                                                  \
  |  |   67|    217|        }                                                               \
  |  |   68|    545|}
  ------------------
  773|  4.67k|		for (i=0; i < (int)entry->components; ++i) {
  ------------------
  |  Branch (773:13): [True: 4.06k, False: 606]
  ------------------
  774|  4.06k|			vs = exif_get_short (entry->data+2*i, entry->order);
  775|  4.06k|			sprintf (buf, "%hu ", vs);
  776|  4.06k|			strncat (v, buf, maxlen - strlen (v));
  777|  4.06k|		}
  778|    606|		break;
  779|    196|	case MNOTE_NIKON1_TAG_FOCUS:
  ------------------
  |  Branch (779:2): [True: 196, False: 48.2k]
  ------------------
  780|    566|	case MNOTE_NIKON_TAG_DIGITALZOOM:
  ------------------
  |  Branch (780:2): [True: 370, False: 48.1k]
  ------------------
  781|    767|	case MNOTE_NIKON1_TAG_DIGITALZOOM:
  ------------------
  |  Branch (781:2): [True: 201, False: 48.2k]
  ------------------
  782|  1.21k|	case MNOTE_OLYMPUS_TAG_FOCALPLANEDIAGONAL:
  ------------------
  |  Branch (782:2): [True: 447, False: 48.0k]
  ------------------
  783|  1.21k|		CF (entry->format, EXIF_FORMAT_RATIONAL, v, maxlen)
  ------------------
  |  |   35|  1.21k|#define CF(format,target,v,maxlen)                              \
  |  |   36|  1.21k|{                                                               \
  |  |   37|  1.21k|        if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 513, False: 701]
  |  |  ------------------
  |  |   38|    513|                snprintf (v, maxlen,	                        \
  |  |   39|    513|                        _("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    513|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   40|    513|                        "expected '%s'."),                      \
  |  |   41|    513|                        exif_format_get_name (format),          \
  |  |   42|    513|                        exif_format_get_name (target));         \
  |  |   43|    513|                break;                                          \
  |  |   44|    513|        }                                                       \
  |  |   45|  1.21k|}
  ------------------
  784|       |		/* Fall through to default handler for display */
  785|       |		/* fall through */
  786|  4.28k|	default:
  ------------------
  |  Branch (786:2): [True: 3.58k, False: 44.9k]
  ------------------
  787|  4.28k|		switch (entry->format) {
  788|    712|		case EXIF_FORMAT_ASCII:
  ------------------
  |  Branch (788:3): [True: 712, False: 3.57k]
  ------------------
  789|    712|			strncpy (v, (char *)entry->data, MIN (maxlen, entry->size));
  ------------------
  |  |  182|    712|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 454, False: 258]
  |  |  ------------------
  ------------------
  790|    712|			break;
  791|    423|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (791:3): [True: 423, False: 3.86k]
  ------------------
  792|    423|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    423|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    423|{                                                                       \
  |  |   62|    423|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 224, False: 199]
  |  |  ------------------
  |  |   63|    224|                snprintf (v, maxlen,                                    \
  |  |   64|    224|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    224|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    224|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    224|                break;                                                  \
  |  |   67|    224|        }                                                               \
  |  |   68|    423|}
  ------------------
  793|    199|			vs = exif_get_short (entry->data, entry->order);
  794|    199|			snprintf (v, maxlen, "%hu", vs);
  795|    199|			break;
  796|    406|		case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (796:3): [True: 406, False: 3.88k]
  ------------------
  797|    406|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    406|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    406|{                                                                       \
  |  |   62|    406|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 212, False: 194]
  |  |  ------------------
  |  |   63|    212|                snprintf (v, maxlen,                                    \
  |  |   64|    212|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    212|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    212|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    212|                break;                                                  \
  |  |   67|    212|        }                                                               \
  |  |   68|    406|}
  ------------------
  798|    194|			vss = exif_get_sshort (entry->data, entry->order);
  799|    194|			snprintf (v, maxlen, "%hi", vss);
  800|    194|			break;
  801|    410|		case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (801:3): [True: 410, False: 3.87k]
  ------------------
  802|    410|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    410|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    410|{                                                                       \
  |  |   62|    410|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 216, False: 194]
  |  |  ------------------
  |  |   63|    216|                snprintf (v, maxlen,                                    \
  |  |   64|    216|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    216|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    216|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    216|                break;                                                  \
  |  |   67|    216|        }                                                               \
  |  |   68|    410|}
  ------------------
  803|    194|			vl = exif_get_long (entry->data, entry->order);
  804|    194|			snprintf (v, maxlen, "%lu", (long unsigned) vl);
  805|    194|			break;
  806|    309|		case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (806:3): [True: 309, False: 3.97k]
  ------------------
  807|    309|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    309|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    309|{                                                                       \
  |  |   62|    309|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 243, False: 66]
  |  |  ------------------
  |  |   63|    243|                snprintf (v, maxlen,                                    \
  |  |   64|    243|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    243|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    243|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    243|                break;                                                  \
  |  |   67|    243|        }                                                               \
  |  |   68|    309|}
  ------------------
  808|     66|			vsl = exif_get_slong (entry->data, entry->order);
  809|     66|			snprintf (v, maxlen, "%li", (long int) vsl);
  810|     66|			break;
  811|    833|		case EXIF_FORMAT_RATIONAL:
  ------------------
  |  Branch (811:3): [True: 833, False: 3.45k]
  ------------------
  812|    833|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    833|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    833|{                                                                       \
  |  |   62|    833|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 309, False: 524]
  |  |  ------------------
  |  |   63|    309|                snprintf (v, maxlen,                                    \
  |  |   64|    309|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    309|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    309|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    309|                break;                                                  \
  |  |   67|    309|        }                                                               \
  |  |   68|    833|}
  ------------------
  813|    524|			vr = exif_get_rational (entry->data, entry->order);
  814|    524|			if (!vr.denominator) {
  ------------------
  |  Branch (814:8): [True: 241, False: 283]
  ------------------
  815|    241|				strncpy (v, _("Infinite"), maxlen);
  ------------------
  |  |   31|    241|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  816|    283|			} else {
  817|    283|				r = R2D(vr);
  ------------------
  |  |   82|    283|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 283, False: 0]
  |  |  ------------------
  ------------------
  818|    283|				snprintf (v, maxlen, "%2.3f", r);
  819|    283|			}
  820|    524|			break;
  821|    635|		case EXIF_FORMAT_SRATIONAL:
  ------------------
  |  Branch (821:3): [True: 635, False: 3.65k]
  ------------------
  822|    635|			CC (entry->components, 1, v, maxlen)
  ------------------
  |  |   60|    635|#define CC(number,target,v,maxlen)                                      \
  |  |   61|    635|{                                                                       \
  |  |   62|    635|        if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (62:13): [True: 114, False: 521]
  |  |  ------------------
  |  |   63|    114|                snprintf (v, maxlen,                                    \
  |  |   64|    114|                        _("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    114|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   65|    114|                        "expected %i)."), (int) number, (int) target);  \
  |  |   66|    114|                break;                                                  \
  |  |   67|    114|        }                                                               \
  |  |   68|    635|}
  ------------------
  823|    521|			vsr = exif_get_srational (entry->data, entry->order);
  824|    521|			if (!vsr.denominator) {
  ------------------
  |  Branch (824:8): [True: 238, False: 283]
  ------------------
  825|    238|				strncpy (v, _("Infinite"), maxlen);
  ------------------
  |  |   31|    238|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  826|    283|			} else {
  827|    283|				r = R2D(vsr);
  ------------------
  |  |   82|    283|#define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
  |  |  ------------------
  |  |  |  Branch (82:17): [True: 283, False: 0]
  |  |  ------------------
  ------------------
  828|    283|				snprintf (v, maxlen, "%2.3f", r);
  829|    283|			}
  830|    521|			break;
  831|    215|		case EXIF_FORMAT_UNDEFINED:
  ------------------
  |  Branch (831:3): [True: 215, False: 4.07k]
  ------------------
  832|    560|		default:
  ------------------
  |  Branch (832:3): [True: 345, False: 3.94k]
  ------------------
  833|    560|			snprintf (v, maxlen, _("%i bytes unknown data: "),
  ------------------
  |  |   31|    560|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  834|    560|				  entry->size);
  835|  55.4k|			for (i = 0; i < (int)entry->size; i++) {
  ------------------
  |  Branch (835:16): [True: 54.8k, False: 560]
  ------------------
  836|  54.8k|				sprintf (buf, "%02x", entry->data[i]);
  837|  54.8k|				strncat (v, buf, maxlen - strlen (v));
  838|  54.8k|			}
  839|    560|			break;
  840|  4.28k|		}
  841|  4.28k|		break;
  842|  48.4k|	}
  843|       |
  844|  48.4k|	return (v);
  845|  48.4k|}

mnote_olympus_tag_get_name:
  232|   145k|{
  233|   145k|	unsigned int i;
  234|       |
  235|  15.3M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (235:14): [True: 15.3M, False: 22.1k]
  ------------------
  236|  15.3M|		if (table[i].tag == t) return (table[i].name);
  ------------------
  |  Branch (236:7): [True: 123k, False: 15.1M]
  ------------------
  237|  22.1k|	return NULL;
  238|   145k|}
mnote_olympus_tag_get_title:
  242|  51.1k|{
  243|  51.1k|	unsigned int i;
  244|       |
  245|  51.1k|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  246|  4.35M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (246:14): [True: 4.35M, False: 0]
  ------------------
  247|  4.35M|		if (table[i].tag == t) {
  ------------------
  |  Branch (247:7): [True: 51.1k, False: 4.30M]
  ------------------
  248|  51.1k|			if (!table[i].title)
  ------------------
  |  Branch (248:8): [True: 0, False: 51.1k]
  ------------------
  249|      0|				return NULL;
  250|  51.1k|			return _(table[i].title);
  ------------------
  |  |   31|  51.1k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  251|  51.1k|		}
  252|      0|	return NULL;
  253|  51.1k|}
mnote_olympus_tag_get_description:
  257|  51.1k|{
  258|  51.1k|	unsigned int i;
  259|       |
  260|  4.35M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (260:14): [True: 4.35M, False: 0]
  ------------------
  261|  4.35M|		if (table[i].tag == t) {
  ------------------
  |  Branch (261:7): [True: 51.1k, False: 4.30M]
  ------------------
  262|  51.1k|			if (!table[i].description || !*table[i].description)
  ------------------
  |  Branch (262:8): [True: 205, False: 50.9k]
  |  Branch (262:33): [True: 49.8k, False: 1.03k]
  ------------------
  263|  50.0k|				return "";
  264|  1.03k|			(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  265|  1.03k|			return _(table[i].description);
  ------------------
  |  |   31|  1.03k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  266|  51.1k|		}
  267|      0|	return NULL;
  268|  51.1k|}

exif_mnote_data_pentax_identify:
  425|  1.26k|{
  426|  1.26k|	(void) ed;  /* unused */
  427|  1.26k|	if ((e->size >= 8) && !memcmp (e->data, "AOC", 4)) {
  ------------------
  |  Branch (427:6): [True: 1.03k, False: 233]
  |  Branch (427:24): [True: 514, False: 520]
  ------------------
  428|    514|		if (((e->data[4] == 'I') && (e->data[5] == 'I')) ||
  ------------------
  |  Branch (428:8): [True: 191, False: 323]
  |  Branch (428:31): [True: 2, False: 189]
  ------------------
  429|    512|		    ((e->data[4] == 'M') && (e->data[5] == 'M')))
  ------------------
  |  Branch (429:8): [True: 20, False: 492]
  |  Branch (429:31): [True: 4, False: 16]
  ------------------
  430|      6|			return pentaxV3;
  431|    508|		else
  432|       |			/* Uses Casio v2 tags */
  433|    508|			return pentaxV2;
  434|    514|	}
  435|       |
  436|    753|	if ((e->size >= 8) && !memcmp (e->data, "QVC", 4))
  ------------------
  |  Branch (436:6): [True: 520, False: 233]
  |  Branch (436:24): [True: 44, False: 476]
  ------------------
  437|     44|		return casioV2;
  438|       |
  439|       |	/* This isn't a very robust test, so make sure it's done last */
  440|       |	/* Maybe we should additionally check for a make of Asahi or Pentax */
  441|    709|	if ((e->size >= 2) && (e->data[0] == 0x00) && (e->data[1] == 0x1b))
  ------------------
  |  Branch (441:6): [True: 698, False: 11]
  |  Branch (441:24): [True: 543, False: 155]
  |  Branch (441:48): [True: 508, False: 35]
  ------------------
  442|    508|		return pentaxV1;
  443|       |
  444|    201|	return 0;
  445|    709|}
exif_mnote_data_pentax_new:
  449|  1.06k|{
  450|  1.06k|	ExifMnoteData *d;
  451|       |
  452|  1.06k|	if (!mem) return NULL;
  ------------------
  |  Branch (452:6): [True: 0, False: 1.06k]
  ------------------
  453|       |
  454|  1.06k|	d = exif_mem_alloc (mem, sizeof (ExifMnoteDataPentax));
  455|  1.06k|	if (!d) return NULL;
  ------------------
  |  Branch (455:6): [True: 0, False: 1.06k]
  ------------------
  456|       |
  457|  1.06k|	exif_mnote_data_construct (d, mem);
  458|       |
  459|       |	/* Set up function pointers */
  460|  1.06k|	d->methods.free            = exif_mnote_data_pentax_free;
  461|  1.06k|	d->methods.set_byte_order  = exif_mnote_data_pentax_set_byte_order;
  462|  1.06k|	d->methods.set_offset      = exif_mnote_data_pentax_set_offset;
  463|  1.06k|	d->methods.load            = exif_mnote_data_pentax_load;
  464|  1.06k|	d->methods.save            = exif_mnote_data_pentax_save;
  465|  1.06k|	d->methods.count           = exif_mnote_data_pentax_count;
  466|  1.06k|	d->methods.get_id          = exif_mnote_data_pentax_get_id;
  467|  1.06k|	d->methods.get_name        = exif_mnote_data_pentax_get_name;
  468|  1.06k|	d->methods.get_title       = exif_mnote_data_pentax_get_title;
  469|  1.06k|	d->methods.get_description = exif_mnote_data_pentax_get_description;
  470|  1.06k|	d->methods.get_value       = exif_mnote_data_pentax_get_value;
  471|       |
  472|  1.06k|	return d;
  473|  1.06k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_free:
   56|  1.06k|{
   57|  1.06k|	if (!n) return;
  ------------------
  |  Branch (57:6): [True: 0, False: 1.06k]
  ------------------
   58|       |
   59|  1.06k|	exif_mnote_data_pentax_clear ((ExifMnoteDataPentax *) n);
   60|  1.06k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_clear:
   36|  1.98k|{
   37|  1.98k|	ExifMnoteData *d = (ExifMnoteData *) n;
   38|  1.98k|	unsigned int i;
   39|       |
   40|  1.98k|	if (!n) return;
  ------------------
  |  Branch (40:6): [True: 0, False: 1.98k]
  ------------------
   41|       |
   42|  1.98k|	if (n->entries) {
  ------------------
  |  Branch (42:6): [True: 914, False: 1.06k]
  ------------------
   43|  18.2k|		for (i = 0; i < n->count; i++)
  ------------------
  |  Branch (43:15): [True: 17.2k, False: 914]
  ------------------
   44|  17.2k|			if (n->entries[i].data) {
  ------------------
  |  Branch (44:8): [True: 7.09k, False: 10.2k]
  ------------------
   45|  7.09k|				exif_mem_free (d->mem, n->entries[i].data);
   46|  7.09k|				n->entries[i].data = NULL;
   47|  7.09k|			}
   48|    914|		exif_mem_free (d->mem, n->entries);
   49|       |		n->entries = NULL;
   50|    914|		n->count = 0;
   51|    914|	}
   52|  1.98k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_set_byte_order:
  405|  1.06k|{
  406|  1.06k|	ExifByteOrder o_orig;
  407|  1.06k|	ExifMnoteDataPentax *n = (ExifMnoteDataPentax *) d;
  408|  1.06k|	unsigned int i;
  409|       |
  410|  1.06k|	if (!n) return;
  ------------------
  |  Branch (410:6): [True: 0, False: 1.06k]
  ------------------
  411|       |
  412|  1.06k|	o_orig = n->order;
  413|  1.06k|	n->order = o;
  414|  1.06k|	for (i = 0; i < n->count; i++) {
  ------------------
  |  Branch (414:14): [True: 0, False: 1.06k]
  ------------------
  415|      0|		if (n->entries[i].components && (n->entries[i].size/n->entries[i].components < exif_format_get_size (n->entries[i].format)))
  ------------------
  |  Branch (415:7): [True: 0, False: 0]
  |  Branch (415:35): [True: 0, False: 0]
  ------------------
  416|      0|			continue;
  417|      0|		n->entries[i].order = o;
  418|      0|		exif_array_set_byte_order (n->entries[i].format, n->entries[i].data,
  419|      0|				n->entries[i].components, o_orig, o);
  420|      0|	}
  421|  1.06k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_set_offset:
  399|  1.06k|{
  400|  1.06k|	if (d) ((ExifMnoteDataPentax *) d)->offset = o;
  ------------------
  |  Branch (400:6): [True: 1.06k, False: 0]
  ------------------
  401|  1.06k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_load:
  219|  1.06k|{
  220|  1.06k|	ExifMnoteDataPentax *n = (ExifMnoteDataPentax *) en;
  221|  1.06k|	size_t i, tcount, o, datao, base = 0;
  222|  1.06k|	ExifShort c;
  223|       |
  224|  1.06k|	if (!n) return;
  ------------------
  |  Branch (224:6): [True: 0, False: 1.06k]
  ------------------
  225|       |
  226|  1.06k|	if (!buf || !buf_size) {
  ------------------
  |  Branch (226:6): [True: 0, False: 1.06k]
  |  Branch (226:14): [True: 0, False: 1.06k]
  ------------------
  227|      0|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  228|      0|			  "ExifMnoteDataPentax", "Short MakerNote");
  229|      0|		return;
  230|      0|	}
  231|  1.06k|	datao = 6 + n->offset;
  232|  1.06k|	if (exif_check_overflow (datao, buf_size, 8)) {
  ------------------
  |  Branch (232:6): [True: 12, False: 1.05k]
  ------------------
  233|     12|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  234|     12|			  "ExifMnoteDataPentax", "Short MakerNote");
  235|     12|		return;
  236|     12|	}
  237|       |
  238|       |	/* Detect variant of Pentax/Casio MakerNote found */
  239|  1.05k|	if (!memcmp(buf + datao, "AOC", 4)) {
  ------------------
  |  Branch (239:6): [True: 492, False: 562]
  ------------------
  240|    492|		if ((buf[datao + 4] == 'I') && (buf[datao + 5] == 'I')) {
  ------------------
  |  Branch (240:7): [True: 182, False: 310]
  |  Branch (240:34): [True: 2, False: 180]
  ------------------
  241|      2|			n->version = pentaxV3;
  242|      2|			n->order = EXIF_BYTE_ORDER_INTEL;
  243|    490|		} else if ((buf[datao + 4] == 'M') && (buf[datao + 5] == 'M')) {
  ------------------
  |  Branch (243:14): [True: 20, False: 470]
  |  Branch (243:41): [True: 4, False: 16]
  ------------------
  244|      4|			n->version = pentaxV3;
  245|      4|			n->order = EXIF_BYTE_ORDER_MOTOROLA;
  246|    486|		} else {
  247|       |			/* Uses Casio v2 tags */
  248|    486|			n->version = pentaxV2;
  249|    486|		}
  250|    492|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataPentax",
  251|    492|			"Parsing Pentax maker note v%d...", (int)n->version);
  252|    492|		datao += 4 + 2;
  253|    492|		base = MNOTE_PENTAX2_TAG_BASE;
  254|    562|	} else if (!memcmp(buf + datao, "QVC", 4)) {
  ------------------
  |  Branch (254:13): [True: 24, False: 538]
  ------------------
  255|     24|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataPentax",
  256|     24|			"Parsing Casio maker note v2...");
  257|     24|		n->version = casioV2;
  258|     24|		base = MNOTE_CASIO2_TAG_BASE;
  259|     24|		datao += 4 + 2;
  260|    538|	} else {
  261|       |		/* probably assert(!memcmp(buf + datao, "\x00\x1b", 2)) */
  262|    538|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataPentax",
  263|    538|			"Parsing Pentax maker note v1...");
  264|    538|		n->version = pentaxV1;
  265|    538|	}
  266|       |
  267|       |	/* Read the number of tags */
  268|  1.05k|	c = exif_get_short (buf + datao, n->order);
  269|  1.05k|	datao += 2;
  270|       |
  271|       |	/* Just use an arbitrary max tag limit here to avoid needing to much memory or time. There are 102 named tags currently.
  272|       |	 * The format allows specifying the same range of memory as often as it can, so this multiplies quickly. */
  273|  1.05k|	if (c > 200) {
  ------------------
  |  Branch (273:6): [True: 140, False: 914]
  ------------------
  274|    140|		exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataPentax", "Too much tags (%d) in Pentax MakerNote", c);
  275|    140|		return;
  276|    140|	}
  277|       |
  278|       |
  279|       |	/* Remove any old entries */
  280|    914|	exif_mnote_data_pentax_clear (n);
  281|       |
  282|       |	/* Reserve enough space for all the possible MakerNote tags */
  283|    914|	n->entries = exif_mem_alloc (en->mem, sizeof (MnotePentaxEntry) * c);
  284|    914|	if (!n->entries) {
  ------------------
  |  Branch (284:6): [True: 0, False: 914]
  ------------------
  285|      0|		EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteDataPentax", sizeof (MnotePentaxEntry) * c);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  286|      0|		return;
  287|      0|	}
  288|       |
  289|       |	/* Parse all c entries, storing ones that are successfully parsed */
  290|    914|	tcount = 0;
  291|  18.7k|	for (i = c, o = datao; i; --i, o += 12) {
  ------------------
  |  Branch (291:25): [True: 18.7k, False: 22]
  ------------------
  292|  18.7k|		size_t s;
  293|       |
  294|  18.7k|		memset(&n->entries[tcount], 0, sizeof(MnotePentaxEntry));
  295|  18.7k|		if (exif_check_overflow (o,buf_size,12)) {
  ------------------
  |  Branch (295:7): [True: 707, False: 18.0k]
  ------------------
  296|    707|			exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  297|    707|				  "ExifMnoteDataPentax", "Short MakerNote");
  298|    707|			break;
  299|    707|		}
  300|       |
  301|  18.0k|		n->entries[tcount].tag        = exif_get_short (buf + o + 0, n->order) + base;
  302|  18.0k|		n->entries[tcount].format     = exif_get_short (buf + o + 2, n->order);
  303|  18.0k|		n->entries[tcount].components = exif_get_long  (buf + o + 4, n->order);
  304|  18.0k|		n->entries[tcount].order      = n->order;
  305|       |
  306|  18.0k|		exif_log (en->log, EXIF_LOG_CODE_DEBUG, "ExifMnotePentax",
  307|  18.0k|			  "Loading entry 0x%x ('%s')...", n->entries[tcount].tag,
  308|  18.0k|			  mnote_pentax_tag_get_name (n->entries[tcount].tag));
  309|       |
  310|       |		/* Check if we overflow the multiplication. Use buf_size as the max size for integer overflow detection,
  311|       |		 * we will check the buffer sizes closer later. */
  312|  18.0k|		if (exif_check_mul_overflow (exif_format_get_size (n->entries[tcount].format),
  ------------------
  |  Branch (312:7): [True: 185, False: 17.8k]
  ------------------
  313|  18.0k|				n->entries[tcount].components, buf_size, &s)) {
  314|    185|			exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
  315|    185|				  "ExifMnoteDataPentax", "Tag size overflow detected (%u * %lu)", exif_format_get_size (n->entries[tcount].format), n->entries[tcount].components);
  316|    185|			break;
  317|    185|		}
  318|       |		/*
  319|       |		 * Size? If bigger than 4 bytes, the actual data is not
  320|       |		 * in the entry but somewhere else (offset).
  321|       |		 */
  322|  17.8k|		n->entries[tcount].size = s;
  323|  17.8k|		if (s) {
  ------------------
  |  Branch (323:7): [True: 7.64k, False: 10.2k]
  ------------------
  324|  7.64k|			size_t dataofs = o + 8;
  325|  7.64k|			if (s > 4)
  ------------------
  |  Branch (325:8): [True: 2.24k, False: 5.39k]
  ------------------
  326|       |				/* The data in this case is merely a pointer */
  327|  2.24k|			   	dataofs = exif_get_long (buf + dataofs, n->order) + 6;
  328|       |
  329|  7.64k|			if (exif_check_overflow (dataofs, buf_size, s)) {
  ------------------
  |  Branch (329:8): [True: 547, False: 7.09k]
  ------------------
  330|    547|				exif_log (en->log, EXIF_LOG_CODE_DEBUG,
  331|    547|						  "ExifMnoteDataPentax", "Tag data past end "
  332|    547|					  "of buffer (%u > %u)", (unsigned)(dataofs + s), buf_size);
  333|    547|				continue;
  334|    547|			}
  335|       |
  336|  7.09k|			n->entries[tcount].data = exif_mem_alloc (en->mem, s);
  337|  7.09k|			if (!n->entries[tcount].data) {
  ------------------
  |  Branch (337:8): [True: 0, False: 7.09k]
  ------------------
  338|      0|				EXIF_LOG_NO_MEMORY(en->log, "ExifMnoteDataPentax", s);
  ------------------
  |  |  112|      0|#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
  ------------------
  339|      0|				continue;
  340|      0|			}
  341|  7.09k|			memcpy (n->entries[tcount].data, buf + dataofs, s);
  342|  7.09k|		}
  343|       |
  344|       |		/* Tag was successfully parsed */
  345|  17.2k|		++tcount;
  346|  17.2k|	}
  347|       |	/* Store the count of successfully parsed tags */
  348|    914|	n->count = tcount;
  349|    914|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_count:
  353|  1.06k|{
  354|  1.06k|	return n ? ((ExifMnoteDataPentax *) n)->count : 0;
  ------------------
  |  Branch (354:9): [True: 1.06k, False: 0]
  ------------------
  355|  1.06k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_get_name:
  369|  12.3k|{
  370|  12.3k|	ExifMnoteDataPentax *note = (ExifMnoteDataPentax *) d;
  371|       |
  372|  12.3k|	if (!note) return NULL;
  ------------------
  |  Branch (372:6): [True: 0, False: 12.3k]
  ------------------
  373|  12.3k|	if (note->count <= n) return NULL;
  ------------------
  |  Branch (373:6): [True: 0, False: 12.3k]
  ------------------
  374|  12.3k|	return mnote_pentax_tag_get_name (note->entries[n].tag);
  375|  12.3k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_get_title:
  379|  12.1k|{
  380|  12.1k|	ExifMnoteDataPentax *note = (ExifMnoteDataPentax *) d;
  381|       |
  382|  12.1k|	if (!note) return NULL;
  ------------------
  |  Branch (382:6): [True: 0, False: 12.1k]
  ------------------
  383|  12.1k|	if (note->count <= n) return NULL;
  ------------------
  |  Branch (383:6): [True: 0, False: 12.1k]
  ------------------
  384|  12.1k|	return mnote_pentax_tag_get_title (note->entries[n].tag);
  385|  12.1k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_get_description:
  389|  12.1k|{
  390|  12.1k|	ExifMnoteDataPentax *note = (ExifMnoteDataPentax *) d;
  391|       |	
  392|  12.1k|	if (!note) return NULL;
  ------------------
  |  Branch (392:6): [True: 0, False: 12.1k]
  ------------------
  393|  12.1k|	if (note->count <= n) return NULL;
  ------------------
  |  Branch (393:6): [True: 0, False: 12.1k]
  ------------------
  394|  12.1k|	return mnote_pentax_tag_get_description (note->entries[n].tag);
  395|  12.1k|}
exif-mnote-data-pentax.c:exif_mnote_data_pentax_get_value:
   64|  12.1k|{
   65|  12.1k|	ExifMnoteDataPentax *n = (ExifMnoteDataPentax *) d;
   66|       |
   67|  12.1k|	if (!n) return NULL;
  ------------------
  |  Branch (67:6): [True: 0, False: 12.1k]
  ------------------
   68|  12.1k|	if (n->count <= i) return NULL;
  ------------------
  |  Branch (68:6): [True: 0, False: 12.1k]
  ------------------
   69|  12.1k|	return mnote_pentax_entry_get_value (&n->entries[i], val, maxlen);
   70|  12.1k|}

mnote_pentax_entry_get_value:
  312|  12.1k|{
  313|  12.1k|	ExifLong vl;
  314|  12.1k|	ExifSLong vsl;
  315|  12.1k|	ExifShort vs, vs2;
  316|  12.1k|	ExifSShort vss;
  317|  12.1k|	int i = 0, j = 0;
  318|       |
  319|  12.1k|	if (!entry) return (NULL);
  ------------------
  |  Branch (319:6): [True: 0, False: 12.1k]
  ------------------
  320|  12.1k|	if (maxlen < 1) return (NULL);
  ------------------
  |  Branch (320:6): [True: 0, False: 12.1k]
  ------------------
  321|       |
  322|  12.1k|	memset (val, 0, maxlen);
  323|  12.1k|	maxlen--;
  324|       |
  325|  12.1k|	switch (entry->tag) {
  326|    417|	  case MNOTE_PENTAX_TAG_MODE:
  ------------------
  |  Branch (326:4): [True: 417, False: 11.7k]
  ------------------
  327|    861|	  case MNOTE_PENTAX_TAG_QUALITY:
  ------------------
  |  Branch (327:4): [True: 444, False: 11.6k]
  ------------------
  328|  1.08k|	  case MNOTE_PENTAX_TAG_FOCUS:
  ------------------
  |  Branch (328:4): [True: 226, False: 11.8k]
  ------------------
  329|  1.32k|	  case MNOTE_PENTAX_TAG_FLASH:
  ------------------
  |  Branch (329:4): [True: 234, False: 11.8k]
  ------------------
  330|  1.52k|	  case MNOTE_PENTAX_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (330:4): [True: 201, False: 11.9k]
  ------------------
  331|  1.75k|	  case MNOTE_PENTAX_TAG_SHARPNESS:
  ------------------
  |  Branch (331:4): [True: 231, False: 11.8k]
  ------------------
  332|  2.10k|	  case MNOTE_PENTAX_TAG_CONTRAST:
  ------------------
  |  Branch (332:4): [True: 353, False: 11.7k]
  ------------------
  333|  2.30k|	  case MNOTE_PENTAX_TAG_SATURATION:
  ------------------
  |  Branch (333:4): [True: 203, False: 11.9k]
  ------------------
  334|  2.55k|	  case MNOTE_PENTAX_TAG_ISO_SPEED:
  ------------------
  |  Branch (334:4): [True: 245, False: 11.8k]
  ------------------
  335|  2.77k|	  case MNOTE_PENTAX_TAG_COLOR:
  ------------------
  |  Branch (335:4): [True: 224, False: 11.8k]
  ------------------
  336|  3.09k|	  case MNOTE_PENTAX2_TAG_MODE:
  ------------------
  |  Branch (336:4): [True: 317, False: 11.8k]
  ------------------
  337|  3.38k|	  case MNOTE_PENTAX2_TAG_QUALITY:
  ------------------
  |  Branch (337:4): [True: 288, False: 11.8k]
  ------------------
  338|  3.59k|	  case MNOTE_PENTAX2_TAG_FLASH_MODE:
  ------------------
  |  Branch (338:4): [True: 213, False: 11.9k]
  ------------------
  339|  3.80k|	  case MNOTE_PENTAX2_TAG_FOCUS_MODE:
  ------------------
  |  Branch (339:4): [True: 213, False: 11.9k]
  ------------------
  340|  4.15k|	  case MNOTE_PENTAX2_TAG_AFPOINT_SELECTED:
  ------------------
  |  Branch (340:4): [True: 347, False: 11.7k]
  ------------------
  341|  4.51k|	  case MNOTE_PENTAX2_TAG_AUTO_AFPOINT:
  ------------------
  |  Branch (341:4): [True: 361, False: 11.7k]
  ------------------
  342|  4.83k|	  case MNOTE_PENTAX2_TAG_WHITE_BALANCE:
  ------------------
  |  Branch (342:4): [True: 322, False: 11.7k]
  ------------------
  343|  5.32k|	  case MNOTE_PENTAX2_TAG_PICTURE_MODE:
  ------------------
  |  Branch (343:4): [True: 487, False: 11.6k]
  ------------------
  344|  5.86k|	  case MNOTE_PENTAX2_TAG_IMAGE_SIZE:
  ------------------
  |  Branch (344:4): [True: 540, False: 11.5k]
  ------------------
  345|  6.12k|	  case MNOTE_CASIO2_TAG_BESTSHOT_MODE:
  ------------------
  |  Branch (345:4): [True: 257, False: 11.8k]
  ------------------
  346|  6.12k|		CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   37|  6.12k|#define CF(format,target,v,maxlen)                              \
  |  |   38|  6.12k|{                                                               \
  |  |   39|  6.12k|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 2.87k, False: 3.24k]
  |  |  ------------------
  |  |   40|  2.87k|		snprintf (v, maxlen,	                        \
  |  |   41|  2.87k|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|  2.87k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|  2.87k|			"expected '%s'."),                      \
  |  |   43|  2.87k|			exif_format_get_name (format),          \
  |  |   44|  2.87k|			exif_format_get_name (target));         \
  |  |   45|  2.87k|		break;                                          \
  |  |   46|  2.87k|	}                                                       \
  |  |   47|  6.12k|}
  ------------------
  347|  3.24k|		CC2 (entry->components, 1, 2, val, maxlen)
  ------------------
  |  |   59|  3.24k|#define CC2(number,t1,t2,v,maxlen)                                      \
  |  |   60|  3.24k|{                                                                       \
  |  |   61|  3.24k|	if ((number != t1) && (number != t2)) {                         \
  |  |  ------------------
  |  |  |  Branch (61:6): [True: 1.04k, False: 2.19k]
  |  |  |  Branch (61:24): [True: 226, False: 823]
  |  |  ------------------
  |  |   62|    226|		snprintf (v, maxlen,                                    \
  |  |   63|    226|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    226|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   64|    226|			"expected %i or %i)."), (int) number,		\
  |  |   65|    226|			(int) t1, (int) t2);  				\
  |  |   66|    226|		break;                                                  \
  |  |   67|    226|	}                                                               \
  |  |   68|  3.24k|}
  ------------------
  348|  3.01k|		if (entry->components == 1) {
  ------------------
  |  Branch (348:7): [True: 2.19k, False: 823]
  ------------------
  349|  2.19k|			vs = exif_get_short (entry->data, entry->order);
  350|       |
  351|       |			/* search the tag */
  352|  29.6k|			for (i = 0; (items[i].tag && items[i].tag != entry->tag); i++);
  ------------------
  |  Branch (352:17): [True: 29.6k, False: 0]
  |  Branch (352:33): [True: 27.4k, False: 2.19k]
  ------------------
  353|  2.19k|			if (!items[i].tag) {
  ------------------
  |  Branch (353:8): [True: 0, False: 2.19k]
  ------------------
  354|      0|				snprintf (val, maxlen,
  355|      0|					  _("Internal error (unknown value %hu)"), vs);
  ------------------
  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  356|      0|			  	break;
  357|      0|			}
  358|       |
  359|       |			/* find the value */
  360|  14.9k|			for (j = 0; items[i].elem[j].string &&
  ------------------
  |  Branch (360:16): [True: 13.8k, False: 1.03k]
  ------------------
  361|  13.8k|			    (items[i].elem[j].index < vs); j++);
  ------------------
  |  Branch (361:8): [True: 12.7k, False: 1.16k]
  ------------------
  362|  2.19k|			if (items[i].elem[j].index != vs) {
  ------------------
  |  Branch (362:8): [True: 1.57k, False: 625]
  ------------------
  363|  1.57k|				snprintf (val, maxlen,
  364|  1.57k|					  _("Internal error (unknown value %hu)"), vs);
  ------------------
  |  |   31|  1.57k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  365|  1.57k|				break;
  366|  1.57k|			}
  367|    625|			strncpy (val, _(items[i].elem[j].string), maxlen);
  ------------------
  |  |   31|    625|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  368|    823|		} else {
  369|       |			/* Two-component values */
  370|    823|			CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen)
  ------------------
  |  |   37|    823|#define CF(format,target,v,maxlen)                              \
  |  |   38|    823|{                                                               \
  |  |   39|    823|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 0, False: 823]
  |  |  ------------------
  |  |   40|      0|		snprintf (v, maxlen,	                        \
  |  |   41|      0|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|      0|			"expected '%s'."),                      \
  |  |   43|      0|			exif_format_get_name (format),          \
  |  |   44|      0|			exif_format_get_name (target));         \
  |  |   45|      0|		break;                                          \
  |  |   46|      0|	}                                                       \
  |  |   47|    823|}
  ------------------
  371|    823|			CC2 (entry->components, 1, 2, val, maxlen)
  ------------------
  |  |   59|    823|#define CC2(number,t1,t2,v,maxlen)                                      \
  |  |   60|    823|{                                                                       \
  |  |   61|    823|	if ((number != t1) && (number != t2)) {                         \
  |  |  ------------------
  |  |  |  Branch (61:6): [True: 823, False: 0]
  |  |  |  Branch (61:24): [True: 0, False: 823]
  |  |  ------------------
  |  |   62|      0|		snprintf (v, maxlen,                                    \
  |  |   63|      0|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|      0|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   64|      0|			"expected %i or %i)."), (int) number,		\
  |  |   65|      0|			(int) t1, (int) t2);  				\
  |  |   66|      0|		break;                                                  \
  |  |   67|      0|	}                                                               \
  |  |   68|    823|}
  ------------------
  372|    823|			vs = exif_get_short (entry->data, entry->order);
  373|    823|			vs2 = ((unsigned int)exif_get_short (entry->data+2, entry->order)) << 16;
  374|       |
  375|       |			/* search the tag */
  376|  1.71k|			for (i = 0; (items2[i].tag && items2[i].tag != entry->tag); i++);
  ------------------
  |  Branch (376:17): [True: 1.36k, False: 348]
  |  Branch (376:34): [True: 894, False: 475]
  ------------------
  377|    823|			if (!items2[i].tag) {
  ------------------
  |  Branch (377:8): [True: 348, False: 475]
  ------------------
  378|    348|				snprintf (val, maxlen,
  379|    348|					  _("Internal error (unknown value %hu %hu)"), vs, vs2);
  ------------------
  |  |   31|    348|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  380|    348|			  	break;
  381|    348|			}
  382|       |
  383|       |			/* find the value */
  384|  1.89k|			for (j = 0; items2[i].elem[j].string && ((items2[i].elem[j].index2 < vs2)
  ------------------
  |  Branch (384:16): [True: 1.89k, False: 0]
  |  Branch (384:45): [True: 0, False: 1.89k]
  ------------------
  385|  1.89k|				|| ((items2[i].elem[j].index2 == vs2) && (items2[i].elem[j].index1 < vs))); j++);
  ------------------
  |  Branch (385:9): [True: 1.64k, False: 254]
  |  Branch (385:46): [True: 1.42k, False: 221]
  ------------------
  386|    475|			if ((items2[i].elem[j].index1 != vs) || (items2[i].elem[j].index2 != vs2)) {
  ------------------
  |  Branch (386:8): [True: 268, False: 207]
  |  Branch (386:44): [True: 0, False: 207]
  ------------------
  387|    268|				snprintf (val, maxlen,
  388|    268|					  _("Internal error (unknown value %hi %hi)"), vs, vs2);
  ------------------
  |  |   31|    268|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  389|    268|				break;
  390|    268|			}
  391|    207|			strncpy (val, _(items2[i].elem[j].string), maxlen);
  ------------------
  |  |   31|    207|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  392|    207|		}
  393|    832|		break;
  394|       |
  395|    832|	case MNOTE_PENTAX_TAG_ZOOM:
  ------------------
  |  Branch (395:2): [True: 522, False: 11.5k]
  ------------------
  396|    522|		CF (entry->format, EXIF_FORMAT_LONG, val, maxlen)
  ------------------
  |  |   37|    522|#define CF(format,target,v,maxlen)                              \
  |  |   38|    522|{                                                               \
  |  |   39|    522|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 225, False: 297]
  |  |  ------------------
  |  |   40|    225|		snprintf (v, maxlen,	                        \
  |  |   41|    225|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    225|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|    225|			"expected '%s'."),                      \
  |  |   43|    225|			exif_format_get_name (format),          \
  |  |   44|    225|			exif_format_get_name (target));         \
  |  |   45|    225|		break;                                          \
  |  |   46|    225|	}                                                       \
  |  |   47|    522|}
  ------------------
  397|    297|		CC (entry->components, 1, val, maxlen)
  ------------------
  |  |   49|    297|#define CC(number,target,v,maxlen)                                      \
  |  |   50|    297|{                                                                       \
  |  |   51|    297|	if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (51:6): [True: 101, False: 196]
  |  |  ------------------
  |  |   52|    101|		snprintf (v, maxlen,                                    \
  |  |   53|    101|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    101|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   54|    101|			"expected %i)."), (int) number, (int) target);  \
  |  |   55|    101|		break;                                                  \
  |  |   56|    101|	}                                                               \
  |  |   57|    297|}
  ------------------
  398|    196|		vl = exif_get_long (entry->data, entry->order);
  399|    196|		snprintf (val, maxlen, "%lu", (long unsigned) vl);
  400|    196|		break;
  401|    540|	case MNOTE_PENTAX_TAG_PRINTIM:
  ------------------
  |  Branch (401:2): [True: 540, False: 11.5k]
  ------------------
  402|    540|		CF (entry->format, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |   37|    540|#define CF(format,target,v,maxlen)                              \
  |  |   38|    540|{                                                               \
  |  |   39|    540|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 259, False: 281]
  |  |  ------------------
  |  |   40|    259|		snprintf (v, maxlen,	                        \
  |  |   41|    259|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    259|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|    259|			"expected '%s'."),                      \
  |  |   43|    259|			exif_format_get_name (format),          \
  |  |   44|    259|			exif_format_get_name (target));         \
  |  |   45|    259|		break;                                          \
  |  |   46|    259|	}                                                       \
  |  |   47|    540|}
  ------------------
  403|    281|		CC (entry->components, 124, val, maxlen)
  ------------------
  |  |   49|    281|#define CC(number,target,v,maxlen)                                      \
  |  |   50|    281|{                                                                       \
  |  |   51|    281|	if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (51:6): [True: 215, False: 66]
  |  |  ------------------
  |  |   52|    215|		snprintf (v, maxlen,                                    \
  |  |   53|    215|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    215|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   54|    215|			"expected %i)."), (int) number, (int) target);  \
  |  |   55|    215|		break;                                                  \
  |  |   56|    215|	}                                                               \
  |  |   57|    281|}
  ------------------
  404|     66|		snprintf (val, maxlen, _("%i bytes unknown data"),
  ------------------
  |  |   31|     66|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  405|     66|			entry->size);
  406|     66|		break;
  407|    434|	case MNOTE_PENTAX_TAG_TZ_CITY:
  ------------------
  |  Branch (407:2): [True: 434, False: 11.6k]
  ------------------
  408|    886|	case MNOTE_PENTAX_TAG_TZ_DST:
  ------------------
  |  Branch (408:2): [True: 452, False: 11.6k]
  ------------------
  409|    886|		CF (entry->format, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |   37|    886|#define CF(format,target,v,maxlen)                              \
  |  |   38|    886|{                                                               \
  |  |   39|    886|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 259, False: 627]
  |  |  ------------------
  |  |   40|    259|		snprintf (v, maxlen,	                        \
  |  |   41|    259|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    259|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|    259|			"expected '%s'."),                      \
  |  |   43|    259|			exif_format_get_name (format),          \
  |  |   44|    259|			exif_format_get_name (target));         \
  |  |   45|    259|		break;                                          \
  |  |   46|    259|	}                                                       \
  |  |   47|    886|}
  ------------------
  410|    627|		CC (entry->components, 4, val, maxlen)
  ------------------
  |  |   49|    627|#define CC(number,target,v,maxlen)                                      \
  |  |   50|    627|{                                                                       \
  |  |   51|    627|	if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (51:6): [True: 365, False: 262]
  |  |  ------------------
  |  |   52|    365|		snprintf (v, maxlen,                                    \
  |  |   53|    365|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    365|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   54|    365|			"expected %i)."), (int) number, (int) target);  \
  |  |   55|    365|		break;                                                  \
  |  |   56|    365|	}                                                               \
  |  |   57|    627|}
  ------------------
  411|    262|		strncpy (val, (char*)entry->data, MIN(maxlen, entry->size));
  ------------------
  |  |  182|    262|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 0, False: 262]
  |  |  ------------------
  ------------------
  412|    262|		break;
  413|    647|	case MNOTE_PENTAX2_TAG_DATE:
  ------------------
  |  Branch (413:2): [True: 647, False: 11.4k]
  ------------------
  414|    647|		CF (entry->format, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |   37|    647|#define CF(format,target,v,maxlen)                              \
  |  |   38|    647|{                                                               \
  |  |   39|    647|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 242, False: 405]
  |  |  ------------------
  |  |   40|    242|		snprintf (v, maxlen,	                        \
  |  |   41|    242|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    242|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|    242|			"expected '%s'."),                      \
  |  |   43|    242|			exif_format_get_name (format),          \
  |  |   44|    242|			exif_format_get_name (target));         \
  |  |   45|    242|		break;                                          \
  |  |   46|    242|	}                                                       \
  |  |   47|    647|}
  ------------------
  415|    405|		CC (entry->components, 4, val, maxlen)
  ------------------
  |  |   49|    405|#define CC(number,target,v,maxlen)                                      \
  |  |   50|    405|{                                                                       \
  |  |   51|    405|	if (number != target) {                                         \
  |  |  ------------------
  |  |  |  Branch (51:6): [True: 205, False: 200]
  |  |  ------------------
  |  |   52|    205|		snprintf (v, maxlen,                                    \
  |  |   53|    205|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    205|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   54|    205|			"expected %i)."), (int) number, (int) target);  \
  |  |   55|    205|		break;                                                  \
  |  |   56|    205|	}                                                               \
  |  |   57|    405|}
  ------------------
  416|       |		/* Note: format is UNDEFINED, not SHORT -> order is fixed: MOTOROLA */
  417|    200|		vs = exif_get_short (entry->data, EXIF_BYTE_ORDER_MOTOROLA);
  418|    200|		snprintf (val, maxlen, "%hi:%02i:%02i", vs, entry->data[2], entry->data[3]);
  419|    200|		break;
  420|    739|	case MNOTE_PENTAX2_TAG_TIME:
  ------------------
  |  Branch (420:2): [True: 739, False: 11.3k]
  ------------------
  421|    739|		CF (entry->format, EXIF_FORMAT_UNDEFINED, val, maxlen)
  ------------------
  |  |   37|    739|#define CF(format,target,v,maxlen)                              \
  |  |   38|    739|{                                                               \
  |  |   39|    739|	if (format != target) {                                 \
  |  |  ------------------
  |  |  |  Branch (39:6): [True: 247, False: 492]
  |  |  ------------------
  |  |   40|    247|		snprintf (v, maxlen,	                        \
  |  |   41|    247|			_("Invalid format '%s', "               \
  |  |  ------------------
  |  |  |  |   31|    247|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   42|    247|			"expected '%s'."),                      \
  |  |   43|    247|			exif_format_get_name (format),          \
  |  |   44|    247|			exif_format_get_name (target));         \
  |  |   45|    247|		break;                                          \
  |  |   46|    247|	}                                                       \
  |  |   47|    739|}
  ------------------
  422|    492|		CC2 (entry->components, 3, 4, val, maxlen)
  ------------------
  |  |   59|    492|#define CC2(number,t1,t2,v,maxlen)                                      \
  |  |   60|    492|{                                                                       \
  |  |   61|    492|	if ((number != t1) && (number != t2)) {                         \
  |  |  ------------------
  |  |  |  Branch (61:6): [True: 283, False: 209]
  |  |  |  Branch (61:24): [True: 217, False: 66]
  |  |  ------------------
  |  |   62|    217|		snprintf (v, maxlen,                                    \
  |  |   63|    217|			_("Invalid number of components (%i, "          \
  |  |  ------------------
  |  |  |  |   31|    217|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  |  |  ------------------
  |  |   64|    217|			"expected %i or %i)."), (int) number,		\
  |  |   65|    217|			(int) t1, (int) t2);  				\
  |  |   66|    217|		break;                                                  \
  |  |   67|    217|	}                                                               \
  |  |   68|    492|}
  ------------------
  423|    275|		snprintf (val, maxlen, "%02i:%02i:%02i", entry->data[0], entry->data[1], entry->data[2]);
  424|    275|		break;
  425|  2.66k|	default:
  ------------------
  |  Branch (425:2): [True: 2.66k, False: 9.45k]
  ------------------
  426|  2.66k|		switch (entry->format) {
  427|    472|		case EXIF_FORMAT_ASCII:
  ------------------
  |  Branch (427:3): [True: 472, False: 2.19k]
  ------------------
  428|    472|		  strncpy (val, (char *)entry->data, MIN(maxlen, entry->size));
  ------------------
  |  |  182|    472|#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (182:21): [True: 255, False: 217]
  |  |  ------------------
  ------------------
  429|    472|		  break;
  430|    355|		case EXIF_FORMAT_SHORT:
  ------------------
  |  Branch (430:3): [True: 355, False: 2.30k]
  ------------------
  431|    355|		  {
  432|    355|			const unsigned char *data = entry->data;
  433|    355|			size_t k, len = strlen(val), sizeleft;
  434|       |
  435|    355|			sizeleft = entry->size;
  436|  79.2k|			for(k=0; k<entry->components; k++) {
  ------------------
  |  Branch (436:13): [True: 78.8k, False: 355]
  ------------------
  437|  78.8k|				if (sizeleft < 2)
  ------------------
  |  Branch (437:9): [True: 0, False: 78.8k]
  ------------------
  438|      0|					break;
  439|  78.8k|				vs = exif_get_short (data, entry->order);
  440|  78.8k|				snprintf (val+len, maxlen-len, "%hu ", vs);
  441|  78.8k|				len = strlen(val);
  442|  78.8k|				data += 2;
  443|  78.8k|				sizeleft -= 2;
  444|  78.8k|			}
  445|    355|		  }
  446|    355|		  break;
  447|    532|		case EXIF_FORMAT_SSHORT:
  ------------------
  |  Branch (447:3): [True: 532, False: 2.13k]
  ------------------
  448|    532|		  {
  449|    532|			const unsigned char *data = entry->data;
  450|    532|			size_t k, len = strlen(val), sizeleft;
  451|       |
  452|    532|			sizeleft = entry->size;
  453|  74.6k|			for(k=0; k<entry->components; k++) {
  ------------------
  |  Branch (453:13): [True: 74.1k, False: 532]
  ------------------
  454|  74.1k|				if (sizeleft < 2)
  ------------------
  |  Branch (454:9): [True: 0, False: 74.1k]
  ------------------
  455|      0|					break;
  456|  74.1k|				vss = exif_get_sshort (data, entry->order);
  457|  74.1k|				snprintf (val+len, maxlen-len, "%hi ", vss);
  458|  74.1k|				len = strlen(val);
  459|  74.1k|				data += 2;
  460|  74.1k|				sizeleft -= 2;
  461|  74.1k|			}
  462|    532|		  }
  463|    532|		  break;
  464|    435|		case EXIF_FORMAT_LONG:
  ------------------
  |  Branch (464:3): [True: 435, False: 2.22k]
  ------------------
  465|    435|		  {
  466|    435|			const unsigned char *data = entry->data;
  467|    435|			size_t k, len = strlen(val), sizeleft;
  468|       |
  469|    435|			sizeleft = entry->size;
  470|  16.9k|			for(k=0; k<entry->components; k++) {
  ------------------
  |  Branch (470:13): [True: 16.5k, False: 435]
  ------------------
  471|  16.5k|				if (sizeleft < 4)
  ------------------
  |  Branch (471:9): [True: 0, False: 16.5k]
  ------------------
  472|      0|					break;
  473|  16.5k|				vl = exif_get_long (data, entry->order);
  474|  16.5k|				snprintf (val+len, maxlen-len, "%lu ", (long unsigned) vl);
  475|  16.5k|				len = strlen(val);
  476|  16.5k|				data += 4;
  477|  16.5k|				sizeleft -= 4;
  478|  16.5k|			}
  479|    435|		  }
  480|    435|		  break;
  481|    436|		case EXIF_FORMAT_SLONG:
  ------------------
  |  Branch (481:3): [True: 436, False: 2.22k]
  ------------------
  482|    436|		  {
  483|    436|			const unsigned char *data = entry->data;
  484|    436|			size_t k, len = strlen(val), sizeleft;
  485|       |
  486|    436|			sizeleft = entry->size;
  487|  27.4k|			for(k=0; k<entry->components; k++) {
  ------------------
  |  Branch (487:13): [True: 26.9k, False: 436]
  ------------------
  488|  26.9k|				if (sizeleft < 4)
  ------------------
  |  Branch (488:9): [True: 0, False: 26.9k]
  ------------------
  489|      0|					break;
  490|  26.9k|				vsl = exif_get_slong (data, entry->order);
  491|  26.9k|				snprintf (val+len, maxlen-len, "%li ", (long int) vsl);
  492|  26.9k|				len = strlen(val);
  493|  26.9k|				data += 4;
  494|  26.9k|				sizeleft -= 4;
  495|  26.9k|			}
  496|    436|		  }
  497|    436|		  break;
  498|      0|		case EXIF_FORMAT_UNDEFINED:
  ------------------
  |  Branch (498:3): [True: 0, False: 2.66k]
  ------------------
  499|    434|		default:
  ------------------
  |  Branch (499:3): [True: 434, False: 2.23k]
  ------------------
  500|    434|		  snprintf (val, maxlen, _("%i bytes unknown data"),
  ------------------
  |  |   31|    434|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  501|    434|			  entry->size);
  502|    434|		  break;
  503|  2.66k|		}
  504|  2.66k|		break;
  505|  12.1k|	}
  506|       |
  507|  12.1k|	return val;
  508|  12.1k|}

mnote_pentax_tag_get_name:
  145|  30.4k|{
  146|  30.4k|	unsigned int i;
  147|       |
  148|  1.35M|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (148:14): [True: 1.34M, False: 4.63k]
  ------------------
  149|  1.34M|		if (table[i].tag == t) return (table[i].name);
  ------------------
  |  Branch (149:7): [True: 25.7k, False: 1.32M]
  ------------------
  150|  4.63k|	return NULL;
  151|  30.4k|}
mnote_pentax_tag_get_title:
  155|  12.1k|{
  156|  12.1k|	unsigned int i;
  157|       |
  158|  12.1k|	(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  159|   399k|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (159:14): [True: 399k, False: 0]
  ------------------
  160|   399k|		if (table[i].tag == t) {
  ------------------
  |  Branch (160:7): [True: 12.1k, False: 387k]
  ------------------
  161|  12.1k|			if (!table[i].title)
  ------------------
  |  Branch (161:8): [True: 0, False: 12.1k]
  ------------------
  162|      0|				return NULL;
  163|  12.1k|			return _(table[i].title);
  ------------------
  |  |   31|  12.1k|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  164|  12.1k|		}
  165|      0|	return NULL;
  166|  12.1k|}
mnote_pentax_tag_get_description:
  170|  12.1k|{
  171|  12.1k|	unsigned int i;
  172|       |
  173|   399k|	for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
  ------------------
  |  Branch (173:14): [True: 399k, False: 0]
  ------------------
  174|   399k|		if (table[i].tag == t) {
  ------------------
  |  Branch (174:7): [True: 12.1k, False: 387k]
  ------------------
  175|  12.1k|			if (!table[i].description || !*table[i].description)
  ------------------
  |  Branch (175:8): [True: 522, False: 11.5k]
  |  Branch (175:33): [True: 11.4k, False: 182]
  ------------------
  176|  11.9k|				return "";
  177|    182|			(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  178|    182|			return _(table[i].description);
  ------------------
  |  |   31|    182|#  define _(String) dgettext (GETTEXT_PACKAGE, String)
  ------------------
  179|  12.1k|		}
  180|      0|	return NULL;
  181|  12.1k|}

