diff --git a/src/file_tiff.c b/src/file_tiff.c index 00bc8284..18789e1d 100644 --- a/src/file_tiff.c +++ b/src/file_tiff.c @@ -20,7 +20,7 @@ */ -#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) +#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) || defined(SINGLE_FORMAT_rw2) #ifdef HAVE_CONFIG_H #include #endif @@ -184,7 +184,7 @@ static void register_header_check_tiff(file_stat_t *file_stat) { static const unsigned char tiff_header_be[4]= { 'M','M',0x00, 0x2a}; static const unsigned char tiff_header_le[4]= { 'I','I',0x2a, 0x00}; -#if !defined(SINGLE_FORMAT_jpg) +#if !defined(SINGLE_FORMAT_jpg) && !defined(SINGLE_FORMAT_rw2) #if !defined(MAIN_tiff_le) && !defined(MAIN_jpg) register_header_check(0, tiff_header_be, sizeof(tiff_header_be), &header_check_tiff_be, file_stat); #endif diff --git a/src/file_tiff.h b/src/file_tiff.h index 7420461d..47d7b966 100644 --- a/src/file_tiff.h +++ b/src/file_tiff.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_TIFF_H +#define _FILE_TIFF_H #ifdef __cplusplus extern "C" { #endif @@ -105,7 +107,9 @@ unsigned int find_tag_from_tiff_header_le(const unsigned char *buffer, const uns @ ensures valid_read_string(fr->extension); @*/ void file_check_tiff_le(file_recovery_t *fr); +#endif +#if !defined(MAIN_tiff_be) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) && !defined(SINGLE_FORMAT_rw2) /*@ @ requires buffer_size > 0; @ requires \valid_read(buffer+(0..buffer_size-1)); @@ -150,7 +154,7 @@ int header_check_tiff_le(const unsigned char *buffer, const unsigned int buffer_ unsigned int find_tag_from_tiff_header_be(const unsigned char*buffer, const unsigned int tiff_size, const unsigned int tag, const unsigned char**potential_error); #endif -#if !defined(MAIN_tiff_le) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) +#if !defined(MAIN_tiff_le) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) && !defined(SINGLE_FORMAT_rw2) /*@ @ requires buffer_size > 0; @ requires \valid_read(buffer+(0..buffer_size-1)); @@ -195,3 +199,4 @@ const char *tag_name(unsigned int tag); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c index 4cfeb69c..cc8c7ba5 100644 --- a/src/file_tiff_be.c +++ b/src/file_tiff_be.c @@ -20,7 +20,7 @@ */ -#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) +#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) || defined(SINGLE_FORMAT_rw2) #ifdef HAVE_CONFIG_H #include #endif @@ -382,7 +382,7 @@ static uint64_t tiff_be_makernote(FILE *in, const uint32_t tiff_diroff) #endif #endif -#if !defined(MAIN_tiff_le) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) +#if !defined(MAIN_tiff_le) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) && !defined(SINGLE_FORMAT_rw2) static uint64_t file_check_tiff_be_aux(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count); /*@ diff --git a/src/file_tiff_le.c b/src/file_tiff_le.c index 034e0759..196b1c22 100644 --- a/src/file_tiff_le.c +++ b/src/file_tiff_le.c @@ -20,7 +20,7 @@ */ -#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) +#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_tiff) || defined(SINGLE_FORMAT_jpg) || defined(SINGLE_FORMAT_rw2) #ifdef HAVE_CONFIG_H #include #endif @@ -755,7 +755,7 @@ void file_check_tiff_le(file_recovery_t *fr) } #endif -#if !defined(MAIN_tiff_be) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) +#if !defined(MAIN_tiff_be) && !defined(MAIN_jpg) && !defined(SINGLE_FORMAT_jpg) && !defined(SINGLE_FORMAT_rw2) /*@ @ requires separation: \separated(&file_hint_tiff, buffer+(..), file_recovery, file_recovery_new); @ ensures (\result == 1) ==> (file_recovery_new->extension == file_hint_tiff.extension ||