diff options
author | Camil Staps | 2016-09-25 00:05:07 +0200 |
---|---|---|
committer | Camil Staps | 2016-09-25 00:05:07 +0200 |
commit | 1cd75335f0878864acb89d9a2818a971701ef680 (patch) | |
tree | 349382d6882cf239461d518ff78f2c8a81e73569 /interpreter/print.c | |
parent | Made parse_file implementation dependent (diff) |
Cleanup: unsigned -> bool (stdbool.h)
Diffstat (limited to 'interpreter/print.c')
-rw-r--r-- | interpreter/print.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/interpreter/print.c b/interpreter/print.c index bb6c03e..78976c2 100644 --- a/interpreter/print.c +++ b/interpreter/print.c @@ -1,9 +1,8 @@ #include "print.h" -#include <stdio.h> - #ifdef _FUSPEL_DEBUG #include <inttypes.h> +#include <stdbool.h> #endif #include "log.h" @@ -139,7 +138,7 @@ void push_visited_node(struct visited_nodes *list, struct node *node) { list->next->node = node; } -unsigned visited_node_exists(struct visited_nodes *list, struct node *node) { +bool visited_node_exists(struct visited_nodes *list, struct node *node) { while (list) { if (list->node == node) return 1; @@ -149,8 +148,8 @@ unsigned visited_node_exists(struct visited_nodes *list, struct node *node) { } void print_node_to_file(struct node* node, FILE* f, struct visited_nodes *visited) { - unsigned close = 0; - unsigned do_free_visited = 0; + bool close = 0; + bool do_free_visited = 0; if (visited_node_exists(visited, node)) return; @@ -164,7 +163,6 @@ void print_node_to_file(struct node* node, FILE* f, struct visited_nodes *visite if (!f) { char fname[20]; - printf(" === Drawing graph %d ===\n", file_count); sprintf(fname, "graph-%03u.dot", file_count++); f = fopen(fname, "w"); fprintf(f, "digraph {\n"); |