Home | History | Annotate | only in /src/usr.bin/wc
History log of /src/usr.bin/wc
RevisionDateAuthorComments
 1.4 18-Oct-1997  mrg merge lite-2.
 1.3 09-Jan-1997  tls RCS ID police
 1.2 30-Jul-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 07-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.18 01-Sep-2019  sevan Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
 1.17 03-Jul-2017  wiz branches: 1.17.6; 1.17.8;
Remove workaround for ancient HTML generation code.
 1.16 19-Sep-2014  wiz Sort sections. From Henning Petersen in PR 49222.
 1.15 18-Feb-2010  wiz New sentence, new line. Add EXIT STATUS section and use .Ex.
Fix macro argument abuse.
Use Aq instead of \*[Lt]\*[Gt].
 1.14 18-Feb-2010  tron Add support for "-L" option (longest line) as present in the GNU and
FreeBSD version of "wc".

No objections on "tech-userlevel" mailing list.
 1.13 07-Aug-2003  agc branches: 1.13.40; 1.13.46;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.12 05-Mar-2002  wiz Drop duplicate .Pp.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 19-Oct-2001  yamt - implement -m.(count characters instead of bytes)
- use iswspace instead of isspace for -w.
 1.9 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.8 20-Oct-1997  lukem fix .Nm usage
 1.7 20-Oct-1997  mrg WARNSify; deprecate register; clean up .Nm
 1.6 18-Oct-1997  mrg merge lite-2.
 1.5 09-Jan-1997  tls RCS ID police
 1.4 19-Aug-1993  jtc Document that utility now conforms to IEEE 1003.2-1992.
 1.3 17-Aug-1993  jtc Make wc 1003.2-1992 compliant by adding -m option (currently a noop, as
we don't support multibyte chars).
Remove blatant lie from manpage: the order of the output is, and always
has been, fixed. The order of the command line arguments makes no difference.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 19-Apr-1994  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.46.1 21-Apr-2010  matt sync to netbsd-5
 1.13.40.1 06-Mar-2010  sborrill Pull up the following revisions(s) (requested by tron in ticket #1313):
usr.bin/wc/wc.c: revision 1.32-1.34
usr.bin/wc/wc.1: revision 1.14-1.15

Add support for "-L" option (longest line) as present in the GNU and
FreeBSD versions of "wc".
 1.17.8.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.17.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37 14-Jan-2024  christos Better check against st_size == 0 instead of st_dev == -1
 1.36 14-Jan-2024  christos PR/57854: Richardo Branco: wc -c does not work on procfs/kernfs
 1.35 16-Sep-2011  joerg Use __dead
 1.34 19-Feb-2010  tron Report the number of characters, not the number of bytes in the
longest line.

Problem pointed out by YAMAMOTO Takashi on "tech-userlevel" mailing list.
 1.33 18-Feb-2010  tron Add support for "-L" option (longest line) as present in the GNU and
FreeBSD version of "wc".

No objections on "tech-userlevel" mailing list.
 1.32 14-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wcast-qual)
 1.31 21-Jul-2008  lukem branches: 1.31.4; 1.31.6; 1.31.10;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.30 04-Jan-2006  perry branches: 1.30.22;
de-__P, ANSIfy prototypes
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.28 02-May-2002  wiz Mention -m in usage. bin/16594 by Ryan Younce.
 1.27 23-Mar-2002  enami Don't pass NULL to warn() etc. Instead, use "<stdin>" to warn about stdin.
 1.26 23-Mar-2002  enami Actually skip the first byte of invalid byte sequence.
 1.25 23-Mar-2002  enami One more; Don't put space before function call op.
 1.24 23-Mar-2002  enami - Remove unnecessary cast.
- Other misc. KNF changes.
 1.23 23-Mar-2002  enami Fix whitespace usage.
 1.22 23-Mar-2002  enami Don't include same file twice. Sort includes alphabetically.
Don't place sys/*.h and *.h mixed.
 1.21 19-Oct-2001  yamt - implement -m.(count characters instead of bytes)
- use iswspace instead of isspace for -w.
 1.20 05-Mar-1999  kleink Normalize usage string.
 1.19 05-Mar-1999  mycroft Don't print a trailing space when counting from stdin.
 1.18 05-Mar-1999  mycroft Make the output format match what it used to be.
 1.17 14-Feb-1999  christos Quad portability fixes:
- Use %llu instead of %qu
- Don't use quad types if NO_QUAD is defined
- Always cast to the appropriate type in printf.
 1.16 14-Feb-1999  mjacob Hopefully somebody better at this than I can correct this somewhat
iffy change. The problem with the last checkin is twofold- first %q
should refer to quad_t, not u_int64_r. Second, for the alpha compiler,
%q is taken to be 'long long'- which is definitely not the same as
u_int64_t. Take home lesson- didn't build on alpha.

I thought about an #ifdef __alpha__- but that's wrong, so I put in a runtime
determinant to set a constant format string. Like I said, I hope somebody
better than I can fix it right.
 1.15 13-Feb-1999  explorer use u_int64_t for line, word, and character counts. It bothers me to see wc -c
return -2146435072 characters for files > 2G.
 1.14 13-Oct-1998  wsanchez Use unsigned long instead of ulong
 1.13 20-Oct-1997  mrg WARNSify; deprecate register; clean up .Nm
 1.12 19-Oct-1997  mycroft Use S_IS*(), not S_IF*.
 1.11 18-Oct-1997  mrg merge lite-2.
 1.10 09-Jan-1997  tls RCS ID police
 1.9 03-Jan-1994  andrew Fixed problems with wc -c when reading from stdin.
 1.8 04-Nov-1993  jtc Checkin minor tweaks before giving a copy to the FreeBSD folks.
 1.7 12-Oct-1993  jtc Streamline the char/word/line counting logic in anticipation of multibyte
character support.
 1.6 12-Oct-1993  jtc Like cat, set the return-value variable "rval" instead of exiting when
we encounter run-time errors.
Update usage message.
 1.5 27-Aug-1993  jtc Minor tweaks: including header files to bring prototypes into scope,
explicitly declaring function return values, etc. to make gcc -Wall
shut up.
 1.4 17-Aug-1993  jtc Make wc 1003.2-1992 compliant by adding -m option (currently a noop, as
we don't support multibyte chars).
Remove blatant lie from manpage: the order of the output is, and always
has been, fixed. The order of the command line arguments makes no difference.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 15-Jul-1993  jtc Update to POSIX 1003.2 (D11.2) compliance.
Make error messages print leading "wc: ", so we know what program is
complaining when we're writing shell scripts.
Simplify argument parsing and total printing.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 02-May-1995  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.30.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.10.1 21-Apr-2010  matt sync to netbsd-5
 1.31.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.31.4.1 06-Mar-2010  sborrill Pull up the following revisions(s) (requested by tron in ticket #1313):
usr.bin/wc/wc.c: revision 1.32-1.34
usr.bin/wc/wc.1: revision 1.14-1.15

Add support for "-L" option (longest line) as present in the GNU and
FreeBSD versions of "wc".

RSS XML Feed