Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
2011/9/27 Pádraig Brady : > 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 getc (if it can hel

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 wrote: >> On 26 September 2011 23:24, Eric Blake wrote: >>> >>> So _both_ linebuffer and getdelim would benefit from a conversion to >>> freadptr. >> >> I just tried using getndelim2 instead of getline for a

Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
On 27 September 2011 22:45, Reuben Thomas wrote: > On 26 September 2011 23:24, Eric Blake 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 m

Re: getline vs linebuffer

2011-09-27 Thread Reuben Thomas
On 26 September 2011 23:24, Eric Blake 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, and it made no de

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 b

Re: getline vs linebuffer

2011-09-26 Thread Reuben Thomas
On 26 September 2011 23:19, Eric Blake 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 confusing. The c

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 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 tha

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 linept

Re: getline vs linebuffer

2011-09-26 Thread Reuben Thomas
On 26 September 2011 23:04, 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. If other

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 writt

getline vs linebuffer

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