[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/main.c between version 1.198 and 1.201

version 1.198, 2014/11/11 02:43:41 version 1.201, 2014/12/02 11:31:51
Line 115  main(int argc, char *argv[])
Line 115  main(int argc, char *argv[])
 #endif  #endif
         enum mandoclevel rc;          enum mandoclevel rc;
         enum outmode     outmode;          enum outmode     outmode;
         pid_t            child_pid;  
         int              fd;          int              fd;
         int              show_usage;          int              show_usage;
         int              use_pager;          int              use_pager;
Line 149  main(int argc, char *argv[])
Line 148  main(int argc, char *argv[])
         /* Parser and formatter options. */          /* Parser and formatter options. */
   
         memset(&curp, 0, sizeof(struct curparse));          memset(&curp, 0, sizeof(struct curparse));
         curp.outtype = OUTT_ASCII;          curp.outtype = OUTT_LOCALE;
         curp.wlevel  = MANDOCLEVEL_FATAL;          curp.wlevel  = MANDOCLEVEL_FATAL;
         options = MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1;          options = MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1;
         defos = NULL;          defos = NULL;
Line 294  main(int argc, char *argv[])
Line 293  main(int argc, char *argv[])
                 if (argc == 0)                  if (argc == 0)
                         usage(search.argmode);                          usage(search.argmode);
   
                   if (search.argmode == ARG_NAME &&
                       outmode == OUTMODE_ONE)
                           search.firstmatch = 1;
   
                 /* Access the mandoc database. */                  /* Access the mandoc database. */
   
                 manpath_parse(&paths, conf_file, defpaths, auxpaths);                  manpath_parse(&paths, conf_file, defpaths, auxpaths);
Line 384  main(int argc, char *argv[])
Line 387  main(int argc, char *argv[])
         while (argc) {          while (argc) {
 #if HAVE_SQLITE3  #if HAVE_SQLITE3
                 if (resp != NULL) {                  if (resp != NULL) {
                         rc = mparse_open(curp.mp, &fd, resp->file,                          rc = mparse_open(curp.mp, &fd, resp->file);
                             &child_pid);  
                         if (fd == -1)                          if (fd == -1)
                                 /* nothing */;                                  /* nothing */;
                         else if (resp->form & FORM_SRC) {                          else if (resp->form & FORM_SRC) {
Line 399  main(int argc, char *argv[])
Line 401  main(int argc, char *argv[])
                 } else                  } else
 #endif  #endif
                 {                  {
                         rc = mparse_open(curp.mp, &fd, *argv++,                          rc = mparse_open(curp.mp, &fd, *argv++);
                             &child_pid);  
                         if (fd != -1)                          if (fd != -1)
                                 parse(&curp, fd, argv[-1], &rc);                                  parse(&curp, fd, argv[-1], &rc);
                 }                  }
   
                 if (child_pid &&                  if (mparse_wait(curp.mp) != MANDOCLEVEL_OK)
                     mparse_wait(curp.mp, child_pid) != MANDOCLEVEL_OK)  
                         rc = MANDOCLEVEL_SYSERR;                          rc = MANDOCLEVEL_SYSERR;
   
                 if (MANDOCLEVEL_OK != rc && curp.wstop)                  if (MANDOCLEVEL_OK != rc && curp.wstop)

Legend:
Removed from v.1.198  
changed lines
  Added in v.1.201

CVSweb