(number_width): New var.
authorJim Meyering <jim@meyering.net>
Sun, 20 Jul 2003 15:22:25 +0000 (15:22 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 20 Jul 2003 15:22:25 +0000 (15:22 +0000)
commit6e1923f4c123c14796fa136d00d70f6148dd7cef
treeb0e463efe2cd041959b5d2f70427b893b2486f2a
parent32d2cea9b8b45c9c48ecfb8ac5741a43ac0863b7
(number_width): New var.
(posixly_correct): Remove.
(struct fstatus): New struct.
(write_counts): Output fields of width number_width.
Do not worry about POSIXLY_CORRECT.
Use null file, not empty-string file, to denote stdin,
since "" is a valid file name on some hosts.
(wc, wc_file): New arg fstatus.  Use it to avoid invoking fstat
if possible.
(wc):  Avoid problems if end_pos - current_pos overflows.
Do not print odd message if stdin has a read error.
(get_input_fstatus, compute_number_width): New functions.
(main): Use them to implement the new behavior.
Ignore POSIXLY_CORRECT.
src/wc.c