version 1.18, 2011/05/04 08:21:17 |
version 1.20, 2011/05/12 01:45:55 |
Line 228 main(int argc, char *argv[]) |
|
Line 228 main(int argc, char *argv[]) |
|
char *fn; /* current file being parsed */ |
char *fn; /* current file being parsed */ |
const char *msec, /* manual section */ |
const char *msec, /* manual section */ |
*mtitle, /* manual title */ |
*mtitle, /* manual title */ |
|
*arch, /* manual architecture */ |
*dir; /* result dir (default: cwd) */ |
*dir; /* result dir (default: cwd) */ |
char ibuf[MAXPATHLEN], /* index fname */ |
char ibuf[MAXPATHLEN], /* index fname */ |
ibbuf[MAXPATHLEN], /* index backup fname */ |
ibbuf[MAXPATHLEN], /* index backup fname */ |
Line 364 main(int argc, char *argv[]) |
|
Line 365 main(int argc, char *argv[]) |
|
mtitle = NULL != mdoc ? |
mtitle = NULL != mdoc ? |
mdoc_meta(mdoc)->title : |
mdoc_meta(mdoc)->title : |
man_meta(man)->title; |
man_meta(man)->title; |
|
arch = NULL != mdoc ? mdoc_meta(mdoc)->arch : NULL; |
|
|
assert(msec); |
assert(msec); |
assert(mtitle); |
assert(mtitle); |
Line 380 main(int argc, char *argv[]) |
|
Line 382 main(int argc, char *argv[]) |
|
dbt_appendb(&rval, &rsz, fn, strlen(fn) + 1); |
dbt_appendb(&rval, &rsz, fn, strlen(fn) + 1); |
dbt_appendb(&rval, &rsz, msec, strlen(msec) + 1); |
dbt_appendb(&rval, &rsz, msec, strlen(msec) + 1); |
dbt_appendb(&rval, &rsz, mtitle, strlen(mtitle) + 1); |
dbt_appendb(&rval, &rsz, mtitle, strlen(mtitle) + 1); |
|
dbt_appendb(&rval, &rsz, arch ? arch : "", |
|
arch ? strlen(arch) + 1 : 1); |
|
|
sv = rval.size; |
sv = rval.size; |
|
|
/* Fix the record number in the btree value. */ |
/* Fix the record number in the btree value. */ |
Line 866 pman_node(MAN_ARGS) |
|
Line 871 pman_node(MAN_ARGS) |
|
/* |
/* |
* Go through a special heuristic dance here. |
* Go through a special heuristic dance here. |
* This is why -man manuals are great! |
* This is why -man manuals are great! |
|
* (I'm being sarcastic: my eyes are bleeding.) |
* Conventionally, one or more manual names are |
* Conventionally, one or more manual names are |
* comma-specified prior to a whitespace, then a |
* comma-specified prior to a whitespace, then a |
* dash, then a description. Try to puzzle out |
* dash, then a description. Try to puzzle out |
Line 903 pman_node(MAN_ARGS) |
|
Line 909 pman_node(MAN_ARGS) |
|
while (' ' == *start) |
while (' ' == *start) |
start++; |
start++; |
|
|
if ('\\' == *start && '-' == *(start + 1)) |
if (0 == strncmp(start, "-", 1)) |
|
start += 1; |
|
else if (0 == strncmp(start, "\\-", 2)) |
start += 2; |
start += 2; |
else if ('-' == *start) |
else if (0 == strncmp(start, "\\(en", 4)) |
start++; |
start += 4; |
|
else if (0 == strncmp(start, "\\(em", 4)) |
|
start += 4; |
|
|
while (' ' == *start) |
while (' ' == *start) |
start++; |
start++; |