version 1.214, 2016/01/08 15:02:54 |
version 1.218, 2016/07/12 05:18:38 |
|
|
#else |
#else |
#include "compat_fts.h" |
#include "compat_fts.h" |
#endif |
#endif |
#include <getopt.h> |
|
#include <limits.h> |
#include <limits.h> |
|
#if HAVE_SANDBOX_INIT |
|
#include <sandbox.h> |
|
#endif |
#include <stddef.h> |
#include <stddef.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdint.h> |
#include <stdint.h> |
Line 346 mandocdb(int argc, char *argv[]) |
|
Line 348 mandocdb(int argc, char *argv[]) |
|
} |
} |
#endif |
#endif |
|
|
|
#if HAVE_SANDBOX_INIT |
|
if (sandbox_init(kSBXProfileNoInternet, SANDBOX_NAMED, NULL) == -1) { |
|
warnx("sandbox_init"); |
|
return (int)MANDOCLEVEL_SYSERR; |
|
} |
|
#endif |
|
|
memset(&conf, 0, sizeof(conf)); |
memset(&conf, 0, sizeof(conf)); |
memset(stmts, 0, STMT__MAX * sizeof(sqlite3_stmt *)); |
memset(stmts, 0, STMT__MAX * sizeof(sqlite3_stmt *)); |
|
|
|
|
* or |
* or |
* [./]cat<section>[/<arch>]/<name>.0 |
* [./]cat<section>[/<arch>]/<name>.0 |
* |
* |
* TODO: accomodate for multi-language directories. |
* TODO: accommodate for multi-language directories. |
*/ |
*/ |
static int |
static int |
treescan(void) |
treescan(void) |
Line 1446 parse_man(struct mpage *mpage, const struct roff_meta |
|
Line 1455 parse_man(struct mpage *mpage, const struct roff_meta |
|
char byte; |
char byte; |
size_t sz; |
size_t sz; |
|
|
if (NULL == n) |
if (n == NULL) |
return; |
return; |
|
|
/* |
/* |
Line 1458 parse_man(struct mpage *mpage, const struct roff_meta |
|
Line 1467 parse_man(struct mpage *mpage, const struct roff_meta |
|
|
|
if (n->type == ROFFT_BODY && n->tok == MAN_SH) { |
if (n->type == ROFFT_BODY && n->tok == MAN_SH) { |
body = n; |
body = n; |
assert(body->parent); |
if ((head = body->parent->head) != NULL && |
if (NULL != (head = body->parent->head) && |
(head = head->child) != NULL && |
1 == head->nchild && |
head->next == NULL && |
NULL != (head = (head->child)) && |
|
head->type == ROFFT_TEXT && |
head->type == ROFFT_TEXT && |
0 == strcmp(head->string, "NAME") && |
strcmp(head->string, "NAME") == 0 && |
NULL != body->child) { |
body->child != NULL) { |
|
|
/* |
/* |
* Suck the entire NAME section into memory. |
* Suck the entire NAME section into memory. |
Line 1697 parse_mdoc_Va(struct mpage *mpage, const struct roff_m |
|
Line 1705 parse_mdoc_Va(struct mpage *mpage, const struct roff_m |
|
if (n->type != ROFFT_ELEM && n->type != ROFFT_BODY) |
if (n->type != ROFFT_ELEM && n->type != ROFFT_BODY) |
return 0; |
return 0; |
|
|
if (n->nchild == 1 && n->child->type == ROFFT_TEXT) |
if (n->child != NULL && |
|
n->child->next == NULL && |
|
n->child->type == ROFFT_TEXT) |
return 1; |
return 1; |
|
|
cp = NULL; |
cp = NULL; |