aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-11-04 01:28:43 -0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-11-04 01:28:43 -0200
commit0fe9ed29207c428deda6c960c81359113f1d3384 (patch)
treee924ab90fb3449eb64155edb07877819556e1e67 /src
parent56736b7b39218c10efd64f305f7a35df9d4bc0af (diff)
downloadblogc-0fe9ed29207c428deda6c960c81359113f1d3384.tar.gz
blogc-0fe9ed29207c428deda6c960c81359113f1d3384.tar.bz2
blogc-0fe9ed29207c428deda6c960c81359113f1d3384.zip
Revert "content-parser: handle errors (that are handler as warnings) in directives"
This reverts commit 56736b7b39218c10efd64f305f7a35df9d4bc0af.
Diffstat (limited to 'src')
-rw-r--r--src/content-parser.c5
-rw-r--r--src/directives.c5
-rw-r--r--src/directives.h3
-rw-r--r--src/error.c3
-rw-r--r--src/error.h1
5 files changed, 4 insertions, 13 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index a9ab9af..042f308 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -1114,11 +1114,8 @@ hr:
case CONTENT_DIRECTIVE_PARAM_END:
param_end:
if (c == '\n' || c == '\r' || is_last) {
- // FIXME: handle errors in the rest of the parser.
- blogc_error_t *err = NULL;
char *rv_d = blogc_directive_loader(directive_name,
- directive_argument, directive_params, &err);
- blogc_error_print(err);
+ directive_argument, directive_params);
if (rv_d != NULL)
b_string_append(rv, rv_d);
free(rv_d);
diff --git a/src/directives.c b/src/directives.c
index 5ff3b4d..7a6b47f 100644
--- a/src/directives.c
+++ b/src/directives.c
@@ -11,11 +11,10 @@
#endif /* HAVE_CONFIG_H */
#include "utils/utils.h"
-#include "error.h"
+
char*
-blogc_directive_loader(const char *name, const char *argument, b_trie_t *params,
- blogc_error_t **err)
+blogc_directive_loader(const char *name, const char *argument, b_trie_t *params)
{
// TODO: implement me!
return b_strdup("TODO\n");
diff --git a/src/directives.h b/src/directives.h
index d03102a..fa758e2 100644
--- a/src/directives.h
+++ b/src/directives.h
@@ -10,9 +10,8 @@
#define _DIRECTIVES_H
#include "utils/utils.h"
-#include "error.h"
char* blogc_directive_loader(const char *name, const char *argument,
- b_trie_t *params, blogc_error_t **err);
+ b_trie_t *params);
#endif /* _DIRECTIVES_H */
diff --git a/src/error.c b/src/error.c
index e472d1f..28396f8 100644
--- a/src/error.c
+++ b/src/error.c
@@ -125,9 +125,6 @@ blogc_error_print(blogc_error_t *err)
case BLOGC_WARNING_DATETIME_PARSER:
fprintf(stderr, "blogc: warning: datetime: %s\n", err->msg);
break;
- case BLOGC_WARNING_CONTENT_PARSER:
- fprintf(stderr, "blogc: warning: content: %s\n", err->msg);
- break;
default:
fprintf(stderr, "blogc: error: %s\n", err->msg);
}
diff --git a/src/error.h b/src/error.h
index 02ccc96..845a316 100644
--- a/src/error.h
+++ b/src/error.h
@@ -17,7 +17,6 @@ typedef enum {
BLOGC_ERROR_TEMPLATE_PARSER,
BLOGC_ERROR_LOADER,
BLOGC_WARNING_DATETIME_PARSER,
- BLOGC_WARNING_CONTENT_PARSER,
} blogc_error_type_t;
typedef struct {