version 1.154, 2010/07/01 22:56:17 |
version 1.156, 2010/07/02 12:54:33 |
Line 514 mdoc_word_alloc(struct mdoc *m, int line, int pos, con |
|
Line 514 mdoc_word_alloc(struct mdoc *m, int line, int pos, con |
|
} |
} |
|
|
|
|
/* FIXME: put in mdoc_node_delete(). */ |
static void |
void |
|
mdoc_node_free(struct mdoc_node *p) |
mdoc_node_free(struct mdoc_node *p) |
{ |
{ |
|
|
|
/* |
|
* XXX: if these end up being problematic in terms of memory |
|
* management and dereferencing freed blocks, then make them |
|
* into reference-counted double-pointers. |
|
*/ |
|
|
if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type) |
if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type) |
if (p->data.Bd) |
if (p->data.Bd) |
free(p->data.Bd); |
free(p->data.Bd); |
if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type) |
if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type) |
if (p->data.Bl) |
if (p->data.Bl) |
free(p->data.Bl); |
free(p->data.Bl); |
|
if (MDOC_Bf == p->tok && MDOC_HEAD == p->type) |
|
if (p->data.Bf) |
|
free(p->data.Bf); |
|
|
if (p->string) |
if (p->string) |
free(p->string); |
free(p->string); |
Line 739 macrowarn(struct mdoc *m, int ln, const char *buf, int |
|
Line 747 macrowarn(struct mdoc *m, int ln, const char *buf, int |
|
* Parse a macro line, that is, a line beginning with the control |
* Parse a macro line, that is, a line beginning with the control |
* character. |
* character. |
*/ |
*/ |
int |
static int |
mdoc_pmacro(struct mdoc *m, int ln, char *buf, int offs) |
mdoc_pmacro(struct mdoc *m, int ln, char *buf, int offs) |
{ |
{ |
enum mdoct tok; |
enum mdoct tok; |