From 0c67cae6e45b77b29c8450c721491b32c56258fa Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 28 May 2015 01:35:32 -0300 Subject: source-parser: fixed reserved variables --- src/source-parser.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/source-parser.c b/src/source-parser.c index d7dddc7..f0fca29 100644 --- a/src/source-parser.c +++ b/src/source-parser.c @@ -81,7 +81,17 @@ blogc_source_parse(const char *src, size_t src_len, blogc_error_t **err) ((current - start == 20) && (0 == strncmp("DATE_FIRST_FORMATTED", src + start, 20))) || ((current - start == 19) && - (0 == strncmp("DATE_LAST_FORMATTED", src + start, 19)))) + (0 == strncmp("DATE_LAST_FORMATTED", src + start, 19))) || + ((current - start == 10) && + (0 == strncmp("PAGE_FIRST", src + start, 10))) || + ((current - start == 13) && + (0 == strncmp("PAGE_PREVIOUS", src + start, 13))) || + ((current - start == 12) && + (0 == strncmp("PAGE_CURRENT", src + start, 12))) || + ((current - start == 9) && + (0 == strncmp("PAGE_NEXT", src + start, 9))) || + ((current - start == 9) && + (0 == strncmp("PAGE_LAST", src + start, 9)))) { *err = blogc_error_new_printf(BLOGC_ERROR_SOURCE_PARSER, "'%s' variable is forbidden in source files. It will " -- cgit v1.2.3-18-g5258