freebsd-dev/usr.bin/wc
Dag-Erling Smørgrav 5016d112ad wc: Make the read buffer static.
The read buffer in cnt() is 64 kB, which is a bit excessive for a stack variable.  MAXBSIZE has grown since this code was originally written, and it might grow again in the future.  Since the program is single-threaded and cnt() does not recurse, we can safely make the buffer static.

While there, constify p since it is only used to read.

Sponsored by:	Klara, Inc.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38608
2023-02-16 00:40:45 +00:00
..
tests wc: Improve test coverage. 2023-02-16 00:40:45 +00:00
Makefile wc: Clean up and modernize. 2023-02-14 22:26:47 +00:00
Makefile.depend
Makefile.depend.options
wc.1 wc(1): document SIGINFO handling in the manual page. 2020-04-11 08:16:35 +00:00
wc.c wc: Make the read buffer static. 2023-02-16 00:40:45 +00:00