version 1.29, 2009/08/13 11:45:29 |
version 1.30, 2009/08/19 09:14:50 |
Line 40 const char *const __man_merrnames[WERRMAX] = { |
|
Line 40 const char *const __man_merrnames[WERRMAX] = { |
|
"expected empty block head", /* WNHEADARGS */ |
"expected empty block head", /* WNHEADARGS */ |
"unknown macro", /* WMACRO */ |
"unknown macro", /* WMACRO */ |
"ill-formed macro", /* WMACROFORM */ |
"ill-formed macro", /* WMACROFORM */ |
"scope open on exit" /* WEXITSCOPE */ |
"scope open on exit", /* WEXITSCOPE */ |
|
"no scope context" /* WNOSCOPE */ |
}; |
}; |
|
|
const char *const __man_macronames[MAN_MAX] = { |
const char *const __man_macronames[MAN_MAX] = { |
Line 50 const char *const __man_macronames[MAN_MAX] = { |
|
Line 51 const char *const __man_macronames[MAN_MAX] = { |
|
"BI", "IB", "BR", "RB", |
"BI", "IB", "BR", "RB", |
"R", "B", "I", "IR", |
"R", "B", "I", "IR", |
"RI", "na", "i", "sp", |
"RI", "na", "i", "sp", |
"nf", "fi", "r" |
"nf", "fi", "r", "RE", |
|
"RS" |
}; |
}; |
|
|
const char * const *man_macronames = __man_macronames; |
const char * const *man_macronames = __man_macronames; |
Line 257 man_node_alloc(int line, int pos, enum man_type type, |
|
Line 259 man_node_alloc(int line, int pos, enum man_type type, |
|
|
|
|
|
int |
int |
man_elem_alloc(struct man *man, int line, int pos, int tok) |
man_elem_alloc(struct man *m, int line, int pos, int tok) |
{ |
{ |
struct man_node *p; |
struct man_node *p; |
|
|
p = man_node_alloc(line, pos, MAN_ELEM, tok); |
p = man_node_alloc(line, pos, MAN_ELEM, tok); |
if (NULL == p) |
if (NULL == p) |
return(0); |
return(0); |
return(man_node_append(man, p)); |
if ( ! man_node_append(m, p)) |
|
return(0); |
|
m->next = MAN_NEXT_CHILD; |
|
return(1); |
} |
} |
|
|
|
|
Line 314 man_block_alloc(struct man *m, int line, int pos, int |
|
Line 319 man_block_alloc(struct man *m, int line, int pos, int |
|
|
|
|
|
int |
int |
man_word_alloc(struct man *man, |
man_word_alloc(struct man *m, int line, int pos, const char *word) |
int line, int pos, const char *word) |
|
{ |
{ |
struct man_node *p; |
struct man_node *p; |
|
|
Line 324 man_word_alloc(struct man *man, |
|
Line 328 man_word_alloc(struct man *man, |
|
return(0); |
return(0); |
if (NULL == (p->string = strdup(word))) |
if (NULL == (p->string = strdup(word))) |
return(0); |
return(0); |
return(man_node_append(man, p)); |
if ( ! man_node_append(m, p)) |
|
return(0); |
|
m->next = MAN_NEXT_SIBLING; |
|
return(1); |
} |
} |
|
|
|
|
Line 359 man_ptext(struct man *m, int line, char *buf) |
|
Line 366 man_ptext(struct man *m, int line, char *buf) |
|
{ |
{ |
|
|
/* First allocate word. */ |
/* First allocate word. */ |
|
|
|
/* FIXME: dechunk words! */ |
|
|
if ( ! man_word_alloc(m, line, 0, buf)) |
if ( ! man_word_alloc(m, line, 0, buf)) |
return(0); |
return(0); |