Lines Matching +full:ext +full:- +full:26 +full:m

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
63 #define isstdin(path) ((path)[0] == '-' && !(path)[1])
79 const char *ext);
95 while ((c = getopt(argc, argv, "ad:in:rst:x")) != -1) in main()
117 warnx("illegal argument to -t option"); in main()
127 argc -= optind; in main()
150 switch (f->fts_info) { in main()
152 rval = fail(f->fts_path, "Directory causes a cycle"); in main()
157 rval = fail(f->fts_path, sys_errlist[f->fts_errno]); in main()
160 if (!opt_recurse && f->fts_level > FTS_ROOTLEVEL && in main()
165 if ((type = distfile(f->fts_name)) != 0 && in main()
167 rval |= ckdist(f->fts_path, type); in main()
196 type = c == 'M' ? DISTMD5 : c == 'P' ? DISTINF : 0; in ckdist()
243 if ((fd = open(dname, O_RDONLY)) == -1) in chkmd5()
266 char ext[3]; in chkinf() local
277 for (cnt = -1; fgets(buf, sizeof(buf), fp); cnt++) { in chkinf()
278 fd = -1; in chkinf()
281 if (cnt == -1) { in chkinf()
285 } else if (((c = sscanf(buf, "cksum.%2s = %lu %jd%c", ext, &sum, in chkinf()
288 ext[0] != 'a' + cnt / 26 || ext[1] != 'a' + cnt % 26) in chkinf()
291 ext)) == NULL) in chkinf()
293 else if ((fd = open(dname, O_RDONLY)) == -1) in chkinf()
305 if (fd != -1 && close(fd)) in chkinf()
351 distname(const char *path, const char *name, const char *ext) in distname() argument
365 if (ext && nlen > 4 && name[nlen - 4] == '.' && in distname()
366 disttype(name + nlen - 3) == DISTINF) in distname()
367 nlen -= 4; in distname()
373 (size_t)(s - path) : 0; in distname()
374 if (plen + (plen > 0) + nlen + (ext ? 3 : 0) >= sizeof(buf)) in distname()
384 if (ext) { in distname()
386 memcpy(s, ext, 2); in distname()
440 "usage: ckdist [-airsx] [-d dir] [-n name] [-t type] file ...\n"); in usage()