summaryrefslogtreecommitdiffstats
path: root/src/file_wnk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_wnk.c')
-rw-r--r--src/file_wnk.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/file_wnk.c b/src/file_wnk.c
index 271b1b0..3bd95d2 100644
--- a/src/file_wnk.c
+++ b/src/file_wnk.c
@@ -31,7 +31,6 @@
#include "filegen.h"
static void register_header_check_wnk(file_stat_t *file_stat);
-static int header_check_wnk(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_wnk= {
.extension="wnk",
@@ -43,20 +42,15 @@ const file_hint_t file_hint_wnk= {
.register_header_check=&register_header_check_wnk
};
-static const unsigned char wnk_header[6]= {'R','P','K','W','I',0x02};
-
-static void register_header_check_wnk(file_stat_t *file_stat)
+static int header_check_wnk(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, wnk_header,sizeof(wnk_header), &header_check_wnk, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_wnk.extension;
+ return 1;
}
-static int header_check_wnk(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_wnk(file_stat_t *file_stat)
{
- if(memcmp(buffer, wnk_header, sizeof(wnk_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_wnk.extension;
- return 1;
- }
- return 0;
+ static const unsigned char wnk_header[6]= {'R','P','K','W','I',0x02};
+ register_header_check(0, wnk_header,sizeof(wnk_header), &header_check_wnk, file_stat);
}