diff --git a/usr.bin/wc/wc.1 b/usr.bin/wc/wc.1 index 6d2ec6415a8f..80afcda711c9 100644 --- a/usr.bin/wc/wc.1 +++ b/usr.bin/wc/wc.1 @@ -57,7 +57,7 @@ character, and a word is defined as a string of characters delimited by white space characters. White space characters are the set of characters for which the -.Xr isspace 3 +.Xr iswspace 3 function returns true. If more than one input file is specified, a line of cumulative counts for all the files is displayed on a separate line after the output for @@ -118,7 +118,7 @@ as well as the totals for both: .Sh DIAGNOSTICS .Ex -std .Sh SEE ALSO -.Xr isspace 3 +.Xr iswspace 3 .Sh COMPATIBILITY Historically, the .Nm @@ -133,7 +133,7 @@ systems after modified the implementation to be consistent with the documentation. This implementation defines a ``word'' in terms of the -.Xr isspace 3 +.Xr iswspace 3 function, as required by .St -p1003.2 . .Sh STANDARDS diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 6eb2602160e9..85a90c9b4d8b 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include uintmax_t tlinect, twordct, tcharct; int doline, doword, dochar, domulti; @@ -234,8 +235,7 @@ word: gotsp = 1; p += clen; if (wch == L'\n') ++linect; - /* XXX Non-portable; should use iswspace() */ - if (isspace(wch)) + if (iswspace(wch)) gotsp = 1; else if (gotsp) { gotsp = 0;