On Wed, Nov 17, 2021 at 08:37:53AM -0600, Scott Cheloha wrote:
> In wc(1) we currently count words, both ASCII and multibyte, in a
> getline(3) loop.
>
> This makes sense in the multibyte case because stdio handles all the
> nasty buffer resizing for us. We avoid splitting a multibyte between
> t
In wc(1) we currently count words, both ASCII and multibyte, in a
getline(3) loop.
This makes sense in the multibyte case because stdio handles all the
nasty buffer resizing for us. We avoid splitting a multibyte between
two read(2) calls and the resulting code is simpler.
However, for ASCII inp