summaryrefslogtreecommitdiffstats
path: root/src/file_atd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_atd.c')
-rw-r--r--src/file_atd.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/file_atd.c b/src/file_atd.c
index e85c1c8..3a20696 100644
--- a/src/file_atd.c
+++ b/src/file_atd.c
@@ -31,7 +31,6 @@
#include "filegen.h"
static void register_header_check_atd(file_stat_t *file_stat);
-static int header_check_atd(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_atd= {
.extension="atd",
@@ -43,22 +42,17 @@ const file_hint_t file_hint_atd= {
.register_header_check=&register_header_check_atd
};
-static const unsigned char atd_header[16]= {
- 'A' ,'B' ,'S' ,'0' ,'L' ,'U' ,'T' ,'E' ,
- 'D' ,'A' ,'T' ,'A' ,'B' ,'A' ,'S' ,'E' };
-
-static void register_header_check_atd(file_stat_t *file_stat)
+static int header_check_atd(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, atd_header,sizeof(atd_header), &header_check_atd, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_atd.extension;
+ return 1;
}
-static int header_check_atd(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_atd(file_stat_t *file_stat)
{
- if(memcmp(buffer,atd_header,sizeof(atd_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_atd.extension;
- return 1;
- }
- return 0;
+ static const unsigned char atd_header[16]= {
+ 'A' ,'B' ,'S' ,'0' ,'L' ,'U' ,'T' ,'E' ,
+ 'D' ,'A' ,'T' ,'A' ,'B' ,'A' ,'S' ,'E' };
+ register_header_check(0, atd_header,sizeof(atd_header), &header_check_atd, file_stat);
}