+char*
+read_file(char* file_name, long* size)
+{ // apparently using seek isnt the greatest, may change to chunk reading later
+ FILE* file;
+ char* output;
+ long fsize;
+
+ file = fopen(file_name, "r");
+ if (file == NULL) {
+ printf("Something went wrong opening file\n");
+ return NULL;
+ }
+
+ fseek(file, 0, SEEK_END);
+ fsize = ftell(file);
+ fseek(file, 0, SEEK_SET);
+
+ output = malloc(fsize+1); // maybe error check malloc
+ fread(output, 1, fsize, file);
+ if (ferror(file)) {
+ printf("Something went wrong reading file\n");
+ fclose(file);
+ free(output);
+ return NULL;
+ }
+ output[fsize] = 0; // add null terminator
+
+ /* clean up */
+ fclose(file);
+
+ /* return */
+ *size = fsize;
+ return output;
+}
+
+Board*
+begin_parse(char* board_path)
+{
+ const char* input_buffer;
+ long input_size;
+ State* state;
+ Board* new_board;
+
+ /* read entire file */
+ input_buffer = read_file(board_path, &input_size);
+
+ /* setup state */
+ state = malloc(sizeof(State));
+ state->cur_todolist = NULL;
+ state->cur_todoitem = NULL;
+
+ new_board = malloc(sizeof(Board));
+ new_board->todolist_list = malloc(0);
+ new_board->todolist_count = 0;
+ state->board = new_board;
+
+ md_parse(input_buffer, input_size, &parser, state);
+
+ /* finish calls */
+ exit_todolist(state);
+
+ free((char*)input_buffer);
+
+ return state->board;
+}
+
+void
+enter_todolist(State* state, char* list_name)