From 4763814c683c50f8a3697b74e764f19c3dacccd5 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Mon, 2 Sep 2019 23:38:48 +0200 Subject: migrate codebase to use squareball. again :) --- src/blogc-make/main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/blogc-make/main.c') diff --git a/src/blogc-make/main.c b/src/blogc-make/main.c index 5b4a030..9b4bce0 100644 --- a/src/blogc-make/main.c +++ b/src/blogc-make/main.c @@ -14,8 +14,8 @@ #include #include #include -#include "../common/error.h" -#include "../common/utils.h" +#include + #include "ctx.h" #include "rules.h" @@ -60,9 +60,9 @@ main(int argc, char **argv) setlocale(LC_ALL, ""); int rv = 0; - bc_error_t *err = NULL; + sb_error_t *err = NULL; - bc_slist_t *rules = NULL; + sb_slist_t *rules = NULL; bool verbose = false; bool dev = false; char *blogcfile = NULL; @@ -85,9 +85,9 @@ main(int argc, char **argv) break; case 'f': if (argv[i][2] != '\0') - blogcfile = bc_strdup(argv[i] + 2); + blogcfile = sb_strdup(argv[i] + 2); else if (i + 1 < argc) - blogcfile = bc_strdup(argv[++i]); + blogcfile = sb_strdup(argv[++i]); break; #ifdef MAKE_EMBEDDED case 'm': @@ -103,18 +103,18 @@ main(int argc, char **argv) } } else { - rules = bc_slist_append(rules, bc_strdup(argv[i])); + rules = sb_slist_append(rules, sb_strdup(argv[i])); } } if (rules == NULL) { - rules = bc_slist_append(rules, bc_strdup("all")); + rules = sb_slist_append(rules, sb_strdup("all")); } ctx = bm_ctx_new(NULL, blogcfile ? blogcfile : "blogcfile", argc > 0 ? argv[0] : NULL, &err); if (err != NULL) { - bc_error_print(err, "blogc-make"); + fprintf(stderr, "blogc-make: error: %s\n", sb_error_to_string(err)); rv = 1; goto cleanup; } @@ -125,10 +125,10 @@ main(int argc, char **argv) cleanup: - bc_slist_free_full(rules, free); + sb_slist_free_full(rules, free); free(blogcfile); bm_ctx_free(ctx); - bc_error_free(err); + sb_error_free(err); return rv; } -- cgit v1.2.3-18-g5258