version 1.24, 2011/12/10 22:01:03 |
version 1.25, 2011/12/12 01:59:13 |
|
|
struct manpaths dirs; |
struct manpaths dirs; |
enum op op; /* current operation */ |
enum op op; /* current operation */ |
const char *dir; |
const char *dir; |
|
char *conf_file; |
char *cp; |
char *cp; |
char pbuf[PATH_MAX], |
char pbuf[PATH_MAX], |
ibuf[MAXPATHLEN], /* index fname */ |
ibuf[MAXPATHLEN], /* index fname */ |
|
|
maxrec = 0; |
maxrec = 0; |
op = OP_NEW; |
op = OP_NEW; |
dir = NULL; |
dir = NULL; |
|
conf_file = NULL; |
|
|
while (-1 != (ch = getopt(argc, argv, "ad:u:v"))) |
while (-1 != (ch = getopt(argc, argv, "aC:d:u:v"))) |
switch (ch) { |
switch (ch) { |
case ('a'): |
case ('a'): |
use_all = 1; |
use_all = 1; |
break; |
break; |
|
case ('C'): |
|
conf_file = optarg; |
|
break; |
case ('d'): |
case ('d'): |
dir = optarg; |
dir = optarg; |
op = OP_UPDATE; |
op = OP_UPDATE; |
|
|
dirs.paths[i] = mandoc_strdup(cp); |
dirs.paths[i] = mandoc_strdup(cp); |
} |
} |
} else |
} else |
manpath_parse(&dirs, NULL, NULL); |
manpath_parse(&dirs, conf_file, NULL, NULL); |
|
|
for (i = 0; i < dirs.sz; i++) { |
for (i = 0; i < dirs.sz; i++) { |
ibuf[0] = fbuf[0] = '\0'; |
ibuf[0] = fbuf[0] = '\0'; |
|
|
{ |
{ |
|
|
fprintf(stderr, "usage: %s [-v] " |
fprintf(stderr, "usage: %s [-v] " |
"[-d dir [files...] |" |
"[-C file] |" |
" -u dir [files...] |" |
" dir ... |" |
" dir...]\n", progname); |
" -d dir [file ...] |" |
|
" -u dir [file ...]\n", progname); |
} |
} |