From 5134b2528e28222c6cfe6ab2b2977ea107397999 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 22 Feb 2009 19:23:48 +0000 Subject: Fixed `.Pf' handling. System now supports all mdocml manual pages. --- macro.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'macro.c') diff --git a/macro.c b/macro.c index ad96ad0e..71955470 100644 --- a/macro.c +++ b/macro.c @@ -1,4 +1,4 @@ -/* $Id: macro.c,v 1.49 2009/01/22 14:56:21 kristaps Exp $ */ +/* $Id: macro.c,v 1.50 2009/02/22 19:23:48 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -1086,7 +1086,8 @@ macro_constant_scoped(MACRO_PROT_ARGS) int macro_constant_delimited(MACRO_PROT_ARGS) { - int lastarg, flushed, j, c, maxargs, argc; + int lastarg, flushed, j, c, maxargs, argc, + igndelim; struct mdoc_arg argv[MDOC_LINEARG_MAX]; char *p; @@ -1098,8 +1099,6 @@ macro_constant_delimited(MACRO_PROT_ARGS) /* FALLTHROUGH */ case (MDOC_Ns): /* FALLTHROUGH */ - case (MDOC_Pf): - /* FALLTHROUGH */ case (MDOC_Ux): /* FALLTHROUGH */ case (MDOC_St): @@ -1110,6 +1109,15 @@ macro_constant_delimited(MACRO_PROT_ARGS) break; } + switch (tok) { + case (MDOC_Pf): + igndelim = 1; + break; + default: + igndelim = 0; + break; + } + for (argc = 0; argc < MDOC_LINEARG_MAX; argc++) { lastarg = *pos; c = mdoc_argv(mdoc, line, tok, &argv[argc], pos, buf); @@ -1167,7 +1175,7 @@ macro_constant_delimited(MACRO_PROT_ARGS) break; } - if ( ! flushed && mdoc_isdelim(p)) { + if ( ! flushed && mdoc_isdelim(p) && ! igndelim) { if ( ! rewind_elem(mdoc, tok)) return(0); flushed = 1; -- cgit v1.2.3