From e619bc1e0f289ddc37b44afeac541450a1ed46a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 10 Feb 2019 15:38:04 +0100 Subject: Replace printf/puts with INFO/ERR. --- main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 6b312ec1..042cc83d 100644 --- a/main.c +++ b/main.c @@ -7,6 +7,7 @@ #include "macro.h" #include "vcal.h" #include "graphs.h" +#include "err.h" typedef struct { int argc; @@ -25,7 +26,7 @@ int main (int argc, char* argv[argc]) { arg args = { .argc = argc, .argv = argv }; if (arg_shift(&args) == 0) { - puts("Please give vdir or a vcalendar file as first argument"); + ERR("Please give vdir or a vcalendar file as first argument"); exit (1); } @@ -36,9 +37,8 @@ int main (int argc, char* argv[argc]) { arg_shift(&args); if (args.argc == 0 || strcmp(args.argv[0], "-p") == 0) { - printf("\nParsed calendar file containing [%u] events\n", - root.components.length - ); + INFO_F("\nParsed calendar file containing [%u] events", + root.components.length); for (size_t i = 0; i < root.components.length; i++) { vcomponent* cal = GET(VECT(vcomponent))(&root.components, i); assert(strcmp(cal->type, "VCALENDAR") == 0); @@ -73,8 +73,8 @@ int main (int argc, char* argv[argc]) { } } else { // create_graph(FCHILD(FCHILD(&root)), args.argv[0]); - puts("Creating graph for single file"); - printf("output = %s\n", args.argv[0]); + INFO("Creating graph for single file"); + INFO_F("output = %s\n", args.argv[0]); create_graph_vcomponent(&root, args.argv[0]); } } -- cgit v1.2.3