pinosaur
/
taskasaur.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
writing board
[taskasaur.git]
/
headers
/
parser.h
diff --git
a/headers/parser.h
b/headers/parser.h
index
4081537
..
e924f3e
100644
(file)
--- a/
headers/parser.h
+++ b/
headers/parser.h
@@
-1,34
+1,53
@@
+#ifndef __PARSER_H__
+#define __PARSER_H__
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <assert.h>
#include <md4c.h>
#include <md4c.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum SubTaskState {
+ SubTaskState_todo,
+ SubTaskState_done
+} SubTaskState;
+
typedef struct SubTask {
char* subtask_name;
typedef struct SubTask {
char* subtask_name;
-
int
done;
+
SubTaskState
done;
} SubTask;
typedef struct TodoItem {
char* item_name;
char* description;
char* due;
} SubTask;
typedef struct TodoItem {
char* item_name;
char* description;
char* due;
- SubTask* subtask_list;
+ SubTask*
*
subtask_list;
int subtask_count;
} TodoItem;
typedef struct TodoList {
char* list_name;
int subtask_count;
} TodoItem;
typedef struct TodoList {
char* list_name;
- TodoItem* item_list;
+ TodoItem*
*
item_list;
int item_count;
} TodoList;
typedef struct Board {
char* board_name;
int item_count;
} TodoList;
typedef struct Board {
char* board_name;
- TodoList* todolist_list;
+ TodoList*
*
todolist_list;
int todolist_count;
} Board;
int todolist_count;
} Board;
-
extern Board* begin_parse(char* board_path);
extern Board* begin_parse(char* board_path);
+extern int begin_write(char* board_path, Board* board);
+extern void log_todo(Board* board);
+
+#ifdef __cplusplus
+}
+#endif
+#endif