aboutsummaryrefslogtreecommitdiff
path: root/common/readline.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-09-21 20:05:39 +1000
committerGitHub <noreply@github.com>2018-09-21 20:05:39 +1000
commit0798fadff2f2f74a7efd7c14c55737bac19de954 (patch)
tree86e1ab4983fec3586a8bbb0044216216e22cc1cb /common/readline.c
parent4289343e17615509fba5fe389d855f2292ba09bc (diff)
parentfa4308c5abecaeef870aced574e9d05e24e62392 (diff)
Merge branch 'master' into render-output-segfault
Diffstat (limited to 'common/readline.c')
-rw-r--r--common/readline.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/common/readline.c b/common/readline.c
index a2c69018..58652429 100644
--- a/common/readline.c
+++ b/common/readline.c
@@ -70,28 +70,3 @@ char *peek_line(FILE *file, int line_offset, long *position) {
fseek(file, pos, SEEK_SET);
return line;
}
-
-char *read_line_buffer(FILE *file, char *string, size_t string_len) {
- size_t length = 0;
- if (!string) {
- return NULL;
- }
- while (1) {
- int c = getc(file);
- if (c == EOF || c == '\n' || c == '\0') {
- break;
- }
- if (c == '\r') {
- continue;
- }
- string[length++] = c;
- if (string_len <= length) {
- return NULL;
- }
- }
- if (length + 1 == string_len) {
- return NULL;
- }
- string[length] = '\0';
- return string;
-}