diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 15:38:04 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 15:38:04 +0100 |
commit | e619bc1e0f289ddc37b44afeac541450a1ed46a1 (patch) | |
tree | 46b6442d3c7dd33993f7371492b8e66feca9e60e /graphs.c | |
parent | Add PRINT macro. (diff) | |
download | calp-e619bc1e0f289ddc37b44afeac541450a1ed46a1.tar.gz calp-e619bc1e0f289ddc37b44afeac541450a1ed46a1.tar.xz |
Replace printf/puts with INFO/ERR.
Diffstat (limited to 'graphs.c')
-rw-r--r-- | graphs.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2,6 +2,8 @@ #include <stdio.h> #include <errno.h> +#include <string.h> +#include "err.h" int create_graph_trie (vcomponent* ev, char* filename) { FILE* f = fopen(filename, "w"); @@ -12,7 +14,6 @@ int create_graph_trie (vcomponent* ev, char* filename) { fclose(f); - printf("Wrote '%s' to '%s'\n", ev->filename, filename); return 0; } @@ -36,6 +37,7 @@ int attr_helper(TRIE_NODE(content_line)* root, FILE* f) { attr_helper(root->child, f); child = child->next; } + INFO_F("Wrote '%s' to '%s'", ev->filename, filename); return 0; } @@ -80,7 +82,7 @@ int helper_vcomponent (vcomponent* root, FILE* f) { int create_graph_vcomponent (vcomponent* root, char* outfile) { FILE* f = fopen(outfile, "w"); if (f == NULL) { - printf("Error opening file %s, errno = %i\n", outfile, errno); + ERR_F("Error opening file %s, errno = %i", outfile, errno); return 1; } vcomponent* c = root; |