/* wc line and word count */
long linect
, wordct
, charct
;
long tlinect
=0, twordct
=0, tcharct
=0;
if(argc
> 1 && *argv
[1] == '-') {
if(argc
>1 && (fp
=fopen(argv
[i
], "r")) == NULL
) {
fprintf(stderr
, "wc: can't open %s\n", argv
[i
]);
/* print lines, words, chars */
wcp(wd
, charct
, wordct
, linect
);
printf(" %s\n", argv
[i
]);
wcp(wd
, tcharct
, twordct
, tlinect
);
wcp(wd
, charct
, wordct
, linect
)
long charct
; long wordct
; long linect
;
while (*wd
) switch (*wd
++) {