Re: [dev] [sbase] [patch] Add strings(1)

From: sin <sin_AT_2f30.org>
Date: Wed, 14 Aug 2013 20:52:00 +0300

On Wed, Aug 14, 2013 at 11:59:22AM -0400, Galos, David wrote:
> >> + while ((r = read(fd, &c, 1) > 0)) {
> >> + offset++;
> >> + if (isprint(c)) {
> >> + span++;
> >
> > I think is better use the buffer interface here. Calling getc
> > will save a lot of system calls and it will improve the performace
> > of the application.
>
> Not only that, using stdio is currently the sbase way.

Will fix and re-send.
Received on Wed Aug 14 2013 - 19:52:00 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 14 2013 - 20:00:04 CEST