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

Diff for /mandoc/main.c between version 1.312 and 1.314

version 1.312, 2018/12/14 01:18:25 version 1.314, 2018/12/20 21:30:32
Line 510  main(int argc, char *argv[])
Line 510  main(int argc, char *argv[])
                 } else                  } else
                         thisarg = *argv;                          thisarg = *argv;
   
                 mandoc_msg_setinfilename(thisarg);  
                 fd = mparse_open(curp.mp, thisarg);                  fd = mparse_open(curp.mp, thisarg);
                 if (fd != -1) {                  if (fd != -1) {
                         if (use_pager) {                          if (use_pager) {
Line 523  main(int argc, char *argv[])
Line 522  main(int argc, char *argv[])
                                             conf.output.tag : *argv;                                              conf.output.tag : *argv;
                         }                          }
   
                           mandoc_msg_setinfilename(thisarg);
                         if (resp == NULL || resp->form == FORM_SRC)                          if (resp == NULL || resp->form == FORM_SRC)
                                 parse(&curp, fd, thisarg);                                  parse(&curp, fd, thisarg);
                         else                          else
                                 passthrough(resp->file, fd,                                  passthrough(resp->file, fd,
                                     conf.output.synopsisonly);                                      conf.output.synopsisonly);
                           mandoc_msg_setinfilename(NULL);
   
                         if (ferror(stdout)) {                          if (ferror(stdout)) {
                                 if (tag_files != NULL) {                                  if (tag_files != NULL) {
Line 545  main(int argc, char *argv[])
Line 546  main(int argc, char *argv[])
                                         outdata_alloc(&curp);                                          outdata_alloc(&curp);
                                 terminal_sepline(curp.outdata);                                  terminal_sepline(curp.outdata);
                         }                          }
                 }                  } else
                 mandoc_msg_setinfilename(NULL);                          mandoc_msg(MANDOCERR_FILE, 0, 0,
                               "%s", strerror(errno));
   
                 if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)                  if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
                         break;                          break;
Line 889  check_xr(void)
Line 891  check_xr(void)
         static struct manpaths   paths;          static struct manpaths   paths;
         struct mansearch         search;          struct mansearch         search;
         struct mandoc_xr        *xr;          struct mandoc_xr        *xr;
         char                    *cp;  
         size_t                   sz;          size_t                   sz;
   
         if (paths.sz == 0)          if (paths.sz == 0)
Line 908  check_xr(void)
Line 909  check_xr(void)
                 if (fs_search(&search, &paths, 1, &xr->name, NULL, &sz))                  if (fs_search(&search, &paths, 1, &xr->name, NULL, &sz))
                         continue;                          continue;
                 if (xr->count == 1)                  if (xr->count == 1)
                         mandoc_asprintf(&cp, "Xr %s %s", xr->name, xr->sec);                          mandoc_msg(MANDOCERR_XR_BAD, xr->line,
                               xr->pos + 1, "Xr %s %s", xr->name, xr->sec);
                 else                  else
                         mandoc_asprintf(&cp, "Xr %s %s (%d times)",                          mandoc_msg(MANDOCERR_XR_BAD, xr->line,
                               xr->pos + 1, "Xr %s %s (%d times)",
                             xr->name, xr->sec, xr->count);                              xr->name, xr->sec, xr->count);
                 mandoc_msg(MANDOCERR_XR_BAD, NULL, xr->line, xr->pos + 1, cp);  
                 free(cp);  
         }          }
 }  }
   

Legend:
Removed from v.1.312  
changed lines
  Added in v.1.314

CVSweb