diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-04-18 17:17:37 -0300 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-04-18 17:17:37 -0300 |
commit | de39a41da62c4b3820b4805ddb7c4970c36bc257 (patch) | |
tree | 33da0f360932be9c76dd79a05a9bceaaed5a0441 /src/output.c | |
parent | d3e1e90f0979621f741357484e5a8f9656ee4a22 (diff) | |
download | blogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.tar.gz blogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.tar.bz2 blogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.zip |
added loader, error handling and cli. tests needed
Diffstat (limited to 'src/output.c')
-rw-r--r-- | src/output.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/output.c b/src/output.c deleted file mode 100644 index 1664afe..0000000 --- a/src/output.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * blogc: A blog compiler. - * Copyright (C) 2015 Rafael G. Martins <rafael@rafaelmartins.eng.br> - * - * This program can be distributed under the terms of the BSD License. - * See the file COPYING. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - -#include <stdio.h> -#include "utils/utils.h" -#include "output.h" - - -void -blogc_parser_syntax_error(const char *name, const char *src, size_t src_len, - size_t current) -{ - b_string_t *msg = b_string_new(); - - while (current < src_len) { - char c = src[current]; - - if (c == '\r' || c == '\n') - break; - - b_string_append_c(msg, c); - - current++; - } - - fprintf(stderr, "%s parser error: failed to parse input near \"%s\".\n", name, - msg->str); - - b_string_free(msg, true); -} |