diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-05-09 22:25:30 -0300 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-05-09 22:25:30 -0300 |
commit | 15d3beecdd227c08df600336dff9ecd2d5979136 (patch) | |
tree | 14601d06e48a8dc20cc60a19f6d978ee4ac13dd5 /src | |
parent | 0cb80d3050de4adb65b6c4acb4c9ac765b2ae448 (diff) | |
download | blogc-15d3beecdd227c08df600336dff9ecd2d5979136.tar.gz blogc-15d3beecdd227c08df600336dff9ecd2d5979136.tar.bz2 blogc-15d3beecdd227c08df600336dff9ecd2d5979136.zip |
fixing gcc stupidity
Diffstat (limited to 'src')
-rw-r--r-- | src/file.c | 11 | ||||
-rw-r--r-- | src/file.h | 3 | ||||
-rw-r--r-- | src/loader.c | 2 |
3 files changed, 15 insertions, 1 deletions
@@ -48,3 +48,14 @@ blogc_file_get_contents(const char *path, size_t *len, blogc_error_t **err) fclose(fp); return b_string_free(str, false); } + + +int +blogc_fprintf(FILE *stream, const char *format, ...) +{ + va_list ap; + va_start(ap, format); + int rv = vfprintf(stream, format, ap); + va_end(ap); + return rv; +} @@ -9,11 +9,14 @@ #ifndef _FILE_H #define _FILE_H +#include <stdio.h> +#include <stdlib.h> #include "utils/utils.h" #include "error.h" #define BLOGC_FILE_CHUNK_SIZE 1024 char* blogc_file_get_contents(const char *path, size_t *len, blogc_error_t **err); +int blogc_fprintf(FILE *stream, const char *format, ...); #endif /* _FILE_H */ diff --git a/src/loader.c b/src/loader.c index f868aeb..bcab0d6 100644 --- a/src/loader.c +++ b/src/loader.c @@ -138,7 +138,7 @@ blogc_source_parse_from_files(b_trie_t *conf, b_slist_t *l, blogc_error_t **err) } if (with_date > 0 && with_date < b_slist_length(l)) // fatal error, maybe? - fprintf(stderr, + blogc_fprintf(stderr, "blogc: warning: 'DATE' variable provided for at least one source " "file, but not for all source files. This means that you may get " "wrong values for 'DATE_FIRST' and 'DATE_LAST' variables.\n"); |