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

Diff for /mandoc/main.c between version 1.295 and 1.297

version 1.295, 2017/07/01 12:02:31 version 1.297, 2017/07/02 15:31:59
Line 663  fs_lookup(const struct manpaths *paths, size_t ipath,
Line 663  fs_lookup(const struct manpaths *paths, size_t ipath,
         if (globres == 0)          if (globres == 0)
                 file = mandoc_strdup(*globinfo.gl_pathv);                  file = mandoc_strdup(*globinfo.gl_pathv);
         globfree(&globinfo);          globfree(&globinfo);
         if (globres != 0)          if (globres == 0)
                   goto found;
           if (res != NULL || ipath + 1 != paths->sz)
                 return 0;                  return 0;
   
           mandoc_asprintf(&file, "%s.%s", name, sec);
           globres = access(file, R_OK);
           free(file);
           return globres != -1;
   
 found:  found:
         warnx("outdated mandoc.db lacks %s(%s) entry, run %s %s",          warnx("outdated mandoc.db lacks %s(%s) entry, run %s %s",
             name, sec, BINM_MAKEWHATIS, paths->paths[ipath]);              name, sec, BINM_MAKEWHATIS, paths->paths[ipath]);
         if (res == NULL)          if (res == NULL) {
                   free(file);
                 return 1;                  return 1;
           }
         *res = mandoc_reallocarray(*res, ++*ressz, sizeof(struct manpage));          *res = mandoc_reallocarray(*res, ++*ressz, sizeof(struct manpage));
         page = *res + (*ressz - 1);          page = *res + (*ressz - 1);
         page->file = file;          page->file = file;
Line 754  parse(struct curparse *curp, int fd, const char *file)
Line 763  parse(struct curparse *curp, int fd, const char *file)
   
         if (man == NULL)          if (man == NULL)
                 return;                  return;
         if (curp->mmin < MANDOCERR_STYLE)          mandoc_xr_reset();
                 mandoc_xr_reset();  
         if (man->macroset == MACROSET_MDOC) {          if (man->macroset == MACROSET_MDOC) {
                 if (curp->outtype != OUTT_TREE || !curp->outopts->noval)                  if (curp->outtype != OUTT_TREE || !curp->outopts->noval)
                         mdoc_validate(man);                          mdoc_validate(man);
Line 807  parse(struct curparse *curp, int fd, const char *file)
Line 815  parse(struct curparse *curp, int fd, const char *file)
                         break;                          break;
                 }                  }
         }          }
         check_xr(file);          if (curp->mmin < MANDOCERR_STYLE)
                   check_xr(file);
         mparse_updaterc(curp->mp, &rc);          mparse_updaterc(curp->mp, &rc);
 }  }
   
Line 824  check_xr(const char *file)
Line 833  check_xr(const char *file)
                 manpath_base(&paths);                  manpath_base(&paths);
   
         for (xr = mandoc_xr_get(); xr != NULL; xr = xr->next) {          for (xr = mandoc_xr_get(); xr != NULL; xr = xr->next) {
                   if (xr->line == -1)
                           continue;
                 search.arch = NULL;                  search.arch = NULL;
                 search.sec = xr->sec;                  search.sec = xr->sec;
                 search.outkey = NULL;                  search.outkey = NULL;

Legend:
Removed from v.1.295  
changed lines
  Added in v.1.297

CVSweb