Use runetypebody.h-functions in wc(1)

This commit is contained in:
FRIGN 2015-02-11 13:24:59 +01:00
parent 17dad35015
commit 471cf8f5bc

5
wc.c
View File

@ -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;