Lines Matching defs:file
65 static void show_cnt(const char *file, uintmax_t linect, uintmax_t wordct,
135 show_cnt(const char *file, uintmax_t linect, uintmax_t wordct,
155 if (file != NULL)
156 (void)fprintf(out, " %s\n", file);
162 cnt(const char *file)
175 if (file == NULL)
178 if ((fd = open(file, O_RDONLY, 0)) < 0) {
179 warn("%s: open", file);
192 warn("%s: read", file);
197 show_cnt(file, linect, wordct, charct,
217 show_cnt(file, linect, wordct, charct, llct);
223 * regular file, just stat the puppy.
227 warn("%s: fstat", file);
233 show_cnt(file, linect, wordct, charct, llct);
247 warn("%s: read", file != NULL ? file : "stdin");
254 show_cnt(file, linect, wordct, charct, llct);
263 file != NULL ? file : "stdin");
294 warn("%s", file != NULL ? file : "stdin");
305 show_cnt(file, linect, wordct, charct, llct);
313 (void)fprintf(stderr, "usage: wc [-Lclmw] [file ...]\n");