diff options
Diffstat (limited to 'src/common/stdin.c')
-rw-r--r-- | src/common/stdin.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/common/stdin.c b/src/common/stdin.c deleted file mode 100644 index 556c7cf..0000000 --- a/src/common/stdin.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * blogc: A blog compiler. - * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br> - * - * This program can be distributed under the terms of the BSD License. - * See the file LICENSE. - */ - -#include <stdbool.h> -#include <stdio.h> -#include "utils.h" -#include "stdin.h" - - -// splitted in single file to make it easier to test -char* -bc_stdin_read(size_t *len) -{ - if (len == NULL) - return NULL; - - int c; - bc_string_t *rv = bc_string_new(); - while (EOF != (c = fgetc(stdin))) - bc_string_append_c(rv, c); - *len = rv->len; - return bc_string_free(rv, false); -} |