Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
On 26 September 2011 23:24, Eric Blake ebl...@redhat.com wrote: So _both_ linebuffer and getdelim would benefit from a conversion to freadptr. I just tried using getndelim2 instead of getline for a program which slurps text line by line but spends most of its time regexp-searching the text,

Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
On 27 September 2011 22:45, Reuben Thomas r...@sc3d.org wrote: On 26 September 2011 23:24, Eric Blake ebl...@redhat.com wrote: So _both_ linebuffer and getdelim would benefit from a conversion to freadptr. I just tried using getndelim2 instead of getline for a program which slurps text line

Re: getline vs linebuffer

2011-09-27 Thread Pádraig Brady
On 09/27/2011 11:12 PM, Reuben Thomas wrote: On 27 September 2011 22:45, Reuben Thomas r...@sc3d.org wrote: On 26 September 2011 23:24, Eric Blake ebl...@redhat.com wrote: So _both_ linebuffer and getdelim would benefit from a conversion to freadptr. I just tried using getndelim2 instead of

Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
2011/9/27 Pádraig Brady p...@draigbrady.com: On 09/27/2011 11:12 PM, Reuben Thomas wrote: Note when testing io functions ensure that gnulib/lib/unlocked-io.h is used appropriately, especially for getc using functions like getndelim2() The point Eric was making is that getndelim2 doesn't use

getline vs linebuffer

2011-09-26 Thread Reuben Thomas
Is linebuffer obsoleteable in the face of standardized getline and friends? -- http://rrt.sc3d.org

Re: getline vs linebuffer

2011-09-26 Thread Eric Blake
On 09/26/2011 03:47 PM, Reuben Thomas wrote: Is linebuffer obsoleteable in the face of standardized getline and friends? Not necessarily, because linebuffer provides a slightly different interface that might be easier to use. However, I do argue that both linebuffer and getdelim can be

Re: getline vs linebuffer

2011-09-26 Thread Reuben Thomas
On 26 September 2011 23:04, Eric Blake ebl...@redhat.com wrote: On 09/26/2011 03:47 PM, Reuben Thomas wrote: Is linebuffer obsoleteable in the face of standardized getline and friends? Not necessarily, because linebuffer provides a slightly different interface that might be easier to use.

Re: getline vs linebuffer

2011-09-26 Thread Bruno Haible
Hi Reuben, Is linebuffer obsoleteable in the face of standardized getline and friends? I'm not the maintainer of either of these modules, but I don't consider 'linebuffer' to be obsolete. Whenever I have to understand the calling convention of getline(), I get dizzy. What will happen if

Re: getline vs linebuffer

2011-09-26 Thread Eric Blake
On 09/26/2011 04:06 PM, Reuben Thomas wrote: On 26 September 2011 23:04, Eric Blakeebl...@redhat.com wrote: On 09/26/2011 03:47 PM, Reuben Thomas wrote: Is linebuffer obsoleteable in the face of standardized getline and friends? Not necessarily, because linebuffer provides a slightly

Re: getline vs linebuffer

2011-09-26 Thread Reuben Thomas
On 26 September 2011 23:19, Eric Blake ebl...@redhat.com wrote: But a patch for both modules that references the other may indeed be worthwhile. Great, I'll write something (and I find your arguments convincing). At the moment the short descriptions in the module files are identical, which is

Re: getline vs linebuffer

2011-09-26 Thread Eric Blake
On 09/26/2011 04:04 PM, Eric Blake wrote: On 09/26/2011 03:47 PM, Reuben Thomas wrote: Is linebuffer obsoleteable in the face of standardized getline and friends? Not necessarily, because linebuffer provides a slightly different interface that might be easier to use. However, I do argue that