tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: Improved handling of literals in -man.
Date: Fri, 8 Jul 2011 20:23:25 +0200	[thread overview]
Message-ID: <20110708182325.GB28744@iris.usta.de> (raw)
In-Reply-To: <4E1701C4.5070007@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Fri, Jul 08, 2011 at 03:10:28PM +0200:

> Enclosed is a patch that considerably simplifies and improves the
> handling of literals in -man.

Err, no.
It considerably breaks literal handling and removes functionality.

Here is a (possibly partial) list of what breaks:

  /usr/src/regress/usr.bin/mandoc/man/nf/indent
    - Long lines now wrap even in literal mode.

  /usr/src/regress/usr.bin/mandoc/man/nf/indent
  /usr/src/regress/usr.bin/mandoc/man/nf/args
  /usr/src/regress/usr.bin/mandoc/man/IP/literal
  /usr/src/regress/usr.bin/mandoc/man/TP/literal
    - Regular text right after .fi ends up one the same line
      as the last line of the text in the literal block.

  c2ph(1):
    - Lines containing nothing but "\&" get lost.

Actually, there is also one thing this seems to fix:

  .ft B
  .nf
  some text
  .fi
  .ft P

That's supposed to produce bold literal text, which currently mandoc
does not do.  See cvs(1) for an example, search for "1 month ago".

At the end of the day, this patch causes so much noise that i'm
giving up on doing a full regression report.  I don't really feel
like reading through a 150 thousand line diff right now.  :-o

Yours,
  Ingo


P.S.
Here you are testing the same condition twice:

> +		if ( ! (MANT_LITERAL & mt->fl)) {
> +			if (' ' == *n->string && MAN_LINE & n->flags)
> +				term_newln(p);
> +		} else if (MANT_LITERAL & mt->fl)
> +			if (n->prev && n->prev->line != n->line)
> +				term_newln(p);

Looks like:  if (!foo) ...; else if (foo) ...
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-07-08 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 13:10 Kristaps Dzonsons
2011-07-08 18:23 ` Ingo Schwarze [this message]
2011-07-09 10:10   ` Kristaps Dzonsons

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=20110708182325.GB28744@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).