version 1.42, 2015/02/14 10:35:02 |
version 1.43, 2015/02/14 11:12:48 |
|
|
ordinary(struct state *st, const char *buf, size_t start, size_t end) |
ordinary(struct state *st, const char *buf, size_t start, size_t end) |
{ |
{ |
size_t i, j, opstack; |
size_t i, j, opstack; |
|
enum mdoc_type mtype; |
int seq; |
int seq; |
|
|
if ( ! st->parsing || st->paused) |
if ( ! st->parsing || st->paused) |
Line 1405 ordinary(struct state *st, const char *buf, size_t sta |
|
Line 1406 ordinary(struct state *st, const char *buf, size_t sta |
|
|
|
/* Detect function names. */ |
/* Detect function names. */ |
|
|
|
mtype = MDOC_Fa; |
if (st->outbuflen > 2 && |
if (st->outbuflen > 2 && |
')' == st->outbuf[st->outbuflen - 1] && |
')' == st->outbuf[st->outbuflen - 1] && |
'(' == st->outbuf[st->outbuflen - 2] && |
'(' == st->outbuf[st->outbuflen - 2]) { |
dict_get(st->outbuf, st->outbuflen - 2) == |
mtype = dict_get(st->outbuf, |
MDOC_Fo) { |
st->outbuflen - 2); |
st->outbuflen -= 2; |
if (MDOC_Fo == mtype || MDOC_MAX == mtype) { |
st->outbuf[st->outbuflen] = '\0'; |
st->outbuflen -= 2; |
mdoc_newln(st); |
st->outbuf[st->outbuflen] = '\0'; |
fputs(".Fn ", stdout); |
mdoc_newln(st); |
st->oust = OUST_MAC; |
if (MDOC_Fo == mtype) |
|
fputs(".Fn ", stdout); |
|
else |
|
fputs(".Xr ", stdout); |
|
st->oust = OUST_MAC; |
|
} |
} |
} |
|
|
/* |
/* |
Line 1434 ordinary(struct state *st, const char *buf, size_t sta |
|
Line 1441 ordinary(struct state *st, const char *buf, size_t sta |
|
'!' == buf[start - 2] || |
'!' == buf[start - 2] || |
'?' == buf[start - 2]) && |
'?' == buf[start - 2]) && |
islower((unsigned char)buf[start - 3]) && |
islower((unsigned char)buf[start - 3]) && |
islower((unsigned char)buf[start - 4]))) |
islower((unsigned char)buf[start - 4]))) { |
|
if (MDOC_MAX == mtype) |
|
fputs(" 3", stdout); |
mdoc_newln(st); |
mdoc_newln(st); |
|
} |
|
|
/* Advance to the next word. */ |
/* Advance to the next word. */ |
|
|