diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-18 22:52:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 22:52:36 -0400 |
commit | cdce604d8e166ae905b394306fece4e7f035cedd (patch) | |
tree | fbbd9612c860fb60bfdee882346f843668b1b8fa /common | |
parent | 15dadaaa4496085e064f290708267e703b3cd029 (diff) | |
parent | 47a66da5de37faccac1207615ce0914b4ab32220 (diff) |
Merge pull request #2640 from ianyfan/swaybar
Overhaul swaybar protocol handling (+fixes)
Diffstat (limited to 'common')
-rw-r--r-- | common/readline.c | 25 |
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; -} |