summaryrefslogtreecommitdiffstats
path: root/src/file_rdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_rdc.c')
-rw-r--r--src/file_rdc.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/file_rdc.c b/src/file_rdc.c
index 8575327..883bc29 100644
--- a/src/file_rdc.c
+++ b/src/file_rdc.c
@@ -30,9 +30,7 @@
#include "types.h"
#include "filegen.h"
-
static void register_header_check_rdc(file_stat_t *file_stat);
-static int header_check_rdc(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_rdc= {
.extension="rdc",
@@ -44,23 +42,16 @@ const file_hint_t file_hint_rdc= {
.register_header_check=&register_header_check_rdc
};
-static const unsigned char rdc_header[9]= {'D','S','C','-','I','m','a','g','e'};
-
-static void register_header_check_rdc(file_stat_t *file_stat)
-{
- register_header_check(0, rdc_header,sizeof(rdc_header), &header_check_rdc, file_stat);
-}
-
static int header_check_rdc(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)
{
/* Rollei */
- if(memcmp(buffer, rdc_header, sizeof(rdc_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_rdc.extension;
- return 1;
- }
- return 0;
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_rdc.extension;
+ return 1;
}
-
+static void register_header_check_rdc(file_stat_t *file_stat)
+{
+ static const unsigned char rdc_header[9]= {'D','S','C','-','I','m','a','g','e'};
+ register_header_check(0, rdc_header,sizeof(rdc_header), &header_check_rdc, file_stat);
+}