ed

simple ed
git clone git://git.2f30.org/ed.git
Log | Files | Refs

commit cd64b2f5a41d8f4471f7e2f1157786dc190e4f4c
parent 5b51c335a0e4642ea15aca1b66fae95c242e687d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue Dec  1 21:47:08 +0100

Fix doread()

After the last commit, there was an error because
the size of the dynamic array was not preserved
between calls, so the next call to getline
will generate an error.

Diffstat:
ed.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ed.c b/ed.c @@ -448,10 +448,11 @@ dowrite(char *fname, int trunc) static void doread(char *fname) { - size_t len = 0, cnt; + size_t cnt; ssize_t n; char *p; FILE *aux; + static size_t len; static char *s; static FILE *fp;