Lines Matching defs:mandir

170 junk(const char *mandir, const char *name, const char *reason)
173 fprintf(stderr, "%s/%s: %s\n", mandir, name, reason);
175 fprintf(stderr, "rm %s/%s\n", mandir, name);
177 warn("%s/%s", mandir, name);
278 already_visited(char *mandir, char *dir, int count_visit)
283 if (mandir != NULL)
284 warn("%s/%s", mandir, dir);
291 if (mandir != NULL)
292 warnx("already visited %s/%s", mandir, dir);
342 check_writable(char *mandir)
344 if (verbose && !(test_path(mandir, NULL) & TEST_WRITABLE))
345 fprintf(stderr, "%s: not writable - will only be able to write to existing cat directories\n", mandir);
353 make_writable_dir(char *mandir, char *dir)
359 warn("%s/%s: chmod", mandir, dir);
369 warn("%s/%s: mkdir", mandir, dir);
383 process_page(char *mandir, char *src, char *cat, enum Ziptype zipped)
395 warnx("%s/%s: unreadable", mandir, src);
398 junk(mandir, src, "bogus symlink");
409 mandir, src);
452 scan_section(char *mandir, char *section, char *cat_section)
470 warn("%s/%s", mandir, section);
487 junk(mandir, page_path,
499 process_page(mandir, page_path, cat_path, zipped);
509 junk(mandir, page_path,
523 process_page(mandir, page_path, cat_path, NONE);
564 junk(mandir, cat_path, junk_reason);
577 process_section(char *mandir, char *section)
581 if (already_visited(mandir, section, 1))
586 if (make_writable_dir(mandir, cat_section))
587 scan_section(mandir, section, cat_section);
666 char *mandir;
677 asprintf(&mandir, "%s/%s", dir, locale);
678 process_mandir(mandir, NULL);
679 free(mandir);
681 asprintf(&mandir, "%s/%s", dir,
683 process_mandir(mandir, NULL);
684 free(mandir);
691 mandir = strdup(dirname(dir));
693 process_mandir(mandir, section);
694 free(mandir);