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

Diff for /src/usr.bin/mandoc/manpath.c between version 1.5 and 1.6

version 1.5, 2012/12/04 02:24:47 version 1.6, 2013/05/29 23:15:11
Line 66 
Line 66 
         }          }
   
         /* Append man.conf(5) to MANPATH. */          /* Append man.conf(5) to MANPATH. */
         if (':' == defp[(int)strlen(defp) - 1]) {          if (':' == defp[strlen(defp) - 1]) {
                 manpath_parseline(dirs, defp);                  manpath_parseline(dirs, defp);
                 manpath_manconf(dirs, file);                  manpath_manconf(dirs, file);
                 return;                  return;
Line 110 
Line 110 
 {  {
         char             buf[PATH_MAX];          char             buf[PATH_MAX];
         char            *cp;          char            *cp;
         int              i;          size_t           i;
   
         if (NULL == (cp = realpath(dir, buf)))          if (NULL == (cp = realpath(dir, buf)))
                 return;                  return;
Line 121 
Line 121 
   
         dirs->paths = mandoc_realloc          dirs->paths = mandoc_realloc
                 (dirs->paths,                  (dirs->paths,
                  ((size_t)dirs->sz + 1) * sizeof(char *));                   (dirs->sz + 1) * sizeof(char *));
   
         dirs->paths[dirs->sz++] = mandoc_strdup(cp);          dirs->paths[dirs->sz++] = mandoc_strdup(cp);
 }  }
Line 129 
Line 129 
 void  void
 manpath_free(struct manpaths *p)  manpath_free(struct manpaths *p)
 {  {
         int              i;          size_t           i;
   
         for (i = 0; i < p->sz; i++)          for (i = 0; i < p->sz; i++)
                 free(p->paths[i]);                  free(p->paths[i]);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6