summaryrefslogtreecommitdiffstats
path: root/src/file_tax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_tax.c')
-rw-r--r--src/file_tax.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/file_tax.c b/src/file_tax.c
index 27846af..637e69c 100644
--- a/src/file_tax.c
+++ b/src/file_tax.c
@@ -32,7 +32,6 @@
static void register_header_check_tax(file_stat_t *file_stat);
-static int header_check_tax(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_tax= {
.extension="tax",
@@ -44,20 +43,15 @@ const file_hint_t file_hint_tax= {
.register_header_check=&register_header_check_tax
};
-static const unsigned char tax_header[6]= { 'T', 'T', 'F', 'N', 0x01, 0x01};
-
-static void register_header_check_tax(file_stat_t *file_stat)
+static int header_check_tax(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(0, tax_header, sizeof(tax_header), &header_check_tax, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_tax.extension;
+ return 1;
}
-static int header_check_tax(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_tax(file_stat_t *file_stat)
{
- if(memcmp(buffer, tax_header, sizeof(tax_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_tax.extension;
- return 1;
- }
- return 0;
+ static const unsigned char tax_header[6]= { 'T', 'T', 'F', 'N', 0x01, 0x01};
+ register_header_check(0, tax_header, sizeof(tax_header), &header_check_tax, file_stat);
}