aboutsummaryrefslogtreecommitdiffstats
path: root/src/source-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-08-14 11:36:18 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-08-14 11:36:18 -0300
commit451752b5436f661879b8a3e9d1770d1e1239a257 (patch)
tree68ca24b4b03a580d4b9a34c7340c1c91ef2322ce /src/source-parser.c
parent77ec9dd19ae8445735781840c9b9b535afa0a12a (diff)
downloadblogc-451752b5436f661879b8a3e9d1770d1e1239a257.tar.gz
blogc-451752b5436f661879b8a3e9d1770d1e1239a257.tar.bz2
blogc-451752b5436f661879b8a3e9d1770d1e1239a257.zip
source-parser: forbid BLOGC_VERSION variable in source files
Diffstat (limited to 'src/source-parser.c')
-rw-r--r--src/source-parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/source-parser.c b/src/source-parser.c
index 5c9d41d..f9a60ae 100644
--- a/src/source-parser.c
+++ b/src/source-parser.c
@@ -93,7 +93,9 @@ blogc_source_parse(const char *src, size_t src_len, blogc_error_t **err)
((current - start == 9) &&
(0 == strncmp("PAGE_NEXT", src + start, 9))) ||
((current - start == 9) &&
- (0 == strncmp("PAGE_LAST", src + start, 9))))
+ (0 == strncmp("PAGE_LAST", src + start, 9))) ||
+ ((current - start == 13) &&
+ (0 == strncmp("BLOGC_VERSION", src + start, 13))))
{
*err = blogc_error_new_printf(BLOGC_ERROR_SOURCE_PARSER,
"'%s' variable is forbidden in source files. It will "