=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.35 retrieving revision 1.39 diff -u -p -r1.35 -r1.39 --- mandoc/mdoc_macro.c 2009/09/16 20:49:06 1.35 +++ mandoc/mdoc_macro.c 2010/01/01 13:17:58 1.39 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.35 2009/09/16 20:49:06 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.39 2010/01/01 13:17:58 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -19,6 +19,7 @@ #include #include #include +#include #include "libmdoc.h" @@ -174,6 +175,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { in_line_eoln, 0 }, /* %Q */ { in_line_eoln, 0 }, /* br */ { in_line_eoln, 0 }, /* sp */ + { in_line_eoln, 0 }, /* %U */ }; const struct mdoc_macro * const mdoc_macros = __mdoc_macros; @@ -260,6 +262,7 @@ mdoc_macroend(struct mdoc *m) static int lookup(int from, const char *p) { + /* FIXME: make -diag lists be un-PARSED. */ if ( ! (MDOC_PARSED & mdoc_macros[from].flags)) return(MDOC_MAX); @@ -805,6 +808,17 @@ in_line(MACRO_PROT_ARGS) cnt++; if ( ! mdoc_word_alloc(m, line, la, p)) return(0); + + /* + * `Fl' macros have their scope re-opened with each new + * word so that the `-' can be added to each one without + * having to parse out spaces. + */ + if (0 == lastpunct && MDOC_Fl == tok) { + if ( ! rew_elem(m, tok)) + return(0); + lastpunct = 1; + } } if (0 == lastpunct && ! rew_elem(m, tok))