diff options
Diffstat (limited to 'buf_misc.c')
-rw-r--r-- | buf_misc.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -86,12 +86,18 @@ int BufLine::add(char *string, int size) int BufLine::add(Buf *newdata) { buf->concat(newdata); - return -1; + return 0; } int BufLine::pop_line(char **val, int *size) { - + int idx; + if (1 == buf->findc('\n',&idx)) + { + printf("") + buf->popsubstring(4,val,size); + return 0; + } return -1; } |