[BACK]Return to mandocdb.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mandocdb.c between version 1.24 and 1.25

version 1.24, 2011/12/10 22:01:03 version 1.25, 2011/12/12 01:59:13
Line 260 
Line 260 
         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 */
Line 299 
Line 300 
         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;
Line 414 
Line 419 
                         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';
Line 1648 
Line 1653 
 {  {
   
         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);
 }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25