repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
pci: don't do sanity check for missing pci bus, the check can misfire.
[minix.git]
/
commands
/
flex-2.5.4
/
MISC
/
fastwc
/
wc1.l
blob
d6696bcde696fd08565290a2c2ed991d888abe50
1
/* First cut at a flex-based "wc" tool. */
2
3
ws [ \t]
4
nonws [^ \t\n]
5
6
%%
7
int cc = 0, wc = 0, lc = 0;
8
9
{nonws}+ cc += yyleng; ++wc;
10
11
{ws}+ cc += yyleng;
12
13
\n ++lc; ++cc;
14
15
<<EOF>> {
16
printf( "%8d %8d %8d\n", lc, wc, cc );
17
yyterminate();
18
}