comparison src/format_raw.c @ 495:c7a2471e5c4e

Introduce macros to display debug messages. if (debug) printf(...) is now replaced by variadic macros: DEBUG_1() And for higher debugging levels: DEBUG_2() DEBUG_3() DEBUG_4()
author zas_
date Wed, 23 Apr 2008 20:47:19 +0000
parents 48c8e49b571c
children fc9c8a3e1a8b
comparison
equal deleted inserted replaced
494:3bb9a8df6ee9 495:c7a2471e5c4e
242 guint eo = 0; 242 guint eo = 0;
243 gint found; 243 gint found;
244 244
245 if (!entry || !entry->func_parse) return FALSE; 245 if (!entry || !entry->func_parse) return FALSE;
246 246
247 if (debug) printf("RAW using file parser for %s\n", entry->description); 247 DEBUG_1("RAW using file parser for %s\n", entry->description);
248 248
249 found = entry->func_parse(data, len, &io, &eo); 249 found = entry->func_parse(data, len, &io, &eo);
250 250
251 if (!found || 251 if (!found ||
252 io >= len - 4 || 252 io >= len - 4 ||
332 i++; 332 i++;
333 } 333 }
334 334
335 if (!match) return FALSE; 335 if (!match) return FALSE;
336 336
337 if (debug) printf("RAW file parser extension match\n"); 337 DEBUG_1("RAW file parser extension match\n");
338 } 338 }
339 339
340 /* FIXME: 340 /* FIXME:
341 * when the target is a tiff file it should be mmaped prior to format_raw_find as 341 * when the target is a tiff file it should be mmaped prior to format_raw_find as
342 * the make field data may not always be within header_data + header_len 342 * the make field data may not always be within header_data + header_len
425 425
426 entry = format_exif_makernote_find(exif, tiff, offset, size); 426 entry = format_exif_makernote_find(exif, tiff, offset, size);
427 427
428 if (!entry || !entry->func_parse) return FALSE; 428 if (!entry || !entry->func_parse) return FALSE;
429 429
430 if (debug) printf("EXIF using makernote parser for %s\n", entry->description); 430 DEBUG_1("EXIF using makernote parser for %s\n", entry->description);
431 431
432 return entry->func_parse(exif, tiff, offset, size, bo); 432 return entry->func_parse(exif, tiff, offset, size, bo);
433 } 433 }
434 434
435 /* 435 /*