- for (C = buf; len--; ++C)
- switch(*C) {
- case NL:
- ++linect;
- case TAB:
- case SPACE:
- gotsp = 1;
- continue;
- default:
-#ifdef notdef
- /*
- * This line of code implements the
- * original V7 wc algorithm, i.e.
- * a non-printing character doesn't
- * toggle the "word" count, so that
- * " ^D^F " counts as 6 spaces,
- * while "foo^D^Fbar" counts as 8
- * characters.
- *
- * test order is important -- gotsp
- * will normally be NO, so test it
- * first
- */
- if (gotsp && *C > SPACE && *C < DEL) {
-#endif
- /*
- * This line implements the manual
- * page, i.e. a word is a "maximal
- * string of characters delimited by
- * spaces, tabs or newlines." Notice
- * nothing was said about a character
- * being printing or non-printing.
- */
- if (gotsp) {
- gotsp = 0;
- ++wordct;
- }