aboutsummaryrefslogtreecommitdiffstats
path: root/src/file.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-12-23 23:45:54 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-12-23 23:45:54 +0100
commit14e9d7b2299f15efb695b0202f9c1f6a9f7a4ba6 (patch)
tree31b3d9a6f9f6144b08b852d016b5b4bdfce553ef /src/file.c
parent8e62072d91193b4894adda9c40544c18c1a01f57 (diff)
downloadblogc-14e9d7b2299f15efb695b0202f9c1f6a9f7a4ba6.tar.gz
blogc-14e9d7b2299f15efb695b0202f9c1f6a9f7a4ba6.tar.bz2
blogc-14e9d7b2299f15efb695b0202f9c1f6a9f7a4ba6.zip
Revert "build: removing src/utils and replacing with squareball"
This reverts commit 950e6c9148eca244a89d18a21d4ae4e5c3d1c646.
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 f6a69c3..d660afc 100644
--- a/src/file.c
+++ b/src/file.c
@@ -14,7 +14,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
-#include <squareball.h>
+#include "utils/utils.h"
#include "file.h"
#include "error.h"
@@ -38,16 +38,16 @@ blogc_file_get_contents(const char *path, size_t *len, blogc_error_t **err)
return NULL;
}
- sb_string_t *str = sb_string_new();
+ b_string_t *str = b_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;
- sb_string_append_len(str, buffer, read_len);
+ b_string_append_len(str, buffer, read_len);
}
fclose(fp);
- return sb_string_free(str, false);
+ return b_string_free(str, false);
}