[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] use custom getline() implementation
From: |
Simon Josefsson |
Subject: |
Re: [PATCH 1/3] use custom getline() implementation |
Date: |
Tue, 22 Nov 2011 14:02:05 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) |
Enrico Scholz <address@hidden> writes:
> Simon Josefsson <address@hidden> writes:
>
>> Have you looked at gnulib's linebuffer.c? It is also a getline-like
>> interface, but it should work line-by-line. See:
>>
>> http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/linebuffer.c
>
> As it uses <stdio.h>'s FILE, it suffers from the same problem as
> getline(3). The getc() there might read multiple lines into the
> internal buffer and there is no way to check whether this buffer is
> empty.
Ok. I suppose the simplest is to add your patch and then hope for some
free time to materialize in the future where the entire protocol parsing
stuff (or even the entire gsasl tool...) could be rewritten in a cleaner
way. I'll do some testing of it and see...
/Simon