/* fwd decl */
struct _KFile;
+typedef int32_t kfile_off_t;
+
/**
* Costants for repositioning read/write file offset.
* These are needed because on some embedded platforms
typedef size_t (*ReadFunc_t) (struct _KFile *fd, void *buf, size_t size);
typedef size_t (*WriteFunc_t) (struct _KFile *fd, const void *buf, size_t size);
-typedef int32_t (*SeekFunc_t) (struct _KFile *fd, int32_t offset, KSeekMode whence);
+typedef kfile_off_t (*SeekFunc_t) (struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
typedef bool (*OpenFunc_t) (struct _KFile *fd, const char *name, int mode);
typedef bool (*CloseFunc_t) (struct _KFile *fd);
uint32_t size;
} KFile;
+
+/*
+ * Generic implementation of seek function.
+ */
+kfile_off_t kfile_seek(struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
+
+/*
+ * Kfile test function
+ */
+bool kfile_test(uint8_t *buf, size_t _size , uint8_t *save_buf, size_t save_buf_size);
+
#endif /* MWARE_KFILE_H */