Support NUL-containing lines in cols(1)

This required an architectural change in getlines() by also storing
the line length.
This commit is contained in:
FRIGN
2016-02-29 00:45:53 +01:00
committed by sin
parent 2d7d2261a0
commit e4810f1cdb
4 changed files with 24 additions and 14 deletions

7
text.h
View File

@@ -1,7 +1,12 @@
/* See LICENSE file for copyright and license details. */
struct linebufline {
char *data;
size_t len;
};
struct linebuf {
char **lines;
struct linebufline *lines;
size_t nlines;
size_t capacity;
};