summaryrefslogtreecommitdiffstats
path: root/src/file_imb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_imb.c')
-rw-r--r--src/file_imb.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/file_imb.c b/src/file_imb.c
index 5e330b7..76b4fc0 100644
--- a/src/file_imb.c
+++ b/src/file_imb.c
@@ -30,9 +30,7 @@
#include "types.h"
#include "filegen.h"
-
static void register_header_check_imb(file_stat_t *file_stat);
-static int header_check_imb(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
const file_hint_t file_hint_imb= {
.extension="imb",
@@ -44,21 +42,16 @@ const file_hint_t file_hint_imb= {
.register_header_check=&register_header_check_imb
};
-static const unsigned char imb_header[15]= { 0x00, 0x00, 0x00, 'I','n','c','r','e','d','i','m','a','i','l',' '};
-
-static void register_header_check_imb(file_stat_t *file_stat)
+static int header_check_imb(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- register_header_check(1, imb_header,sizeof(imb_header), &header_check_imb, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_imb.extension;
+ file_recovery_new->min_filesize=16;
+ return 1;
}
-static int header_check_imb(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+static void register_header_check_imb(file_stat_t *file_stat)
{
- if(memcmp(buffer+1,imb_header,sizeof(imb_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_imb.extension;
- file_recovery_new->min_filesize=16;
- return 1;
- }
- return 0;
+ static const unsigned char imb_header[15]= { 0x00, 0x00, 0x00, 'I','n','c','r','e','d','i','m','a','i','l',' '};
+ register_header_check(1, imb_header,sizeof(imb_header), &header_check_imb, file_stat);
}