HomeFreeBSD

wc: Clean up and modernize.

Description

wc: Clean up and modernize.

  • Drop <err.h>, which is unnecessary since we use libxo.
  • As per POSIX, report an error if output fails.
  • Fix some type mismatches.
  • Use bool instead of int where appropriate.
  • Avoid repeatedly checking for a null filename.
  • Miscellaneous other tidying.
  • Add tests (partly derived from work performed by SHENG-YI HONG <i19780219111@kimo.com>).

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D38496

Details

Provenance
desAuthored on Feb 14 2023, 10:26 PM
Reviewer
kevans
Differential Revision
D38496: wc: Clean up and modernize.
Parents
rG96e16cf368f6: linuxkpi: Add <linux/cc_platform.h>
Branches
Unknown
Tags
Unknown