#if !defined(TYPE_DEF_H_H) #define TYPE_DEF_H_H #define NUM_BLOCKS 4000 #define BLOCK_SIZE 1000 #define ERROR -1 #define NO_ERROR 0 #define FREE_BLOCK_FLAG 0 #define END_BLOCK_FLAG 1 #define MAX_OPEN_FILES 10 #define IS_FILE_FLAG 0x00 #define IS_DIR_FLAG 0x01 #define OPEN_SLOT_USED 1 #define OPEN_SLOT_FREE 0 #include #include typedef struct { int block_size; int file_system_size; int root_dir_block; int root_dir_size; int fat_size; int first_data_block; } BOOT_AREA; typedef struct { char fname[28]; time_t timestamp; int attribute; int start_block; int size; } FILE_DIR_ENTRY; typedef struct { char path[256]; int size; int nentries; FILE_DIR_ENTRY *entries; int updated_flag; int start_block; } CURR_DIR; typedef struct { int start_block; int pos; int size; int curr_block; int curr_block_pos; int flag; } OPEN_FILE; typedef unsigned int FAT_ENTRY; #endif