[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'freadptr'
From: |
Bruno Haible |
Subject: |
Re: new module 'freadptr' |
Date: |
Thu, 28 Feb 2008 14:21:19 +0100 |
User-agent: |
KMail/1.5.4 |
Jim Meyering wrote:
> Looks useful.
It's useful in few cases, to get the ultimate performance. getc_unlocked is
already quite good in performance.
> > const char *nl = (const char *) memchr (buf, '\n', n);
>
> Surely you meant this:
>
> const char *nl = (const char *) memchr (buf, '\n', available);
Yes.
> > if (nl != NULL)
> > {
> > obstack_grow (obs, buf, nl - buf);
> > fseek (fp, nl - buf + 1, SEEK_CUR);
And here I forgot a 'break;'.
Bruno