[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.296

version 1.295, 2017/07/01 12:02:31 version 1.296, 2017/07/01 12:54:07
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;

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

CVSweb