tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: sync results
Date: Thu, 7 Jul 2011 06:13:24 +0200	[thread overview]
Message-ID: <20110707041324.GD15627@iris.usta.de> (raw)
In-Reply-To: <4E131A74.3050900@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Tue, Jul 05, 2011 at 04:06:44PM +0200:
> Kristaps wrote:
>> Ingo wrote:

>>> nsd-xfer(8) contains this code:
>>>
>>> .SH "OPTIONS"
>>> .LP
>>> .TP
>>> .B \-4
>>> Only send to IPv4 addresses.
>>>
>>> In groff and old mandoc, there is no blank line after OPTIONS,
>>> now there is one.

>> Ouch, this is indeed a bug: the syntax tree appears to be messed up by
>> the removal of the `LP'. I'll look into it...

> Please check if the enclosed patch fixes this problem

Yes, it does.

> without fallout.

I don't see any new regressions.

> Basically, the "next node append type" for -man was
> automatically being set to NEXT, clobbering the value set during
> node deletion in the post-validator.  This was causing the `LP' to
> be removed and the next node, the `TP', being assigned under the
> block of `SH'.  Ew.  I eye-balled it over a selection of -man and
> ran it over my regular tests for failure.  This is quite an old bug,
> it turns out.

Somehow, it must have been uncovered by recent changes elsewhere,
or it wouldn't have shown up as an regression.  Anyway,
investigating the details why it remained hidden looks like
a waste of time.

So, ok schwarze@ and committed to OpenBSD.

Thanks,
  Ingo


> Index: man_macro.c
> ===================================================================
> RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_macro.c,v
> retrieving revision 1.63
> diff -u -r1.63 man_macro.c
> --- man_macro.c	18 Jun 2011 17:36:52 -0000	1.63
> +++ man_macro.c	5 Jul 2011 14:01:28 -0000
> @@ -120,6 +120,9 @@
>  
>  	assert(to);
>  
> +	assert(MAN_ROOT != m->last->type);
> +	m->next = MAN_NEXT_SIBLING;
> +
>  	/* LINTED */
>  	while (m->last != to) {
>  		/*
> @@ -140,9 +143,6 @@
>  	if ( ! man_valid_post(m))
>  		return(0);
>  
> -	m->next = MAN_ROOT == m->last->type ? 
> -		MAN_NEXT_CHILD : MAN_NEXT_SIBLING;
> -
>  	return(1);
>  }
>  
> @@ -428,6 +428,9 @@
>  		assert( ! (MAN_SCOPED & man_macros[tok].flags));
>  		m->flags |= MAN_ILINE;
>  	}
> +
> +	assert(MAN_ROOT != m->last->type);
> +	m->next = MAN_NEXT_SIBLING;
>  	
>  	/*
>  	 * Rewind our element scope.  Note that when TH is pruned, we'll
> @@ -452,9 +455,6 @@
>  
>  	if (m->last->type != MAN_ROOT && ! man_valid_post(m))
>  		return(0);
> -
> -	m->next = MAN_ROOT == m->last->type ?
> -		MAN_NEXT_CHILD : MAN_NEXT_SIBLING;
>  
>  	return(1);
>  }
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-07-07  4:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 22:45 Ingo Schwarze
2011-07-05 12:43 ` Kristaps Dzonsons
2011-07-05 14:06   ` Kristaps Dzonsons
2011-07-07  4:13     ` Ingo Schwarze [this message]
2011-07-06  6:03   ` Ingo Schwarze
2011-07-07 10:27     ` Kristaps Dzonsons
2011-07-07 21:11       ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110707041324.GD15627@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).