=================================================================== RCS file: /cvs/mandoc/catman.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -r1.25 -r1.26 --- mandoc/catman.c 2025/06/29 23:21:07 1.25 +++ mandoc/catman.c 2025/06/29 23:51:40 1.26 @@ -1,7 +1,7 @@ -/* $Id: catman.c,v 1.25 2025/06/29 23:21:07 schwarze Exp $ */ +/* $Id: catman.c,v 1.26 2025/06/29 23:51:40 schwarze Exp $ */ /* + * Copyright (c) 2017, 2025 Ingo Schwarze * Copyright (c) 2017 Michael Stapelberg - * Copyright (c) 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -41,6 +41,8 @@ #include #include +int verbose_flag = 0; + int process_manpage(int, int, const char *); int process_tree(int, int); void run_mandocd(int, const char *, const char *) @@ -234,6 +236,9 @@ process_tree(int srv_fd, int dstdir_fd) warn("FATAL: fts_read"); fts_close(ftsp); + if (verbose_flag) + warnx("processed %d files in %d directories", + goodfiles, gooddirs); if (baddirs > 0) warnx("skipped %d %s due to errors", baddirs, baddirs == 1 ? "directory" : "directories"); @@ -258,13 +263,16 @@ main(int argc, char **argv) defos = NULL; outtype = "ascii"; - while ((opt = getopt(argc, argv, "I:T:")) != -1) { + while ((opt = getopt(argc, argv, "I:T:v")) != -1) { switch (opt) { case 'I': defos = optarg; break; case 'T': outtype = optarg; + break; + case 'v': + verbose_flag = 1; break; default: usage();