=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.31 retrieving revision 1.33 diff -u -p -r1.31 -r1.33 --- mandoc/mdoc.c 2009/01/15 17:38:57 1.31 +++ mandoc/mdoc.c 2009/01/16 15:58:50 1.33 @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.31 2009/01/15 17:38:57 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.33 2009/01/16 15:58:50 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -99,7 +99,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { macro_scoped_close, MDOC_EXPLICIT }, /* El */ { macro_scoped, MDOC_PARSED | MDOC_TABSEP}, /* It */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Ad */ - { macro_constant, MDOC_PARSED }, /* An */ + { macro_text, MDOC_PARSED }, /* An */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Ar */ { macro_constant, MDOC_QUOTABLE }, /* Cd */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Cm */ @@ -111,7 +111,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { macro_constant, 0 }, /* Fd */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Fl */ { macro_text, MDOC_CALLABLE | MDOC_QUOTABLE | MDOC_PARSED }, /* Fn */ - { macro_text, MDOC_PARSED }, /* Ft */ + { macro_text, MDOC_PARSED | MDOC_QUOTABLE }, /* Ft */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Ic */ { macro_constant, 0 }, /* In */ { macro_text, MDOC_CALLABLE | MDOC_PARSED }, /* Li */ @@ -162,7 +162,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { macro_constant_delimited, MDOC_PARSED }, /* Nx */ { macro_constant_delimited, MDOC_PARSED }, /* Ox */ { macro_scoped_close, MDOC_EXPLICIT | MDOC_CALLABLE | MDOC_PARSED }, /* Pc */ - { macro_constant, MDOC_PARSED }, /* Pf */ + { macro_constant_delimited, MDOC_PARSED }, /* Pf */ { macro_constant_scoped, MDOC_CALLABLE | MDOC_PARSED | MDOC_EXPLICIT }, /* Po */ { macro_scoped_line, MDOC_CALLABLE | MDOC_PARSED }, /* Pq */ { macro_scoped_close, MDOC_EXPLICIT | MDOC_CALLABLE | MDOC_PARSED }, /* Qc */ @@ -241,7 +241,8 @@ mdoc_alloc(void *data, const struct mdoc_cb *cb) p = xcalloc(1, sizeof(struct mdoc)); p->data = data; - (void)memcpy(&p->cb, cb, sizeof(struct mdoc_cb)); + if (cb) + (void)memcpy(&p->cb, cb, sizeof(struct mdoc_cb)); p->last = xcalloc(1, sizeof(struct mdoc_node)); p->last->type = MDOC_ROOT;