Re: [dev] [sbase][PATCH] wc: Print number of bytes by default
Hi,
> size_t nc = 0, nl = 0, nw = 0;
>
> while ((rlen = efgetrune(&c, fp, str))) {
> - nc += (cmode == 'c') ? rlen :
> + nc += (cmode == 'c' || cmode == 0) ? rlen :
> (c != Runeerror) ? 1 : 0;
> if (c == '\n')
> nl++;
a '?' inside of other '?' is not a good idea. I think the expression
is complex enough to require an if-else.
Regards,
Received on Sun Apr 05 2015 - 08:51:37 CEST
This archive was generated by hypermail 2.3.0
: Sun Apr 05 2015 - 09:00:10 CEST