summaryrefslogtreecommitdiffstats
path: root/src/file_skp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_skp.c')
-rw-r--r--src/file_skp.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/file_skp.c b/src/file_skp.c
index 94c1aac..ab89e8d 100644
--- a/src/file_skp.c
+++ b/src/file_skp.c
@@ -31,7 +31,6 @@
#include "filegen.h"
static void register_header_check_skp(file_stat_t *file_stat);
-static int header_check_skp(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_skp= {
.extension="skp",
@@ -43,22 +42,17 @@ const file_hint_t file_hint_skp= {
.register_header_check=&register_header_check_skp
};
-static const unsigned char skp_header[32]= {
- 0xff, 0xfe, 0xff, 0x0e, 'S', 0x00, 'k', 0x00, 'e', 0x00, 't', 0x00, 'c', 0x00, 'h', 0x00,
- 'U', 0x00, 'p', 0x00, ' ', 0x00, 'M', 0x00, 'o', 0x00, 'd', 0x00, 'e', 0x00, 'l', 0x00 };
-
-static void register_header_check_skp(file_stat_t *file_stat)
+static int header_check_skp(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, skp_header,sizeof(skp_header), &header_check_skp, file_stat);
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_skp.extension;
+ return 1;
}
-static int header_check_skp(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_skp(file_stat_t *file_stat)
{
- if(memcmp(buffer,skp_header, sizeof(skp_header))==0)
- {
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_skp.extension;
- return 1;
- }
- return 0;
+ static const unsigned char skp_header[32]= {
+ 0xff, 0xfe, 0xff, 0x0e, 'S', 0x00, 'k', 0x00, 'e', 0x00, 't', 0x00, 'c', 0x00, 'h', 0x00,
+ 'U', 0x00, 'p', 0x00, ' ', 0x00, 'M', 0x00, 'o', 0x00, 'd', 0x00, 'e', 0x00, 'l', 0x00 };
+ register_header_check(0, skp_header,sizeof(skp_header), &header_check_skp, file_stat);
}