[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.198 and 1.199

version 1.198, 2017/07/01 12:00:12 version 1.199, 2017/07/01 12:53:56
Line 633 
Line 633 
         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 makewhatis %s",          warnx("outdated mandoc.db lacks %s(%s) entry, run makewhatis %s",
             name, sec, paths->paths[ipath]);              name, sec, 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.198  
changed lines
  Added in v.1.199