Re: io:lines() and 0円
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: io:lines() and 0円
- From: Francisco Olarte <folarte@...>
- Date: 2014年2月20日 21:29:50 +0100
Hi:
On Thu, Feb 20, 2014 at 8:15 PM, René Rebe <rene@exactcode.de> wrote:
> This gets is a plain and simple getchar loop:
> http://www.opensource.apple.com/source/Libc/Libc-167/stdio.subproj/gets.c
Who would bother optimizing gets? It's for toys.
> The (latest) glibc has reads the first with getchar (EOF optimization I
> guess) and the rest with a call to an internal __iogetline.
One of the reason for this I've found previously is ungetc(). You can
have a single ungot char, calling getchar first insure you can dive
into a unget unaware function.
Francisco Olarte.
- References:
- Re: io:lines() and 0円, Craig Barnes
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Craig Barnes
- Re: io:lines() and 0円, Sean Conner
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Sean Conner
- Re: io:lines() and 0円, Francisco Olarte
- Re: io:lines() and 0円, Enrico Colombini
- Re: io:lines() and 0円, Francisco Olarte
- Re: io:lines() and 0円, Luiz Henrique de Figueiredo
- Re: io:lines() and 0円, Francisco Olarte
- Re: io:lines() and 0円, René Rebe