summaryrefslogtreecommitdiffstatshomepage
path: root/macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-22 19:23:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-22 19:23:48 +0000
commit5134b2528e28222c6cfe6ab2b2977ea107397999 (patch)
tree7f5e62c6008e07831f58913277362fefe3f76add /macro.c
parent9d6cd65d9c0228344fd1848a9f8c9343f5434599 (diff)
downloadmandoc-5134b2528e28222c6cfe6ab2b2977ea107397999.tar.gz
mandoc-5134b2528e28222c6cfe6ab2b2977ea107397999.tar.zst
mandoc-5134b2528e28222c6cfe6ab2b2977ea107397999.zip
Fixed `.Pf' handling.
System now supports all mdocml manual pages.
Diffstat (limited to 'macro.c')
-rw-r--r--macro.c18
1 files changed, 13 insertions, 5 deletions
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 <kristaps@kth.se>
*
@@ -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;