Josef El-Rayes
806abfccac
Remove warnings and make wc WARNS=6 clean.
...
Add FreeBSD Id to Makefile.
Approved by: ssouhlal
2004-12-27 22:27:56 +00:00
Tim J. Robbins
149a123b34
Improve robustness of multibyte character handling (-m option), and
...
simplify the read buffering now that we can feed partial multibyte
characters to mbrtowc().
2004-04-09 11:17:29 +00:00
Tim J. Robbins
e58245f7dc
Use the iswspace(3) function now that it's been implemented.
2002-08-11 10:52:13 +00:00
Tim J. Robbins
abd0c85dcd
When counting words, check the correct character variable to see whether it's
...
a space or not.
Noticed by: bde
2002-06-16 06:04:43 +00:00
Tim J. Robbins
a1a27143bd
fstat() returns information about the target of any symbolic link that
...
was opened, not the link itself. Remove dead code.
2002-06-15 08:31:19 +00:00
Tim J. Robbins
ebb42aee31
Add the -m option, which counts characters (as opposed to -c, which
...
counts bytes). In locales that don't have multibyte characters, -m
is effectively an alias for -c.
This brings wc(1) up to P1003.1-2001 conformance.
2002-06-13 12:48:50 +00:00
Warner Losh
3f330d7d1a
remove __P
2002-03-22 01:42:45 +00:00
Mike Barcroft
064692095c
Leave the `copyright' variable exposed, since the main purpose of it
...
is to put a copyright in the object file.
Submitted by: bde
2002-03-07 10:06:00 +00:00
Mike Barcroft
a821e36e41
Fix vendor ID (mostly obtained from rev 1.1).
...
Make use of `static' storage-class for local functions.
Replace uses of `u_quad_t' with `uintmax_t'.
2002-02-28 11:02:49 +00:00
Mark Murray
7a8fb588c7
WARNS=2 fix, use __FBSDID().
...
Not added to Makefgile as WARNS=2 will be made default.
2001-12-11 22:23:53 +00:00
Peter Wemm
c3aac50f28
$Id$ -> $FreeBSD$
1999-08-28 01:08:13 +00:00
Sheldon Hearn
a0cf59e65e
Correct style issues with the previous commit.
...
Requested by: bde
1999-08-13 12:56:35 +00:00
Sheldon Hearn
af86fc21d6
Fix integer overflow for files containing more than 4GB by using
...
u_quad_int instead of u_long for counters. (NetBSD's rev 1.15 - 1.18)
Deprecate register. (NetBSD's rev 1.13)
The diffs from NetBSD were not applied verbatim, because we don't care
about NO_QUAD right now.
PR: 12959
Reported by: Nicholas Barnes <nb@ravenbrook.com>
Obtained from: NetBSD
1999-08-06 14:37:13 +00:00
Philippe Charnier
8c85cce77a
Sync usage string according to man page. Silent -Wall.
1997-08-25 06:44:59 +00:00
Warner Losh
1c8af87873
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Peter Wemm
c115df18cd
Revert $FreeBSD$ to $Id$
1997-02-22 19:58:13 +00:00
Jordan K. Hubbard
1130b656e5
Make the long-awaited change from $Id$ to $FreeBSD$
...
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
2c51e5ed8d
Changed all per-file errors to warnings. Exit with a nonzero status of
...
if there was a per-file error. My test case of `wc /proc/curproc/*'
works reasonably now (much like `size /proc/curproc/*'.
Reviewed by: wosch
1996-04-13 11:35:54 +00:00
Wolfram Schneider
a0d038a406
Do not exit if a file is not readable. This is a short hack
...
until someone rewrite wc(1).
1996-04-10 22:21:01 +00:00
Andrey A. Chernov
ae6fa8ae08
Localize it.
1996-01-10 21:42:14 +00:00
Rodney W. Grimes
9b50d90275
BSD 4.4 Lite Usr.bin Sources
1994-05-27 12:33:43 +00:00