Use runetypebody.h-functions in wc(1)
This commit is contained in:
parent
17dad35015
commit
471cf8f5bc
5
wc.c
5
wc.c
@ -1,9 +1,6 @@
|
|||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <ctype.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <wctype.h>
|
|
||||||
|
|
||||||
#include "utf.h"
|
#include "utf.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@ -42,7 +39,7 @@ wc(FILE *fp, const char *str)
|
|||||||
(c != Runeerror) ? 1 : 0;
|
(c != Runeerror) ? 1 : 0;
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
nl++;
|
nl++;
|
||||||
if (!iswspace(c))
|
if (!isspacerune(c))
|
||||||
word = 1;
|
word = 1;
|
||||||
else if (word) {
|
else if (word) {
|
||||||
word = 0;
|
word = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user