aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-13 23:58:03 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-13 23:58:03 +0100
commit3d93f3a5e165ec12b97a269ef8fe599981e61e92 (patch)
tree1532243fc5e3fbdf67db467d572bac4cae95cc55
parent095714cb2d6409afeee0b1df82b4a543b961efcd (diff)
downloadblogc-3d93f3a5e165ec12b97a269ef8fe599981e61e92.tar.gz
blogc-3d93f3a5e165ec12b97a269ef8fe599981e61e92.tar.bz2
blogc-3d93f3a5e165ec12b97a269ef8fe599981e61e92.zip
blogc-make: renamed auto-defined vars to MAKE_*
-rw-r--r--src/blogc-make/rules.c28
-rwxr-xr-xtests/blogc-make/check_blogc_make.sh.in4
2 files changed, 16 insertions, 16 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index 9516dc9..49fc36c 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -61,8 +61,8 @@ index_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
bc_trie_insert(variables, "FILTER_PAGE", bc_strdup("1"));
bc_trie_insert(variables, "DATE_FORMAT",
bc_strdup(bc_trie_lookup(ctx->settings->settings, "date_format")));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("index"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("post"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("index"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("post"));
for (bc_slist_t *l = outputs; l != NULL; l = l->next) {
bm_filectx_t *fctx = l->data;
@@ -119,8 +119,8 @@ atom_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
"atom_posts_per_page")));
bc_trie_insert(variables, "FILTER_PAGE", bc_strdup("1"));
bc_trie_insert(variables, "DATE_FORMAT", bc_strdup("%Y-%m-%dT%H:%M:%SZ"));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("atom"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("atom"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("atom"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("atom"));
for (bc_slist_t *l = outputs; l != NULL; l = l->next) {
bm_filectx_t *fctx = l->data;
@@ -181,8 +181,8 @@ atom_tags_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
"atom_posts_per_page")));
bc_trie_insert(variables, "FILTER_PAGE", bc_strdup("1"));
bc_trie_insert(variables, "DATE_FORMAT", bc_strdup("%Y-%m-%dT%H:%M:%SZ"));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("atom_tags"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("atom"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("atom_tags"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("atom"));
for (bc_slist_t *l = outputs; l != NULL; l = l->next, i++) {
bm_filectx_t *fctx = l->data;
@@ -254,8 +254,8 @@ pagination_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
bc_strdup(bc_trie_lookup(ctx->settings->settings, "posts_per_page")));
bc_trie_insert(variables, "DATE_FORMAT",
bc_strdup(bc_trie_lookup(ctx->settings->settings, "date_format")));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("pagination"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("post"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("pagination"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("post"));
for (bc_slist_t *l = outputs; l != NULL; l = l->next, page++) {
bm_filectx_t *fctx = l->data;
@@ -315,8 +315,8 @@ posts_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
bc_trie_insert(variables, "IS_POST", bc_strdup("1"));
bc_trie_insert(variables, "DATE_FORMAT",
bc_strdup(bc_trie_lookup(ctx->settings->settings, "date_format")));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("posts"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("post"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("posts"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("post"));
bc_slist_t *s, *o;
@@ -381,8 +381,8 @@ tags_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
bc_trie_insert(variables, "FILTER_PAGE", bc_strdup("1"));
bc_trie_insert(variables, "DATE_FORMAT",
bc_strdup(bc_trie_lookup(ctx->settings->settings, "date_format")));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("tags"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("post"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("tags"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("post"));
for (bc_slist_t *l = outputs; l != NULL; l = l->next, i++) {
bm_filectx_t *fctx = l->data;
@@ -445,8 +445,8 @@ pages_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
bc_trie_t *variables = bc_trie_new(free);
bc_trie_insert(variables, "DATE_FORMAT",
bc_strdup(bc_trie_lookup(ctx->settings->settings, "date_format")));
- bc_trie_insert(variables, "BM_RULE", bc_strdup("pages"));
- bc_trie_insert(variables, "BM_TYPE", bc_strdup("page"));
+ bc_trie_insert(variables, "MAKE_RULE", bc_strdup("pages"));
+ bc_trie_insert(variables, "MAKE_TYPE", bc_strdup("page"));
bc_slist_t *s, *o;
diff --git a/tests/blogc-make/check_blogc_make.sh.in b/tests/blogc-make/check_blogc_make.sh.in
index 638b149..1352bbc 100755
--- a/tests/blogc-make/check_blogc_make.sh.in
+++ b/tests/blogc-make/check_blogc_make.sh.in
@@ -54,7 +54,7 @@ cat > "${TEMP}/proj/templates/main.tmpl" <<EOF
Listing: {% ifdef FILTER_TAG %}{{ FILTER_TAG }} - {% endif %}{{ TITLE }} - {{ DATE_FORMATTED }}
{% endblock %}
{% block entry %}
-{{ TITLE }}{% if BM_TYPE == "post" %} - {{ DATE_FORMATTED }}{% endif %}
+{{ TITLE }}{% if MAKE_TYPE == "post" %} - {{ DATE_FORMATTED }}{% endif %}
{{ CONTENT }}
{% endblock %}
@@ -455,7 +455,7 @@ cat > "${TEMP}/proj/temp/main.html" <<EOF
Listing: {% ifdef FILTER_TAG %}{{ FILTER_TAG }} - {% endif %}{{ TITLE }} - {{ DATE_FORMATTED }}
{% endblock %}
{% block entry %}
-{{ TITLE }}{% if BM_TYPE == "post" %} - {{ DATE_FORMATTED }}{% endif %}
+{{ TITLE }}{% if MAKE_TYPE == "post" %} - {{ DATE_FORMATTED }}{% endif %}
{{ CONTENT }}
{% endblock %}