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

Diff for /src/usr.bin/mandoc/main.c between version 1.218 and 1.219

version 1.218, 2018/12/30 00:48:47 version 1.219, 2019/01/01 08:18:06
Line 117 
Line 117 
         struct manpage  *res, *resp;          struct manpage  *res, *resp;
         const char      *progname, *sec, *thisarg;          const char      *progname, *sec, *thisarg;
         char            *conf_file, *defpaths, *auxpaths;          char            *conf_file, *defpaths, *auxpaths;
         char            *oarg;          char            *oarg, *tagarg;
         unsigned char   *uc;          unsigned char   *uc;
         size_t           i, sz;          size_t           i, sz;
         int              prio, best_prio;          int              prio, best_prio;
Line 340 
Line 340 
                         search.arch = MACHINE;                          search.arch = MACHINE;
         }          }
   
           /*
            * Use the first argument for -O tag in addition to
            * using it as a search term for man(1) or apropos(1).
            */
   
           if (conf.output.tag != NULL && *conf.output.tag == '\0') {
                   tagarg = argc > 0 && search.argmode == ARG_EXPR ?
                       strchr(*argv, '=') : NULL;
                   conf.output.tag = tagarg == NULL ? *argv : tagarg + 1;
           }
   
         /* man(1), whatis(1), apropos(1) */          /* man(1), whatis(1), apropos(1) */
   
         if (search.argmode != ARG_FILE) {          if (search.argmode != ARG_FILE) {
Line 450 
Line 461 
         curp.mp = mparse_alloc(options, curp.os_e, curp.os_s);          curp.mp = mparse_alloc(options, curp.os_e, curp.os_s);
   
         if (argc < 1) {          if (argc < 1) {
                 if (use_pager)                  if (use_pager) {
                         tag_files = tag_init();                          tag_files = tag_init();
                           tag_files->tagname = conf.output.tag;
                   }
                 thisarg = "<stdin>";                  thisarg = "<stdin>";
                 mandoc_msg_setinfilename(thisarg);                  mandoc_msg_setinfilename(thisarg);
                 parse(&curp, STDIN_FILENO, thisarg);                  parse(&curp, STDIN_FILENO, thisarg);
Line 488 
Line 501 
                         if (use_pager) {                          if (use_pager) {
                                 use_pager = 0;                                  use_pager = 0;
                                 tag_files = tag_init();                                  tag_files = tag_init();
                                 if (conf.output.tag != NULL &&                                  tag_files->tagname = conf.output.tag;
                                     tag_files->tagname == NULL)  
                                         tag_files->tagname =  
                                             *conf.output.tag != '\0' ?  
                                             conf.output.tag : *argv;  
                         }                          }
   
                         mandoc_msg_setinfilename(thisarg);                          mandoc_msg_setinfilename(thisarg);

Legend:
Removed from v.1.218  
changed lines
  Added in v.1.219