aboutsummaryrefslogtreecommitdiffstats
path: root/src/file.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-05-07 04:43:30 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-05-07 04:43:30 +0200
commit68e4c6ce2cbcc16f5613a7731d4cfac13e4d3354 (patch)
treeb07274c5478a9058be5eb67e3ba7be293a7c8df5 /src/file.c
parent4b676a3e0a21d494a1d47efcaf995537b29ff2b9 (diff)
parent4230e93c64c78ca4276a164704c8dc8a67e466e1 (diff)
downloadblogc-68e4c6ce2cbcc16f5613a7731d4cfac13e4d3354.tar.gz
blogc-68e4c6ce2cbcc16f5613a7731d4cfac13e4d3354.tar.bz2
blogc-68e4c6ce2cbcc16f5613a7731d4cfac13e4d3354.zip
Merge branch 'master' into feature/directives
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file.c b/src/file.c
index a4c763a..f784d93 100644
--- a/src/file.c
+++ b/src/file.c
@@ -14,9 +14,9 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
-#include "utils/utils.h"
#include "file.h"
#include "error.h"
+#include "utils.h"
// this would belong to loader.c, but we need it in a separated file to be
// able to mock it when unit testing the loader functions.
@@ -38,16 +38,16 @@ blogc_file_get_contents(const char *path, size_t *len, blogc_error_t **err)
return NULL;
}
- b_string_t *str = b_string_new();
+ sb_string_t *str = sb_string_new();
char buffer[BLOGC_FILE_CHUNK_SIZE];
while (!feof(fp)) {
size_t read_len = fread(buffer, sizeof(char), BLOGC_FILE_CHUNK_SIZE, fp);
*len += read_len;
- b_string_append_len(str, buffer, read_len);
+ sb_string_append_len(str, buffer, read_len);
}
fclose(fp);
- return b_string_free(str, false);
+ return sb_string_free(str, false);
}