version 1.137, 2010/05/24 13:39:47 |
version 1.140, 2010/05/30 11:00:53 |
Line 276 mdoc_macro(struct mdoc *m, enum mdoct tok, |
|
Line 276 mdoc_macro(struct mdoc *m, enum mdoct tok, |
|
if ( ! mdoc_pmsg(m, ln, pp, MANDOCERR_BADPROLOG)) |
if ( ! mdoc_pmsg(m, ln, pp, MANDOCERR_BADPROLOG)) |
return(0); |
return(0); |
if (NULL == m->meta.title) |
if (NULL == m->meta.title) |
m->meta.title = mandoc_strdup("unknown"); |
m->meta.title = mandoc_strdup("UNKNOWN"); |
if (NULL == m->meta.vol) |
if (NULL == m->meta.vol) |
m->meta.vol = mandoc_strdup("local"); |
m->meta.vol = mandoc_strdup("LOCAL"); |
if (NULL == m->meta.os) |
if (NULL == m->meta.os) |
m->meta.os = mandoc_strdup("local"); |
m->meta.os = mandoc_strdup("LOCAL"); |
if (0 == m->meta.date) |
if (0 == m->meta.date) |
m->meta.date = time(NULL); |
m->meta.date = time(NULL); |
m->flags |= MDOC_PBODY; |
m->flags |= MDOC_PBODY; |
Line 560 mdoc_ptext(struct mdoc *m, int line, char *buf, int of |
|
Line 560 mdoc_ptext(struct mdoc *m, int line, char *buf, int of |
|
* Search for the beginning of unescaped trailing whitespace (ws) |
* Search for the beginning of unescaped trailing whitespace (ws) |
* and for the first character not to be output (end). |
* and for the first character not to be output (end). |
*/ |
*/ |
|
|
|
/* FIXME: replace with strcspn(). */ |
ws = NULL; |
ws = NULL; |
for (c = end = buf + offs; *c; c++) { |
for (c = end = buf + offs; *c; c++) { |
switch (*c) { |
switch (*c) { |
|
case '-': |
|
if (mandoc_hyph(buf + offs, c)) |
|
*c = ASCII_HYPH; |
|
break; |
case ' ': |
case ' ': |
if (NULL == ws) |
if (NULL == ws) |
ws = c; |
ws = c; |