diff options
Diffstat (limited to 'libcnary/cnary.c')
| -rw-r--r-- | libcnary/cnary.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libcnary/cnary.c b/libcnary/cnary.c new file mode 100644 index 0000000..3e55fce --- /dev/null +++ b/libcnary/cnary.c | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * cnary.c | ||
| 3 | * | ||
| 4 | * Created on: Mar 9, 2011 | ||
| 5 | * Author: posixninja | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <stdio.h> | ||
| 9 | |||
| 10 | #include "node.h" | ||
| 11 | |||
| 12 | int main(int argc, char* argv[]) { | ||
| 13 | puts("Creating root node"); | ||
| 14 | node_t* root = node_create(NULL, NULL); | ||
| 15 | |||
| 16 | puts("Creating child 1 node"); | ||
| 17 | node_t* one = node_create(root, NULL); | ||
| 18 | puts("Creating child 2 node"); | ||
| 19 | node_t* two = node_create(root, NULL); | ||
| 20 | |||
| 21 | puts("Creating child 3 node"); | ||
| 22 | node_t* three = node_create(one, NULL); | ||
| 23 | |||
| 24 | puts("Debugging root node"); | ||
| 25 | node_debug(root); | ||
| 26 | |||
| 27 | puts("Destroying root node"); | ||
| 28 | node_destroy(root); | ||
| 29 | return 0; | ||
| 30 | } | ||
