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

Diff for /mandoc/Attic/manup.c between version 1.1 and 1.2

version 1.1, 2011/11/24 10:33:38 version 1.2, 2011/11/24 12:22:53
Line 391  treecpy(char *dst, char *src)
Line 391  treecpy(char *dst, char *src)
         xstrlcat(src, "/mandoc.db", MAXPATHLEN);          xstrlcat(src, "/mandoc.db", MAXPATHLEN);
         xstrlcat(dst, "/mandoc.db", MAXPATHLEN);          xstrlcat(dst, "/mandoc.db", MAXPATHLEN);
   
         if ((rc = isnewer(dst, src)) <= 0)          if (-1 == (rc = isnewer(dst, src)))
                 return(0);                  return(0);
           else if (rc == 0)
                   return(1);
   
         dst[(int)dsz] = src[(int)ssz] = '\0';          dst[(int)dsz] = src[(int)ssz] = '\0';
   
Line 425  manup(const struct manpaths *dirs, const char *dir)
Line 427  manup(const struct manpaths *dirs, const char *dir)
   
         xstrlcat(dst, "/man.conf", MAXPATHLEN);          xstrlcat(dst, "/man.conf", MAXPATHLEN);
   
           if (verbose)
                   printf("%s\n", dst);
   
         if (NULL == (f = fopen(dst, "w"))) {          if (NULL == (f = fopen(dst, "w"))) {
                 perror(dst);                  perror(dst);
                 return(0);                  return(0);
Line 451  manup(const struct manpaths *dirs, const char *dir)
Line 456  manup(const struct manpaths *dirs, const char *dir)
                 else if (0 == c)                  else if (0 == c)
                         continue;                          continue;
   
                 fprintf(f, "_whatdb %s/whatis.db\n", path);                  /*
                    * We want to use a relative path here because manpath.h
                    * will realpath() when invoked with man.cgi, and we'll
                    * make sure to chdir() into the cache directory before.
                    *
                    * This allows the cache directory to be in an arbitrary
                    * place, working in both chroot() and non-chroot()
                    * "safe" modes.
                    */
                   assert('/' == path[0]);
                   fprintf(f, "_whatdb %s/whatis.db\n", path + 1);
         }          }
   
         fclose(f);          fclose(f);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb