aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-02-24 17:18:08 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-02-24 17:18:08 +0100
commit1232f3482b272fbe8986c9677b529ec7b6cb0183 (patch)
tree7c17e8177d2aef5df4a80344ec4d0c64ca616355 /src/blogc-make/rules.c
parent6bc34603d772fedcd90ffd0d198622e6582a44b1 (diff)
downloadblogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.tar.gz
blogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.tar.bz2
blogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.zip
make: do not run stat twice for regular files when copying
Diffstat (limited to 'src/blogc-make/rules.c')
-rw-r--r--src/blogc-make/rules.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index 2633d04..8a0558b 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -52,7 +52,7 @@ index_outputlist(bm_ctx_t *ctx)
char *f = bc_strdup_printf("%s%s%s%s", ctx->short_output_dir,
is_index ? "" : "/", is_index ? "" : index_prefix,
html_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
return rv;
}
@@ -109,7 +109,7 @@ atom_outputlist(bm_ctx_t *ctx)
const char *atom_ext = bc_trie_lookup(ctx->settings->settings, "atom_ext");
char *f = bc_strdup_printf("%s/%s%s", ctx->short_output_dir,
atom_prefix, atom_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
return rv;
}
@@ -167,7 +167,7 @@ atom_tags_outputlist(bm_ctx_t *ctx)
for (size_t i = 0; ctx->settings->tags[i] != NULL; i++) {
char *f = bc_strdup_printf("%s/%s/%s%s", ctx->short_output_dir,
atom_prefix, ctx->settings->tags[i], atom_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;
@@ -239,7 +239,7 @@ pagination_outputlist(bm_ctx_t *ctx)
for (size_t i = 0; i < pages; i++) {
char *f = bc_strdup_printf("%s/%s/%d%s", ctx->short_output_dir,
pagination_prefix, i + 1, html_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;
@@ -301,7 +301,7 @@ posts_outputlist(bm_ctx_t *ctx)
for (size_t i = 0; ctx->settings->posts[i] != NULL; i++) {
char *f = bc_strdup_printf("%s/%s/%s%s", ctx->short_output_dir,
post_prefix, ctx->settings->posts[i], html_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;
@@ -362,7 +362,7 @@ tags_outputlist(bm_ctx_t *ctx)
for (size_t i = 0; ctx->settings->tags[i] != NULL; i++) {
char *f = bc_strdup_printf("%s/%s/%s%s", ctx->short_output_dir,
tag_prefix, ctx->settings->tags[i], html_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;
@@ -429,7 +429,7 @@ pages_outputlist(bm_ctx_t *ctx)
char *f = bc_strdup_printf("%s%s%s%s", ctx->short_output_dir,
is_index ? "" : "/", is_index ? "" : ctx->settings->pages[i],
html_ext);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;
@@ -487,7 +487,7 @@ copy_outputlist(bm_ctx_t *ctx)
for (bc_slist_t *s = ctx->copy_fctx; s != NULL; s = s->next) {
char *f = bc_strdup_printf("%s/%s", ctx->short_output_dir,
((bm_filectx_t*) s->data)->short_path);
- rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
+ rv = bc_slist_append(rv, bm_filectx_new(ctx, f, NULL));
free(f);
}
return rv;