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

Diff for /mandoc/mandocdb.c between version 1.39 and 1.42

version 1.39, 2011/12/25 14:58:39 version 1.42, 2011/12/28 00:32:13
Line 615  index_merge(const struct of *of, struct mparse *mp,
Line 615  index_merge(const struct of *of, struct mparse *mp,
   
                 /*                  /*
                  * By default, skip a file if the manual section                   * By default, skip a file if the manual section
                  * and architecture given in the file disagree                   * given in the file disagrees with the directory
                  * with the directory where the file is located.                   * where the file is located.
                  */                   */
   
                 skip = 0;                  skip = 0;
Line 631  index_merge(const struct of *of, struct mparse *mp,
Line 631  index_merge(const struct of *of, struct mparse *mp,
                         skip = 1;                          skip = 1;
                 }                  }
   
                   /*
                    * Manual page directories exist for each kernel
                    * architecture as returned by machine(1).
                    * However, many manuals only depend on the
                    * application architecture as returned by arch(1).
                    * For example, some (2/ARM) manuals are shared
                    * across the "armish" and "zaurus" kernel
                    * architectures.
                    * A few manuals are even shared across completely
                    * different architectures, for example fdformat(1)
                    * on amd64, i386, sparc, and sparc64.
                    * Thus, warn about architecture mismatches,
                    * but don't skip manuals for this reason.
                    */
   
                 assert(of->arch);                  assert(of->arch);
                 assert(march);                  assert(march);
                 if (strcasecmp(march, of->arch)) {                  if (strcasecmp(march, of->arch)) {
Line 639  index_merge(const struct of *of, struct mparse *mp,
Line 654  index_merge(const struct of *of, struct mparse *mp,
                                         "architecture \"%s\" manual "                                          "architecture \"%s\" manual "
                                         "in \"%s\" directory\n",                                          "in \"%s\" directory\n",
                                         fn, march, of->arch);                                          fn, march, of->arch);
                         skip = 1;                          march = of->arch;
                 }                  }
   
                 /*                  /*
Line 1452  static void
Line 1467  static void
 ofile_argbuild(int argc, char *argv[], struct of **of)  ofile_argbuild(int argc, char *argv[], struct of **of)
 {  {
         char             buf[MAXPATHLEN];          char             buf[MAXPATHLEN];
         char            *sec, *arch, *title, *p;          const char      *sec, *arch, *title;
           char            *p;
         int              i, src_form;          int              i, src_form;
         struct of       *nof;          struct of       *nof;
   
Line 1538  ofile_argbuild(int argc, char *argv[], struct of **of)
Line 1554  ofile_argbuild(int argc, char *argv[], struct of **of)
  * Recursively build up a list of files to parse.   * Recursively build up a list of files to parse.
  * We use this instead of ftw() and so on because I don't want global   * We use this instead of ftw() and so on because I don't want global
  * variables hanging around.   * variables hanging around.
  * This ignores the mandoc.db and mandoc.index files, but assumes that   * This ignores the whatis.db and whatis.index files, but assumes that
  * everything else is a manual.   * everything else is a manual.
  * Pass in a pointer to a NULL structure for the first invocation.   * Pass in a pointer to a NULL structure for the first invocation.
  */   */
Line 1756  ofile_dirbuild(const char *dir, const char* psec, cons
Line 1772  ofile_dirbuild(const char *dir, const char* psec, cons
   
                 if (verb > 1)                  if (verb > 1)
                         printf("%s: scheduling\n", buf);                          printf("%s: scheduling\n", buf);
   
                 if (NULL == *of) {                  if (NULL == *of) {
                         *of = nof;                          *of = nof;
                         (*of)->first = nof;                          (*of)->first = nof;
Line 1774  ofile_free(struct of *of)
Line 1791  ofile_free(struct of *of)
 {  {
         struct of       *nof;          struct of       *nof;
   
         while (of) {          if (NULL != of)
                   of = of->first;
   
           while (NULL != of) {
                 nof = of->next;                  nof = of->next;
                 free(of->fname);                  free(of->fname);
                 free(of->sec);                  free(of->sec);

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.42

CVSweb