Hi,

> +     for (p = str, col = 0; *p && *p != '\n'; p++) {
> +             if (!UTF8_POINT(*p) && !bflag)
> +                     continue;
> +             if (col >= width) {
> +                     off = (sflag && spacesect) ? spacesect - str : p - str;
> +                     if (fwrite(str, 1, off, stdout) != off)
> +                             eprintf("fwrite <stdout>:");
> +                     putchar('\n');
...
> +     fputs(str, stdout);

It's a bit strange this fwrite, why don't you use putchar there?, and
why you check the return value of fwrite, but not the return value of
putcharor fputs?.  I usually don't check the return value of write
functions and at the end of the loop I do a call to ferror.


Regards,


Reply via email to