summaryrefslogtreecommitdiffstats
path: root/src/file_xsv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_xsv.c')
-rw-r--r--src/file_xsv.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/file_xsv.c b/src/file_xsv.c
index 1831bba..da38a48 100644
--- a/src/file_xsv.c
+++ b/src/file_xsv.c
@@ -44,23 +44,18 @@ const file_hint_t file_hint_xsv= {
.register_header_check=&register_header_check_xsv
};
-static const unsigned char xsv_header[9]= {'B','L','O','C', 'K', 'L', 0xDC, 0x1D, 'd'};
-
-static void register_header_check_xsv(file_stat_t *file_stat)
+static int header_check_xsv(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(20, xsv_header,sizeof(xsv_header), &header_check_xsv, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_xsv.extension;
+ file_recovery_new->calculated_file_size=202772;
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ return 1;
}
-static int header_check_xsv(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_xsv(file_stat_t *file_stat)
{
- if(memcmp(buffer + 20, xsv_header, sizeof(xsv_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_xsv.extension;
- file_recovery_new->calculated_file_size=202772;
- file_recovery_new->data_check=&data_check_size;
- file_recovery_new->file_check=&file_check_size;
- return 1;
- }
- return 0;
+ static const unsigned char xsv_header[9]= {'B','L','O','C', 'K', 'L', 0xDC, 0x1D, 'd'};
+ register_header_check(20, xsv_header,sizeof(xsv_header), &header_check_xsv, file_stat);
}