version 1.208, 2015/11/07 14:22:29 |
version 1.220.2.3, 2016/10/20 18:52:27 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org> |
|
* Copyright (c) 2016 Ed Maste <emaste@freebsd.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 |
|
|
#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> |
|
|
char *arch; /* architecture from file content */ |
char *arch; /* architecture from file content */ |
char *title; /* title from file content */ |
char *title; /* title from file content */ |
char *desc; /* description from file content */ |
char *desc; /* description from file content */ |
|
struct mpage *next; /* singly linked list */ |
struct mlink *mlinks; /* singly linked list */ |
struct mlink *mlinks; /* singly linked list */ |
int form; /* format from file content */ |
int form; /* format from file content */ |
int name_head_done; |
int name_head_done; |
Line 137 struct mdoc_handler { |
|
Line 141 struct mdoc_handler { |
|
uint64_t mask; /* set unless handler returns 0 */ |
uint64_t mask; /* set unless handler returns 0 */ |
}; |
}; |
|
|
|
|
|
int mandocdb(int, char *[]); |
|
|
static void dbclose(int); |
static void dbclose(int); |
static void dbadd(struct mpage *); |
static void dbadd(struct mpage *); |
static void dbadd_mlink(const struct mlink *mlink); |
static void dbadd_mlink(const struct mlink *mlink); |
Line 144 static void dbadd_mlink_name(const struct mlink *mlin |
|
Line 151 static void dbadd_mlink_name(const struct mlink *mlin |
|
static int dbopen(int); |
static int dbopen(int); |
static void dbprune(void); |
static void dbprune(void); |
static void filescan(const char *); |
static void filescan(const char *); |
|
#if HAVE_FTS_COMPARE_CONST |
|
static int fts_compare(const FTSENT *const *, const FTSENT *const *); |
|
#else |
|
static int fts_compare(const FTSENT **, const FTSENT **); |
|
#endif |
static void mlink_add(struct mlink *, const struct stat *); |
static void mlink_add(struct mlink *, const struct stat *); |
static void mlink_check(struct mpage *, struct mlink *); |
static void mlink_check(struct mpage *, struct mlink *); |
static void mlink_free(struct mlink *); |
static void mlink_free(struct mlink *); |
Line 156 static void parse_man(struct mpage *, const struct ro |
|
Line 168 static void parse_man(struct mpage *, const struct ro |
|
const struct roff_node *); |
const struct roff_node *); |
static void parse_mdoc(struct mpage *, const struct roff_meta *, |
static void parse_mdoc(struct mpage *, const struct roff_meta *, |
const struct roff_node *); |
const struct roff_node *); |
static int parse_mdoc_body(struct mpage *, const struct roff_meta *, |
|
const struct roff_node *); |
|
static int parse_mdoc_head(struct mpage *, const struct roff_meta *, |
static int parse_mdoc_head(struct mpage *, const struct roff_meta *, |
const struct roff_node *); |
const struct roff_node *); |
static int parse_mdoc_Fd(struct mpage *, const struct roff_meta *, |
static int parse_mdoc_Fd(struct mpage *, const struct roff_meta *, |
Line 173 static int parse_mdoc_Nm(struct mpage *, const struct |
|
Line 183 static int parse_mdoc_Nm(struct mpage *, const struct |
|
const struct roff_node *); |
const struct roff_node *); |
static int parse_mdoc_Sh(struct mpage *, const struct roff_meta *, |
static int parse_mdoc_Sh(struct mpage *, const struct roff_meta *, |
const struct roff_node *); |
const struct roff_node *); |
|
static int parse_mdoc_Va(struct mpage *, const struct roff_meta *, |
|
const struct roff_node *); |
static int parse_mdoc_Xr(struct mpage *, const struct roff_meta *, |
static int parse_mdoc_Xr(struct mpage *, const struct roff_meta *, |
const struct roff_node *); |
const struct roff_node *); |
static void putkey(const struct mpage *, char *, uint64_t); |
static void putkey(const struct mpage *, char *, uint64_t); |
Line 180 static void putkeys(const struct mpage *, char *, siz |
|
Line 192 static void putkeys(const struct mpage *, char *, siz |
|
static void putmdockey(const struct mpage *, |
static void putmdockey(const struct mpage *, |
const struct roff_node *, uint64_t); |
const struct roff_node *, uint64_t); |
static int render_string(char **, size_t *); |
static int render_string(char **, size_t *); |
static void say(const char *, const char *, ...); |
static void say(const char *, const char *, ...) |
|
__attribute__((__format__ (printf, 2, 3))); |
static int set_basedir(const char *, int); |
static int set_basedir(const char *, int); |
static int treescan(void); |
static int treescan(void); |
static size_t utf8(unsigned int, char [7]); |
static size_t utf8(unsigned int, char [7]); |
Line 195 static int write_utf8; /* write UTF-8 output; else A |
|
Line 208 static int write_utf8; /* write UTF-8 output; else A |
|
static int exitcode; /* to be returned by main */ |
static int exitcode; /* to be returned by main */ |
static enum op op; /* operational mode */ |
static enum op op; /* operational mode */ |
static char basedir[PATH_MAX]; /* current base directory */ |
static char basedir[PATH_MAX]; /* current base directory */ |
|
static struct mpage *mpage_head; /* list of distinct manual pages */ |
static struct ohash mpages; /* table of distinct manual pages */ |
static struct ohash mpages; /* table of distinct manual pages */ |
static struct ohash mlinks; /* table of directory entries */ |
static struct ohash mlinks; /* table of directory entries */ |
static struct ohash names; /* table of all names */ |
static struct ohash names; /* table of all names */ |
Line 242 static const struct mdoc_handler mdocs[MDOC_MAX] = { |
|
Line 256 static const struct mdoc_handler mdocs[MDOC_MAX] = { |
|
{ NULL, TYPE_Pa }, /* Pa */ |
{ NULL, TYPE_Pa }, /* Pa */ |
{ NULL, 0 }, /* Rv */ |
{ NULL, 0 }, /* Rv */ |
{ NULL, TYPE_St }, /* St */ |
{ NULL, TYPE_St }, /* St */ |
{ NULL, TYPE_Va }, /* Va */ |
{ parse_mdoc_Va, TYPE_Va }, /* Va */ |
{ parse_mdoc_body, TYPE_Va }, /* Vt */ |
{ parse_mdoc_Va, TYPE_Vt }, /* Vt */ |
{ parse_mdoc_Xr, 0 }, /* Xr */ |
{ parse_mdoc_Xr, 0 }, /* Xr */ |
{ NULL, 0 }, /* %A */ |
{ NULL, 0 }, /* %A */ |
{ NULL, 0 }, /* %B */ |
{ NULL, 0 }, /* %B */ |
Line 341 mandocdb(int argc, char *argv[]) |
|
Line 355 mandocdb(int argc, char *argv[]) |
|
|
|
#if HAVE_PLEDGE |
#if HAVE_PLEDGE |
if (pledge("stdio rpath wpath cpath fattr flock proc exec", NULL) == -1) { |
if (pledge("stdio rpath wpath cpath fattr flock proc exec", NULL) == -1) { |
perror("pledge"); |
warn("pledge"); |
return (int)MANDOCLEVEL_SYSERR; |
return (int)MANDOCLEVEL_SYSERR; |
} |
} |
#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 *)); |
|
|
Line 420 mandocdb(int argc, char *argv[]) |
|
Line 441 mandocdb(int argc, char *argv[]) |
|
argv += optind; |
argv += optind; |
|
|
#if HAVE_PLEDGE |
#if HAVE_PLEDGE |
if (nodb && pledge("stdio rpath", NULL) == -1) { |
if (nodb) { |
perror("pledge"); |
if (pledge("stdio rpath", NULL) == -1) { |
return (int)MANDOCLEVEL_SYSERR; |
warn("pledge"); |
|
return (int)MANDOCLEVEL_SYSERR; |
|
} |
} |
} |
#endif |
#endif |
|
|
Line 452 mandocdb(int argc, char *argv[]) |
|
Line 475 mandocdb(int argc, char *argv[]) |
|
* all files specified on the command-line. |
* all files specified on the command-line. |
*/ |
*/ |
#if HAVE_PLEDGE |
#if HAVE_PLEDGE |
if (!nodb && pledge("stdio rpath wpath cpath fattr flock", |
if (!nodb) { |
NULL) == -1) { |
if (pledge("stdio rpath wpath cpath fattr flock", NULL) == -1) { |
perror("pledge"); |
warn("pledge"); |
exitcode = (int)MANDOCLEVEL_SYSERR; |
exitcode = (int)MANDOCLEVEL_SYSERR; |
goto out; |
goto out; |
|
} |
} |
} |
#endif |
#endif |
use_all = 1; |
use_all = 1; |
|
|
} |
} |
|
|
/* |
/* |
|
* To get a singly linked list in alpha order while inserting entries |
|
* at the beginning, process directory entries in reverse alpha order. |
|
*/ |
|
static int |
|
#if HAVE_FTS_COMPARE_CONST |
|
fts_compare(const FTSENT *const *a, const FTSENT *const *b) |
|
#else |
|
fts_compare(const FTSENT **a, const FTSENT **b) |
|
#endif |
|
{ |
|
return -strcmp((*a)->fts_name, (*b)->fts_name); |
|
} |
|
|
|
/* |
* Scan a directory tree rooted at "basedir" for manpages. |
* Scan a directory tree rooted at "basedir" for manpages. |
* We use fts(), scanning directory parts along the way for clues to our |
* We use fts(), scanning directory parts along the way for clues to our |
* section and architecture. |
* section and architecture. |
|
|
* 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) |
|
|
argv[0] = "."; |
argv[0] = "."; |
argv[1] = (char *)NULL; |
argv[1] = (char *)NULL; |
|
|
f = fts_open((char * const *)argv, |
f = fts_open((char * const *)argv, FTS_PHYSICAL | FTS_NOCHDIR, |
FTS_PHYSICAL | FTS_NOCHDIR, NULL); |
fts_compare); |
if (f == NULL) { |
if (f == NULL) { |
exitcode = (int)MANDOCLEVEL_SYSERR; |
exitcode = (int)MANDOCLEVEL_SYSERR; |
say("", "&fts_open"); |
say("", "&fts_open"); |
Line 954 mlink_add(struct mlink *mlink, const struct stat *st) |
|
Line 992 mlink_add(struct mlink *mlink, const struct stat *st) |
|
mpage = mandoc_calloc(1, sizeof(struct mpage)); |
mpage = mandoc_calloc(1, sizeof(struct mpage)); |
mpage->inodev.st_ino = inodev.st_ino; |
mpage->inodev.st_ino = inodev.st_ino; |
mpage->inodev.st_dev = inodev.st_dev; |
mpage->inodev.st_dev = inodev.st_dev; |
|
mpage->next = mpage_head; |
|
mpage_head = mpage; |
ohash_insert(&mpages, slot, mpage); |
ohash_insert(&mpages, slot, mpage); |
} else |
} else |
mlink->next = mpage->mlinks; |
mlink->next = mpage->mlinks; |
Line 977 mpages_free(void) |
|
Line 1017 mpages_free(void) |
|
{ |
{ |
struct mpage *mpage; |
struct mpage *mpage; |
struct mlink *mlink; |
struct mlink *mlink; |
unsigned int slot; |
|
|
|
mpage = ohash_first(&mpages, &slot); |
while ((mpage = mpage_head) != NULL) { |
while (NULL != mpage) { |
while ((mlink = mpage->mlinks) != NULL) { |
while (NULL != (mlink = mpage->mlinks)) { |
|
mpage->mlinks = mlink->next; |
mpage->mlinks = mlink->next; |
mlink_free(mlink); |
mlink_free(mlink); |
} |
} |
|
mpage_head = mpage->next; |
free(mpage->sec); |
free(mpage->sec); |
free(mpage->arch); |
free(mpage->arch); |
free(mpage->title); |
free(mpage->title); |
free(mpage->desc); |
free(mpage->desc); |
free(mpage); |
free(mpage); |
mpage = ohash_next(&mpages, &slot); |
|
} |
} |
} |
} |
|
|
Line 1111 mpages_merge(struct mparse *mp) |
|
Line 1149 mpages_merge(struct mparse *mp) |
|
char *sodest; |
char *sodest; |
char *cp; |
char *cp; |
int fd; |
int fd; |
unsigned int pslot; |
|
|
|
if ( ! nodb) |
if ( ! nodb) |
SQL_EXEC("BEGIN TRANSACTION"); |
SQL_EXEC("BEGIN TRANSACTION"); |
|
|
mpage = ohash_first(&mpages, &pslot); |
for (mpage = mpage_head; mpage != NULL; mpage = mpage->next) { |
while (mpage != NULL) { |
|
mlinks_undupe(mpage); |
mlinks_undupe(mpage); |
if ((mlink = mpage->mlinks) == NULL) { |
if ((mlink = mpage->mlinks) == NULL) |
mpage = ohash_next(&mpages, &pslot); |
|
continue; |
continue; |
} |
|
|
|
name_mask = NAME_MASK; |
name_mask = NAME_MASK; |
mandoc_ohash_init(&names, 4, offsetof(struct str, key)); |
mandoc_ohash_init(&names, 4, offsetof(struct str, key)); |
Line 1131 mpages_merge(struct mparse *mp) |
|
Line 1165 mpages_merge(struct mparse *mp) |
|
man = NULL; |
man = NULL; |
sodest = NULL; |
sodest = NULL; |
|
|
mparse_open(mp, &fd, mlink->file); |
if ((fd = mparse_open(mp, mlink->file)) == -1) { |
if (fd == -1) { |
|
say(mlink->file, "&open"); |
say(mlink->file, "&open"); |
goto nextpage; |
goto nextpage; |
} |
} |
Line 1143 mpages_merge(struct mparse *mp) |
|
Line 1176 mpages_merge(struct mparse *mp) |
|
*/ |
*/ |
if (mlink->dform != FORM_CAT || mlink->fform != FORM_CAT) { |
if (mlink->dform != FORM_CAT || mlink->fform != FORM_CAT) { |
mparse_readfd(mp, fd, mlink->file); |
mparse_readfd(mp, fd, mlink->file); |
|
close(fd); |
mparse_result(mp, &man, &sodest); |
mparse_result(mp, &man, &sodest); |
} |
} |
|
|
Line 1244 mpages_merge(struct mparse *mp) |
|
Line 1278 mpages_merge(struct mparse *mp) |
|
nextpage: |
nextpage: |
ohash_delete(&strings); |
ohash_delete(&strings); |
ohash_delete(&names); |
ohash_delete(&names); |
mpage = ohash_next(&mpages, &pslot); |
|
} |
} |
|
|
if (0 == nodb) |
if (0 == nodb) |
Line 1291 parse_cat(struct mpage *mpage, int fd) |
|
Line 1324 parse_cat(struct mpage *mpage, int fd) |
|
{ |
{ |
FILE *stream; |
FILE *stream; |
char *line, *p, *title; |
char *line, *p, *title; |
size_t len, plen, titlesz; |
size_t linesz, plen, titlesz; |
|
ssize_t len; |
|
int offs; |
|
|
stream = (-1 == fd) ? |
stream = (-1 == fd) ? |
fopen(mpage->mlinks->file, "r") : |
fopen(mpage->mlinks->file, "r") : |
Line 1304 parse_cat(struct mpage *mpage, int fd) |
|
Line 1339 parse_cat(struct mpage *mpage, int fd) |
|
return; |
return; |
} |
} |
|
|
|
line = NULL; |
|
linesz = 0; |
|
|
/* Skip to first blank line. */ |
/* Skip to first blank line. */ |
|
|
while (NULL != (line = fgetln(stream, &len))) |
while (getline(&line, &linesz, stream) != -1) |
if ('\n' == *line) |
if (*line == '\n') |
break; |
break; |
|
|
/* |
/* |
Line 1315 parse_cat(struct mpage *mpage, int fd) |
|
Line 1353 parse_cat(struct mpage *mpage, int fd) |
|
* is the first section header. Skip to it. |
* is the first section header. Skip to it. |
*/ |
*/ |
|
|
while (NULL != (line = fgetln(stream, &len))) |
while (getline(&line, &linesz, stream) != -1) |
if ('\n' != *line && ' ' != *line) |
if (*line != '\n' && *line != ' ') |
break; |
break; |
|
|
/* |
/* |
Line 1329 parse_cat(struct mpage *mpage, int fd) |
|
Line 1367 parse_cat(struct mpage *mpage, int fd) |
|
titlesz = 0; |
titlesz = 0; |
title = NULL; |
title = NULL; |
|
|
while (NULL != (line = fgetln(stream, &len))) { |
while ((len = getline(&line, &linesz, stream)) != -1) { |
if (' ' != *line || '\n' != line[len - 1]) |
if (*line != ' ') |
break; |
break; |
while (len > 0 && isspace((unsigned char)*line)) { |
offs = 0; |
line++; |
while (isspace((unsigned char)line[offs])) |
len--; |
offs++; |
} |
if (line[offs] == '\0') |
if (1 == len) |
|
continue; |
continue; |
title = mandoc_realloc(title, titlesz + len); |
title = mandoc_realloc(title, titlesz + len - offs); |
memcpy(title + titlesz, line, len); |
memcpy(title + titlesz, line + offs, len - offs); |
titlesz += len; |
titlesz += len - offs; |
title[titlesz - 1] = ' '; |
title[titlesz - 1] = ' '; |
} |
} |
|
free(line); |
|
|
/* |
/* |
* If no page content can be found, or the input line |
* If no page content can be found, or the input line |
Line 1360 parse_cat(struct mpage *mpage, int fd) |
|
Line 1398 parse_cat(struct mpage *mpage, int fd) |
|
return; |
return; |
} |
} |
|
|
title = mandoc_realloc(title, titlesz + 1); |
title[titlesz - 1] = '\0'; |
title[titlesz] = '\0'; |
|
|
|
/* |
/* |
* Skip to the first dash. |
* Skip to the first dash. |
Line 1439 parse_man(struct mpage *mpage, const struct roff_meta |
|
Line 1476 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 1451 parse_man(struct mpage *mpage, const struct roff_meta |
|
Line 1488 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 1682 parse_mdoc_Fo(struct mpage *mpage, const struct roff_m |
|
Line 1718 parse_mdoc_Fo(struct mpage *mpage, const struct roff_m |
|
} |
} |
|
|
static int |
static int |
|
parse_mdoc_Va(struct mpage *mpage, const struct roff_meta *meta, |
|
const struct roff_node *n) |
|
{ |
|
char *cp; |
|
|
|
if (n->type != ROFFT_ELEM && n->type != ROFFT_BODY) |
|
return 0; |
|
|
|
if (n->child != NULL && |
|
n->child->next == NULL && |
|
n->child->type == ROFFT_TEXT) |
|
return 1; |
|
|
|
cp = NULL; |
|
deroff(&cp, n); |
|
if (cp != NULL) { |
|
putkey(mpage, cp, TYPE_Vt | (n->tok == MDOC_Va || |
|
n->type == ROFFT_BODY ? TYPE_Va : 0)); |
|
free(cp); |
|
} |
|
|
|
return 0; |
|
} |
|
|
|
static int |
parse_mdoc_Xr(struct mpage *mpage, const struct roff_meta *meta, |
parse_mdoc_Xr(struct mpage *mpage, const struct roff_meta *meta, |
const struct roff_node *n) |
const struct roff_node *n) |
{ |
{ |
Line 1727 parse_mdoc_Nm(struct mpage *mpage, const struct roff_m |
|
Line 1788 parse_mdoc_Nm(struct mpage *mpage, const struct roff_m |
|
if ( ! (mpage->name_head_done || |
if ( ! (mpage->name_head_done || |
n->child == NULL || n->child->string == NULL || |
n->child == NULL || n->child->string == NULL || |
strcasecmp(n->child->string, meta->title))) { |
strcasecmp(n->child->string, meta->title))) { |
putkey(mpage, n->child->string, ROFFT_HEAD); |
putkey(mpage, n->child->string, NAME_HEAD); |
mpage->name_head_done = 1; |
mpage->name_head_done = 1; |
} |
} |
return 0; |
return 0; |
Line 1749 parse_mdoc_head(struct mpage *mpage, const struct roff |
|
Line 1810 parse_mdoc_head(struct mpage *mpage, const struct roff |
|
return n->type == ROFFT_HEAD; |
return n->type == ROFFT_HEAD; |
} |
} |
|
|
static int |
|
parse_mdoc_body(struct mpage *mpage, const struct roff_meta *meta, |
|
const struct roff_node *n) |
|
{ |
|
|
|
return n->type == ROFFT_BODY; |
|
} |
|
|
|
/* |
/* |
* Add a string to the hash table for the current manual. |
* Add a string to the hash table for the current manual. |
* Each string has a bitmask telling which macros it belongs to. |
* Each string has a bitmask telling which macros it belongs to. |
Line 1783 putkeys(const struct mpage *mpage, char *cp, size_t sz |
|
Line 1836 putkeys(const struct mpage *mpage, char *cp, size_t sz |
|
name_mask &= ~NAME_FIRST; |
name_mask &= ~NAME_FIRST; |
if (debug > 1) |
if (debug > 1) |
say(mpage->mlinks->file, |
say(mpage->mlinks->file, |
"Adding name %*s, bits=%d", sz, cp, v); |
"Adding name %*s, bits=0x%llx", (int)sz, cp, v); |
} else { |
} else { |
htab = &strings; |
htab = &strings; |
if (debug > 1) |
if (debug > 1) |
Line 1791 putkeys(const struct mpage *mpage, char *cp, size_t sz |
|
Line 1844 putkeys(const struct mpage *mpage, char *cp, size_t sz |
|
if ((uint64_t)1 << i & v) |
if ((uint64_t)1 << i & v) |
say(mpage->mlinks->file, |
say(mpage->mlinks->file, |
"Adding key %s=%*s", |
"Adding key %s=%*s", |
mansearch_keynames[i], sz, cp); |
mansearch_keynames[i], (int)sz, cp); |
} |
} |
|
|
end = cp + sz; |
end = cp + sz; |