version 1.46, 2012/03/23 06:52:17 |
version 1.49, 2012/05/27 17:48:57 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
Line 137 static void index_merge(const struct of *, struct m |
|
Line 137 static void index_merge(const struct of *, struct m |
|
const char *); |
const char *); |
static void index_prune(const struct of *, struct mdb *, |
static void index_prune(const struct of *, struct mdb *, |
struct recs *, const char *); |
struct recs *, const char *); |
static void ofile_argbuild(int, char *[], |
static void ofile_argbuild(int, char *[], |
struct of **, const char *); |
struct of **, const char *); |
static void ofile_dirbuild(const char *, const char *, |
static void ofile_dirbuild(const char *, const char *, |
const char *, int, struct of **, char *); |
const char *, int, struct of **, char *); |
static void ofile_free(struct of *); |
static void ofile_free(struct of *); |
static void pformatted(DB *, struct buf *, struct buf *, |
static void pformatted(DB *, struct buf *, struct buf *, |
const struct of *, const char *); |
const struct of *, const char *); |
static int pman_node(MAN_ARGS); |
static int pman_node(MAN_ARGS); |
static void pmdoc_node(MDOC_ARGS); |
static void pmdoc_node(MDOC_ARGS); |
Line 396 main(int argc, char *argv[]) |
|
Line 396 main(int argc, char *argv[]) |
|
info.lorder = 4321; |
info.lorder = 4321; |
info.flags = R_DUP; |
info.flags = R_DUP; |
|
|
mp = mparse_alloc(MPARSE_AUTO, MANDOCLEVEL_FATAL, NULL, NULL); |
mp = mparse_alloc(MPARSE_AUTO, MANDOCLEVEL_FATAL, NULL, NULL, NULL); |
|
|
memset(&buf, 0, sizeof(struct buf)); |
memset(&buf, 0, sizeof(struct buf)); |
memset(&dbuf, 0, sizeof(struct buf)); |
memset(&dbuf, 0, sizeof(struct buf)); |
Line 410 main(int argc, char *argv[]) |
|
Line 410 main(int argc, char *argv[]) |
|
ofile_argbuild(argc, argv, &of, "."); |
ofile_argbuild(argc, argv, &of, "."); |
if (NULL == of) |
if (NULL == of) |
goto out; |
goto out; |
index_merge(of, mp, &dbuf, &buf, |
index_merge(of, mp, &dbuf, &buf, |
hash, &mdb, &recs, "."); |
hash, &mdb, &recs, "."); |
goto out; |
goto out; |
} |
} |
Line 651 index_merge(const struct of *of, struct mparse *mp, |
|
Line 651 index_merge(const struct of *of, struct mparse *mp, |
|
assert(march); |
assert(march); |
if (strcasecmp(march, of->arch)) |
if (strcasecmp(march, of->arch)) |
WARNING(fn, basedir, "Architecture \"%s\" " |
WARNING(fn, basedir, "Architecture \"%s\" " |
"manual in \"%s\" directory", |
"manual in \"%s\" directory", |
march, of->arch); |
march, of->arch); |
|
|
/* |
/* |
Line 822 index_merge(const struct of *of, struct mparse *mp, |
|
Line 822 index_merge(const struct of *of, struct mparse *mp, |
|
while (0 == (*files->seq)(files, &key, &val, seq)) { |
while (0 == (*files->seq)(files, &key, &val, seq)) { |
seq = R_NEXT; |
seq = R_NEXT; |
if (val.size) |
if (val.size) |
WARNING((char *)val.data, basedir, |
WARNING((char *)val.data, basedir, |
"Probably unreachable, title " |
"Probably unreachable, title " |
"is %s", (char *)key.data); |
"is %s", (char *)key.data); |
} |
} |
Line 837 index_merge(const struct of *of, struct mparse *mp, |
|
Line 837 index_merge(const struct of *of, struct mparse *mp, |
|
* in `idx' (zeroing its value size). |
* in `idx' (zeroing its value size). |
*/ |
*/ |
static void |
static void |
index_prune(const struct of *ofile, struct mdb *mdb, |
index_prune(const struct of *ofile, struct mdb *mdb, |
struct recs *recs, const char *basedir) |
struct recs *recs, const char *basedir) |
{ |
{ |
const struct of *of; |
const struct of *of; |
Line 913 index_prune(const struct of *ofile, struct mdb *mdb, |
|
Line 913 index_prune(const struct of *ofile, struct mdb *mdb, |
|
} |
} |
|
|
if (verb) |
if (verb) |
printf("%s: Deleting from index: %s\n", |
printf("%s: Deleting from index: %s\n", |
basedir, fn); |
basedir, fn); |
|
|
val.size = 0; |
val.size = 0; |
Line 1760 ofile_dirbuild(const char *dir, const char* psec, cons |
|
Line 1760 ofile_dirbuild(const char *dir, const char* psec, cons |
|
continue; |
continue; |
} |
} |
|
|
ofile_dirbuild(buf, sec, arch, |
ofile_dirbuild(buf, sec, arch, |
src_form, of, basedir); |
src_form, of, basedir); |
|
|
p = strrchr(basedir, '/'); |
p = strrchr(basedir, '/'); |