Add first batch of tests
and fix some issues.
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MINIFFS_VERSION_MAJOR (1)
|
||||
#define MINIFFS_VERSION_MINOR (0)
|
||||
#define MINIFFS_FILENAME_LENGTH (8)
|
||||
@@ -56,7 +60,7 @@ typedef struct miniffs_header_t
|
||||
/* Somewhat similar structure to the plain C FILE structure */
|
||||
typedef struct file_t
|
||||
{
|
||||
void *private;
|
||||
void *private_data;
|
||||
fileentry_t *fent; /***< file linked to this structure */
|
||||
uint32_t offset; /***< current position in the file */
|
||||
} file_t;
|
||||
@@ -68,7 +72,8 @@ typedef struct file_t
|
||||
#endif
|
||||
#define MINIFFS_MAGIC MAKE4('M', 'F', 'F', 'S')
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
MFFS_SEEK_SET, /***< Seek from beginning of file */
|
||||
MFFS_SEEK_CUR, /***< Seek from current position */
|
||||
MFFS_SEEK_END /***< Seek from end of file */
|
||||
@@ -123,4 +128,8 @@ void miniffs_seterror(miniffs_error_t err);
|
||||
void *miniffs_getfileaddr(miniffs_t *fs, fileentry_t *fent);
|
||||
#endif /* __miniffs_internal */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MINIFFS_H */
|
||||
|
||||
Reference in New Issue
Block a user