* Re: mdocml: Version up to 1.11.1: here we go!
[not found] <201104042107.p34L7KUB020149@krisdoz.my.domain>
@ 2011-04-24 17:20 ` Ingo Schwarze
2011-04-24 21:44 ` Kristaps Dzonsons
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Schwarze @ 2011-04-24 17:20 UTC (permalink / raw)
To: tech
Hi Kristaps,
i have just merged 1.11.1 to OpenBSD.
Some improvements to the manuals are not yet merged.
Some minor post-1.11.1 changes are already contained in the commit.
The following three major post-1.11.1 changes are not yet merged:
- the mandoc_escape reorg
- the first steps to use mandoc_getarg for mdoc(7)
- the mdoc(7) delimiter cleanup
While merging, i ran into two regressions.
Luckily, it turned out they are not too hard to fix,
see the patch below.
I'd like to commit the roff.c patch quickly to bsd.lv as well;
you can see the effect e.g. in sudoers(5) and many other pod2man
pages. OK?
I'm not completely happy with the mdoc_macro.c patch, it feels hacky.
However, i failed to find a cleaner way to fix this quickly, and
unless you can come up with a better fix, we should probably use it
for now. You can see the issues in ksh(1) and in the OpenBSD
regression tests for Pf and No.
Yours,
Ingo
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.136
diff -u -p -r1.136 roff.c
--- roff.c 19 Apr 2011 16:38:48 -0000 1.136
+++ roff.c 24 Apr 2011 17:00:29 -0000
@@ -829,8 +829,7 @@ roff_block_sub(ROFF_ARGS)
* pulling it out of the hashtable.
*/
- if (ROFF_MAX == (t = roff_parse(r, *bufp, &pos)))
- return(ROFF_IGN);
+ t = roff_parse(r, *bufp, &pos);
/*
* Macros other than block-end are only significant
Index: mdoc_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v
retrieving revision 1.107
diff -u -p -r1.107 mdoc_macro.c
--- mdoc_macro.c 19 Apr 2011 16:38:48 -0000 1.107
+++ mdoc_macro.c 24 Apr 2011 17:00:28 -0000
@@ -600,7 +600,8 @@ dword(struct mdoc *m, int line,
if (DELIM_OPEN == d)
m->last->flags |= MDOC_DELIMO;
- else if (DELIM_CLOSE == d)
+ else if (DELIM_CLOSE == d && m->last->prev &&
+ m->last->prev->tok != MDOC_No)
m->last->flags |= MDOC_DELIMC;
return(1);
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mdocml: Version up to 1.11.1: here we go!
2011-04-24 17:20 ` mdocml: Version up to 1.11.1: here we go! Ingo Schwarze
@ 2011-04-24 21:44 ` Kristaps Dzonsons
0 siblings, 0 replies; 2+ messages in thread
From: Kristaps Dzonsons @ 2011-04-24 21:44 UTC (permalink / raw)
To: tech; +Cc: Ingo Schwarze
> i have just merged 1.11.1 to OpenBSD.
>
> Some improvements to the manuals are not yet merged.
>
> Some minor post-1.11.1 changes are already contained in the commit.
>
> The following three major post-1.11.1 changes are not yet merged:
> - the mandoc_escape reorg
> - the first steps to use mandoc_getarg for mdoc(7)
> - the mdoc(7) delimiter cleanup
>
> While merging, i ran into two regressions.
> Luckily, it turned out they are not too hard to fix,
> see the patch below.
>
> I'd like to commit the roff.c patch quickly to bsd.lv as well;
> you can see the effect e.g. in sudoers(5) and many other pod2man
> pages. OK?
>
> I'm not completely happy with the mdoc_macro.c patch, it feels hacky.
> However, i failed to find a cleaner way to fix this quickly, and
> unless you can come up with a better fix, we should probably use it
> for now. You can see the issues in ksh(1) and in the OpenBSD
> regression tests for Pf and No.
Excellent work! I'm fine with the check-in below, although please add
some in-line comments about the `No' part for the sake of my old
brain... (Even to the extent that it's hacky is fine for a start.)
>
> Yours,
> Ingo
>
>
> Index: roff.c
> ===================================================================
> RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
> retrieving revision 1.136
> diff -u -p -r1.136 roff.c
> --- roff.c 19 Apr 2011 16:38:48 -0000 1.136
> +++ roff.c 24 Apr 2011 17:00:29 -0000
> @@ -829,8 +829,7 @@ roff_block_sub(ROFF_ARGS)
> * pulling it out of the hashtable.
> */
>
> - if (ROFF_MAX == (t = roff_parse(r, *bufp,&pos)))
> - return(ROFF_IGN);
> + t = roff_parse(r, *bufp,&pos);
>
> /*
> * Macros other than block-end are only significant
> Index: mdoc_macro.c
> ===================================================================
> RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v
> retrieving revision 1.107
> diff -u -p -r1.107 mdoc_macro.c
> --- mdoc_macro.c 19 Apr 2011 16:38:48 -0000 1.107
> +++ mdoc_macro.c 24 Apr 2011 17:00:28 -0000
> @@ -600,7 +600,8 @@ dword(struct mdoc *m, int line,
>
> if (DELIM_OPEN == d)
> m->last->flags |= MDOC_DELIMO;
> - else if (DELIM_CLOSE == d)
> + else if (DELIM_CLOSE == d&& m->last->prev&&
> + m->last->prev->tok != MDOC_No)
> m->last->flags |= MDOC_DELIMC;
>
> return(1);
> --
> To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
>
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-24 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201104042107.p34L7KUB020149@krisdoz.my.domain>
2011-04-24 17:20 ` mdocml: Version up to 1.11.1: here we go! Ingo Schwarze
2011-04-24 21:44 ` Kristaps Dzonsons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).